xkb: improve error messages
Some checks are pending
Build X servers / xserver-build-ubuntu (push) Waiting to run
Build X servers / drivers-build-ubuntu (push) Waiting to run
Build X servers / xserver-build-mingw32-ubuntu (push) Waiting to run
Build X servers / xserver-build-macos (push) Waiting to run
Build X servers / xserver-build-freebsd (push) Waiting to run
Build X servers / xserver-build-dragonflybsd (push) Waiting to run
Build X servers / xserver-build-netbsd (push) Waiting to run
Build X servers / xserver-build-cygwin (push) Waiting to run
Build X servers / xserver-build-arch (push) Waiting to run
Build X servers / Check Signed-Off-By (push) Waiting to run
Build X servers / Release pushed tag (push) Blocked by required conditions
check PRs for merge conflicts / notify (push) Waiting to run

Make error messages on failed childbuf size check more clear on where
the problem is coming from.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
Enrico Weigelt, metux IT consult 2026-05-18 12:23:00 +02:00 • committed by Enrico Weigelt
commit 58cedffac1

View file

@ -5964,7 +5964,7 @@ ProcXkbGetKbdByName(ClientPtr client)
return BadAlloc;
if (childbuf.wpos != (mrep.length * 4))
LogMessage(X_WARNING, "ProcXkbGetKbdByName() childbuf size (%ld) mismatch mrep size (%ld // %ld units)\n",
LogMessage(X_WARNING, "ProcXkbGetKbdByName() childbuf size (%ld) mismatch after XkbAssembleMap(): mrep size (%ld // %ld units)\n",
(unsigned long)childbuf.wpos, (unsigned long)mrep.length * 4, (unsigned long)mrep.length);
if (client->swapped) {
@ -5985,7 +5985,7 @@ ProcXkbGetKbdByName(ClientPtr client)
XkbAssembleCompatMap(client, new->compat, crep, &childbuf);
if (childbuf.wpos != (crep.length * 4))
LogMessage(X_WARNING, "ProcXkbGetKbdByName() childbuf size (%ld) mismatch crep size (%ld // %ld units)\n",
LogMessage(X_WARNING, "ProcXkbGetKbdByName() childbuf size (%ld) mismatch after XkbAssembleCompatMap(): crep size (%ld // %ld units)\n",
(unsigned long)childbuf.wpos, (unsigned long)crep.length * 4, (unsigned long)crep.length);
if (client->swapped) {
@ -6009,7 +6009,7 @@ ProcXkbGetKbdByName(ClientPtr client)
return BadAlloc;
if (childbuf.wpos != (irep.length * 4))
LogMessage(X_WARNING, "ProcXkbGetKbdByName() childbuf size (%ld) mismatch irep size (%ld // %ld units)\n",
LogMessage(X_WARNING, "ProcXkbGetKbdByName() childbuf size (%ld) mismatch after XkbAssembleIndicatorMap(): irep size (%ld // %ld units)\n",
(unsigned long)childbuf.wpos, (unsigned long)irep.length * 4, (unsigned long)irep.length);
if (client->swapped) {
@ -6029,7 +6029,7 @@ ProcXkbGetKbdByName(ClientPtr client)
XkbAssembleNames(client, new, nrep, &childbuf);
if (childbuf.wpos != (nrep.length * 4))
LogMessage(X_WARNING, "ProcXkbGetKbdByName() childbuf size (%ld) mismatch nrep size (%ld // %ld units)\n",
LogMessage(X_WARNING, "ProcXkbGetKbdByName() childbuf size (%ld) mismatch after XkbAssembleNames(): nrep size (%ld // %ld units)\n",
(unsigned long)childbuf.wpos, (unsigned long)nrep.length * 4, (unsigned long)nrep.length);
if (client->swapped) {