From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:40845) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TlO2R-0006t6-EZ for qemu-devel@nongnu.org; Wed, 19 Dec 2012 13:06:41 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TlO2O-0007qK-TQ for qemu-devel@nongnu.org; Wed, 19 Dec 2012 13:06:39 -0500 Received: from mx1.redhat.com ([209.132.183.28]:53651) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TlO2O-0007qF-LY for qemu-devel@nongnu.org; Wed, 19 Dec 2012 13:06:36 -0500 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id qBJI6a5D028428 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 19 Dec 2012 13:06:36 -0500 Message-ID: <50D2022B.3050303@redhat.com> Date: Wed, 19 Dec 2012 11:06:35 -0700 From: Eric Blake MIME-Version: 1.0 References: <1355751593-31535-1-git-send-email-mrezanin@redhat.com> <1355751593-31535-2-git-send-email-mrezanin@redhat.com> <1355751593-31535-3-git-send-email-mrezanin@redhat.com> In-Reply-To: <1355751593-31535-3-git-send-email-mrezanin@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------enigF803FCFA718BB9DCA24A7C1D" Subject: Re: [Qemu-devel] [PATCH v7 2/4] qemu-img: Add "Quiet mode" option List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: mrezanin@redhat.com Cc: kwolf@redhat.com, pbonzini@redhat.com, qemu-devel@nongnu.org, stefanha@redhat.com This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigF803FCFA718BB9DCA24A7C1D Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 12/17/2012 06:39 AM, mrezanin@redhat.com wrote: > From: Miroslav Rezanina Your git send-email settings threaded each message as a reply to the other, rather than the more typical setting of threading messages only as a reply to the cover letter. You may want to do 'git config format.thread shallow' rather than your current deep approach. >=20 > There can be need to turn output to stdout off. This patch adds a -q op= tion that s/be need/be a need/ > enable "Quiet mode". In Quiet mode, only errors are printed out. >=20 > Signed-off-by: Miroslav Rezanina > --- > block.c | 11 +++--- > block.h | 2 +- > blockdev.c | 6 ++-- > qemu-img-cmds.hx | 28 +++++++-------- > qemu-img.c | 108 +++++++++++++++++++++++++++++++++++++++++------= -------- > qemu-img.texi | 3 ++ > 6 files changed, 108 insertions(+), 50 deletions(-) >=20 > @@ -1275,7 +1275,7 @@ void qmp_drive_mirror(const char *device, const c= har *target, > ret =3D bdrv_img_create(target, format, > source->filename, > source->drv->format_name, > - NULL, -1, flags); > + NULL, -1, flags,false); Space after comma. > @@ -10,27 +10,27 @@ STEXI > ETEXI > =20 > DEF("check", img_check, > - "check [-f fmt] [-r [leaks | all]] filename") > + "check [-q] [-f fmt] [-r [leaks | all]] filename") Is it really better to list [-q] to all of the sub-commands, or would it be easier to simply declare that -q is a universal option that can appear before sub-commands, as in: qemu-img [-q] command [command options] > #ifdef _WIN32 > #include > @@ -86,6 +87,7 @@ static void help(void) > " rebasing in this case (useful for renaming the back= ing file)\n" > " '-h' with or without a command shows this help and lists= the supported formats\n" > " '-p' show progress of command (only certain commands)\n"= > + " '-q' Quiet mode - do not print any output (except errors= )\n" s/Quiet/quiet/ for consistency with the nearby lines not starting with a capital. > +++ b/qemu-img.texi > @@ -54,6 +54,9 @@ indicates that target image must be compressed (qcow = format only) > with or without a command shows help and lists the supported formats > @item -p > display progress bar (convert and rebase commands only) > +@item -q > +Quiet mode - do not print any output (except errors). There's no progr= es bar=20 s/progres/progress/ > +in case both @var{-q} and @var{-p} options are used. Should it be a hard error if both -q and -p are given? Otherwise, when dealing with conflicting options, it's more typical to have the semantic of last one wins: 'qemu-img -q -p' prints progress, and only 'qemu-img -p -q' is quiet. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --------------enigF803FCFA718BB9DCA24A7C1D Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with undefined - http://www.enigmail.net/ iQEcBAEBCAAGBQJQ0gIrAAoJEKeha0olJ0NqF2gH/2zk7t5U2Cw674rtOqEEBuKT ve3UapEmdtjAef+v9QWEViznFMt5+6lvC2uLa2jinYojSplHzEZUU274n3yOKZzP srcbT9kA14EmyJ154s1868b7tmOMdTDh0eLpyVAqZbBvJRI3qyztwlD0RrxaC3Do sj28kpzQgyOCCqiIYYf6P9UJ9MppWOLBvCuJHI9swAwKTxUQoBg51J7GpLOqRwxS wTU/kIjzRxD0Hp3DtpihaB69kfp5nmGGNq5U+jn+IexZ9+sumrrZVrN5zuuY0JN5 vg73likhoU1Ee8wh4mKthgEfPaAh1Enkj7PlDs551NIY+MTL/j8Fi0kuDDGsLh0= =GSy6 -----END PGP SIGNATURE----- --------------enigF803FCFA718BB9DCA24A7C1D--