From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752906AbZI2FBW (ORCPT ); Tue, 29 Sep 2009 01:01:22 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752336AbZI2FBO (ORCPT ); Tue, 29 Sep 2009 01:01:14 -0400 Received: from mail.perches.com ([173.55.12.10]:1300 "EHLO mail.perches.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752340AbZI2FBM (ORCPT ); Tue, 29 Sep 2009 01:01:12 -0400 From: Joe Perches To: linux-kernel@vger.kernel.org Cc: Adrian Hunter , Alex Elder , Artem Bityutskiy , Christoph Hellwig , Harvey Harrison , Huang Ying , Ingo Molnar , Jeff Garzik , Laurent Pinchart , Matt Mackall , Mauro Carvalho Chehab , Neil Brown , Steven Whitehouse , xfs-masters@oss.sgi.com, Yinghai Lu Subject: [PATCH 3/9] random.c: Use %pU to print UUIDs Date: Mon, 28 Sep 2009 22:01:05 -0700 Message-Id: X-Mailer: git-send-email 1.6.3.1.10.g659a0.dirty In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Signed-off-by: Joe Perches --- 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