1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

dmsetup: use getopt defines

Replace 0/1 with getopts defines no/required_argument
This commit is contained in:
Zdenek Kabelac 2024-05-03 22:44:06 +02:00
parent 2b198cd874
commit 011e0672c5

View File

@ -6859,85 +6859,85 @@ static int _process_switches(int *argcp, char ***argvp, const char *dev_dir)
#ifdef HAVE_GETOPTLONG
static const struct option _long_options[] = {
{"addnodeoncreate", 0, 0, ADD_NODE_ON_CREATE_ARG},
{"addnodeonresume", 0, 0, ADD_NODE_ON_RESUME_ARG},
{"alias", 1, 0, ALIAS_ARG},
{"alldevices", 0, 0, ALL_DEVICES_ARG},
{"allprograms", 0, 0, ALL_PROGRAMS_ARG},
{"allregions", 0, 0, ALL_REGIONS_ARG},
{"area", 0, 0, AREA_ARG},
{"areas", 1, 0, AREAS_ARG},
{"areasize", 1, 0, AREA_SIZE_ARG},
{"bounds", 1, 0, BOUNDS_ARG},
{"checks", 0, 0, CHECKS_ARG},
{"clear", 0, 0, CLEAR_ARG},
{"columns", 0, 0, COLS_ARG},
{"concise", 0, 0, CONCISE_ARG},
{"count", 1, 0, COUNT_ARG},
{"deferred", 0, 0, DEFERRED_ARG},
{"exec", 1, 0, EXEC_ARG},
{"filemap", 0, 0, FILEMAP_ARG},
{"follow", 1, 0, FOLLOW_ARG},
{"force", 0, 0, FORCE_ARG},
{"foreground", 0, 0, FOREGROUND_ARG},
{"gid", 1, 0, GID_ARG},
{"group", 0, 0, GROUP_ARG},
{"groupid", 1, 0, GROUP_ID_ARG},
{"headings", 1, 0, HEADINGS_ARG},
{"help", 0, 0, HELP_ARG},
{"histogram", 0, 0, HISTOGRAM_ARG},
{"inactive", 0, 0, INACTIVE_ARG},
{"interval", 1, 0, INTERVAL_ARG},
{"length", 1, 0, LENGTH_ARG},
{"major", 1, 0, MAJOR_ARG},
{"manglename", 1, 0, MANGLENAME_ARG},
{"minor", 1, 0, MINOR_ARG},
{"mode", 1, 0, MODE_ARG},
{"nameprefixes", 0, 0, NAMEPREFIXES_ARG},
{"noflush", 0, 0, NOFLUSH_ARG},
{"nogroup", 0, 0, NOGROUP_ARG},
{"noheadings", 0, 0, NOHEADINGS_ARG},
{"nolockfs", 0, 0, NOLOCKFS_ARG},
{"nomonitor", 0, 0, NOMONITOR_ARG},
{"noopencount", 0, 0, NOOPENCOUNT_ARG},
{"nosuffix", 0, 0, NOSUFFIX_ARG},
{"notable", 0, 0, NOTABLE_ARG},
{"notimesuffix", 0, 0, NOTIMESUFFIX_ARG},
{"noudevrules", 0, 0, NOUDEVRULES_ARG},
{"noudevsync", 0, 0, NOUDEVSYNC_ARG},
{"options", 1, 0, OPTIONS_ARG},
{"precise", 0, 0, PRECISE_ARG},
{"programid", 1, 0, PROGRAM_ID_ARG},
{"raw", 0, 0, RAW_ARG},
{"readahead", 1, 0, READAHEAD_ARG},
{"readonly", 0, 0, READ_ONLY},
{"region", 0, 0, REGION_ARG},
{"regionid", 1, 0, REGION_ID_ARG},
{"regions", 1, 0, REGIONS_ARG},
{"relative", 0, 0, RELATIVE_ARG},
{"retry", 0, 0, RETRY_ARG},
{"rows", 0, 0, ROWS_ARG},
{"segments", 0, 0, SEGMENTS_ARG},
{"select", 1, 0, SELECT_ARG},
{"separator", 1, 0, SEPARATOR_ARG},
{"setuuid", 0, 0, SETUUID_ARG},
{"showkeys", 0, 0, SHOWKEYS_ARG},
{"sort", 1, 0, SORT_ARG},
{"start", 1, 0, START_ARG},
{"table", 1, 0, TABLE_ARG},
{"target", 1, 0, TARGET_ARG},
{"tree", 0, 0, TREE_ARG},
{"udevcookie", 1, 0, UDEVCOOKIE_ARG},
{"uid", 1, 0, UID_ARG},
{"unbuffered", 0, 0, UNBUFFERED_ARG},
{"units", 1, 0, UNITS_ARG},
{"unquoted", 0, 0, UNQUOTED_ARG},
{"userdata", 1, 0, USER_DATA_ARG},
{"uuid", 1, 0, UUID_ARG},
{"verbose", 1, 0, VERBOSE_ARG},
{"verifyudev", 0, 0, VERIFYUDEV_ARG},
{"version", 0, 0, VERSION_ARG},
{"yes", 0, 0, YES_ARG},
{"addnodeoncreate", no_argument, 0, ADD_NODE_ON_CREATE_ARG},
{"addnodeonresume", no_argument, 0, ADD_NODE_ON_RESUME_ARG},
{"alias", required_argument, 0, ALIAS_ARG},
{"alldevices", no_argument, 0, ALL_DEVICES_ARG},
{"allprograms", no_argument, 0, ALL_PROGRAMS_ARG},
{"allregions", no_argument, 0, ALL_REGIONS_ARG},
{"area", no_argument, 0, AREA_ARG},
{"areas", required_argument, 0, AREAS_ARG},
{"areasize", required_argument, 0, AREA_SIZE_ARG},
{"bounds", required_argument, 0, BOUNDS_ARG},
{"checks", no_argument, 0, CHECKS_ARG},
{"clear", no_argument, 0, CLEAR_ARG},
{"columns", no_argument, 0, COLS_ARG},
{"concise", no_argument, 0, CONCISE_ARG},
{"count", required_argument, 0, COUNT_ARG},
{"deferred", no_argument, 0, DEFERRED_ARG},
{"exec", required_argument, 0, EXEC_ARG},
{"filemap", no_argument, 0, FILEMAP_ARG},
{"follow", required_argument, 0, FOLLOW_ARG},
{"force", no_argument, 0, FORCE_ARG},
{"foreground", no_argument, 0, FOREGROUND_ARG},
{"gid", required_argument, 0, GID_ARG},
{"group", no_argument, 0, GROUP_ARG},
{"groupid", required_argument, 0, GROUP_ID_ARG},
{"headings", required_argument, 0, HEADINGS_ARG},
{"help", no_argument, 0, HELP_ARG},
{"histogram", no_argument, 0, HISTOGRAM_ARG},
{"inactive", no_argument, 0, INACTIVE_ARG},
{"interval", required_argument, 0, INTERVAL_ARG},
{"length", required_argument, 0, LENGTH_ARG},
{"major", required_argument, 0, MAJOR_ARG},
{"manglename", required_argument, 0, MANGLENAME_ARG},
{"minor", required_argument, 0, MINOR_ARG},
{"mode", required_argument, 0, MODE_ARG},
{"nameprefixes", no_argument, 0, NAMEPREFIXES_ARG},
{"noflush", no_argument, 0, NOFLUSH_ARG},
{"nogroup", no_argument, 0, NOGROUP_ARG},
{"noheadings", no_argument, 0, NOHEADINGS_ARG},
{"nolockfs", no_argument, 0, NOLOCKFS_ARG},
{"nomonitor", no_argument, 0, NOMONITOR_ARG},
{"noopencount", no_argument, 0, NOOPENCOUNT_ARG},
{"nosuffix", no_argument, 0, NOSUFFIX_ARG},
{"notable", no_argument, 0, NOTABLE_ARG},
{"notimesuffix", no_argument, 0, NOTIMESUFFIX_ARG},
{"noudevrules", no_argument, 0, NOUDEVRULES_ARG},
{"noudevsync", no_argument, 0, NOUDEVSYNC_ARG},
{"options", required_argument, 0, OPTIONS_ARG},
{"precise", no_argument, 0, PRECISE_ARG},
{"programid", required_argument, 0, PROGRAM_ID_ARG},
{"raw", no_argument, 0, RAW_ARG},
{"readahead", required_argument, 0, READAHEAD_ARG},
{"readonly", no_argument, 0, READ_ONLY},
{"region", no_argument, 0, REGION_ARG},
{"regionid", required_argument, 0, REGION_ID_ARG},
{"regions", required_argument, 0, REGIONS_ARG},
{"relative", no_argument, 0, RELATIVE_ARG},
{"retry", no_argument, 0, RETRY_ARG},
{"rows", no_argument, 0, ROWS_ARG},
{"segments", no_argument, 0, SEGMENTS_ARG},
{"select", required_argument, 0, SELECT_ARG},
{"separator", required_argument, 0, SEPARATOR_ARG},
{"setuuid", no_argument, 0, SETUUID_ARG},
{"showkeys", no_argument, 0, SHOWKEYS_ARG},
{"sort", required_argument, 0, SORT_ARG},
{"start", required_argument, 0, START_ARG},
{"table", required_argument, 0, TABLE_ARG},
{"target", required_argument, 0, TARGET_ARG},
{"tree", no_argument, 0, TREE_ARG},
{"udevcookie", required_argument, 0, UDEVCOOKIE_ARG},
{"uid", required_argument, 0, UID_ARG},
{"unbuffered", no_argument, 0, UNBUFFERED_ARG},
{"units", required_argument, 0, UNITS_ARG},
{"unquoted", no_argument, 0, UNQUOTED_ARG},
{"userdata", required_argument, 0, USER_DATA_ARG},
{"uuid", required_argument, 0, UUID_ARG},
{"verbose", required_argument, 0, VERBOSE_ARG},
{"verifyudev", no_argument, 0, VERIFYUDEV_ARG},
{"version", no_argument, 0, VERSION_ARG},
{"yes", no_argument, 0, YES_ARG},
{0, 0, 0, 0}
};
#else