From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54261) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YnuJv-0008Vs-Gv for qemu-devel@nongnu.org; Thu, 30 Apr 2015 15:40:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YnuJu-0003GC-D4 for qemu-devel@nongnu.org; Thu, 30 Apr 2015 15:40:27 -0400 Message-ID: <55427F5A.5090608@redhat.com> Date: Thu, 30 Apr 2015 13:15:38 -0600 From: Eric Blake MIME-Version: 1.0 References: <1430418196-8691-1-git-send-email-dslutz@verizon.com> In-Reply-To: <1430418196-8691-1-git-send-email-dslutz@verizon.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="HIvDgP8HADPQX5LDpDnRDMR5dn1u9GGsh" 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 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Don Slutz , qemu-devel@nongnu.org Cc: Kevin Wolf , Paolo Bonzini , qemu block This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --HIvDgP8HADPQX5LDpDnRDMR5dn1u9GGsh Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable [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] >=20 > 'disk_image' is a raw hard disk image for IDE hard disk 0 >=20 > Standard options: > ... >=20 > Signed-off-by: Don Slutz > --- > vl.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) Reviewed-by: Eric Blake 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. >=20 > 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 *o= paque) > /* QEMU Block devices */ > =20 > #define HD_OPTS "media=3Ddisk" > +#define HD_OPTS_RAW "media=3Ddisk,format=3Draw" > #define CDROM_OPTS "media=3Dcdrom" > #define FD_OPTS "" > #define PFLASH_OPTS "" > @@ -2862,7 +2863,7 @@ int main(int argc, char **argv, char **envp) > if (optind >=3D argc) > break; > if (argv[optind][0] !=3D '-') { > - hda_opts =3D drive_add(IF_DEFAULT, 0, argv[optind++], HD_O= PTS); > + hda_opts =3D drive_add(IF_DEFAULT, 0, argv[optind++], HD_O= PTS_RAW); > } else { > const QEMUOption *popt; > =20 >=20 --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --HIvDgP8HADPQX5LDpDnRDMR5dn1u9GGsh Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJVQn9bAAoJEKeha0olJ0NqW7sIAKcepZzLkqFgvrXhuQ6WlB84 ZJj9CbDCvdhFKeDfMan7gjBk9+9h+TuMMuyOWH15/Dg4NyoQ0BWkN/toktrBu6BA jJ+C6FX3GXZDinMIDpEfbQoJ4XTcK1I7YQ9kkdSQVcuV9phI/sZBJvsA214hLZCW aeqyLb+1hW8iUwl40Z+N/cdl9n+TNRMHWPfd1aKXz2SFAzrvw/gho8zXMnEP+SuK EnxF+vLe8mc6T5KZpK1A62k63C/BmIhXK0Se6FDAbEj9RMWJan89dqspu7tCR1WI YGlFfmDEoHNWuGI/Mz+80ZA1iANv94/l04ih76EKTfZ1ja26jL4IU8Hpwhrqr+E= =3x3I -----END PGP SIGNATURE----- --HIvDgP8HADPQX5LDpDnRDMR5dn1u9GGsh--