qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "M. Warner Losh" <imp@bsdimp.com>
To: qemu-devel@nongnu.org, aliguori@us.ibm.com
Cc: amit.shah@redhat.com
Subject: Re: [Qemu-devel] [PATCH] Introduce get_datafile_dir() to replace bios_dir
Date: Thu, 26 Feb 2009 09:53:46 -0700 (MST)	[thread overview]
Message-ID: <20090226.095346.-658329428.imp@bsdimp.com> (raw)
In-Reply-To: <49A6C550.7070005@us.ibm.com>

In message: <49A6C550.7070005@us.ibm.com>
            Anthony Liguori <aliguori@us.ibm.com> writes:
: Amit Shah wrote:
: > bios_dir really is $(PREFIX)/share/qemu/ (or the dir. specified by
: > -L). It currently stores some firmware images and keymaps, so the
: > name bios_dir is really a misnomer.
: >
: > Replace it with a helper, get_datafile_dir().
: >
: >
: > +static void set_datafile_dir(const char *dir)
: > +{
: > +    strncpy(datafile_dir, dir, sizeof(datafile_dir) - 1);
: > +    datafile_dir[sizeof(datafile_dir) - 1] = 0;
: > +}
: >   
: 
: While this is a safe usage of strncpy(), strncpy() has such weird 
: semantics that it would be better to just use snprintf().

Better performance to, but I doubt that would matter here...

Warner

  reply	other threads:[~2009-02-26 16:55 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-15 11:03 [Qemu-devel] [PATCH] Introduce get_datafile_dir() to replace bios_dir Amit Shah
2009-02-26 16:37 ` Anthony Liguori
2009-02-26 16:53   ` M. Warner Losh [this message]
  -- strict thread matches above, loose matches on Subject: below --
2009-02-10  7:56 Amit Shah

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=20090226.095346.-658329428.imp@bsdimp.com \
    --to=imp@bsdimp.com \
    --cc=aliguori@us.ibm.com \
    --cc=amit.shah@redhat.com \
    --cc=qemu-devel@nongnu.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).