dix: unify ErrorFs. prepend all with [dix].

This commit is contained in:
Peter Hutterer 2007-09-26 15:19:53 +09:30
parent 394f3c1dbe
commit 8b508f5d6b
9 changed files with 37 additions and 36 deletions

View File

@ -143,7 +143,7 @@ ACChangeWindowAccess(ClientPtr client,
if (!win->optional && !MakeWindowOptional(win)) if (!win->optional && !MakeWindowOptional(win))
{ {
ErrorF("ACChangeWindowAcccess: Failed to make window optional.\n"); ErrorF("[dix] ACChangeWindowAcccess: Failed to make window optional.\n");
return BadImplementation; return BadImplementation;
} }
@ -183,7 +183,7 @@ acReplaceList(DeviceIntPtr** list,
xalloc(ndevices * sizeof(DeviceIntPtr*)); xalloc(ndevices * sizeof(DeviceIntPtr*));
if (!*list) if (!*list)
{ {
ErrorF("ACChangeWindowAccess: out of memory\n"); ErrorF("[dix] ACChangeWindowAccess: out of memory\n");
return; return;
} }
memcpy(*list, memcpy(*list,
@ -223,7 +223,7 @@ ACQueryWindowAccess(WindowPtr win,
*perm = (DeviceIntPtr*)xalloc(*nperm * sizeof(DeviceIntPtr)); *perm = (DeviceIntPtr*)xalloc(*nperm * sizeof(DeviceIntPtr));
if (!*perm) if (!*perm)
{ {
ErrorF("ACQuerywinAccess: xalloc failure\n"); ErrorF("[dix] ACQuerywinAccess: xalloc failure\n");
return; return;
} }
memcpy(*perm, memcpy(*perm,
@ -237,7 +237,7 @@ ACQueryWindowAccess(WindowPtr win,
*deny = (DeviceIntPtr*)xalloc(*ndeny * sizeof(DeviceIntPtr)); *deny = (DeviceIntPtr*)xalloc(*ndeny * sizeof(DeviceIntPtr));
if (!*deny) if (!*deny)
{ {
ErrorF("ACQuerywinAccess: xalloc failure\n"); ErrorF("[dix] ACQuerywinAccess: xalloc failure\n");
return; return;
} }
memcpy(*deny, memcpy(*deny,

View File

@ -220,7 +220,7 @@ EnableDevice(DeviceIntPtr dev)
if ((*prev != dev) || !dev->inited || if ((*prev != dev) || !dev->inited ||
((ret = (*dev->deviceProc)(dev, DEVICE_ON)) != Success)) { ((ret = (*dev->deviceProc)(dev, DEVICE_ON)) != Success)) {
ErrorF("couldn't enable device %d\n", dev->id); ErrorF("[dix] couldn't enable device %d\n", dev->id);
return FALSE; return FALSE;
} }
dev->enabled = TRUE; dev->enabled = TRUE;
@ -357,13 +357,13 @@ CoreKeyboardProc(DeviceIntPtr pDev, int what)
keySyms.minKeyCode + 1) * keySyms.minKeyCode + 1) *
keySyms.mapWidth); keySyms.mapWidth);
if (!keySyms.map) { if (!keySyms.map) {
ErrorF("Couldn't allocate core keymap\n"); ErrorF("[dix] Couldn't allocate core keymap\n");
return BadAlloc; return BadAlloc;
} }
modMap = (CARD8 *)xalloc(MAP_LENGTH); modMap = (CARD8 *)xalloc(MAP_LENGTH);
if (!modMap) { if (!modMap) {
ErrorF("Couldn't allocate core modifier map\n"); ErrorF("[dix] Couldn't allocate core modifier map\n");
return BadAlloc; return BadAlloc;
} }
bzero((char *)modMap, MAP_LENGTH); bzero((char *)modMap, MAP_LENGTH);
@ -529,11 +529,11 @@ InitAndStartDevices(WindowPtr root)
} }
if (!inputInfo.keyboard) { if (!inputInfo.keyboard) {
ErrorF("No core keyboard\n"); ErrorF("[dix] No core keyboard\n");
return BadImplementation; return BadImplementation;
} }
if (!inputInfo.pointer) { if (!inputInfo.pointer) {
ErrorF("No core pointer\n"); ErrorF("[dix] No core pointer\n");
return BadImplementation; return BadImplementation;
} }

View File

@ -378,7 +378,7 @@ OpenFont(ClientPtr client, XID fid, Mask flags, unsigned lenfname, char *pfontna
f = (char *)xalloc(lenfname + 1); f = (char *)xalloc(lenfname + 1);
memmove(f, pfontname, lenfname); memmove(f, pfontname, lenfname);
f[lenfname] = '\0'; f[lenfname] = '\0';
ErrorF("OpenFont: fontname is \"%s\"\n", f); ErrorF("[dix] OpenFont: fontname is \"%s\"\n", f);
xfree(f); xfree(f);
#endif #endif
if (!lenfname || lenfname > XLFDMAXFONTNAMELEN) if (!lenfname || lenfname > XLFDMAXFONTNAMELEN)
@ -1628,7 +1628,7 @@ FreeFontPath(FontPathElementPtr *list, int n, Bool force)
found++; found++;
} }
if (list[i]->refcount != found) { if (list[i]->refcount != found) {
ErrorF("FreeFontPath: FPE \"%.*s\" refcount is %d, should be %d; fixing.\n", ErrorF("[dix] FreeFontPath: FPE \"%.*s\" refcount is %d, should be %d; fixing.\n",
list[i]->name_length, list[i]->name, list[i]->name_length, list[i]->name,
list[i]->refcount, found); list[i]->refcount, found);
list[i]->refcount = found; /* ensure it will get freed */ list[i]->refcount = found; /* ensure it will get freed */
@ -1680,7 +1680,7 @@ SetFontPathElements(int npaths, unsigned char *paths, int *bad, Bool persist)
if (len == 0) if (len == 0)
{ {
if (persist) if (persist)
ErrorF ("Removing empty element from the valid list of fontpaths\n"); ErrorF("[dix] Removing empty element from the valid list of fontpaths\n");
err = BadValue; err = BadValue;
} }
else else
@ -1732,7 +1732,7 @@ SetFontPathElements(int npaths, unsigned char *paths, int *bad, Bool persist)
{ {
if (persist) if (persist)
{ {
ErrorF("Could not init font path element %s, removing from list!\n", ErrorF("[dix] Could not init font path element %s, removing from list!\n",
fpe->name); fpe->name);
} }
xfree (fpe->name); xfree (fpe->name);

View File

@ -288,7 +288,7 @@ SecurityLookupWindow(XID id, ClientPtr client, Mask access_mode)
int i = dixLookupWindow(&pWin, id, client, access_mode); int i = dixLookupWindow(&pWin, id, client, access_mode);
static int warn = 1; static int warn = 1;
if (warn-- > 0) if (warn-- > 0)
ErrorF("Warning: LookupWindow()/SecurityLookupWindow() " ErrorF("[dix] Warning: LookupWindow()/SecurityLookupWindow() "
"are deprecated. Please convert your driver/module " "are deprecated. Please convert your driver/module "
"to use dixLookupWindow().\n"); "to use dixLookupWindow().\n");
return (i == Success) ? pWin : NULL; return (i == Success) ? pWin : NULL;
@ -307,7 +307,7 @@ SecurityLookupDrawable(XID id, ClientPtr client, Mask access_mode)
int i = dixLookupDrawable(&pDraw, id, client, M_DRAWABLE, access_mode); int i = dixLookupDrawable(&pDraw, id, client, M_DRAWABLE, access_mode);
static int warn = 1; static int warn = 1;
if (warn-- > 0) if (warn-- > 0)
ErrorF("Warning: LookupDrawable()/SecurityLookupDrawable() " ErrorF("[dix] Warning: LookupDrawable()/SecurityLookupDrawable() "
"are deprecated. Please convert your driver/module " "are deprecated. Please convert your driver/module "
"to use dixLookupDrawable().\n"); "to use dixLookupDrawable().\n");
return (i == Success) ? pDraw : NULL; return (i == Success) ? pDraw : NULL;
@ -326,7 +326,7 @@ LookupClient(XID id, ClientPtr client)
int i = dixLookupClient(&pClient, id, client, DixUnknownAccess); int i = dixLookupClient(&pClient, id, client, DixUnknownAccess);
static int warn = 1; static int warn = 1;
if (warn-- > 0) if (warn-- > 0)
ErrorF("Warning: LookupClient() is deprecated. Please convert your " ErrorF("[dix] Warning: LookupClient() is deprecated. Please convert your "
"driver/module to use dixLookupClient().\n"); "driver/module to use dixLookupClient().\n");
return (i == Success) ? pClient : NULL; return (i == Success) ? pClient : NULL;
} }

View File

@ -1887,7 +1887,7 @@ TryClientEvents (ClientPtr client, xEvent *pEvents, int count, Mask mask,
int type; int type;
#ifdef DEBUG_EVENTS #ifdef DEBUG_EVENTS
ErrorF("Event([%d, %d], mask=0x%x), client=%d", ErrorF("[dix] Event([%d, %d], mask=0x%x), client=%d",
pEvents->u.u.type, pEvents->u.u.detail, mask, client->index); pEvents->u.u.type, pEvents->u.u.detail, mask, client->index);
#endif #endif
if ((client) && (client != serverClient) && (!client->clientGone) && if ((client) && (client != serverClient) && (!client->clientGone) &&
@ -1904,8 +1904,8 @@ TryClientEvents (ClientPtr client, xEvent *pEvents, int count, Mask mask,
pEvents->u.keyButtonPointer.event) pEvents->u.keyButtonPointer.event)
{ {
#ifdef DEBUG_EVENTS #ifdef DEBUG_EVENTS
ErrorF("\n"); ErrorF("[dix] \n");
ErrorF("motionHintWindow == keyButtonPointer.event\n"); ErrorF("[dix] motionHintWindow == keyButtonPointer.event\n");
#endif #endif
return 1; /* don't send, but pretend we did */ return 1; /* don't send, but pretend we did */
} }
@ -1944,14 +1944,14 @@ TryClientEvents (ClientPtr client, xEvent *pEvents, int count, Mask mask,
WriteEventsToClient(client, count, pEvents); WriteEventsToClient(client, count, pEvents);
#ifdef DEBUG_EVENTS #ifdef DEBUG_EVENTS
ErrorF( " delivered\n"); ErrorF("[dix] delivered\n");
#endif #endif
return 1; return 1;
} }
else else
{ {
#ifdef DEBUG_EVENTS #ifdef DEBUG_EVENTS
ErrorF("\n"); ErrorF("[dix] \n");
#endif #endif
return 0; return 0;
} }
@ -2031,7 +2031,7 @@ DeliverEventsToWindow(DeviceIntPtr pDev, WindowPtr pWin, xEvent
/* We don't do more than one GenericEvent at a time. */ /* We don't do more than one GenericEvent at a time. */
if (count > 1) if (count > 1)
{ {
ErrorF("Do not send more than one GenericEvent at a time!\n"); ErrorF("[dix] Do not send more than one GenericEvent at a time!\n");
return 0; return 0;
} }
@ -2355,7 +2355,7 @@ DeliverDeviceEvents(WindowPtr pWin, xEvent *xE, GrabPtr grab,
if (count > 1) if (count > 1)
{ {
ErrorF("Do not send more than one GenericEvent at a time!\n"); ErrorF("[dix] Do not send more than one GenericEvent at a time!\n");
return 0; return 0;
} }
filter = generic_filters[GEEXTIDX(xE)][ge->evtype]; filter = generic_filters[GEEXTIDX(xE)][ge->evtype];
@ -5942,7 +5942,7 @@ WriteEventsToClient(ClientPtr pClient, int count, xEvent *events)
{ {
if (events[i].u.u.type == GenericEvent) if (events[i].u.u.type == GenericEvent)
{ {
ErrorF("TryClientEvents: Only one GenericEvent at a time."); ErrorF("[dix] TryClientEvents: Only one GenericEvent at a time.\n");
return; return;
} }
} }
@ -6028,7 +6028,7 @@ PickPointer(ClientPtr client)
if (!it) if (!it)
{ {
ErrorF("Picking VCP\n"); ErrorF("[dix] Picking VCP\n");
return inputInfo.pointer; return inputInfo.pointer;
} }
} }

View File

@ -402,7 +402,7 @@ main(int argc, char *argv[], char *envp[])
} }
else { else {
if (SetDefaultFontPath(defaultFontPath) != Success) if (SetDefaultFontPath(defaultFontPath) != Success)
ErrorF("failed to set default font path '%s'", ErrorF("[dix] failed to set default font path '%s'",
defaultFontPath); defaultFontPath);
} }
if (!SetDefaultFont(defaultTextFont)) { if (!SetDefaultFont(defaultTextFont)) {

View File

@ -81,11 +81,11 @@ PrintPropertys(WindowPtr pWin)
pProp = pWin->userProps; pProp = pWin->userProps;
while (pProp) while (pProp)
{ {
ErrorF( "%x %x\n", pProp->propertyName, pProp->type); ErrorF("[dix] %x %x\n", pProp->propertyName, pProp->type);
ErrorF("property format: %d\n", pProp->format); ErrorF("[dix] property format: %d\n", pProp->format);
ErrorF("property data: \n"); ErrorF("[dix] property data: \n");
for (j=0; j<(pProp->format/8)*pProp->size; j++) for (j=0; j<(pProp->format/8)*pProp->size; j++)
ErrorF("%c\n", pProp->data[j]); ErrorF("[dix] %c\n", pProp->data[j]);
pProp = pProp->next; pProp = pProp->next;
} }
} }

View File

@ -468,7 +468,7 @@ AddResource(XID id, RESTYPE type, pointer value)
rrec = &clientTable[client]; rrec = &clientTable[client];
if (!rrec->buckets) if (!rrec->buckets)
{ {
ErrorF("AddResource(%lx, %lx, %lx), client=%d \n", ErrorF("[dix] AddResource(%lx, %lx, %lx), client=%d \n",
(unsigned long)id, type, (unsigned long)value, client); (unsigned long)id, type, (unsigned long)value, client);
FatalError("client not in use\n"); FatalError("client not in use\n");
} }
@ -589,7 +589,7 @@ FreeResource(XID id, RESTYPE skipDeleteFuncType)
} }
} }
if (!gotOne) if (!gotOne)
ErrorF("Freeing resource id=%lX which isn't there.\n", ErrorF("[dix] Freeing resource id=%lX which isn't there.\n",
(unsigned long)id); (unsigned long)id);
} }

