aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2009-12-14 21:01:11 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2009-12-15 11:53:33 -0500
commit35900771c06cee858b725ef7069fb6934691b319 (patch)
tree9f10572c710c0792c4cafe248143512e8208724c
parent03daa57cdb2198e36a41ca1f63a030759490363f (diff)
random.c: use %pU to print UUIDs
Signed-off-by: Joe Perches <joe@perches.com> Acked-by: Matt Mackall <mpm@selenic.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--drivers/char/random.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/drivers/char/random.c b/drivers/char/random.c
index dcd08635cf1b..8258982b49ec 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,
1245 if (uuid[8] == 0) 1245 if (uuid[8] == 0)
1246 generate_random_uuid(uuid); 1246 generate_random_uuid(uuid);
1247 1247
1248 sprintf(buf, "%02x%02x%02x%02x-%02x%02x-%02x%02x-%02x%02x-" 1248 sprintf(buf, "%pU", uuid);
1249 "%02x%02x%02x%02x%02x%02x", 1249
1250 uuid[0], uuid[1], uuid[2], uuid[3],
1251 uuid[4], uuid[5], uuid[6], uuid[7],
1252 uuid[8], uuid[9], uuid[10], uuid[11],
1253 uuid[12], uuid[13], uuid[14], uuid[15]);
1254 fake_table.data = buf; 1250 fake_table.data = buf;
1255 fake_table.maxlen = sizeof(buf); 1251 fake_table.maxlen = sizeof(buf);
1256 1252
@@ -1310,7 +1306,7 @@ ctl_table random_table[] = {
1310 1306
1311/******************************************************************** 1307/********************************************************************
1312 * 1308 *
1313 * Random funtions for networking 1309 * Random functions for networking
1314 * 1310 *
1315 ********************************************************************/ 1311 ********************************************************************/
1316 1312