[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1459898182.6715.22.camel@perches.com>
Date: Tue, 05 Apr 2016 16:16:22 -0700
From: Joe Perches <joe@...ches.com>
To: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
Dmitry Kasatkin <dmitry.kasatkin@...il.com>,
Mimi Zohar <zohar@...ux.vnet.ibm.com>,
linux-kernel@...r.kernel.org, linux-api@...r.kernel.org,
Andrew Morton <akpm@...ux-foundation.org>,
Rasmus Villemoes <linux@...musvillemoes.dk>,
linux-efi@...r.kernel.org, Matt Fleming <matt@...eblueprint.co.uk>,
Arnd Bergmann <arnd@...db.de>, Theodore Ts'o <tytso@....edu>
Subject: Re: [PATCH v3 02/10] ima: use %pU to output UUID in printable format
On Tue, 2016-04-05 at 16:56 +0300, Andy Shevchenko wrote:
> Instead of open coded variant re-use extension what vsprintf.c provides us for
> ages.
trivia:
> diff --git a/security/integrity/ima/ima_policy.c b/security/integrity/ima/ima_policy.c
[]
> @@ -1012,17 +1012,7 @@ int ima_policy_show(struct seq_file *m, void *v)
> }
>
> if (entry->flags & IMA_FSUUID) {
> - seq_puts(m, "fsuuid=");
> - for (i = 0; i < ARRAY_SIZE(entry->fsuuid); ++i) {
> - switch (i) {
> - case 4:
> - case 6:
> - case 8:
> - case 10:
> - seq_puts(m, "-");
> - }
> - seq_printf(m, "%x", entry->fsuuid[i]);
> - }
> + seq_printf(m, "fsuuid=%pU", entry->fsuuid);
> seq_puts(m, " ");
> }
Maybe combine the printf and puts
seq_printf(m, "fsuuid=%pU ", entry->fsuuid);
Powered by blists - more mailing lists