From: Michael Tokarev Date: Sat, 31 May 2025 17:15:52 +0000 (+0300) Subject: qemu-img: compare: use helper function for --object X-Git-Tag: v10.1.0-rc0~13^2~17 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=eedfb5c07e270eca9bfe1f8f16303b23447f8176;p=thirdparty%2Fqemu.git qemu-img: compare: use helper function for --object Use the same function to parse --object as used by all other qemu-img subcommands. Signed-off-by: Michael Tokarev Message-ID: <20250531171609.197078-11-mjt@tls.msk.ru> Reviewed-by: Kevin Wolf Signed-off-by: Kevin Wolf --- diff --git a/qemu-img.c b/qemu-img.c index 9d2eba3b36..a7a07ed4bc 100644 --- a/qemu-img.c +++ b/qemu-img.c @@ -1529,20 +1529,8 @@ static int img_compare(const img_cmd_t *ccmd, int argc, char **argv) force_share = true; break; case OPTION_OBJECT: - { - Error *local_err = NULL; - - if (!user_creatable_add_from_str(optarg, &local_err)) { - if (local_err) { - error_report_err(local_err); - exit(2); - } else { - /* Help was printed */ - exit(EXIT_SUCCESS); - } - } - break; - } + user_creatable_process_cmdline(optarg); + break; case OPTION_IMAGE_OPTS: image_opts = true; break;