From: Christoph Hellwig <hch@lst.de>
To: Christoph Egger <Christoph.Egger@amd.com>
Cc: "qemu-devel@nongnu.org" <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH] block/raw-posix: use a character device if a block device is given
Date: Mon, 23 May 2011 15:42:58 +0200 [thread overview]
Message-ID: <20110523134258.GA18354@lst.de> (raw)
In-Reply-To: <4DDA5442.30801@amd.com>
> + if (lstat(filename, &sb) < 0) {
> + fprintf(stderr, "%s: stat failed: %s\n", filename,
> strerror(errno));
> + return -errno;
> + }
> +
> + if (S_ISBLK(sb.st_mode))
> + filename = raw_get_rawdevice(filename);
Please move the lstat and S_ISBLK check into raw_get_rawdevice. Also
it might be worth to rename it to something like raw_normalize_devicepath.
next prev parent reply other threads:[~2011-05-23 13:43 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-23 12:34 [Qemu-devel] [PATCH] block/raw-posix: use a character device if a block device is given Christoph Egger
2011-05-23 13:42 ` Christoph Hellwig [this message]
2011-05-23 13:49 ` Christoph Egger
2011-05-23 14:11 ` Kevin Wolf
2011-05-24 8:36 ` Christoph Egger
2011-05-24 9:10 ` Kevin Wolf
2011-05-24 9:24 ` Christoph Egger
-- strict thread matches above, loose matches on Subject: below --
2011-05-24 9:30 Christoph Egger
2011-05-25 10:43 ` Kevin Wolf
2011-05-25 12:19 ` Christoph Egger
2011-05-25 13:01 ` Kevin Wolf
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=20110523134258.GA18354@lst.de \
--to=hch@lst.de \
--cc=Christoph.Egger@amd.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).