btrfs-progs: convert, add long options for all short options
Signed-off-by: David Sterba <dsterba@suse.cz>
This commit is contained in:
parent
22057607b4
commit
bc400acbff
|
@ -17,23 +17,24 @@ named 'ext2_saved' as file image.
|
||||||
|
|
||||||
OPTIONS
|
OPTIONS
|
||||||
-------
|
-------
|
||||||
-d::
|
-d|--no-datasum::
|
||||||
Disable data checksum.
|
Disable data checksum calculations and set NODATASUM file flag. This can speed
|
||||||
-i::
|
up the conversion.
|
||||||
|
-i|--no-xattr::
|
||||||
Ignore xattrs and ACLs.
|
Ignore xattrs and ACLs.
|
||||||
-n::
|
-n|--no-inline::
|
||||||
Disable packing of small files.
|
Disable inlining of small files to metadata blocks.
|
||||||
-N <SIZE>::
|
-N|--nodesize <SIZE>::
|
||||||
Set filesystem nodesize, the tree block size in which btrfs stores data.
|
Set filesystem nodesize, the tree block size in which btrfs stores data.
|
||||||
The default value is 16KB (16384) or the page size, whichever is bigger.
|
The default value is 16KB (16384) or the page size, whichever is bigger.
|
||||||
Must be a multiple of the sectorsize, but not larger than 65536.
|
Must be a multiple of the sectorsize, but not larger than 65536.
|
||||||
-r::
|
-r|--rollback::
|
||||||
Roll back to ext2fs.
|
Roll back to ext2fs.
|
||||||
-l <LABEL>::
|
-l|--label <LABEL>::
|
||||||
set filesystem label during conversion.
|
set filesystem label during conversion.
|
||||||
-L::
|
-L|--copy-label::
|
||||||
use label from the converted filesystem.
|
use label from the converted filesystem.
|
||||||
-p::
|
-p|--progress::
|
||||||
Show progress of conversion, on by default.
|
Show progress of conversion, on by default.
|
||||||
--no-progress::
|
--no-progress::
|
||||||
Disable detailed progress and show only the main phases of conversion.
|
Disable detailed progress and show only the main phases of conversion.
|
||||||
|
|
|
@ -2800,14 +2800,15 @@ fail:
|
||||||
static void print_usage(void)
|
static void print_usage(void)
|
||||||
{
|
{
|
||||||
printf("usage: btrfs-convert [options] device\n");
|
printf("usage: btrfs-convert [options] device\n");
|
||||||
printf("\t-d disable data checksum\n");
|
printf("options:\n");
|
||||||
printf("\t-i ignore xattrs and ACLs\n");
|
printf("\t-d|--no-datasum disable data checksum, sets NODATASUM\n");
|
||||||
printf("\t-n disable packing of small files\n");
|
printf("\t-i|--no-xattr ignore xattrs and ACLs\n");
|
||||||
printf("\t-N SIZE set filesystem nodesize\n");
|
printf("\t-n|--no-inline disable inlining of small files to metadata\n");
|
||||||
printf("\t-r roll back to ext2fs\n");
|
printf("\t-N|--nodesize SIZE set filesystem metadata nodesize\n");
|
||||||
printf("\t-l LABEL set filesystem label\n");
|
printf("\t-r|--rollback roll back to ext2fs\n");
|
||||||
printf("\t-L use label from converted fs\n");
|
printf("\t-l|--label LABEL set filesystem label\n");
|
||||||
printf("\t-p show converting progress (default)\n");
|
printf("\t-L|--copy-label use label from converted filesystem\n");
|
||||||
|
printf("\t-p|--progress show converting progress (default)\n");
|
||||||
printf("\t--no-progress show only overview, not the detailed progress\n");
|
printf("\t--no-progress show only overview, not the detailed progress\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2832,6 +2833,14 @@ int main(int argc, char *argv[])
|
||||||
static const struct option long_options[] = {
|
static const struct option long_options[] = {
|
||||||
{ "no-progress", no_argument, NULL,
|
{ "no-progress", no_argument, NULL,
|
||||||
GETOPT_VAL_NO_PROGRESS },
|
GETOPT_VAL_NO_PROGRESS },
|
||||||
|
{ "no-datasum", no_argument, NULL, 'd' },
|
||||||
|
{ "no-inline", no_argument, NULL, 'n' },
|
||||||
|
{ "no-xattr", no_argument, NULL, 'i' },
|
||||||
|
{ "rollback", no_argument, NULL, 'r' },
|
||||||
|
{ "progress", no_argument, NULL, 'p' },
|
||||||
|
{ "label", required_argument, NULL, 'l' },
|
||||||
|
{ "copy-label", no_argument, NULL, 'L' },
|
||||||
|
{ "nodesize", required_argument, NULL, 'N' },
|
||||||
{ NULL, 0, NULL, 0 }
|
{ NULL, 0, NULL, 0 }
|
||||||
};
|
};
|
||||||
int c = getopt_long(argc, argv, "dinN:rl:Lp", long_options,
|
int c = getopt_long(argc, argv, "dinN:rl:Lp", long_options,
|
||||||
|
|
Loading…
Reference in New Issue