diff --git a/c_src/cmd_counters.c b/c_src/cmd_counters.c index 0609a78f..85d6688a 100644 --- a/c_src/cmd_counters.c +++ b/c_src/cmd_counters.c @@ -19,7 +19,7 @@ static void reset_counters_usage(void) int cmd_reset_counters(int argc, char *argv[]) { static const struct option longopts[] = { - { "help", 0, NULL, 'h' }, + { "help", no_argument, NULL, 'h' }, { NULL } }; int opt; diff --git a/c_src/cmd_data.c b/c_src/cmd_data.c index 520ec9c7..e5f7338e 100644 --- a/c_src/cmd_data.c +++ b/c_src/cmd_data.c @@ -28,7 +28,7 @@ static void data_rereplicate_usage(void) static int cmd_data_rereplicate(int argc, char *argv[]) { static const struct option longopts[] = { - { "help", 0, NULL, 'h' }, + { "help", no_argument, NULL, 'h' }, { NULL } }; int opt; diff --git a/c_src/cmd_device.c b/c_src/cmd_device.c index cabdf70c..39ad006d 100644 --- a/c_src/cmd_device.c +++ b/c_src/cmd_device.c @@ -151,10 +151,10 @@ static void device_remove_usage(void) static int cmd_device_remove(int argc, char *argv[]) { static const struct option longopts[] = { - { "by-id", 0, NULL, 'i' }, - { "force", 0, NULL, 'f' }, - { "force-metadata", 0, NULL, 'F' }, - { "help", 0, NULL, 'h' }, + { "by-id", no_argument, NULL, 'i' }, + { "force", no_argument, NULL, 'f' }, + { "force-metadata", no_argument, NULL, 'F' }, + { "help", no_argument, NULL, 'h' }, { NULL } }; struct bchfs_handle fs; @@ -217,7 +217,7 @@ static void device_online_usage(void) static int cmd_device_online(int argc, char *argv[]) { static const struct option longopts[] = { - { "help", 0, NULL, 'h' }, + { "help", no_argument, NULL, 'h' }, { NULL } }; int opt; @@ -258,8 +258,8 @@ static void device_offline_usage(void) static int cmd_device_offline(int argc, char *argv[]) { static const struct option longopts[] = { - { "force", 0, NULL, 'f' }, - { "help", 0, NULL, 'h' }, + { "force", no_argument, NULL, 'f' }, + { "help", no_argument, NULL, 'h' }, { NULL } }; int opt, flags = 0; @@ -476,7 +476,7 @@ static void device_resize_usage(void) static int cmd_device_resize(int argc, char *argv[]) { static const struct option longopts[] = { - { "help", 0, NULL, 'h' }, + { "help", no_argument, NULL, 'h' }, { NULL } }; u64 size; @@ -584,7 +584,7 @@ static void device_resize_journal_usage(void) static int cmd_device_resize_journal(int argc, char *argv[]) { static const struct option longopts[] = { - { "help", 0, NULL, 'h' }, + { "help", no_argument, NULL, 'h' }, { NULL } }; u64 size; diff --git a/c_src/cmd_super.c b/c_src/cmd_super.c index c3b39c97..dac6e29b 100644 --- a/c_src/cmd_super.c +++ b/c_src/cmd_super.c @@ -123,8 +123,8 @@ int cmd_show_super(int argc, char *argv[]) static const struct option longopts[] = { { "fields", 1, NULL, 'f' }, { "field-only", 1, NULL, 'F' }, - { "layout", 0, NULL, 'l' }, - { "help", 0, NULL, 'h' }, + { "layout", no_argument, NULL, 'l' }, + { "help", no_argument, NULL, 'h' }, { NULL } }; unsigned fields = 0;