Add "sda" alias options to "hda" options
PATCH 1/1 Add "sda" alias options to "hda" options
qemu-kvm: Add "sda" alias options to "hda" options
I know that the name "hda" come from IDE drive, but I felt strange when I use qemu to boot linux kernel directly as follows:
$ qemu-system-x86 -kernel vmlinux-2.6.28.15 -initrd initrd.img-2.6.28.15 -hda vdisk.img
By applying this patch, the command will change to:
$ qemu-system-x86 -kernel vmlinux-2.6.28.15 -initrd initrd.img-2.6.28.15 -sda vdisk.img
The latter one seems to be more intuitive for me.
qemu-options.hx +0 -0
@@ -68,6 +68,13 @@ Use @var{file} as floppy disk 0/1 image
(@pxref{disk_images}). You can
use the host floppy by using @file{/dev/fd0} as filename (@pxref{host_drives}). ETEXI
+DEF("sda", HAS_ARG, QEMU_OPTION_sda,
+ "-sda/-sdb file use 'file' as IDE hard disk 0/1 image\n")
+DEF("sdb", HAS_ARG, QEMU_OPTION_sdb, "")
+DEF("sdc", HAS_ARG, QEMU_OPTION_sdc,
+ "-sdc/-sdd file use 'file' as IDE hard disk 2/3 image\n")
+DEF("sdd", HAS_ARG, QEMU_OPTION_sdd, "")
+
DEF("hda", HAS_ARG, QEMU_OPTION_hda,
"-hda/-hdb file use 'file' as IDE hard disk 0/1 image\n")
DEF("hdb", HAS_ARG, QEMU_OPTION_hdb, "")
vl.c +4 -0
@@ -5085,6 +5085,7 @@ int main(int argc, char **argv, char **envp) initrd_filename = optarg;break ;case QEMU_OPTION_hda: +case QEMU_OPTION_sda:if (cyls ==0 ) hda_opts =drive_add (optarg,HD_ALIAS ,0 );else
@@ -5096,6 +5097,9 @@ int main(int argc, char **argv, char **envp) translation ==BIOS_ATA_TRANSLATION_NONE ? ",trans=none" : "");break ; +case QEMU_OPTION_sdb: +case QEMU_OPTION_sdc: +case QEMU_OPTION_sdd:case QEMU_OPTION_hdb:case QEMU_OPTION_hdc:case QEMU_OPTION_hdd:
Signature · 2 lines
Tsuyoshi Ozawa <[email protected]>
Quoted 8 lines · Ozawa Tsuyoshi
qemu-kvm: Add "sda" alias options to "hda" options
I know that the name "hda" come from IDE drive, but I felt strange when I use qemu to boot linux kernel directly as follows:
$ qemu-system-x86 -kernel vmlinux-2.6.28.15 -initrd initrd.img-2.6.28.15 -hda vdisk.img
Quoted 8 lines
By applying this patch, the command will change to:
$ qemu-system-x86 -kernel vmlinux-2.6.28.15 -initrd initrd.img-2.6.28.15 -sda vdisk.imgThe latter one seems to be more intuitive for me.
-hda is deprecated in favor of -drive, please use -drive instead.
Signature · 1 line
error compiling committee.c: too many arguments to function
Quoted 1 line
-hda is deprecated in favor of -drive, please use -drive instead.
I see, it's better.
Signature · 2 lines
Tsuyoshi Ozawa <[email protected]>