btrfs-progs: device add: update --nodiscard spec to take no argument

By mistake in the original commit 992fd23180 ("btrfs-progs: add
nodiscard option to device add") the --nodiscard could take an optional
parameter but this was not intended. This is also not documented so
there's little chance somebody would actually use it like that.

Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
David Sterba 2025-01-30 12:17:05 +01:00
parent b6bfaa72f3
commit 9794c739ca

View File

@ -73,7 +73,7 @@ static int cmd_device_add(const struct cmd_struct *cmd,
int c;
enum { GETOPT_VAL_ENQUEUE = GETOPT_VAL_FIRST };
static const struct option long_options[] = {
{ "nodiscard", optional_argument, NULL, 'K'},
{ "nodiscard", no_argument, NULL, 'K' },
{ "force", no_argument, NULL, 'f'},
{ "enqueue", no_argument, NULL, GETOPT_VAL_ENQUEUE},
{ NULL, 0, NULL, 0}