From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>
Cc: Kees Cook <keescook@chromium.org>, Jiri Slaby <jslaby@suse.cz>,
Al Viro <viro@zeniv.linux.org.uk>,
xemul@openvz.org, remi.denis-courmont@nokia.com,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
linux-sctp@vger.kernel.org, George Spelvin <linux@horizon.com>,
Andrew Morton <akpm@linux-foundation.org>,
Dan Carpenter <dan.carpenter@oracle.com>,
Jan Beulich <JBeulich@suse.com>, Joe Perches <joe@perches.com>,
Motohiro KOSAKI <kosaki.motohiro@gmail.com>
Subject: Re: [PATCH 1/2] remove all uses of printf's %n
Date: Sun, 22 Sep 2013 10:16:36 +0200 [thread overview]
Message-ID: <CAMuHMdVdgmio-VGhLRZBZBP8GL1bHDtu4z23z5jqSJKoOj4iXg@mail.gmail.com> (raw)
In-Reply-To: <201309210928.JCF90671.OtOFLFQSOJVFMH@I-love.SAKURA.ne.jp>
On Sat, Sep 21, 2013 at 2:28 AM, Tetsuo Handa
<penguin-kernel@i-love.sakura.ne.jp> wrote:
> Kees Cook wrote:
>> >> - seq_printf(seq, "%*s\n", 127 - len, "");
>> >> + seq_pad(seq, '\n');
>> >
>> > Hmm, seq_pad is unintuitive. I would say it pads the string by '\n'. Of
>> > course it does not, but...
>>
>> I don't think this is a very serious problem. Currently, the padding
>> character is always ' ' for all existing callers, so it only makes
>> sense to make the trailing character an argument.
>
> If you want, we can rename seq_pad() to seq_pad_and_putc(). Also we can pass
> both the padding character (e.g. ' ') and the trailing character (e.g. '\n')
> like seq_pad_and_putc((' ' << 8) | '\n'), though I wonder someone wants to
> use '\0', '\t', '\n' etc. as the padding character...
Not those special characters. '-' could be useful for tables (doh,
text-mode graphics
log output).
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
next prev parent reply other threads:[~2013-09-22 8:16 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CAGXu5jL+NeBw2_vXymM81UdtS6UO7KZA2S4rf3gwM_7nSJ2h6g@mail.gmail.com>
[not found] ` <20130917205742.16147.qmail@science.horizon.com>
[not found] ` <201309191756.BCF65661.MQFOLSJOFHFtOV@I-love.SAKURA.ne.jp>
[not found] ` <CAGXu5jK_D1BJOQr=1A-UFrpM5Ad+Qu894HT_XjkZh4EmsbCkTQ@mail.gmail.com>
2013-09-20 4:09 ` [PATCH 1/2] remove all uses of printf's %n Tetsuo Handa
2013-09-20 4:23 ` Joe Perches
2013-09-20 4:53 ` Kees Cook
2013-09-20 8:08 ` Jiri Slaby
2013-09-20 19:24 ` Kees Cook
2013-09-20 19:33 ` Joe Perches
2013-09-21 0:28 ` Tetsuo Handa
2013-09-22 8:09 ` George Spelvin
2013-09-22 8:16 ` Geert Uytterhoeven [this message]
2013-09-23 21:24 ` Kees Cook
2013-09-30 8:16 ` Tetsuo Handa
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=CAMuHMdVdgmio-VGhLRZBZBP8GL1bHDtu4z23z5jqSJKoOj4iXg@mail.gmail.com \
--to=geert@linux-m68k.org \
--cc=JBeulich@suse.com \
--cc=akpm@linux-foundation.org \
--cc=dan.carpenter@oracle.com \
--cc=joe@perches.com \
--cc=jslaby@suse.cz \
--cc=keescook@chromium.org \
--cc=kosaki.motohiro@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sctp@vger.kernel.org \
--cc=linux@horizon.com \
--cc=netdev@vger.kernel.org \
--cc=penguin-kernel@i-love.sakura.ne.jp \
--cc=remi.denis-courmont@nokia.com \
--cc=viro@zeniv.linux.org.uk \
--cc=xemul@openvz.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).