From: Joe Perches <joe@perches.com>
To: linux-kernel@vger.kernel.org, Andrew Morton <akpm@linux-foundation.org>
Cc: Matt Mackall <mpm@selenic.com>
Subject: [PATCH 2/8] random.c: Use %pU to print UUIDs
Date: Tue, 6 Oct 2009 21:45:35 -0700 [thread overview]
Message-ID: <f1bf1e935f962ce807a0d70e1657ac778ca833ba.1254884776.git.joe@perches.com> (raw)
In-Reply-To: <1254890742-28245-1-git-send-email-joe@perches.com>
In-Reply-To: <cover.1254884776.git.joe@perches.com>
Signed-off-by: Joe Perches <joe@perches.com>
---
drivers/char/random.c | 10 +++-------
1 files changed, 3 insertions(+), 7 deletions(-)
diff --git a/drivers/char/random.c b/drivers/char/random.c
index 04b505e..7104df9 100644
--- a/drivers/char/random.c
+++ b/drivers/char/random.c
@@ -1245,12 +1245,8 @@ static int proc_do_uuid(ctl_table *table, int write,
if (uuid[8] == 0)
generate_random_uuid(uuid);
- sprintf(buf, "%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]);
+ sprintf(buf, "%pU", uuid);
+
fake_table.data = buf;
fake_table.maxlen = sizeof(buf);
@@ -1350,7 +1346,7 @@ ctl_table random_table[] = {
/********************************************************************
*
- * Random funtions for networking
+ * Random functions for networking
*
********************************************************************/
--
1.6.3.1.10.g659a0.dirty
next prev parent reply other threads:[~2009-10-07 4:46 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-07 4:45 [PATCH 0/8] Add vsprintf extension %pU to print UUID/GUIDs and use it Joe Perches
[not found] ` <cover.1254884776.git.joe@perches.com>
2009-10-07 4:45 ` [PATCH 1/8] lib/vsprintf.c: Add %pU to print UUID/GUIDs Joe Perches
2009-10-07 4:45 ` Joe Perches [this message]
2009-10-07 5:19 ` [PATCH 2/8] random.c: Use %pU to print UUIDs Matt Mackall
2009-10-07 4:45 ` [PATCH 3/8] drivers/firmware/dmi_scan.c: Use %pUB " Joe Perches
2009-10-07 4:45 ` [PATCH 4/8] drivers/md/md.c: Use %pU " Joe Perches
2009-10-07 4:45 ` [PATCH 5/8] drivers/media/video/uvc: Use %pUl " Joe Perches
2009-10-11 22:34 ` Laurent Pinchart
2009-10-31 9:07 ` Mauro Carvalho Chehab
2009-10-31 19:10 ` Laurent Pinchart
2009-10-31 19:27 ` Joe Perches
2009-11-04 14:42 ` Laurent Pinchart
2009-11-04 16:42 ` Joe Perches
2009-10-07 4:45 ` [PATCH 6/8] fs/gfs2/sys.c: Use %pUB " Joe Perches
2009-10-07 4:45 ` [PATCH 7/8] fs/ubifs: " Joe Perches
2009-10-07 4:45 ` [PATCH 8/8] fs/xfs/xfs_log_recover.c: Use %pU " Joe Perches
2009-10-07 6:11 ` [PATCH 9/8] efi.h: Use %pUl " Joe Perches
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=f1bf1e935f962ce807a0d70e1657ac778ca833ba.1254884776.git.joe@perches.com \
--to=joe@perches.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mpm@selenic.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
all inboxes | Powered by JetHome®