Page MenuHomeFreeBSD

D61406.1794448515.diff
No OneTemporary

Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None

D61406.1794448515.diff

diff --git a/sbin/nvmecontrol/format.c b/sbin/nvmecontrol/format.c
--- a/sbin/nvmecontrol/format.c
+++ b/sbin/nvmecontrol/format.c
@@ -204,6 +204,16 @@
"Only one of -E, -C or --ses may be specified\n");
arg_help(argc, argv, f);
}
+ if (opt.ms != NONE && opt.ms > 1)
+ errx(EX_USAGE, "metadata setting must be 0 or 1");
+ if (opt.pi != NONE && opt.pi > 3)
+ errx(EX_USAGE,
+ "protection information type must be between 0 and 3");
+ if (opt.pil != NONE && opt.pil > 1)
+ errx(EX_USAGE,
+ "protection information location must be 0 or 1");
+ if (opt.ses > SES_CRYPTO)
+ errx(EX_USAGE, "secure erase setting must be between 0 and 2");
target = opt.dev;
lbaf = opt.lbaf;
diff --git a/sbin/nvmecontrol/nvmecontrol.8 b/sbin/nvmecontrol/nvmecontrol.8
--- a/sbin/nvmecontrol/nvmecontrol.8
+++ b/sbin/nvmecontrol/nvmecontrol.8
@@ -33,7 +33,7 @@
.\"
.\" Author: Jim Harris <jimharris@FreeBSD.org>
.\"
-.Dd September 21, 2026
+.Dd November 10, 2026
.Dt NVMECONTROL 8
.Os
.Sh NAME
@@ -573,6 +573,24 @@
Enables Cryptographic Erase during format.
All user data is erased cryptographically by deleting the encryption key,
rendering it unintelligible.
+.It Fl Fl ses Ar ses
+Secure Erase Settings.
+.Bl -tag -compact -width 6n
+.It Dv 0
+Do not perform a secure erase.
+.It Dv 1
+User Data Erase, as with
+.Fl E .
+.It Dv 2
+Cryptographic Erase, as with
+.Fl C .
+.El
+Only one of
+.Fl E ,
+.Fl C ,
+or
+.Fl Fl ses
+may be specified.
.El
.Pp
When formatting specific namespace, existing values are used as defaults.

File Metadata

Mime Type
text/plain
Expires
Thu, Nov 12, 1:55 AM (8 h, 55 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
41665636
Default Alt Text
D61406.1794448515.diff (1 KB)

Event Timeline