diff options
author | Goffredo Baroncelli <kreijack@inwind.it> | 2010-03-11 22:07:10 +0100 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2010-03-11 22:09:46 -0500 |
commit | 866539056ab1f422d0abfd494077de1312918193 (patch) | |
tree | 1a1c408874e47b83f892d451e1dc61a4b15ad8ed | |
parent | e584004d3c350cdb7e489c330e03386b816719fe (diff) |
Correct the check of the argument number for the "btrfs dev add|rem" commands
-rw-r--r-- | btrfs.c | 13 | ||||
-rw-r--r-- | btrfs_cmds.h | 1 |
2 files changed, 8 insertions, 6 deletions
@@ -60,11 +60,15 @@ static struct Command commands[] = { { do_subvol_list, 1, "subvolume list", "<path>\n" "List the snapshot/subvolume of a filesystem." }, - { do_defrag, -1, "filesystem defragment", "[-vcf] [-s start] [-l len] [-t size] <file>|<dir> [<file>|<dir>...]\n" "Defragment a file or a directory." }, + { do_set_default_subvol, 2, + "subvolume set-default", "<id> <path>\n" + "Set the subvolume of the filesystem <path> which will be mounted\n" + "as default." + }, { do_fssync, 1, "filesystem sync", "<path>\n" "Force a sync on the filesystem <path>." @@ -88,11 +92,11 @@ static struct Command commands[] = { "Scan all device for or the passed device for a btrfs\n" "filesystem." }, - { do_add_volume, -1, + { do_add_volume, -2, "device add", "<dev> [<dev>..] <path>\n" "Add a device to a filesystem." }, - { do_remove_volume, -1, + { do_remove_volume, -2, "device delete", "<dev> [<dev>..] <path>\n" "Remove a device from a filesystem." }, @@ -104,9 +108,6 @@ static struct Command commands[] = { { 0, 0 , 0 } }; - - - static char *get_prgname(char *programname) { char *np; diff --git a/btrfs_cmds.h b/btrfs_cmds.h index cfdbde23..c63baa99 100644 --- a/btrfs_cmds.h +++ b/btrfs_cmds.h @@ -27,4 +27,5 @@ int do_remove_volume(int nargs, char **args); int do_scan(int nargs, char **argv); int do_resize(int nargs, char **argv); int do_subvol_list(int nargs, char **argv); +int do_set_default_subvol(int nargs, char **argv); int list_subvols(int fd); |