From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:37409) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QDFc5-0003ez-Py for qemu-devel@nongnu.org; Fri, 22 Apr 2011 08:37:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QDFc4-000648-Pp for qemu-devel@nongnu.org; Fri, 22 Apr 2011 08:37:33 -0400 Received: from mail-qw0-f45.google.com ([209.85.216.45]:63893) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QDFc4-000643-MM for qemu-devel@nongnu.org; Fri, 22 Apr 2011 08:37:32 -0400 Received: by qwj8 with SMTP id 8so322087qwj.4 for ; Fri, 22 Apr 2011 05:37:32 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <4DB17686.2010502@redhat.com> Date: Fri, 22 Apr 2011 14:37:26 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1301487385-1755-1-git-send-email-Jes.Sorensen@redhat.com> <4D9459B8.8000901@redhat.com> <4D946250.5010406@redhat.com> <4D9467CA.9020306@redhat.com> <4D95D5F2.5050101@redhat.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2] qemu-img: Initial progress printing support List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: Kevin Wolf , Jes Sorensen , qemu-devel@nongnu.org, stefanha@linux.vnet.ibm.com On 04/01/2011 04:58 PM, Stefan Hajnoczi wrote: > On Fri, Apr 1, 2011 at 2:41 PM, Jes Sorensen wrote: >> On 03/31/11 13:49, Stefan Hajnoczi wrote: >>> On Thu, Mar 31, 2011 at 12:38 PM, Kevin Wolf wrote: >>>> Am 31.03.2011 13:15, schrieb Jes Sorensen: >>>>> On 03/31/11 12:38, Kevin Wolf wrote: >>>>> I have been a little reluctant to do this because it will break the ABI >>>>> for tools running qemu-img from a GUI etc. >>>> >>>> That's the reason for the "from a terminal" part. If we check for >>>> isatty(), we should handle these cases just fine. >>> >>> Yes, I think checking for a tty is enough precaution and allows users >>> to get the benefit of the progress bar. TBH I'd probably forget to >>> add -p half the time :). >> >> Ok, this is fine with me - however how do you suggest we offer the >> option to disable it on the command line, an additional flag? If you also check stdout/stderr for isatty (probably the progress output should go to stderr), "> /dev/null" is enough. Paolo