View File

@ -206,8 +206,9 @@ PrintChildren(WindowPtr p1, int indent)
while (p1) while (p1)
{ {
p2 = p1->firstChild; p2 = p1->firstChild;
for (i=0; i<indent; i++) ErrorF( " "); ErrorF("[dix] ");
ErrorF( "%lx\n", p1->drawable.id); for (i=0; i<indent; i++) ErrorF(" ");
ErrorF("%lx\n", p1->drawable.id);
miPrintRegion(&p1->clipList); miPrintRegion(&p1->clipList);
PrintChildren(p2, indent+4); PrintChildren(p2, indent+4);
p1 = p1->nextSib; p1 = p1->nextSib;
@ -222,7 +223,7 @@ PrintWindowTree(void)
for (i=0; i<screenInfo.numScreens; i++) for (i=0; i<screenInfo.numScreens; i++)
{ {
ErrorF( "WINDOW %d\n", i); ErrorF("[dix] WINDOW %d\n", i);
pWin = WindowTable[i]; pWin = WindowTable[i];
miPrintRegion(&pWin->clipList); miPrintRegion(&pWin->clipList);
p1 = pWin->firstChild; p1 = pWin->firstChild;
@ -2232,7 +2233,7 @@ WhereDoIGoInTheStack(
return pWin->nextSib; return pWin->nextSib;
default: default:
{ {
ErrorF("Internal error in ConfigureWindow, smode == %d\n",smode ); ErrorF("[dix] Internal error in ConfigureWindow, smode == %d\n",smode );
return pWin->nextSib; return pWin->nextSib;
} }
} }