From: Eric Blake <eblake@redhat.com>
To: Don Slutz <dslutz@verizon.com>, qemu-devel@nongnu.org
Cc: Kevin Wolf <kwolf@redhat.com>,
Paolo Bonzini <pbonzini@redhat.com>,
qemu block <qemu-block@nongnu.org>
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 [thread overview]
Message-ID: <55427F5A.5090608@redhat.com> (raw)
In-Reply-To: <1430418196-8691-1-git-send-email-dslutz@verizon.com>
[-- Attachment #1: Type: text/plain, Size: 1784 bytes --]
[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 <dslutz@verizon.com>
> ---
> vl.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
Reviewed-by: Eric Blake <eblake@redhat.com>
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
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]
next prev parent reply other threads:[~2015-04-30 19:40 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-30 18:23 [Qemu-devel] [PATCH 1/1] vl.c: Since the help says that 'disk_image' is a raw hard disk image, pass format=raw Don Slutz
2015-04-30 19:15 ` Eric Blake [this message]
2015-04-30 19:17 ` Eric Blake
2015-04-30 20:15 ` Kevin Wolf
2015-04-30 23:28 ` Don Slutz
2015-05-04 11:08 ` Kevin Wolf
2015-05-04 13:39 ` Markus Armbruster
2015-05-04 14:17 ` Kevin Wolf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=55427F5A.5090608@redhat.com \
--to=eblake@redhat.com \
--cc=dslutz@verizon.com \
--cc=kwolf@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).