Commit c032e2a98c1c23bdd281ebf0aa4593e87813e1e0

Authored by ths
1 parent 42550fde

Fix -cdrom breakage.


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2266 c046a42c-6fe2-441c-8c8c-71466251a162
Showing 1 changed file with 5 additions and 5 deletions
@@ -6749,7 +6749,7 @@ int main(int argc, char **argv) @@ -6749,7 +6749,7 @@ int main(int argc, char **argv)
6749 "hdx=a,img=", "hdx=b,img=", "hdx=c,img=", "hdx=d,img=" }; 6749 "hdx=a,img=", "hdx=b,img=", "hdx=c,img=", "hdx=d,img=" };
6750 6750
6751 hd_index = popt->index - QEMU_OPTION_hda; 6751 hd_index = popt->index - QEMU_OPTION_hda;
6752 - if (num_ide_disks >= MAX_DISKS){ 6752 + if (num_ide_disks >= MAX_DISKS) {
6753 fprintf(stderr, "qemu: too many IDE disks defined.\n"); 6753 fprintf(stderr, "qemu: too many IDE disks defined.\n");
6754 exit(1); 6754 exit(1);
6755 } 6755 }
@@ -6868,7 +6868,7 @@ int main(int argc, char **argv) @@ -6868,7 +6868,7 @@ int main(int argc, char **argv)
6868 break; 6868 break;
6869 case QEMU_OPTION_cdrom: 6869 case QEMU_OPTION_cdrom:
6870 { 6870 {
6871 - char buf[24]; 6871 + char buf[22];
6872 if (num_ide_disks >= MAX_DISKS) { 6872 if (num_ide_disks >= MAX_DISKS) {
6873 fprintf(stderr, "qemu: too many IDE disks/cdroms defined.\n"); 6873 fprintf(stderr, "qemu: too many IDE disks/cdroms defined.\n");
6874 exit(1); 6874 exit(1);
@@ -6876,11 +6876,11 @@ int main(int argc, char **argv) @@ -6876,11 +6876,11 @@ int main(int argc, char **argv)
6876 snprintf(buf, sizeof(buf), "type=cdrom,hdx=%c,img=", cdrom_index + 'a'); 6876 snprintf(buf, sizeof(buf), "type=cdrom,hdx=%c,img=", cdrom_index + 'a');
6877 /* Build new disk IDE syntax string */ 6877 /* Build new disk IDE syntax string */
6878 pstrcpy(ide_options[cdrom_index], 6878 pstrcpy(ide_options[cdrom_index],
6879 - 25, 6879 + 22,
6880 buf); 6880 buf);
6881 /* Add on image filename */ 6881 /* Add on image filename */
6882 - pstrcpy(&(ide_options[cdrom_index][24]),  
6883 - sizeof(ide_options[0])-24, 6882 + pstrcpy(&(ide_options[cdrom_index][21]),
  6883 + sizeof(ide_options[0])-21,
6884 optarg); 6884 optarg);
6885 num_ide_disks++; 6885 num_ide_disks++;
6886 } 6886 }