提交 1f958449 编写于 作者: T ths

Null character instead of numeric null.


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2277 c046a42c-6fe2-441c-8c8c-71466251a162
上级 a14d6c8c
......@@ -3881,7 +3881,7 @@ static int disk_options_init(int num_ide_disks,
}
if (cdrom_device) {
snprintf(dev_name, sizeof(dev_name), "cdrom%c", i);
snprintf(dev_name, sizeof(dev_name), "cdrom%c", i + '0');
} else {
snprintf(dev_name, sizeof(dev_name), "hd%c", i + 'a');
}
......@@ -3977,7 +3977,7 @@ static int disk_options_init(int num_ide_disks,
}
if (cdrom_device) {
snprintf(dev_name, sizeof(buf), "cdrom%c", scsi_index);
snprintf(dev_name, sizeof(buf), "cdrom%c", scsi_index + '0');
scsi_disks_info[scsi_index].device_type = SCSI_CDROM;
} else {
snprintf(dev_name, sizeof(buf), "sd%c", scsi_index + 'a');
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册