]> www.infradead.org Git - users/sagi/nvme-cli.git/commit
nvme: Fix --force flag inversion
authorDaniel Wagner <dwagner@suse.de>
Tue, 8 Feb 2022 11:13:34 +0000 (12:13 +0100)
committerDaniel Wagner <dwagner@suse.de>
Tue, 8 Feb 2022 11:13:34 +0000 (12:13 +0100)
commit142bfc867110de7a93e3caddd9a89f8958115df7
treef29a81452e36a87ac96a2b2810195c226ab73714
parenta18f2bc18efe7a68d488b1e1db0ab1175a9b4b26
nvme: Fix --force flag inversion

argparse sets the default_value member when the argument has been
provided by the user. But in parse_and_open we set O_EXCL when --force
is not used.

It also introduced a regression in the 'id-ns' where the --force flag
is used to determine which function is used to identify the
namespace (nvme_identify_allocated_ns() vs nvme_identify_ns()).

Fixes: 2100609 ("nvme: open namespace exclusive by default")
Signed-off-by: Daniel Wagner <dwagner@suse.de>
nvme.c