qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Eduardo Felipe" <edusaper@gmail.com>
To: qemu-devel <qemu-devel@nongnu.org>
Subject: [Qemu-devel] [PATCH] Fix drive names in windows
Date: Fri, 21 Dec 2007 01:28:08 +0100	[thread overview]
Message-ID: <83a4d4ca0712201628l112abc06p85dea81b5f26dca6@mail.gmail.com> (raw)


[-- Attachment #1.1: Type: text/plain, Size: 122 bytes --]

Hi,

Attached patch fixes drive names for windows. Using $ in formatting strings
seems to be Unix specific.

Regards,
Edu

[-- Attachment #1.2: Type: text/html, Size: 141 bytes --]

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: fix_drive_name.patch --]
[-- Type: text/x-patch; name=fix_drive_name.patch, Size: 699 bytes --]

--- vl.c	17 Dec 2007 04:42:28 -0000	1.388
+++ vl.c	21 Dec 2007 00:08:50 -0000
@@ -5091,8 +5091,13 @@
 
     if (type == IF_IDE || type == IF_SCSI)
         mediastr = (media == MEDIA_CDROM) ? "-cd" : "-hd";
-    snprintf(buf, sizeof(buf), max_devs ? "%1$s%4$i%2$s%3$i" : "%s%s%i",
-             devname, mediastr, unit_id, bus_id);
+    if (max_devs) {
+        snprintf(buf, sizeof(buf), "%s%i%s%i",
+                 devname, bus_id, mediastr, unit_id);
+    } else {
+        snprintf(buf, sizeof(buf), "%s%s%i",
+                 devname, mediastr, unit_id);
+    }
     bdrv = bdrv_new(buf);
     drives_table[nb_drives].bdrv = bdrv;
     drives_table[nb_drives].type = type;

                 reply	other threads:[~2007-12-21  0:28 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=83a4d4ca0712201628l112abc06p85dea81b5f26dca6@mail.gmail.com \
    --to=edusaper@gmail.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).