From e162294e63df2a1ddeb179532a4015856ab5e69c Mon Sep 17 00:00:00 2001 From: David Sterba Date: Thu, 30 Jan 2025 12:17:05 +0100 Subject: [PATCH] btrfs-progs: device add: update --nodiscard spec to take no argument By mistake in the original commit 992fd231807d12 ("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 --- cmds/device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmds/device.c b/cmds/device.c index 65b5fc2c4..3e45a7209 100644 --- a/cmds/device.c +++ b/cmds/device.c @@ -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}