forked from Mirrors/btrfs-progs
btrfs-progs: cleanup, move usage help strings closer to the command callbacks
Signed-off-by: David Sterba <dsterba@suse.com>master
parent
f7c9278008
commit
7ccc0543dc
|
@ -329,6 +329,14 @@ out:
|
||||||
return !!ret;
|
return !!ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static const char* const cmd_inspect_min_dev_size_usage[] = {
|
||||||
|
"btrfs inspect-internal min-dev-size [options] <path>",
|
||||||
|
"Get the minimum size the device can be shrunk to. The",
|
||||||
|
"device id 1 is used by default.",
|
||||||
|
"--id DEVID specify the device id to query",
|
||||||
|
NULL
|
||||||
|
};
|
||||||
|
|
||||||
struct dev_extent_elem {
|
struct dev_extent_elem {
|
||||||
u64 start;
|
u64 start;
|
||||||
/* inclusive end */
|
/* inclusive end */
|
||||||
|
@ -569,14 +577,6 @@ out:
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static const char* const cmd_inspect_min_dev_size_usage[] = {
|
|
||||||
"btrfs inspect-internal min-dev-size [options] <path>",
|
|
||||||
"Get the minimum size the device can be shrunk to. The",
|
|
||||||
"device id 1 is used by default.",
|
|
||||||
"--id DEVID specify the device id to query",
|
|
||||||
NULL
|
|
||||||
};
|
|
||||||
|
|
||||||
static int cmd_inspect_min_dev_size(int argc, char **argv)
|
static int cmd_inspect_min_dev_size(int argc, char **argv)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
|
|
|
@ -32,35 +32,6 @@ static const char * const property_cmd_group_usage[] = {
|
||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
static const char * const cmd_property_get_usage[] = {
|
|
||||||
"btrfs property get [-t <type>] <object> [<name>]",
|
|
||||||
"Gets a property from a btrfs object.",
|
|
||||||
"If no name is specified, all properties for the given object are",
|
|
||||||
"printed.",
|
|
||||||
"A filesystem object can be a the filesystem itself, a subvolume,",
|
|
||||||
"an inode or a device. The '-t <type>' option can be used to explicitly",
|
|
||||||
"specify what type of object you meant. This is only needed when a",
|
|
||||||
"property could be set for more then one object type. Possible types",
|
|
||||||
"are s[ubvol], f[ilesystem], i[node] and d[evice].",
|
|
||||||
NULL
|
|
||||||
};
|
|
||||||
|
|
||||||
static const char * const cmd_property_set_usage[] = {
|
|
||||||
"btrfs property set [-t <type>] <object> <name> <value>",
|
|
||||||
"Sets a property on a btrfs object.",
|
|
||||||
"Please see the help of 'btrfs property get' for a description of",
|
|
||||||
"objects and object types.",
|
|
||||||
NULL
|
|
||||||
};
|
|
||||||
|
|
||||||
static const char * const cmd_property_list_usage[] = {
|
|
||||||
"btrfs property list [-t <type>] <object>",
|
|
||||||
"Lists available properties with their descriptions for the given object.",
|
|
||||||
"Please see the help of 'btrfs property get' for a description of",
|
|
||||||
"objects and object types.",
|
|
||||||
NULL
|
|
||||||
};
|
|
||||||
|
|
||||||
static int parse_prop(const char *arg, const struct prop_handler *props,
|
static int parse_prop(const char *arg, const struct prop_handler *props,
|
||||||
const struct prop_handler **prop_ret)
|
const struct prop_handler **prop_ret)
|
||||||
{
|
{
|
||||||
|
@ -388,6 +359,19 @@ static void parse_args(int argc, char **argv,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static const char * const cmd_property_get_usage[] = {
|
||||||
|
"btrfs property get [-t <type>] <object> [<name>]",
|
||||||
|
"Gets a property from a btrfs object.",
|
||||||
|
"If no name is specified, all properties for the given object are",
|
||||||
|
"printed.",
|
||||||
|
"A filesystem object can be a the filesystem itself, a subvolume,",
|
||||||
|
"an inode or a device. The '-t <type>' option can be used to explicitly",
|
||||||
|
"specify what type of object you meant. This is only needed when a",
|
||||||
|
"property could be set for more then one object type. Possible types",
|
||||||
|
"are s[ubvol], f[ilesystem], i[node] and d[evice].",
|
||||||
|
NULL
|
||||||
|
};
|
||||||
|
|
||||||
static int cmd_property_get(int argc, char **argv)
|
static int cmd_property_get(int argc, char **argv)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
|
@ -413,6 +397,14 @@ static int cmd_property_get(int argc, char **argv)
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static const char * const cmd_property_set_usage[] = {
|
||||||
|
"btrfs property set [-t <type>] <object> <name> <value>",
|
||||||
|
"Sets a property on a btrfs object.",
|
||||||
|
"Please see the help of 'btrfs property get' for a description of",
|
||||||
|
"objects and object types.",
|
||||||
|
NULL
|
||||||
|
};
|
||||||
|
|
||||||
static int cmd_property_set(int argc, char **argv)
|
static int cmd_property_set(int argc, char **argv)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
|
@ -436,6 +428,14 @@ static int cmd_property_set(int argc, char **argv)
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static const char * const cmd_property_list_usage[] = {
|
||||||
|
"btrfs property list [-t <type>] <object>",
|
||||||
|
"Lists available properties with their descriptions for the given object.",
|
||||||
|
"Please see the help of 'btrfs property get' for a description of",
|
||||||
|
"objects and object types.",
|
||||||
|
NULL
|
||||||
|
};
|
||||||
|
|
||||||
static int cmd_property_list(int argc, char **argv)
|
static int cmd_property_list(int argc, char **argv)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
|
|
|
@ -43,15 +43,6 @@ static const char * const cmd_rescue_chunk_recover_usage[] = {
|
||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
static const char * const cmd_rescue_super_recover_usage[] = {
|
|
||||||
"btrfs rescue super-recover [options] <device>",
|
|
||||||
"Recover bad superblocks from good copies",
|
|
||||||
"",
|
|
||||||
"-y Assume an answer of `yes' to all questions",
|
|
||||||
"-v Verbose mode",
|
|
||||||
NULL
|
|
||||||
};
|
|
||||||
|
|
||||||
static int cmd_rescue_chunk_recover(int argc, char *argv[])
|
static int cmd_rescue_chunk_recover(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
@ -103,6 +94,15 @@ static int cmd_rescue_chunk_recover(int argc, char *argv[])
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static const char * const cmd_rescue_super_recover_usage[] = {
|
||||||
|
"btrfs rescue super-recover [options] <device>",
|
||||||
|
"Recover bad superblocks from good copies",
|
||||||
|
"",
|
||||||
|
"-y Assume an answer of `yes' to all questions",
|
||||||
|
"-v Verbose mode",
|
||||||
|
NULL
|
||||||
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* return codes:
|
* return codes:
|
||||||
* 0 : All superblocks are valid, no need to recover
|
* 0 : All superblocks are valid, no need to recover
|
||||||
|
|
Loading…
Reference in New Issue