mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jan Veldeman <jan.veldeman@advalvas.be>
To: Ingo Oeser <ioe-lkml@rameria.de>
Cc: domen@coderock.org, akpm@osdl.org, linux-kernel@vger.kernel.org
Subject: Re: [patch 3/5] Driver core: Documentation: use snprintf and strnlen
Date: Mon, 1 Aug 2005 10:50:04 +0200	[thread overview]
Message-ID: <20050801085004.GA25253@eros.intern.mind.be> (raw)
In-Reply-To: <200507312025.54600.ioe-lkml@rameria.de>

Hi Ingo,

Ingo Oeser wrote:

> On Sunday 31 July 2005 13:12, domen@coderock.org wrote:
> > From: Jan Veldeman <jan@mind.be>
> > Documentation should give the good example of using snprintf and
> > strnlen in stead of sprintf and strlen.
> > 
> > PAGE_SIZE is used as the maximal length to reflect the behaviour of
> > show/store.
> 
> The whole part of the Documentation is obsoleted by the fact,
> that struct device has no structure member called "name".
> 
> People hacking sysfs should also try to hack the docu to match or
> at least remove the obsolete parts of it.
> 
> So you can drop this patch altogether, I think.
> 
> 

Even though the example doesn't work (the comment below the example even
indicates it shouldn't be done), I would suggest to still apply this
patch, as it shows the good usage of snprintf in stead of sprintf:

Somebody who looks at the documentation will certainly change the
contents of the attribute (this is by all means the reason for such an
example), but will not likely change the way sprintf is used.

Best regards,
Jan



      reply	other threads:[~2005-08-01  8:50 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-07-31 11:12 domen
2005-07-31 18:25 ` Ingo Oeser
2005-08-01  8:50   ` Jan Veldeman [this message]

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=20050801085004.GA25253@eros.intern.mind.be \
    --to=jan.veldeman@advalvas.be \
    --cc=akpm@osdl.org \
    --cc=domen@coderock.org \
    --cc=ioe-lkml@rameria.de \
    --cc=linux-kernel@vger.kernel.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

Powered by JetHome