summaryrefslogtreecommitdiff
path: root/cmds-subvolume.c
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.com>2016-01-14 10:37:02 +0100
committerDavid Sterba <dsterba@suse.com>2016-01-14 11:07:10 +0100
commit62cb59389491fec18154641663ca1a6368849cad (patch)
treee8b9a431c094e33fb4310fa9662b299de8e6d65f /cmds-subvolume.c
parenta6cc8ea10ad84e4b7d1303ed048e644f0dd7ae04 (diff)
btrfs-progs: subvol show: use clean_args_no_options instead of opencoding
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'cmds-subvolume.c')
-rw-r--r--cmds-subvolume.c15
1 files changed, 1 insertions, 14 deletions
diff --git a/cmds-subvolume.c b/cmds-subvolume.c
index 95c23d0a..9d9b0af7 100644
--- a/cmds-subvolume.c
+++ b/cmds-subvolume.c
@@ -939,20 +939,7 @@ static int cmd_subvol_show(int argc, char **argv)
int ret = 1;
DIR *dirstream1 = NULL, *dirstream2 = NULL;
- while (1) {
- static const struct option long_options[] = {
- {NULL, 0, NULL, 0}
- };
- int c = getopt_long(argc, argv, "", long_options, NULL);
-
- if (c < 0)
- break;
-
- switch (c) {
- default:
- usage(cmd_subvol_show_usage);
- }
- }
+ clean_args_no_options(argc, argv, cmd_subvol_show_usage);
if (check_argc_exact(argc - optind, 1))
usage(cmd_subvol_show_usage);