| To: | linux-kernel@xxxxxxxxxxxxxxx |
|---|---|
| Subject: | [PATCH 3/9] random.c: Use %pU to print UUIDs |
| From: | Joe Perches <joe@xxxxxxxxxxx> |
| Date: | Mon, 28 Sep 2009 22:01:05 -0700 |
| Cc: | Adrian Hunter <adrian.hunter@xxxxxxxxx>, Alex Elder <aelder@xxxxxxx>, Artem Bityutskiy <dedekind@xxxxxxxxxxxxx>, Christoph Hellwig <hch@xxxxxx>, Harvey Harrison <harvey.harrison@xxxxxxxxx>, Huang Ying <ying.huang@xxxxxxxxx>, Ingo Molnar <mingo@xxxxxxx>, Jeff Garzik <jgarzik@xxxxxxxxxx>, Laurent Pinchart <laurent.pinchart@xxxxxxxxx>, Matt Mackall <mpm@xxxxxxxxxxx>, Mauro Carvalho Chehab <mchehab@xxxxxxxxxxxxx>, Neil Brown <neilb@xxxxxxx>, Steven Whitehouse <swhiteho@xxxxxxxxxx>, xfs-masters@xxxxxxxxxxx, Yinghai Lu <yinghai@xxxxxxxxxx> |
| In-reply-to: | <cover.1254193019.git.joe@xxxxxxxxxxx> |
| References: | <cover.1254193019.git.joe@xxxxxxxxxxx> |
Signed-off-by: Joe Perches <joe@xxxxxxxxxxx>
---
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
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | [PATCH 1/9] lib/vsprintf.c: Add %pU to print UUID/GUIDs, Joe Perches |
|---|---|
| Next by Date: | [PATCH 4/9] drivers/firmware/dmi_scan.c: Use %pUX to print UUIDs, Joe Perches |
| Previous by Thread: | [PATCH 1/9] lib/vsprintf.c: Add %pU to print UUID/GUIDs, Joe Perches |
| Next by Thread: | [PATCH 4/9] drivers/firmware/dmi_scan.c: Use %pUX to print UUIDs, Joe Perches |
| Indexes: | [Date] [Thread] [Top] [All Lists] |