From: Johannes Schindelin <Johannes.Schindelin@gmx.de>
To: Lorenzo Campedelli <lorenzo.campedelli@tele2.it>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] Re: [PATCH] vvfat mbr fixes
Date: Sun, 23 Sep 2007 12:34:46 +0100 (BST) [thread overview]
Message-ID: <Pine.LNX.4.64.0709231223040.28395@racer.site> (raw)
In-Reply-To: <fd54o8$kjc$1@sea.gmane.org>
Hi,
On Sun, 23 Sep 2007, Lorenzo Campedelli wrote:
> While you are working on vvfat issues, could you give a look to the
> attached small patch?
Okay, this is what I would do:
- not make this handling dependent on vvfat (but this means checking if
the colon is the second character, because then it is most likely
a Windows path and does _not_ want special handling), and
- I'd use the result of strrchr() directly.
This is a sketch of the code I propose:
const char *tmp;
...
get_tmp_filename(tmp_filename, sizeof(tmp_filename));
/* Handle 'fat:rw:<filename>' */
tmp = strrchr(backing_filename, ':');
if (tmp - backing_filename == 2) /* DOS path */
tmp = NULL;
else if (tmp - backing_filename > 2 && tmp[-2] == ':')
tmp -= 2;
realpath(filename, tmp ? tmp : backing_filename);
Ciao,
Dscho
next prev parent reply other threads:[~2007-09-23 11:35 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-22 21:43 [Qemu-devel] [PATCH] vvfat mbr fixes Ivan Kalvachev
2007-09-22 22:48 ` Johannes Schindelin
2007-09-23 7:31 ` [Qemu-devel] " Lorenzo Campedelli
2007-09-23 11:34 ` Johannes Schindelin [this message]
2007-09-23 15:55 ` Lorenzo Campedelli
2007-09-23 19:18 ` Johannes Schindelin
2007-09-23 20:17 ` Lorenzo Campedelli
2007-09-24 10:50 ` [Qemu-devel] " Ivan Kalvachev
2007-09-24 11:18 ` Johannes Schindelin
2007-09-24 14:12 ` Ivan Kalvachev
2007-09-24 15:32 ` Johannes Schindelin
2007-09-24 17:23 ` Ivan Kalvachev
2007-09-24 19:19 ` [Qemu-devel] " Lorenzo Campedelli
2007-09-24 21:58 ` Johannes Schindelin
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=Pine.LNX.4.64.0709231223040.28395@racer.site \
--to=johannes.schindelin@gmx.de \
--cc=lorenzo.campedelli@tele2.it \
--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).