From cf0fa3d69319755be0d6fb0c7f692f89e49f5881 Mon Sep 17 00:00:00 2001 From: "Bryn M. Reeves" Date: Tue, 5 Jul 2016 15:54:02 +0100 Subject: [PATCH] dmstats: rename --auxdata to --userdata --- man/dmstats.8.in | 8 ++++---- tools/dmsetup.c | 20 ++++++++++---------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/man/dmstats.8.in b/man/dmstats.8.in index 217509702..8530caebb 100644 --- a/man/dmstats.8.in +++ b/man/dmstats.8.in @@ -87,8 +87,8 @@ dmstats \(em device-mapper statistics management . IR start_sector . BR \-\-length . IR length | \fB\-\-segments ] -. RB \%[ \-\-auxdata -. IR data ] +. RB \%[ \-\-userdata +. IR user_data ] . RB [ \-\-programid . IR id ] . ad b @@ -268,8 +268,8 @@ optional suffix selects units of: .HELP_UNITS . .HP -.BR \-\-auxdata -.IR aux_data +.BR \-\-userdata +.IR user_data .br Specify user data (a word) to be stored with a new region. The value is added to any internal auxilliary data (for example, group diff --git a/tools/dmsetup.c b/tools/dmsetup.c index b468fee96..3ee9ed83b 100644 --- a/tools/dmsetup.c +++ b/tools/dmsetup.c @@ -163,7 +163,6 @@ enum { AREA_ARG, AREAS_ARG, AREA_SIZE_ARG, - AUX_DATA_ARG, BOUNDS_ARG, CHECKS_ARG, CLEAR_ARG, @@ -220,6 +219,7 @@ enum { UNBUFFERED_ARG, UNITS_ARG, UNQUOTED_ARG, + USER_DATA_ARG, UUID_ARG, VERBOSE_ARG, VERIFYUDEV_ARG, @@ -4925,8 +4925,8 @@ static int _stats_create(CMD_ARGS) if (!strlen(program_id) && !_switches[FORCE_ARG]) program_id = DM_STATS_PROGRAM_ID; - if (_switches[AUX_DATA_ARG]) - user_data = _string_args[AUX_DATA_ARG]; + if (_switches[USER_DATA_ARG]) + user_data = _string_args[USER_DATA_ARG]; if (!(dms = dm_stats_create(DM_STATS_PROGRAM_ID))) return_0; @@ -5327,7 +5327,7 @@ static int _stats_help(CMD_ARGS); * clear [--regionid id] * create [--areas nr_areas] [--areasize size] * [ [--start start] [--length len] | [--segments]] - * [--auxdata data] [--programid id] [] + * [--userdata data] [--programid id] [] * delete [--regionid] * delete_all [--programid id] * group [--alias name] [--alldevices] [--regions ] [] @@ -5340,7 +5340,7 @@ static int _stats_help(CMD_ARGS); #define AREA_OPTS "[--areas ] [--areasize ] " #define CREATE_OPTS "[--start [--length ]]\n\t\t" AREA_OPTS -#define ID_OPTS "[--programid ] [--auxdata ] " +#define ID_OPTS "[--programid ] [--userdata ] " #define SELECT_OPTS "[--programid ] [--regionid ] " #define PRINT_OPTS "[--clear] " SELECT_OPTS #define REPORT_OPTS "[--interval ] [--count ]\n\t\t[--units ]" SELECT_OPTS @@ -5429,7 +5429,7 @@ static void _stats_usage(FILE *out) fprintf(out, " [-h|--help]\n"); fprintf(out, " [-v|--verbose [-v|--verbose ...]]\n"); fprintf(out, " [--areas ] [--areasize ]\n"); - fprintf(out, " [--auxdata ] [--clear]\n"); + fprintf(out, " [--userdata ] [--clear]\n"); fprintf(out, " [--count ] [--interval ]\n"); fprintf(out, " [-o ] [-O|--sort ]\n"); fprintf(out, " [--programid ]\n"); @@ -5973,7 +5973,6 @@ static int _process_switches(int *argcp, char ***argvp, const char *dev_dir) {"area", 0, &ind, AREA_ARG}, {"areas", 1, &ind, AREAS_ARG}, {"areasize", 1, &ind, AREA_SIZE_ARG}, - {"auxdata", 1, &ind, AUX_DATA_ARG}, {"bounds", 1, &ind, BOUNDS_ARG}, {"checks", 0, &ind, CHECKS_ARG}, {"clear", 0, &ind, CLEAR_ARG}, @@ -6031,6 +6030,7 @@ static int _process_switches(int *argcp, char ***argvp, const char *dev_dir) {"uuid", 1, &ind, UUID_ARG}, {"unbuffered", 0, &ind, UNBUFFERED_ARG}, {"unquoted", 0, &ind, UNQUOTED_ARG}, + {"userdata", 1, &ind, USER_DATA_ARG}, {"verbose", 1, &ind, VERBOSE_ARG}, {"verifyudev", 0, &ind, VERIFYUDEV_ARG}, {"version", 0, &ind, VERSION_ARG}, @@ -6128,9 +6128,9 @@ static int _process_switches(int *argcp, char ***argvp, const char *dev_dir) _switches[AREA_SIZE_ARG]++; _string_args[AREA_SIZE_ARG] = optarg; } - if (ind == AUX_DATA_ARG) { - _switches[AUX_DATA_ARG]++; - _string_args[AUX_DATA_ARG] = optarg; + if (ind == USER_DATA_ARG) { + _switches[USER_DATA_ARG]++; + _string_args[USER_DATA_ARG] = optarg; } if (c == ':' || c == '?') return_0;