All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Misono, Tomohiro" <misono.tomohiro@jp.fujitsu.com>
To: <linux-btrfs@vger.kernel.org>
Subject: [PATCH 3/3] btrfs-progs: fix option handling for some commands
Date: Thu, 24 Aug 2017 14:25:29 +0900	[thread overview]
Message-ID: <e0101e20-6536-9b84-2808-242408af3e0f@jp.fujitsu.com> (raw)
In-Reply-To: <2ea1dea7-13b5-b984-03ce-2d88d4f9d220@jp.fujitsu.com>

This fixes "btrfs inspect-internal dump-super --bytenr"

Signed-off-by: Tomohiro Misono <misono.tomohiro@jp.fujitsu.com>
---
  cmds-inspect-dump-super.c | 7 +++++++
  1 file changed, 7 insertions(+)

diff --git a/cmds-inspect-dump-super.c b/cmds-inspect-dump-super.c
index 98e0270..c7afd80 100644
--- a/cmds-inspect-dump-super.c
+++ b/cmds-inspect-dump-super.c
@@ -519,11 +519,13 @@ int cmd_inspect_dump_super(int argc, char **argv)

  	while (1) {
  		int c;
+		enum { GETOPT_VAL_BYTENR = 257 };
  		static const struct option long_options[] = {
  			{"all", no_argument, NULL, 'a'},
  			{"full", no_argument, NULL, 'f'},
  			{"force", no_argument, NULL, 'F'},
  			{"super", required_argument, NULL, 's' },
+			{"bytenr", required_argument, NULL, GETOPT_VAL_BYTENR },
  			{NULL, 0, NULL, 0}
  		};

@@ -565,6 +567,11 @@ int cmd_inspect_dump_super(int argc, char **argv)
  			}
  			all = 0;
  			break;
+		case GETOPT_VAL_BYTENR:
+			arg = arg_strtou64(optarg);
+			sb_bytenr = arg;
+			all = 0;
+			break;
  		default:
  			usage(cmd_inspect_dump_super_usage);
  		}
-- 
2.9.4


  parent reply	other threads:[~2017-08-24  5:25 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-24  5:18 [PATCH 1/3] btrfs-progs: fix option handling for some commands Misono, Tomohiro
2017-08-24  5:24 ` [PATCH 2/3] " Misono, Tomohiro
2017-08-24  5:25 ` Misono, Tomohiro [this message]
2017-08-24  6:06 ` [PATCH] btrfs-progs: change document in accordance with usage info Misono, Tomohiro
2017-08-24 17:18 ` [PATCH 1/3] btrfs-progs: fix option handling for some commands 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=e0101e20-6536-9b84-2808-242408af3e0f@jp.fujitsu.com \
    --to=misono.tomohiro@jp.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.