aboutsummaryrefslogtreecommitdiff
path: root/vl.c
diff options
context:
space:
mode:
authorths <ths@c046a42c-6fe2-441c-8c8c-71466251a162>2006-12-22 17:29:05 +0000
committerths <ths@c046a42c-6fe2-441c-8c8c-71466251a162>2006-12-22 17:29:05 +0000
commitc032e2a98c1c23bdd281ebf0aa4593e87813e1e0 (patch)
tree7f5518a785d17ad8020e0c8f0414d2d77466c405 /vl.c
parent42550fde7e16ac040fbd391bb2c65c3f5fa08d60 (diff)
Fix -cdrom breakage.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2266 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'vl.c')
-rw-r--r--vl.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/vl.c b/vl.c
index bdd46c3283..7e161c69c4 100644
--- a/vl.c
+++ b/vl.c
@@ -6749,7 +6749,7 @@ int main(int argc, char **argv)
"hdx=a,img=", "hdx=b,img=", "hdx=c,img=", "hdx=d,img=" };
hd_index = popt->index - QEMU_OPTION_hda;
- if (num_ide_disks >= MAX_DISKS){
+ if (num_ide_disks >= MAX_DISKS) {
fprintf(stderr, "qemu: too many IDE disks defined.\n");
exit(1);
}
@@ -6868,7 +6868,7 @@ int main(int argc, char **argv)
break;
case QEMU_OPTION_cdrom:
{
- char buf[24];
+ char buf[22];
if (num_ide_disks >= MAX_DISKS) {
fprintf(stderr, "qemu: too many IDE disks/cdroms defined.\n");
exit(1);
@@ -6876,11 +6876,11 @@ int main(int argc, char **argv)
snprintf(buf, sizeof(buf), "type=cdrom,hdx=%c,img=", cdrom_index + 'a');
/* Build new disk IDE syntax string */
pstrcpy(ide_options[cdrom_index],
- 25,
+ 22,
buf);
/* Add on image filename */
- pstrcpy(&(ide_options[cdrom_index][24]),
- sizeof(ide_options[0])-24,
+ pstrcpy(&(ide_options[cdrom_index][21]),
+ sizeof(ide_options[0])-21,
optarg);
num_ide_disks++;
}