From: Joe Perches <joe-6d6DIl74uiNBDgjK7y7TUQ@public.gmane.org>
To: Andy Shevchenko
<andriy.shevchenko-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>,
Dmitry Kasatkin
<dmitry.kasatkin-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
Mimi Zohar
<zohar-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Andrew Morton
<akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>,
Rasmus Villemoes
<linux-qQsb+v5E8BnlAoU/VqSP6n9LOBIZ5rWg@public.gmane.org>,
linux-efi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Matt Fleming
<matt-mF/unelCI9GS6iBeEJttW/XRex20P6io@public.gmane.org>,
Arnd Bergmann <arnd-r2nGTMty4D4@public.gmane.org>,
Theodore Ts'o <tytso-3s7WtUTddSA@public.gmane.org>
Subject: Re: [PATCH v3 02/10] ima: use %pU to output UUID in printable format
Date: Tue, 05 Apr 2016 16:16:22 -0700 [thread overview]
Message-ID: <1459898182.6715.22.camel@perches.com> (raw)
In-Reply-To: <1459864579-55988-3-git-send-email-andriy.shevchenko-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
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);
WARNING: multiple messages have this Message-ID (diff)
From: Joe Perches <joe@perches.com>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
Dmitry Kasatkin <dmitry.kasatkin@gmail.com>,
Mimi Zohar <zohar@linux.vnet.ibm.com>,
linux-kernel@vger.kernel.org, linux-api@vger.kernel.org,
Andrew Morton <akpm@linux-foundation.org>,
Rasmus Villemoes <linux@rasmusvillemoes.dk>,
linux-efi@vger.kernel.org,
Matt Fleming <matt@codeblueprint.co.uk>,
Arnd Bergmann <arnd@arndb.de>, "Theodore Ts'o" <tytso@mit.edu>
Subject: Re: [PATCH v3 02/10] ima: use %pU to output UUID in printable format
Date: Tue, 05 Apr 2016 16:16:22 -0700 [thread overview]
Message-ID: <1459898182.6715.22.camel@perches.com> (raw)
In-Reply-To: <1459864579-55988-3-git-send-email-andriy.shevchenko@linux.intel.com>
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);
next prev parent reply other threads:[~2016-04-05 23:16 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-05 13:56 [PATCH v3 00/10] uuid: convert users to generic UUID API Andy Shevchenko
2016-04-05 13:56 ` [PATCH v3 03/10] lib/uuid: move generate_random_uuid() to uuid.c Andy Shevchenko
[not found] ` <1459864579-55988-1-git-send-email-andriy.shevchenko-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2016-04-05 13:56 ` [PATCH v3 01/10] lib/vsprintf: simplify UUID printing Andy Shevchenko
2016-04-05 13:56 ` Andy Shevchenko
2016-04-05 13:56 ` [PATCH v3 02/10] ima: use %pU to output UUID in printable format Andy Shevchenko
2016-04-05 13:56 ` Andy Shevchenko
[not found] ` <1459864579-55988-3-git-send-email-andriy.shevchenko-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2016-04-05 23:16 ` Joe Perches [this message]
2016-04-05 23:16 ` Joe Perches
[not found] ` <1459898182.6715.22.camel-6d6DIl74uiNBDgjK7y7TUQ@public.gmane.org>
2016-04-06 11:02 ` Andy Shevchenko
2016-04-06 11:02 ` Andy Shevchenko
2016-04-05 13:56 ` [PATCH v3 04/10] lib/uuid: introduce few more generic helpers for UUID Andy Shevchenko
2016-04-05 13:56 ` Andy Shevchenko
[not found] ` <1459864579-55988-5-git-send-email-andriy.shevchenko-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2016-04-05 14:15 ` Andy Shevchenko
2016-04-05 14:15 ` Andy Shevchenko
2016-04-05 13:56 ` [PATCH v3 05/10] lib/uuid: remove FSF address Andy Shevchenko
2016-04-05 13:56 ` Andy Shevchenko
2016-04-05 13:56 ` [PATCH v3 06/10] sysctl: drop away useless label Andy Shevchenko
2016-04-05 13:56 ` Andy Shevchenko
[not found] ` <1459864579-55988-7-git-send-email-andriy.shevchenko-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2016-04-05 22:17 ` Andrew Morton
2016-04-05 22:17 ` Andrew Morton
[not found] ` <20160405151752.de82f221f1c70ff901b2b958-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>
2016-04-06 11:34 ` Andy Shevchenko
2016-04-06 11:34 ` Andy Shevchenko
2016-04-05 13:56 ` [PATCH v3 08/10] efi: redefine type, constant, macro from generic code Andy Shevchenko
2016-04-05 13:56 ` Andy Shevchenko
2016-04-05 13:56 ` [PATCH v3 07/10] sysctl: use generic UUID library Andy Shevchenko
2016-04-05 13:56 ` [PATCH v3 09/10] efivars: " Andy Shevchenko
2016-04-05 13:56 ` [PATCH v3 10/10] genhd: move to " Andy Shevchenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1459898182.6715.22.camel@perches.com \
--to=joe-6d6dil74uinbdgjk7y7tuq@public.gmane.org \
--cc=akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org \
--cc=andriy.shevchenko-VuQAYsv1563Yd54FQh9/CA@public.gmane.org \
--cc=arnd-r2nGTMty4D4@public.gmane.org \
--cc=dmitry.kasatkin-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-efi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-qQsb+v5E8BnlAoU/VqSP6n9LOBIZ5rWg@public.gmane.org \
--cc=matt-mF/unelCI9GS6iBeEJttW/XRex20P6io@public.gmane.org \
--cc=tytso-3s7WtUTddSA@public.gmane.org \
--cc=zohar-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.