btrfs-progs: Doc: Add explain on 'source' and 'target' for btrfs-image.
authorQu Wenruo <quwenruo@cn.fujitsu.com>
Mon, 24 Nov 2014 07:27:44 +0000 (15:27 +0800)
committerDavid Sterba <dsterba@suse.cz>
Wed, 21 Jan 2015 16:23:23 +0000 (17:23 +0100)
Add explain on 'source' and 'target', which is somewhat confusing for
users who want to restore dumped image.

Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
[reworded texts]
Signed-off-by: David Sterba <dsterba@suse.cz>
Documentation/btrfs-image.txt
btrfs-image.c

index b7751f9..3826517 100644 (file)
@@ -13,8 +13,13 @@ DESCRIPTION
 -----------
 *btrfs-image* is used to create an image of a btrfs filesystem.
 All data will be zeroed, but metadata and the like is preserved.
+Mainly used for debugging purposes.
+
+In the dump mode, source is the btrfs device/file and target is the output
+file (use '-' for stdout).
+
+In the restore mode (option -r), source is the dumped image and target is the btrfs device/file.
 
-Mainly used for debug purpose.
 
 OPTIONS
 -------
index cb17f16..1341bf1 100644 (file)
@@ -2466,6 +2466,9 @@ static void print_usage(void)
        fprintf(stderr, "\t-s      \tsanitize file names, use once to just use garbage, use twice if you want crc collisions\n");
        fprintf(stderr, "\t-w      \twalk all trees instead of using extent tree, do this if your extent tree is broken\n");
        fprintf(stderr, "\t-m      \trestore for multiple devices\n");
+       fprintf(stderr, "\n");
+       fprintf(stderr, "\tIn the dump mode, source is the btrfs device and target is the output file (use '-' for stdout).\n");
+       fprintf(stderr, "\tIn the restore mode, source is the dumped image and target is the btrfs device/file.\n");
        exit(1);
 }