From: Todd Gill <tgill@redhat.com>
To: dm-devel@redhat.com
Cc: Todd Gill <tgill@redhat.com>
Subject: [PATCH 1/3] add %g format specifier to 'multipathd show paths format' command
Date: Mon, 1 Feb 2016 07:53:25 -0500 [thread overview]
Message-ID: <1454331207-380-1-git-send-email-tgill@redhat.com> (raw)
The %g specifier will print the group number of the path when used with
multipathd show paths format.
Signed-off-by: Todd Gill <tgill@redhat.com>
---
libmultipath/print.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/libmultipath/print.c b/libmultipath/print.c
index 6215d0b..332327a 100644
--- a/libmultipath/print.c
+++ b/libmultipath/print.c
@@ -293,6 +293,12 @@ snprint_path_uuid (char * buff, size_t len, struct path * pp)
return snprint_str(buff, len, pp->wwid);
}
+static int snprint_path_groupnumber(char * buff, size_t len, struct path * pp)
+{
+ return snprint_int(buff, len, pp->pgindex);
+}
+
+
static int
snprint_hcil (char * buff, size_t len, struct path * pp)
{
@@ -576,6 +582,7 @@ struct path_data pd[] = {
{'i', "hcil", 0, snprint_hcil},
{'d', "dev", 0, snprint_dev},
{'D', "dev_t", 0, snprint_dev_t},
+ {'g', "group", 0, snprint_path_groupnumber},
{'t', "dm_st", 0, snprint_dm_path_state},
{'o', "dev_st", 0, snprint_offline},
{'T', "chk_st", 0, snprint_chk_state},
--
2.5.0
next reply other threads:[~2016-02-01 12:53 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-01 12:53 Todd Gill [this message]
2016-02-01 12:53 ` [PATCH 2/3] add 'show groups' command to multipathd Todd Gill
2016-02-01 12:53 ` [PATCH 3/3] add options to the show groups command Todd Gill
2016-02-01 17:36 ` [PATCH 1/3] add %g format specifier to 'multipathd show paths format' command Benjamin Marzinski
2016-02-09 19:49 ` [PATCH v2 1/3] Add " Todd Gill
2016-02-09 19:49 ` [PATCH v2 2/3] Add 'show groups' command to multipathd Todd Gill
2016-02-09 19:49 ` [PATCH v2 3/3] Add options to the show groups command Todd Gill
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=1454331207-380-1-git-send-email-tgill@redhat.com \
--to=tgill@redhat.com \
--cc=dm-devel@redhat.com \
/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).