sim-card
/
qemu
Archived
10
0
Fork 0

Fix -cdrom breakage.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2266 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
ths 2006-12-22 17:29:05 +00:00
parent 42550fde7e
commit c032e2a98c
1 changed files with 5 additions and 5 deletions

8
vl.c
View File

@ -6868,7 +6868,7 @@ int main(int argc, char **argv)
break; break;
case QEMU_OPTION_cdrom: case QEMU_OPTION_cdrom:
{ {
char buf[24]; char buf[22];
if (num_ide_disks >= MAX_DISKS) { if (num_ide_disks >= MAX_DISKS) {
fprintf(stderr, "qemu: too many IDE disks/cdroms defined.\n"); fprintf(stderr, "qemu: too many IDE disks/cdroms defined.\n");
exit(1); exit(1);
@ -6876,11 +6876,11 @@ int main(int argc, char **argv)
snprintf(buf, sizeof(buf), "type=cdrom,hdx=%c,img=", cdrom_index + 'a'); snprintf(buf, sizeof(buf), "type=cdrom,hdx=%c,img=", cdrom_index + 'a');
/* Build new disk IDE syntax string */ /* Build new disk IDE syntax string */
pstrcpy(ide_options[cdrom_index], pstrcpy(ide_options[cdrom_index],
25, 22,
buf); buf);
/* Add on image filename */ /* Add on image filename */
pstrcpy(&(ide_options[cdrom_index][24]), pstrcpy(&(ide_options[cdrom_index][21]),
sizeof(ide_options[0])-24, sizeof(ide_options[0])-21,
optarg); optarg);
num_ide_disks++; num_ide_disks++;
} }