]> www.infradead.org Git - users/sagi/nvme-cli.git/commit
sed: add '--read-only' to 'sed initialize'
authorHannes Reinecke <hare@suse.de>
Fri, 15 Nov 2024 07:25:34 +0000 (08:25 +0100)
committerDaniel Wagner <wagi@monom.org>
Mon, 16 Dec 2024 08:19:27 +0000 (09:19 +0100)
commit73fe6ad745b9513b6f774f58f71b55b51cc551de
treec3aeaa75a36d18aa5846e920899e8c0f5548a98f
parentecd7d9918f0206dacb992cdc3691285d35b13998
sed: add '--read-only' to 'sed initialize'

By default 'sed initialize' will set the entire disk to read/write
locked, ie no access is possible. That is all fine if the BIOS supports
TCG Opal, as then the BIOS can unlock the drive before access.
But for BIOS _not_ supporting TCG Opal this results in an inaccessible
drive, and requires the user to use a different drive to boot and
unlock the SED device.
This patch adds a flag '--read-only' to 'nvme sed initlialize' such
that the 'read-lock enable' flag is not set for the locking range,
and the device continues to be readable by the BIOS for booting.

Signed-off-by: Hannes Reinecke <hare@suse.de>
plugins/sed/sed.c
plugins/sed/sedopal_cmd.c
plugins/sed/sedopal_cmd.h