diff options
author | David Sterba <dsterba@suse.com> | 2015-07-11 00:05:05 +0200 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2015-08-31 19:25:09 +0200 |
commit | c6cf9778e8f8dbdb0597edfd8adb712663b9e422 (patch) | |
tree | ed098e1267e61d7e861c5f7b22b3124e9ca5e04e /cmds-subvolume.c | |
parent | 5b1c5b88786297a8582c8ad211289a090f8e8435 (diff) | |
download | btrfs-progs-c6cf9778e8f8dbdb0597edfd8adb712663b9e422.tar.gz |
btrfs-progs: unify naming of command handlers
Use cmd_ + group + command schema.
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'cmds-subvolume.c')
-rw-r--r-- | cmds-subvolume.c | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/cmds-subvolume.c b/cmds-subvolume.c index e88a6e6..61f08f5 100644 --- a/cmds-subvolume.c +++ b/cmds-subvolume.c @@ -611,7 +611,7 @@ out: return !!ret; } -static const char * const cmd_snapshot_usage[] = { +static const char * const cmd_subvol_snapshot_usage[] = { "btrfs subvolume snapshot [-r] [-i <qgroupid>] <source> <dest>|[<dest>/]<name>", "Create a snapshot of the subvolume", "Create a writable/readonly snapshot of the subvolume <source> with", @@ -624,7 +624,7 @@ static const char * const cmd_snapshot_usage[] = { NULL }; -static int cmd_snapshot(int argc, char **argv) +static int cmd_subvol_snapshot(int argc, char **argv) { char *subvol, *dst; int res, retval; @@ -671,12 +671,12 @@ static int cmd_snapshot(int argc, char **argv) } break; default: - usage(cmd_snapshot_usage); + usage(cmd_subvol_snapshot_usage); } } if (check_argc_exact(argc - optind, 2)) - usage(cmd_snapshot_usage); + usage(cmd_subvol_snapshot_usage); subvol = argv[optind]; dst = argv[optind + 1]; @@ -875,13 +875,13 @@ static int cmd_subvol_set_default(int argc, char **argv) return 0; } -static const char * const cmd_find_new_usage[] = { +static const char * const cmd_subvol_find_new_usage[] = { "btrfs subvolume find-new <path> <lastgen>", "List the recently modified files in a filesystem", NULL }; -static int cmd_find_new(int argc, char **argv) +static int cmd_subvol_find_new(int argc, char **argv) { int fd; int ret; @@ -890,7 +890,7 @@ static int cmd_find_new(int argc, char **argv) DIR *dirstream = NULL; if (check_argc_exact(argc, 3)) - usage(cmd_find_new_usage); + usage(cmd_subvol_find_new_usage); subvol = argv[1]; last_gen = arg_strtou64(argv[2]); @@ -1353,12 +1353,14 @@ const struct cmd_group subvolume_cmd_group = { { "create", cmd_subvol_create, cmd_subvol_create_usage, NULL, 0 }, { "delete", cmd_subvol_delete, cmd_subvol_delete_usage, NULL, 0 }, { "list", cmd_subvol_list, cmd_subvol_list_usage, NULL, 0 }, - { "snapshot", cmd_snapshot, cmd_snapshot_usage, NULL, 0 }, + { "snapshot", cmd_subvol_snapshot, cmd_subvol_snapshot_usage, + NULL, 0 }, { "get-default", cmd_subvol_get_default, cmd_subvol_get_default_usage, NULL, 0 }, { "set-default", cmd_subvol_set_default, cmd_subvol_set_default_usage, NULL, 0 }, - { "find-new", cmd_find_new, cmd_find_new_usage, NULL, 0 }, + { "find-new", cmd_subvol_find_new, cmd_subvol_find_new_usage, + NULL, 0 }, { "show", cmd_subvol_show, cmd_subvol_show_usage, NULL, 0 }, { "sync", cmd_subvol_sync, cmd_subvol_sync_usage, NULL, 0 }, NULL_CMD_STRUCT |