[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 1/1] vl.c: Since the help says that 'disk_image'
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH 1/1] vl.c: Since the help says that 'disk_image' is a raw hard disk image, pass format=raw |
Date: |
Thu, 30 Apr 2015 13:15:38 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 |
[adding qemu-block]
On 04/30/2015 12:23 PM, Don Slutz wrote:
> ~/qemu/out/master/x86_64-softmmu/qemu-system-x86_64 -h | head
> QEMU emulator version 2.3.50, Copyright (c) 2003-2008 Fabrice Bellard
> usage: qemu-system-x86_64 [options] [disk_image]
>
> 'disk_image' is a raw hard disk image for IDE hard disk 0
>
> Standard options:
> ...
>
> Signed-off-by: Don Slutz <address@hidden>
> ---
> vl.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
Reviewed-by: Eric Blake <address@hidden>
Without this, qemu will try to probe formats. It is arguably is more
convenient when using the shorthand of supplying a disk image to let
qemu pick the format; but as the --help text says the image is raw, it's
better to be explicit and avoid probing. Besides, we can always use
longhand to specify actual format and/or probing if we don't like the
shorthand.
>
> diff --git a/vl.c b/vl.c
> index 74c2681..93e674f 100644
> --- a/vl.c
> +++ b/vl.c
> @@ -1084,6 +1084,7 @@ static int cleanup_add_fd(QemuOpts *opts, void *opaque)
> /* QEMU Block devices */
>
> #define HD_OPTS "media=disk"
> +#define HD_OPTS_RAW "media=disk,format=raw"
> #define CDROM_OPTS "media=cdrom"
> #define FD_OPTS ""
> #define PFLASH_OPTS ""
> @@ -2862,7 +2863,7 @@ int main(int argc, char **argv, char **envp)
> if (optind >= argc)
> break;
> if (argv[optind][0] != '-') {
> - hda_opts = drive_add(IF_DEFAULT, 0, argv[optind++], HD_OPTS);
> + hda_opts = drive_add(IF_DEFAULT, 0, argv[optind++], HD_OPTS_RAW);
> } else {
> const QEMUOption *popt;
>
>
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature