mirror of
https://github.com/koverstreet/bcachefs-tools.git
synced 2025-12-08 00:00:12 +03:00
c_src: Consistently use no_argument instead of 0
This commit is contained in:
parent
30fcb00f69
commit
d48719f752
@ -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;
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user