[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <5d3edf851a4cb01c3f42b5efa05f5a9bb694d29b.1254193019.git.joe@perches.com>
Date: Mon, 28 Sep 2009 22:01:09 -0700
From: Joe Perches <joe@...ches.com>
To: linux-kernel@...r.kernel.org
Cc: Adrian Hunter <adrian.hunter@...ia.com>,
Alex Elder <aelder@....com>,
Artem Bityutskiy <dedekind@...radead.org>,
Christoph Hellwig <hch@....de>,
Harvey Harrison <harvey.harrison@...il.com>,
Huang Ying <ying.huang@...el.com>, Ingo Molnar <mingo@...e.hu>,
Jeff Garzik <jgarzik@...hat.com>,
Laurent Pinchart <laurent.pinchart@...net.be>,
Matt Mackall <mpm@...enic.com>,
Mauro Carvalho Chehab <mchehab@...radead.org>,
Neil Brown <neilb@...e.de>,
Steven Whitehouse <swhiteho@...hat.com>,
xfs-masters@....sgi.com, Abhijith Das <adas@...hat.com>,
cluster-devel@...hat.com
Subject: [PATCH 7/9] fs/gfs2/sys.c: Use %pUX to print UUIDs
Signed-off-by: Joe Perches <joe@...ches.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;
}
--
1.6.3.1.10.g659a0.dirty
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists