linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Qu Wenruo <quwenruo@cn.fujitsu.com>
To: <linux-btrfs@vger.kernel.org>
Subject: [PATCH] btrfs-progs: Doc: Add explain on 'source' and 'target' for btrfs-image.
Date: Mon, 24 Nov 2014 15:27:44 +0800	[thread overview]
Message-ID: <1416814064-29543-1-git-send-email-quwenruo@cn.fujitsu.com> (raw)

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>
---
 Documentation/btrfs-image.txt | 5 +++++
 btrfs-image.c                 | 2 ++
 2 files changed, 7 insertions(+)

diff --git a/Documentation/btrfs-image.txt b/Documentation/btrfs-image.txt
index b7751f9..43c2e06 100644
--- a/Documentation/btrfs-image.txt
+++ b/Documentation/btrfs-image.txt
@@ -14,6 +14,11 @@ 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.
 
+Without '-r' option, <source> is the device/normal file containing the btrfs,
+and <target> is the output image file, or standard output if <target> is '-'.
+With '-r' option, <source> is the dump image file and <target> is the
+device/normal file where the restored fs lies.
+
 Mainly used for debug purpose.
 
 OPTIONS
diff --git a/btrfs-image.c b/btrfs-image.c
index cb17f16..12f04b7 100644
--- a/btrfs-image.c
+++ b/btrfs-image.c
@@ -2459,6 +2459,8 @@ out:
 static void print_usage(void)
 {
 	fprintf(stderr, "usage: btrfs-image [options] source target\n");
+	fprintf(stderr, "Without '-r' source is the btrfs fs and target is output image('-' for stdout)\n");
+	fprintf(stderr, "With '-r' source is the dumped image and target is the btrfs fs\n");
 	fprintf(stderr, "\t-r      \trestore metadump image\n");
 	fprintf(stderr, "\t-c value\tcompression level (0 ~ 9)\n");
 	fprintf(stderr, "\t-t value\tnumber of threads (1 ~ 32)\n");
-- 
2.1.3


             reply	other threads:[~2014-11-24  7:29 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-24  7:27 Qu Wenruo [this message]
2015-01-21 16:23 ` [PATCH] btrfs-progs: Doc: Add explain on 'source' and 'target' for btrfs-image David Sterba

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1416814064-29543-1-git-send-email-quwenruo@cn.fujitsu.com \
    --to=quwenruo@cn.fujitsu.com \
    --cc=linux-btrfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).