qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] Fix drive names in windows
@ 2007-12-21  0:28 Eduardo Felipe
  0 siblings, 0 replies; only message in thread
From: Eduardo Felipe @ 2007-12-21  0:28 UTC (permalink / raw)
  To: qemu-devel


[-- 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;

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2007-12-21  0:28 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-12-21  0:28 [Qemu-devel] [PATCH] Fix drive names in windows Eduardo Felipe

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).