Use the same function to parse --object as used by all
other qemu-img subcommands.
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Message-ID: <
20250531171609.197078-11-mjt@tls.msk.ru>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
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;