From: Steven Whitehouse <swhiteho@redhat.com>
To: Joe Perches <joe@perches.com>
Cc: linux-kernel@vger.kernel.org,
Adrian Hunter <adrian.hunter@nokia.com>,
Alex Elder <aelder@sgi.com>,
Artem Bityutskiy <dedekind@infradead.org>,
Christoph Hellwig <hch@lst.de>,
Harvey Harrison <harvey.harrison@gmail.com>,
Huang Ying <ying.huang@intel.com>, Ingo Molnar <mingo@elte.hu>,
Jeff Garzik <jgarzik@redhat.com>,
Laurent Pinchart <laurent.pinchart@skynet.be>,
Matt Mackall <mpm@selenic.com>,
Mauro Carvalho Chehab <mchehab@infradead.org>,
Neil Brown <neilb@suse.de>,
xfs-masters@oss.sgi.com, Abhijith Das <adas@redhat.com>,
cluster-devel@redhat.com
Subject: Re: [PATCH 7/9] fs/gfs2/sys.c: Use %pUX to print UUIDs
Date: Tue, 29 Sep 2009 09:50:52 +0100 [thread overview]
Message-ID: <1254214252.2721.6.camel@localhost.localdomain> (raw)
In-Reply-To: <5d3edf851a4cb01c3f42b5efa05f5a9bb694d29b.1254193019.git.joe@perches.com>
Hi,
Provided this gives identical output and people are happy with the
general concept, then:
Acked-by: Steven Whitehouse <swhiteho@redhat.com>
Looks like a nice cleanup,
Steve.
On Mon, 2009-09-28 at 22:01 -0700, Joe Perches wrote:
> Signed-off-by: Joe Perches <joe@perches.com>
> ---
> fs/gfs2/sys.c | 16 +++-------------
> 1 files changed, 3 insertions(+), 13 deletions(-)
>
> diff --git a/fs/gfs2/sys.c b/fs/gfs2/sys.c
> index 4463297..56901be 100644
> --- a/fs/gfs2/sys.c
> +++ b/fs/gfs2/sys.c
> @@ -85,11 +85,7 @@ static ssize_t uuid_show(struct gfs2_sbd *sdp, char *buf)
> buf[0] = '\0';
> if (!gfs2_uuid_valid(uuid))
> return 0;
> - return snprintf(buf, PAGE_SIZE, "%02X%02X%02X%02X-%02X%02X-"
> - "%02X%02X-%02X%02X-%02X%02X%02X%02X%02X%02X\n",
> - uuid[0], uuid[1], uuid[2], uuid[3], uuid[4], uuid[5],
> - uuid[6], uuid[7], uuid[8], uuid[9], uuid[10], uuid[11],
> - uuid[12], uuid[13], uuid[14], uuid[15]);
> + return snprintf(buf, PAGE_SIZE, "%pUX\n", uuid);
> }
>
> static ssize_t freeze_show(struct gfs2_sbd *sdp, char *buf)
> @@ -573,14 +569,8 @@ static int gfs2_uevent(struct kset *kset, struct kobject *kobj,
> add_uevent_var(env, "LOCKPROTO=%s", sdp->sd_proto_name);
> if (!sdp->sd_args.ar_spectator)
> add_uevent_var(env, "JOURNALID=%u", sdp->sd_lockstruct.ls_jid);
> - if (gfs2_uuid_valid(uuid)) {
> - add_uevent_var(env, "UUID=%02X%02X%02X%02X-%02X%02X-%02X%02X-"
> - "%02X%02X-%02X%02X%02X%02X%02X%02X",
> - uuid[0], uuid[1], uuid[2], uuid[3], uuid[4],
> - uuid[5], uuid[6], uuid[7], uuid[8], uuid[9],
> - uuid[10], uuid[11], uuid[12], uuid[13],
> - uuid[14], uuid[15]);
> - }
> + if (gfs2_uuid_valid(uuid))
> + add_uevent_var(env, "UUID=%pUX", uuid);
> return 0;
> }
>
next prev parent reply other threads:[~2009-09-29 8:49 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-29 5:01 [PATCH 0/9] Add vsprintf extension %pU to print UUID/GUIDs and use it Joe Perches
2009-09-29 5:01 ` [PATCH 1/9] lib/vsprintf.c: Add %pU to print UUID/GUIDs Joe Perches
2009-10-01 7:10 ` Geert Uytterhoeven
2009-10-01 7:26 ` Joe Perches
2009-10-01 8:55 ` Geert Uytterhoeven
2009-10-07 0:07 ` Joe Perches
2009-09-29 5:01 ` [PATCH 2/9] efi.h: Use %pUr to print UUIDs Joe Perches
2009-09-29 5:01 ` [PATCH 3/9] random.c: Use %pU " Joe Perches
2009-09-29 5:01 ` [PATCH 4/9] drivers/firmware/dmi_scan.c: Use %pUX " Joe Perches
2009-09-29 5:01 ` [PATCH 5/9] drivers/md/md.c: Use %pU " Joe Perches
2009-09-29 5:01 ` [PATCH 6/9] drivers/media/video/uvc: Use %pUr " Joe Perches
2009-10-01 0:20 ` Laurent Pinchart
2009-10-01 0:24 ` Joe Perches
2009-09-29 5:01 ` [PATCH 7/9] fs/gfs2/sys.c: Use %pUX " Joe Perches
2009-09-29 8:50 ` Steven Whitehouse [this message]
2009-09-29 5:01 ` [PATCH 8/9] fs/ubifs: " Joe Perches
2009-09-29 12:32 ` Artem Bityutskiy
2009-09-29 5:01 ` [PATCH 9/9] fs/xfs/xfs_log_recover.c: Use %pU " Joe Perches
2009-09-29 5:57 ` [PATCH 0/9] Add vsprintf extension %pU to print UUID/GUIDs and use it Huang Ying
2009-10-01 0:07 ` Laurent Pinchart
2009-10-01 0:20 ` Joe Perches
2009-10-10 5:50 ` Huang Ying
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=1254214252.2721.6.camel@localhost.localdomain \
--to=swhiteho@redhat.com \
--cc=adas@redhat.com \
--cc=adrian.hunter@nokia.com \
--cc=aelder@sgi.com \
--cc=cluster-devel@redhat.com \
--cc=dedekind@infradead.org \
--cc=harvey.harrison@gmail.com \
--cc=hch@lst.de \
--cc=jgarzik@redhat.com \
--cc=joe@perches.com \
--cc=laurent.pinchart@skynet.be \
--cc=linux-kernel@vger.kernel.org \
--cc=mchehab@infradead.org \
--cc=mingo@elte.hu \
--cc=mpm@selenic.com \
--cc=neilb@suse.de \
--cc=xfs-masters@oss.sgi.com \
--cc=ying.huang@intel.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
Powered by JetHome