mirror of
https://gitlab.freedesktop.org/wayland/wayland.git
synced 2026-03-07 04:34:49 -05:00
server: improve wl_registry.bind error messages
- Consistently use PRIu32 for global names (uint32_t) - Use expected/got instead of have/wanted (which were used differently anyway) Signed-off-by: Kirill Primak <vyivel@eclair.cafe>
This commit is contained in:
parent
69aabecd18
commit
13d906a629
1 changed files with 4 additions and 5 deletions
|
|
@ -1061,18 +1061,17 @@ registry_bind(struct wl_client *client,
|
|||
else if (strcmp(global->interface->name, interface) != 0)
|
||||
wl_resource_post_error(resource,
|
||||
WL_DISPLAY_ERROR_INVALID_OBJECT,
|
||||
"invalid interface for global %u: "
|
||||
"have %s, wanted %s",
|
||||
name, interface, global->interface->name);
|
||||
"invalid interface for global %"PRIu32": expected %s, got %s",
|
||||
name, global->interface->name, interface);
|
||||
else if (version == 0)
|
||||
wl_resource_post_error(resource,
|
||||
WL_DISPLAY_ERROR_INVALID_OBJECT,
|
||||
"invalid version for global %s (%d): 0 is not a valid version",
|
||||
"invalid version for global %s (%"PRIu32"): 0 is not a valid version",
|
||||
interface, name);
|
||||
else if (global->version < version)
|
||||
wl_resource_post_error(resource,
|
||||
WL_DISPLAY_ERROR_INVALID_OBJECT,
|
||||
"invalid version for global %s (%d): have %d, wanted %d",
|
||||
"invalid version for global %s (%"PRIu32"): expected at most %d, got %d",
|
||||
interface, name, global->version, version);
|
||||
else
|
||||
global->bind(client, global->data, version, id);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue