Avoid the use of $ in format strings because it's system-specific - fixes drive names under Win32 (Eduardo Felipe).
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3846 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
		
							parent
							
								
									06177d36ed
								
							
						
					
					
						commit
						e6198a7023
					
				
							
								
								
									
										8
									
								
								vl.c
									
									
									
									
									
								
							
							
						
						
									
										8
									
								
								vl.c
									
									
									
									
									
								
							@ -5091,8 +5091,12 @@ static int drive_init(const char *str, int snapshot, QEMUMachine *machine)
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    if (type == IF_IDE || type == IF_SCSI)
 | 
					    if (type == IF_IDE || type == IF_SCSI)
 | 
				
			||||||
        mediastr = (media == MEDIA_CDROM) ? "-cd" : "-hd";
 | 
					        mediastr = (media == MEDIA_CDROM) ? "-cd" : "-hd";
 | 
				
			||||||
    snprintf(buf, sizeof(buf), max_devs ? "%1$s%4$i%2$s%3$i" : "%s%s%i",
 | 
					    if (max_devs)
 | 
				
			||||||
             devname, mediastr, unit_id, bus_id);
 | 
					        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);
 | 
					    bdrv = bdrv_new(buf);
 | 
				
			||||||
    drives_table[nb_drives].bdrv = bdrv;
 | 
					    drives_table[nb_drives].bdrv = bdrv;
 | 
				
			||||||
    drives_table[nb_drives].type = type;
 | 
					    drives_table[nb_drives].type = type;
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user