From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50034) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fDvjp-00032r-0S for qemu-devel@nongnu.org; Wed, 02 May 2018 13:40:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fDvjo-0000Bf-88 for qemu-devel@nongnu.org; Wed, 02 May 2018 13:40:20 -0400 References: <20180421165423.30759-1-mreitz@redhat.com> <20180421165423.30759-6-mreitz@redhat.com> From: John Snow Message-ID: Date: Wed, 2 May 2018 13:40:06 -0400 MIME-Version: 1.0 In-Reply-To: <20180421165423.30759-6-mreitz@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [Qemu-block] [PATCH 5/7] qemu-img: Recognize no creation support in -o help List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Max Reitz , qemu-block@nongnu.org Cc: Kevin Wolf , qemu-devel@nongnu.org On 04/21/2018 12:54 PM, Max Reitz wrote: > The only users of print_block_option_help() are qemu-img create and > qemu-img convert for the output image, so this function is always used > for image creation (it used to be used for amendment also, but that is > no longer the case). > > So if image creation is not supported by either the format or the > protocol, there is no need to print any option description, because the > user cannot create an image like this anyway. > > This also fixes an assertion failure: > > $ qemu-img create -f bochs -o help > Supported options: > qemu-img: util/qemu-option.c:219: > qemu_opts_print_help: Assertion `list' failed. > [1] 24831 abort (core dumped) qemu-img create -f bochs -o help > > Signed-off-by: Max Reitz This is great. 3-5: Reviewed-by: John Snow