Skip to content

Commit

Permalink
btrfs-progs: subvol show: use clean_args_no_options instead of openco…
Browse files Browse the repository at this point in the history
…ding

Signed-off-by: David Sterba <dsterba@suse.com>
  • Loading branch information
kdave committed Jan 14, 2016
1 parent a6cc8ea commit 62cb593
Showing 1 changed file with 1 addition and 14 deletions.
15 changes: 1 addition & 14 deletions cmds-subvolume.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 62cb593

Please sign in to comment.