aboutsummaryrefslogtreecommitdiffstats
path: root/cmds-device.c
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.cz>2015-01-21 18:09:32 +0100
committerDavid Sterba <dsterba@suse.cz>2015-01-21 18:32:06 +0100
commita5b66a81bf6007b3c3b3b108ffcb4cbd75287d57 (patch)
treef619ae4edf056ef220f72b0ee9a532ac4d92a34b /cmds-device.c
parenta598348a329b1b0ba3bfa8a3da910f407a4ee4e1 (diff)
downloadbtrfs-progs-a5b66a81bf6007b3c3b3b108ffcb4cbd75287d57.tar.gz
btrfs-progs-a5b66a81bf6007b3c3b3b108ffcb4cbd75287d57.tar.xz
btrfs-progs-a5b66a81bf6007b3c3b3b108ffcb4cbd75287d57.zip
btrfs-progs: use predefined getopt values for unit suffixes
Signed-off-by: David Sterba <dsterba@suse.cz>
Diffstat (limited to 'cmds-device.c')
-rw-r--r--cmds-device.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/cmds-device.c b/cmds-device.c
index ba9e6b3..ce4406f 100644
--- a/cmds-device.c
+++ b/cmds-device.c
@@ -509,8 +509,8 @@ int cmd_device_usage(int argc, char **argv)
{ "mbytes", no_argument, NULL, 'm'},
{ "gbytes", no_argument, NULL, 'g'},
{ "tbytes", no_argument, NULL, 't'},
- { "si", no_argument, NULL, 256},
- { "iec", no_argument, NULL, 257},
+ { "si", no_argument, NULL, GETOPT_VAL_SI},
+ { "iec", no_argument, NULL, GETOPT_VAL_IEC},
};
int c = getopt_long(argc, argv, "bhHkmgt", long_options,
&long_index);
@@ -539,10 +539,10 @@ int cmd_device_usage(int argc, char **argv)
case 'H':
unit_mode = UNITS_HUMAN_DECIMAL;
break;
- case 256:
+ case GETOPT_VAL_SI:
units_set_mode(&unit_mode, UNITS_DECIMAL);
break;
- case 257:
+ case GETOPT_VAL_IEC:
units_set_mode(&unit_mode, UNITS_BINARY);
break;
default: