* [qemu-kvm][PATCH] Add "sda" alias options to "hda" options
@ 2009-09-07 14:00 Ozawa Tsuyoshi
2009-09-08 7:26 ` Avi Kivity
0 siblings, 1 reply; 3+ messages in thread
From: Ozawa Tsuyoshi @ 2009-09-07 14:00 UTC (permalink / raw)
To: kvm
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.
diff --git a/qemu-options.hx b/qemu-options.hx
index c1ec976..91cd931 100644
--- a/qemu-options.hx
+++ b/qemu-options.hx
@@ -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, "")
diff --git a/vl.c b/vl.c
index 3485ce6..62d1d91 100644
--- a/vl.c
+++ b/vl.c
@@ -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:
--
Tsuyoshi Ozawa
<ozawa@t-oza.net>
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [qemu-kvm][PATCH] Add "sda" alias options to "hda" options
2009-09-07 14:00 [qemu-kvm][PATCH] Add "sda" alias options to "hda" options Ozawa Tsuyoshi
@ 2009-09-08 7:26 ` Avi Kivity
2009-09-08 10:37 ` Tsuyoshi Ozawa
0 siblings, 1 reply; 3+ messages in thread
From: Avi Kivity @ 2009-09-08 7:26 UTC (permalink / raw)
To: Ozawa Tsuyoshi; +Cc: kvm
On 09/07/2009 05:00 PM, Ozawa Tsuyoshi wrote:
> 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.
>
>
-hda is deprecated in favor of -drive, please use -drive instead.
--
error compiling committee.c: too many arguments to function
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [qemu-kvm][PATCH] Add "sda" alias options to "hda" options
2009-09-08 7:26 ` Avi Kivity
@ 2009-09-08 10:37 ` Tsuyoshi Ozawa
0 siblings, 0 replies; 3+ messages in thread
From: Tsuyoshi Ozawa @ 2009-09-08 10:37 UTC (permalink / raw)
To: Avi Kivity; +Cc: kvm
> -hda is deprecated in favor of -drive, please use -drive instead.
I see, it's better.
--
Tsuyoshi Ozawa
<ozawa@t-oza.net>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-09-08 10:37 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-09-07 14:00 [qemu-kvm][PATCH] Add "sda" alias options to "hda" options Ozawa Tsuyoshi
2009-09-08 7:26 ` Avi Kivity
2009-09-08 10:37 ` Tsuyoshi Ozawa
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.