mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-12-22 07:28:36 -07:00
nbd/client: fix error messages in nbd_handle_reply_err
1. NBD_REP_ERR_INVALID is not only about length, so, make message more general 2. hex format is not very good: it's hard to read something like "option a (set meta context)", so switch to dec. Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Message-Id: <1518702707-7077-6-git-send-email-vsementsov@virtuozzo.com> [eblake: expand scope of patch: ALL uses of nbd_opt_lookup and nbd_rep_lookup are now decimal] Signed-off-by: Eric Blake <eblake@redhat.com>
This commit is contained in:
parent
25c146789f
commit
28fb494f9b
3 changed files with 18 additions and 18 deletions
|
|
@ -806,7 +806,7 @@ static int nbd_negotiate_options(NBDClient *client, uint16_t myflags,
|
|||
|
||||
default:
|
||||
ret = nbd_opt_drop(client, NBD_REP_ERR_UNSUP, errp,
|
||||
"Unsupported option 0x%" PRIx32 " (%s)",
|
||||
"Unsupported option %" PRIu32 " (%s)",
|
||||
option, nbd_opt_lookup(option));
|
||||
break;
|
||||
}
|
||||
|
|
@ -822,7 +822,7 @@ static int nbd_negotiate_options(NBDClient *client, uint16_t myflags,
|
|||
errp);
|
||||
|
||||
default:
|
||||
error_setg(errp, "Unsupported option 0x%" PRIx32 " (%s)",
|
||||
error_setg(errp, "Unsupported option %" PRIu32 " (%s)",
|
||||
option, nbd_opt_lookup(option));
|
||||
return -EINVAL;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue