From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=56219 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PQ0F4-0003hu-By for qemu-devel@nongnu.org; Tue, 07 Dec 2010 11:18:16 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PQ0F3-0007N1-BH for qemu-devel@nongnu.org; Tue, 07 Dec 2010 11:18:14 -0500 Received: from mx1.redhat.com ([209.132.183.28]:29935) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PQ0F2-0007Mi-W3 for qemu-devel@nongnu.org; Tue, 07 Dec 2010 11:18:13 -0500 Message-ID: <4CFE5E36.9020000@redhat.com> Date: Tue, 07 Dec 2010 17:17:58 +0100 From: Jes Sorensen MIME-Version: 1.0 References: <1291721514-7354-1-git-send-email-Jes.Sorensen@redhat.com> <4CFE5A79.8000909@redhat.com> In-Reply-To: <4CFE5A79.8000909@redhat.com> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [PATCH 1/1] qemu-img: Deprecate obsolete -6 and -e options List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf Cc: stefanha@linux.vnet.ibm.com, qemu-devel@nongnu.org On 12/07/10 17:02, Kevin Wolf wrote: >> @@ -323,11 +310,13 @@ static int img_create(int argc, char **argv) >> fmt = optarg; >> break; >> case 'e': >> - flags |= BLOCK_FLAG_ENCRYPT; >> - break; >> + printf("qemu-img: option -e is deprecated, please use \'-o " >> + "encryption\' instead!\n"); >> + return -1; > > The return value of this function is used as exit code of qemu-img, so 1 > is probably better than -1. > > Also, is there a reason why you use printf and not error (which writes > the message to stderr)? I looked for fprintf(stderr.... and found nothing so I used printf() instead. I'm happy to change it to use error() and the return value too. Thanks for the feedback. Cheers, Jes