From: Joe Perches Date: Tue, 15 Dec 2009 02:01:11 +0000 (-0800) Subject: random.c: use %pU to print UUIDs X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=35900771c06cee858b725ef7069fb6934691b319;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git random.c: use %pU to print UUIDs Signed-off-by: Joe Perches Acked-by: Matt Mackall Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- 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, 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); @@ -1310,7 +1306,7 @@ ctl_table random_table[] = { /******************************************************************** * - * Random funtions for networking + * Random functions for networking * ********************************************************************/