* [Cluster-devel] [PATCH 0/8] Add vsprintf extension %pU to print UUID/GUIDs and use it @ 2009-10-07 4:45 Joe Perches 2009-10-07 4:45 ` [Cluster-devel] [PATCH 6/8] fs/gfs2/sys.c: Use %pUB to print UUIDs Joe Perches 0 siblings, 1 reply; 2+ messages in thread From: Joe Perches @ 2009-10-07 4:45 UTC (permalink / raw) To: cluster-devel.redhat.com Using %pU makes an x86 defconfig image a bit smaller before: $ size vmlinux text data bss dec hex filename 6976022 679572 1359668 9015262 898fde vmlinux after: $ size vmlinux text data bss dec hex filename 6975863 679652 1359668 9015183 898f8f vmlinux Joe Perches (8): lib/vsprintf.c: Add %pU to print UUID/GUIDs random.c: Use %pU to print UUIDs drivers/firmware/dmi_scan.c: Use %pUB to print UUIDs drivers/md/md.c: Use %pU to print UUIDs drivers/media/video/uvc: Use %pUl to print UUIDs fs/gfs2/sys.c: Use %pUB to print UUIDs fs/ubifs: Use %pUB to print UUIDs fs/xfs/xfs_log_recover.c: Use %pU to print UUIDs drivers/char/random.c | 10 +--- drivers/firmware/dmi_scan.c | 5 +-- drivers/md/md.c | 16 ++------ drivers/media/video/uvc/uvc_ctrl.c | 69 ++++++++++++++++------------------ drivers/media/video/uvc/uvc_driver.c | 7 +-- drivers/media/video/uvc/uvcvideo.h | 10 ----- fs/gfs2/sys.c | 16 +------ fs/ubifs/debug.c | 9 +--- fs/ubifs/super.c | 7 +--- fs/xfs/xfs_log_recover.c | 14 ++----- lib/vsprintf.c | 62 ++++++++++++++++++++++++++++++- 11 files changed, 114 insertions(+), 111 deletions(-) ^ permalink raw reply [flat|nested] 2+ messages in thread
* [Cluster-devel] [PATCH 6/8] fs/gfs2/sys.c: Use %pUB to print UUIDs 2009-10-07 4:45 [Cluster-devel] [PATCH 0/8] Add vsprintf extension %pU to print UUID/GUIDs and use it Joe Perches @ 2009-10-07 4:45 ` Joe Perches 0 siblings, 0 replies; 2+ messages in thread From: Joe Perches @ 2009-10-07 4:45 UTC (permalink / raw) To: cluster-devel.redhat.com 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..25f03da 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, "%pUB\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=%pUB", uuid); return 0; } -- 1.6.3.1.10.g659a0.dirty ^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-10-07 4:45 UTC | newest] Thread overview: 2+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2009-10-07 4:45 [Cluster-devel] [PATCH 0/8] Add vsprintf extension %pU to print UUID/GUIDs and use it Joe Perches 2009-10-07 4:45 ` [Cluster-devel] [PATCH 6/8] fs/gfs2/sys.c: Use %pUB to print UUIDs Joe Perches
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).