Compare commits
27 Commits
master
...
wip/loggin
Author | SHA1 | Date | |
---|---|---|---|
|
d1ba6fd921 | ||
|
0aea7f71e5 | ||
|
1118521fda | ||
|
685f30ec01 | ||
|
8eb7031099 | ||
|
00ad63c7b2 | ||
|
a788acecce | ||
|
0742083904 | ||
|
271e5e3cf0 | ||
|
1d85d93cf8 | ||
|
908f416606 | ||
|
d2d54c0d66 | ||
|
939f357e78 | ||
|
9669879a45 | ||
|
20affc4366 | ||
|
04f839243f | ||
|
04077fad1b | ||
|
5728b2a458 | ||
|
70d9a43ad4 | ||
|
107a24c537 | ||
|
6b0fc3eb40 | ||
|
ba8c048b3a | ||
|
dff6fb4246 | ||
|
16bb113472 | ||
|
80a0297638 | ||
|
c5f1390f8e | ||
|
b94a9ca1d4 |
|
@ -277,13 +277,6 @@ xf86-driver-build-test:
|
||||||
GIT_DEPTH: 1
|
GIT_DEPTH: 1
|
||||||
MESON_ARGS: -Dprefix=/usr/
|
MESON_ARGS: -Dprefix=/usr/
|
||||||
MESON_EXTRA_ARGS: -Dxwayland=false -Dxnest=false -Dxvfb=false -Dxquartz=false -Ddocs=false
|
MESON_EXTRA_ARGS: -Dxwayland=false -Dxnest=false -Dxvfb=false -Dxquartz=false -Ddocs=false
|
||||||
rules:
|
|
||||||
- if: $CI_PIPELINE_SOURCE == 'merge_request_event'
|
|
||||||
changes:
|
|
||||||
*dix_paths
|
|
||||||
- if: $CI_PIPELINE_SOURCE == 'merge_request_event'
|
|
||||||
changes:
|
|
||||||
*xorg_paths
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Verify that commit messages are as expected
|
# Verify that commit messages are as expected
|
||||||
|
|
|
@ -47,6 +47,7 @@ in this Software without prior written authorization from The Open Group.
|
||||||
#include "dix/dix_priv.h"
|
#include "dix/dix_priv.h"
|
||||||
#include "os/auth.h"
|
#include "os/auth.h"
|
||||||
#include "os/busfault.h"
|
#include "os/busfault.h"
|
||||||
|
#include "os/log_priv.h"
|
||||||
#include "os/osdep.h"
|
#include "os/osdep.h"
|
||||||
|
|
||||||
#include "misc.h"
|
#include "misc.h"
|
||||||
|
|
|
@ -38,6 +38,9 @@ from Kaleb S. KEITHLEY
|
||||||
#include <X11/X.h>
|
#include <X11/X.h>
|
||||||
#include <X11/Xproto.h>
|
#include <X11/Xproto.h>
|
||||||
#include <X11/extensions/xf86vmproto.h>
|
#include <X11/extensions/xf86vmproto.h>
|
||||||
|
|
||||||
|
#include "os/log_priv.h"
|
||||||
|
|
||||||
#include "misc.h"
|
#include "misc.h"
|
||||||
#include "dixstruct.h"
|
#include "dixstruct.h"
|
||||||
#include "extnsionst.h"
|
#include "extnsionst.h"
|
||||||
|
|
|
@ -96,6 +96,7 @@ SOFTWARE.
|
||||||
#include "dix/eventconvert.h"
|
#include "dix/eventconvert.h"
|
||||||
#include "dix/exevents_priv.h"
|
#include "dix/exevents_priv.h"
|
||||||
#include "dix/input_priv.h"
|
#include "dix/input_priv.h"
|
||||||
|
#include "os/log_priv.h"
|
||||||
|
|
||||||
#include "inputstr.h"
|
#include "inputstr.h"
|
||||||
#include "windowstr.h"
|
#include "windowstr.h"
|
||||||
|
|
|
@ -30,6 +30,8 @@
|
||||||
#include <dbus/dbus.h>
|
#include <dbus/dbus.h>
|
||||||
#include <sys/select.h>
|
#include <sys/select.h>
|
||||||
|
|
||||||
|
#include "os/log_priv.h"
|
||||||
|
|
||||||
#include "dix.h"
|
#include "dix.h"
|
||||||
#include "os.h"
|
#include "os.h"
|
||||||
|
|
||||||
|
|
|
@ -61,6 +61,7 @@ SOFTWARE.
|
||||||
#include "dix/exevents_priv.h"
|
#include "dix/exevents_priv.h"
|
||||||
#include "dix/input_priv.h"
|
#include "dix/input_priv.h"
|
||||||
#include "dix/ptrveloc_priv.h"
|
#include "dix/ptrveloc_priv.h"
|
||||||
|
#include "os/log_priv.h"
|
||||||
#include "xkb/xkbsrv_priv.h"
|
#include "xkb/xkbsrv_priv.h"
|
||||||
|
|
||||||
#include "misc.h"
|
#include "misc.h"
|
||||||
|
|
|
@ -62,6 +62,7 @@ Equipment Corporation.
|
||||||
#include "dix/dix_priv.h"
|
#include "dix/dix_priv.h"
|
||||||
#include "dix/gc_priv.h"
|
#include "dix/gc_priv.h"
|
||||||
#include "os/auth.h"
|
#include "os/auth.h"
|
||||||
|
#include "os/log_priv.h"
|
||||||
|
|
||||||
#include "scrnintstr.h"
|
#include "scrnintstr.h"
|
||||||
#include "resource.h"
|
#include "resource.h"
|
||||||
|
|
|
@ -119,6 +119,7 @@ Equipment Corporation.
|
||||||
#include "dix/input_priv.h"
|
#include "dix/input_priv.h"
|
||||||
#include "dix/eventconvert.h"
|
#include "dix/eventconvert.h"
|
||||||
#include "dix/exevents_priv.h"
|
#include "dix/exevents_priv.h"
|
||||||
|
#include "os/log_priv.h"
|
||||||
#include "xkb/xkbsrv_priv.h"
|
#include "xkb/xkbsrv_priv.h"
|
||||||
|
|
||||||
#include "misc.h"
|
#include "misc.h"
|
||||||
|
|
|
@ -32,6 +32,7 @@
|
||||||
#include "dix/eventconvert.h"
|
#include "dix/eventconvert.h"
|
||||||
#include "dix/exevents_priv.h"
|
#include "dix/exevents_priv.h"
|
||||||
#include "dix/input_priv.h"
|
#include "dix/input_priv.h"
|
||||||
|
#include "os/log_priv.h"
|
||||||
|
|
||||||
#include "inputstr.h"
|
#include "inputstr.h"
|
||||||
#include "scrnintstr.h"
|
#include "scrnintstr.h"
|
||||||
|
|
|
@ -196,7 +196,7 @@ GLXClientCallback(CallbackListPtr *list, void *closure, void *data)
|
||||||
static void
|
static void
|
||||||
GLXReset(ExtensionEntry *extEntry)
|
GLXReset(ExtensionEntry *extEntry)
|
||||||
{
|
{
|
||||||
// xf86Msg(X_INFO, "GLX: GLXReset\n");
|
// LogMessageVerb(X_INFO, 1, "GLX: GLXReset\n");
|
||||||
|
|
||||||
GlxVendorExtensionReset(extEntry);
|
GlxVendorExtensionReset(extEntry);
|
||||||
GlxDispatchReset();
|
GlxDispatchReset();
|
||||||
|
|
|
@ -30,6 +30,7 @@
|
||||||
#include "dix/dix_priv.h"
|
#include "dix/dix_priv.h"
|
||||||
#include "os/cmdline.h"
|
#include "os/cmdline.h"
|
||||||
#include "os/ddx_priv.h"
|
#include "os/ddx_priv.h"
|
||||||
|
#include "os/log_priv.h"
|
||||||
#include "os/osdep.h"
|
#include "os/osdep.h"
|
||||||
|
|
||||||
#include "ephyr.h"
|
#include "ephyr.h"
|
||||||
|
@ -290,10 +291,8 @@ ddxProcessArgument(int argc, char **argv, int i)
|
||||||
}
|
}
|
||||||
else if (!strcmp(argv[i], "-verbosity")) {
|
else if (!strcmp(argv[i], "-verbosity")) {
|
||||||
if (i + 1 < argc && argv[i + 1][0] != '-') {
|
if (i + 1 < argc && argv[i + 1][0] != '-') {
|
||||||
int verbosity = atoi(argv[i + 1]);
|
xorgLogVerbosity = atoi(argv[i + 1]);
|
||||||
|
EPHYR_LOG("set verbosiry to %d\n", xorgLogVerbosity);
|
||||||
LogSetParameter(XLOG_VERBOSITY, verbosity);
|
|
||||||
EPHYR_LOG("set verbosiry to %d\n", verbosity);
|
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
|
@ -254,12 +254,6 @@ extern _X_EXPORT void
|
||||||
xf86DrvMsg(int scrnIndex, MessageType type, const char *format, ...)
|
xf86DrvMsg(int scrnIndex, MessageType type, const char *format, ...)
|
||||||
_X_ATTRIBUTE_PRINTF(3, 4);
|
_X_ATTRIBUTE_PRINTF(3, 4);
|
||||||
extern _X_EXPORT void
|
extern _X_EXPORT void
|
||||||
xf86MsgVerb(MessageType type, int verb, const char *format, ...)
|
|
||||||
_X_ATTRIBUTE_PRINTF(3, 4);
|
|
||||||
extern _X_EXPORT void
|
|
||||||
xf86Msg(MessageType type, const char *format, ...)
|
|
||||||
_X_ATTRIBUTE_PRINTF(2, 3);
|
|
||||||
extern _X_EXPORT void
|
|
||||||
xf86ErrorFVerb(int verb, const char *format, ...)
|
xf86ErrorFVerb(int verb, const char *format, ...)
|
||||||
_X_ATTRIBUTE_PRINTF(2, 3);
|
_X_ATTRIBUTE_PRINTF(2, 3);
|
||||||
extern _X_EXPORT void
|
extern _X_EXPORT void
|
||||||
|
@ -406,4 +400,8 @@ extern _X_EXPORT ScreenPtr xf86ScrnToScreen(ScrnInfoPtr pScrn);
|
||||||
extern _X_EXPORT void
|
extern _X_EXPORT void
|
||||||
xf86UpdateDesktopDimensions(void);
|
xf86UpdateDesktopDimensions(void);
|
||||||
|
|
||||||
|
/* only for backwards (source) compatibility */
|
||||||
|
#define xf86MsgVerb LogMessageVerb
|
||||||
|
#define xf86Msg(type, ...) LogMessageVerb(type, 1, __VA_ARGS__)
|
||||||
|
|
||||||
#endif /* _XF86_H */
|
#endif /* _XF86_H */
|
||||||
|
|
|
@ -160,7 +160,7 @@ xf86AddMatchedDriver(XF86MatchedDrivers *md, const char *driver)
|
||||||
md->nmatches++;
|
md->nmatches++;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
xf86Msg(X_WARNING, "Too many drivers registered, can't add %s\n", driver);
|
LogMessageVerb(X_WARNING, 1, "Too many drivers registered, can't add %s\n", driver);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -178,7 +178,7 @@ xf86AutoConfig(void)
|
||||||
ret = CONFIG_OK; /* OK so far */
|
ret = CONFIG_OK; /* OK so far */
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
xf86Msg(X_ERROR, "Couldn't allocate Config record.\n");
|
LogMessageVerb(X_ERROR, 1, "Couldn't allocate Config record.\n");
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -205,14 +205,14 @@ xf86AutoConfig(void)
|
||||||
free(md.matches[i]);
|
free(md.matches[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
xf86MsgVerb(X_DEFAULT, 0,
|
LogMessageVerb(X_DEFAULT, 0,
|
||||||
"Using default built-in configuration (%d lines)\n",
|
"Using default built-in configuration (%d lines)\n",
|
||||||
builtinLines);
|
builtinLines);
|
||||||
|
|
||||||
xf86MsgVerb(X_DEFAULT, 3, "--- Start of built-in configuration ---\n");
|
LogMessageVerb(X_DEFAULT, 3, "--- Start of built-in configuration ---\n");
|
||||||
for (cp = builtinConfig; *cp; cp++)
|
for (cp = builtinConfig; *cp; cp++)
|
||||||
xf86ErrorFVerb(3, "\t%s", *cp);
|
xf86ErrorFVerb(3, "\t%s", *cp);
|
||||||
xf86MsgVerb(X_DEFAULT, 3, "--- End of built-in configuration ---\n");
|
LogMessageVerb(X_DEFAULT, 3, "--- End of built-in configuration ---\n");
|
||||||
|
|
||||||
xf86initConfigFiles();
|
xf86initConfigFiles();
|
||||||
xf86setBuiltinConfig(builtinConfig);
|
xf86setBuiltinConfig(builtinConfig);
|
||||||
|
@ -220,7 +220,7 @@ xf86AutoConfig(void)
|
||||||
FreeConfig();
|
FreeConfig();
|
||||||
|
|
||||||
if (ret != CONFIG_OK)
|
if (ret != CONFIG_OK)
|
||||||
xf86Msg(X_ERROR, "Error parsing the built-in default configuration.\n");
|
LogMessageVerb(X_ERROR, 1, "Error parsing the built-in default configuration.\n");
|
||||||
|
|
||||||
return ret == CONFIG_OK;
|
return ret == CONFIG_OK;
|
||||||
}
|
}
|
||||||
|
@ -253,12 +253,12 @@ listPossibleVideoDrivers(XF86MatchedDrivers *md)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (iret < 0) {
|
if (iret < 0) {
|
||||||
xf86Msg(X_WARNING,
|
LogMessageVerb(X_WARNING, 1,
|
||||||
"could not get frame buffer identifier from %s\n",
|
"could not get frame buffer identifier from %s\n",
|
||||||
xf86SolarisFbDev);
|
xf86SolarisFbDev);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
xf86Msg(X_PROBED, "console driver: %s\n", visid.name);
|
LogMessageVerb(X_PROBED, 1, "console driver: %s\n", visid.name);
|
||||||
|
|
||||||
/* Special case from before the general case was set */
|
/* Special case from before the general case was set */
|
||||||
if (strcmp(visid.name, "NVDAnvda") == 0) {
|
if (strcmp(visid.name, "NVDAnvda") == 0) {
|
||||||
|
@ -392,7 +392,7 @@ autoConfigDevice(GDevPtr preconf_device)
|
||||||
/* get all possible video drivers and count them */
|
/* get all possible video drivers and count them */
|
||||||
listPossibleVideoDrivers(&md);
|
listPossibleVideoDrivers(&md);
|
||||||
for (i = 0; i < md.nmatches; i++) {
|
for (i = 0; i < md.nmatches; i++) {
|
||||||
xf86Msg(X_DEFAULT, "Matched %s as autoconfigured driver %d\n",
|
LogMessageVerb(X_DEFAULT, 1, "Matched %s as autoconfigured driver %d\n",
|
||||||
md.matches[i], i);
|
md.matches[i], i);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -441,7 +441,7 @@ autoConfigDevice(GDevPtr preconf_device)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
xf86Msg(X_DEFAULT, "Assigned the driver to the xf86ConfigLayout\n");
|
LogMessageVerb(X_DEFAULT, 1, "Assigned the driver to the xf86ConfigLayout\n");
|
||||||
|
|
||||||
return ptr;
|
return ptr;
|
||||||
}
|
}
|
||||||
|
|
|
@ -96,7 +96,7 @@ xf86CallDriverProbe(DriverPtr drv, Bool detect_only)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
if (!foundScreen && (drv->Probe != NULL)) {
|
if (!foundScreen && (drv->Probe != NULL)) {
|
||||||
xf86Msg(X_WARNING, "Falling back to old probe method for %s\n",
|
LogMessageVerb(X_WARNING, 1, "Falling back to old probe method for %s\n",
|
||||||
drv->driverName);
|
drv->driverName);
|
||||||
foundScreen = (*drv->Probe) (drv, (detect_only) ? PROBE_DETECT
|
foundScreen = (*drv->Probe) (drv, (detect_only) ? PROBE_DETECT
|
||||||
: PROBE_DEFAULT);
|
: PROBE_DEFAULT);
|
||||||
|
@ -181,7 +181,7 @@ xf86BusConfig(void)
|
||||||
|
|
||||||
/* If nothing was detected, return now */
|
/* If nothing was detected, return now */
|
||||||
if (xf86NumScreens == 0) {
|
if (xf86NumScreens == 0) {
|
||||||
xf86Msg(X_ERROR, "No devices detected.\n");
|
LogMessageVerb(X_ERROR, 1, "No devices detected.\n");
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -205,9 +205,9 @@ xf86BusConfig(void)
|
||||||
xf86Screens[i]->confScreen = layout->screen;
|
xf86Screens[i]->confScreen = layout->screen;
|
||||||
else {
|
else {
|
||||||
/* No match found */
|
/* No match found */
|
||||||
xf86Msg(X_ERROR,
|
LogMessageVerb(X_ERROR, 1,
|
||||||
"Screen %d deleted because of no matching config section.\n",
|
"Screen %d deleted because of no matching config section.\n",
|
||||||
i);
|
i);
|
||||||
xf86DeleteScreen(xf86Screens[i--]);
|
xf86DeleteScreen(xf86Screens[i--]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -221,8 +221,8 @@ xf86BusConfig(void)
|
||||||
|
|
||||||
/* If no screens left, return now. */
|
/* If no screens left, return now. */
|
||||||
if (xf86NumScreens == 0) {
|
if (xf86NumScreens == 0) {
|
||||||
xf86Msg(X_ERROR,
|
LogMessageVerb(X_ERROR, 1,
|
||||||
"Device(s) detected, but none match those in the config file.\n");
|
"Device(s) detected, but none match those in the config file.\n");
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -50,6 +50,7 @@
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <grp.h>
|
#include <grp.h>
|
||||||
|
|
||||||
|
#include "os/log_priv.h"
|
||||||
#include "os/osdep.h"
|
#include "os/osdep.h"
|
||||||
|
|
||||||
#include "xf86.h"
|
#include "xf86.h"
|
||||||
|
@ -195,8 +196,8 @@ xf86ValidateFontPath(char *path)
|
||||||
if (!S_ISDIR(stat_buf.st_mode))
|
if (!S_ISDIR(stat_buf.st_mode))
|
||||||
flag = -1;
|
flag = -1;
|
||||||
if (flag != 0) {
|
if (flag != 0) {
|
||||||
xf86Msg(X_WARNING, "The directory \"%s\" does not exist.\n",
|
LogMessageVerb(X_WARNING, 1, "The directory \"%s\" does not exist.\n",
|
||||||
dir_elem);
|
dir_elem);
|
||||||
xf86ErrorF("\tEntry deleted from font path.\n");
|
xf86ErrorF("\tEntry deleted from font path.\n");
|
||||||
free(dir_elem);
|
free(dir_elem);
|
||||||
continue;
|
continue;
|
||||||
|
@ -209,9 +210,9 @@ xf86ValidateFontPath(char *path)
|
||||||
flag = -1;
|
flag = -1;
|
||||||
free(p1);
|
free(p1);
|
||||||
if (flag != 0) {
|
if (flag != 0) {
|
||||||
xf86Msg(X_WARNING,
|
LogMessageVerb(X_WARNING, 1,
|
||||||
"`fonts.dir' not found (or not valid) in \"%s\".\n",
|
"`fonts.dir' not found (or not valid) in \"%s\".\n",
|
||||||
dir_elem);
|
dir_elem);
|
||||||
xf86ErrorF("\tEntry deleted from font path.\n");
|
xf86ErrorF("\tEntry deleted from font path.\n");
|
||||||
xf86ErrorF("\t(Run 'mkfontdir' on \"%s\").\n", dir_elem);
|
xf86ErrorF("\t(Run 'mkfontdir' on \"%s\").\n", dir_elem);
|
||||||
free(dir_elem);
|
free(dir_elem);
|
||||||
|
@ -269,7 +270,7 @@ xf86ModulelistFromConfig(void ***optlist)
|
||||||
* ModulePath
|
* ModulePath
|
||||||
*/
|
*/
|
||||||
if (xf86configptr == NULL) {
|
if (xf86configptr == NULL) {
|
||||||
xf86Msg(X_ERROR, "Cannot access global config data structure\n");
|
LogMessageVerb(X_ERROR, 1, "Cannot access global config data structure\n");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -279,9 +280,9 @@ xf86ModulelistFromConfig(void ***optlist)
|
||||||
*/
|
*/
|
||||||
modp = xf86configptr->conf_modules->mod_disable_lst;
|
modp = xf86configptr->conf_modules->mod_disable_lst;
|
||||||
while (modp) {
|
while (modp) {
|
||||||
xf86Msg(X_WARNING,
|
LogMessageVerb(X_WARNING, 1,
|
||||||
"\"%s\" will not be loaded unless you've specified it to be loaded elsewhere.\n",
|
"\"%s\" will not be loaded unless you've specified it to be loaded elsewhere.\n",
|
||||||
modp->load_name);
|
modp->load_name);
|
||||||
modp = (XF86LoadPtr) modp->list.next;
|
modp = (XF86LoadPtr) modp->list.next;
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
|
@ -292,18 +293,18 @@ xf86ModulelistFromConfig(void ***optlist)
|
||||||
*/
|
*/
|
||||||
for (i = 0; ModuleDefaults[i].name != NULL; i++) {
|
for (i = 0; ModuleDefaults[i].name != NULL; i++) {
|
||||||
if (ModuleDefaults[i].toLoad == FALSE) {
|
if (ModuleDefaults[i].toLoad == FALSE) {
|
||||||
xf86Msg(X_WARNING,
|
LogMessageVerb(X_WARNING, 1,
|
||||||
"\"%s\" is not to be loaded by default. Skipping.\n",
|
"\"%s\" is not to be loaded by default. Skipping.\n",
|
||||||
ModuleDefaults[i].name);
|
ModuleDefaults[i].name);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
found = FALSE;
|
found = FALSE;
|
||||||
modp = xf86configptr->conf_modules->mod_load_lst;
|
modp = xf86configptr->conf_modules->mod_load_lst;
|
||||||
while (modp) {
|
while (modp) {
|
||||||
if (strcmp(modp->load_name, ModuleDefaults[i].name) == 0) {
|
if (strcmp(modp->load_name, ModuleDefaults[i].name) == 0) {
|
||||||
xf86Msg(X_INFO,
|
LogMessageVerb(X_INFO, 1,
|
||||||
"\"%s\" will be loaded. This was enabled by default and also specified in the config file.\n",
|
"\"%s\" will be loaded. This was enabled by default and also specified in the config file.\n",
|
||||||
ModuleDefaults[i].name);
|
ModuleDefaults[i].name);
|
||||||
found = TRUE;
|
found = TRUE;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -313,9 +314,9 @@ xf86ModulelistFromConfig(void ***optlist)
|
||||||
modp = xf86configptr->conf_modules->mod_disable_lst;
|
modp = xf86configptr->conf_modules->mod_disable_lst;
|
||||||
while (modp) {
|
while (modp) {
|
||||||
if (strcmp(modp->load_name, ModuleDefaults[i].name) == 0) {
|
if (strcmp(modp->load_name, ModuleDefaults[i].name) == 0) {
|
||||||
xf86Msg(X_INFO,
|
LogMessageVerb(X_INFO, 1,
|
||||||
"\"%s\" will be loaded even though the default is to disable it.\n",
|
"\"%s\" will be loaded even though the default is to disable it.\n",
|
||||||
ModuleDefaults[i].name);
|
ModuleDefaults[i].name);
|
||||||
found = TRUE;
|
found = TRUE;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -328,8 +329,8 @@ xf86ModulelistFromConfig(void ***optlist)
|
||||||
xf86addNewLoadDirective(ptr, ModuleDefaults[i].name,
|
xf86addNewLoadDirective(ptr, ModuleDefaults[i].name,
|
||||||
XF86_LOAD_MODULE,
|
XF86_LOAD_MODULE,
|
||||||
ModuleDefaults[i].load_opt);
|
ModuleDefaults[i].load_opt);
|
||||||
xf86Msg(X_INFO, "\"%s\" will be loaded by default.\n",
|
LogMessageVerb(X_INFO, 1, "\"%s\" will be loaded by default.\n",
|
||||||
ModuleDefaults[i].name);
|
ModuleDefaults[i].name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -401,7 +402,7 @@ xf86DriverlistFromConfig(void)
|
||||||
* ModulePath
|
* ModulePath
|
||||||
*/
|
*/
|
||||||
if (xf86configptr == NULL) {
|
if (xf86configptr == NULL) {
|
||||||
xf86Msg(X_ERROR, "Cannot access global config data structure\n");
|
LogMessageVerb(X_ERROR, 1, "Cannot access global config data structure\n");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -478,7 +479,7 @@ xf86InputDriverlistFromConfig(void)
|
||||||
* ModulePath
|
* ModulePath
|
||||||
*/
|
*/
|
||||||
if (xf86configptr == NULL) {
|
if (xf86configptr == NULL) {
|
||||||
xf86Msg(X_ERROR, "Cannot access global config data structure\n");
|
LogMessageVerb(X_ERROR, 1, "Cannot access global config data structure\n");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -582,7 +583,7 @@ configFiles(XF86ConfFilesPtr fileconf)
|
||||||
/* copy last entry */
|
/* copy last entry */
|
||||||
*(temp_path++) = '\t';
|
*(temp_path++) = '\t';
|
||||||
strcpy(temp_path, start);
|
strcpy(temp_path, start);
|
||||||
xf86Msg(pathFrom, "FontPath set to:\n%s\n", log_buf);
|
LogMessageVerb(pathFrom, 1, "FontPath set to:\n%s\n", log_buf);
|
||||||
free(log_buf);
|
free(log_buf);
|
||||||
|
|
||||||
/* ModulePath */
|
/* ModulePath */
|
||||||
|
@ -594,12 +595,12 @@ configFiles(XF86ConfFilesPtr fileconf)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
xf86Msg(xf86ModPathFrom, "ModulePath set to \"%s\"\n", xf86ModulePath);
|
LogMessageVerb(xf86ModPathFrom, 1, "ModulePath set to \"%s\"\n", xf86ModulePath);
|
||||||
|
|
||||||
if (!xf86xkbdirFlag && fileconf && fileconf->file_xkbdir) {
|
if (!xf86xkbdirFlag && fileconf && fileconf->file_xkbdir) {
|
||||||
XkbBaseDirectory = fileconf->file_xkbdir;
|
XkbBaseDirectory = fileconf->file_xkbdir;
|
||||||
xf86Msg(X_CONFIG, "XKB base directory set to \"%s\"\n",
|
LogMessageVerb(X_CONFIG, 1, "XKB base directory set to \"%s\"\n",
|
||||||
XkbBaseDirectory);
|
XkbBaseDirectory);
|
||||||
}
|
}
|
||||||
#if 0
|
#if 0
|
||||||
/* LogFile */
|
/* LogFile */
|
||||||
|
@ -749,12 +750,12 @@ configServerFlags(XF86ConfFlagsPtr flagsconf, XF86OptionPtr layoutopts)
|
||||||
|
|
||||||
xf86GetOptValBool(FlagOptions, FLAG_IGNORE_ABI, &xf86Info.ignoreABI);
|
xf86GetOptValBool(FlagOptions, FLAG_IGNORE_ABI, &xf86Info.ignoreABI);
|
||||||
if (xf86Info.ignoreABI) {
|
if (xf86Info.ignoreABI) {
|
||||||
xf86Msg(X_CONFIG, "Ignoring ABI Version\n");
|
LogMessageVerb(X_CONFIG, 1, "Ignoring ABI Version\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
xf86GetOptValBool(FlagOptions, FLAG_ALLOW_BYTE_SWAPPED_CLIENTS, &AllowByteSwappedClients);
|
xf86GetOptValBool(FlagOptions, FLAG_ALLOW_BYTE_SWAPPED_CLIENTS, &AllowByteSwappedClients);
|
||||||
if (AllowByteSwappedClients) {
|
if (AllowByteSwappedClients) {
|
||||||
xf86Msg(X_CONFIG, "Allowing byte-swapped clients\n");
|
LogMessageVerb(X_CONFIG, 1, "Allowing byte-swapped clients\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (xf86IsOptionSet(FlagOptions, FLAG_AUTO_ADD_DEVICES)) {
|
if (xf86IsOptionSet(FlagOptions, FLAG_AUTO_ADD_DEVICES)) {
|
||||||
|
@ -765,8 +766,8 @@ configServerFlags(XF86ConfFlagsPtr flagsconf, XF86OptionPtr layoutopts)
|
||||||
else {
|
else {
|
||||||
from = X_DEFAULT;
|
from = X_DEFAULT;
|
||||||
}
|
}
|
||||||
xf86Msg(from, "%sutomatically adding devices\n",
|
LogMessageVerb(from, 1, "%sutomatically adding devices\n",
|
||||||
xf86Info.autoAddDevices ? "A" : "Not a");
|
xf86Info.autoAddDevices ? "A" : "Not a");
|
||||||
|
|
||||||
if (xf86IsOptionSet(FlagOptions, FLAG_AUTO_ENABLE_DEVICES)) {
|
if (xf86IsOptionSet(FlagOptions, FLAG_AUTO_ENABLE_DEVICES)) {
|
||||||
xf86GetOptValBool(FlagOptions, FLAG_AUTO_ENABLE_DEVICES,
|
xf86GetOptValBool(FlagOptions, FLAG_AUTO_ENABLE_DEVICES,
|
||||||
|
@ -776,8 +777,8 @@ configServerFlags(XF86ConfFlagsPtr flagsconf, XF86OptionPtr layoutopts)
|
||||||
else {
|
else {
|
||||||
from = X_DEFAULT;
|
from = X_DEFAULT;
|
||||||
}
|
}
|
||||||
xf86Msg(from, "%sutomatically enabling devices\n",
|
LogMessageVerb(from, 1, "%sutomatically enabling devices\n",
|
||||||
xf86Info.autoEnableDevices ? "A" : "Not a");
|
xf86Info.autoEnableDevices ? "A" : "Not a");
|
||||||
|
|
||||||
if (xf86IsOptionSet(FlagOptions, FLAG_AUTO_ADD_GPU)) {
|
if (xf86IsOptionSet(FlagOptions, FLAG_AUTO_ADD_GPU)) {
|
||||||
xf86GetOptValBool(FlagOptions, FLAG_AUTO_ADD_GPU,
|
xf86GetOptValBool(FlagOptions, FLAG_AUTO_ADD_GPU,
|
||||||
|
@ -787,8 +788,8 @@ configServerFlags(XF86ConfFlagsPtr flagsconf, XF86OptionPtr layoutopts)
|
||||||
else {
|
else {
|
||||||
from = X_DEFAULT;
|
from = X_DEFAULT;
|
||||||
}
|
}
|
||||||
xf86Msg(from, "%sutomatically adding GPU devices\n",
|
LogMessageVerb(from, 1, "%sutomatically adding GPU devices\n",
|
||||||
xf86Info.autoAddGPU ? "A" : "Not a");
|
xf86Info.autoAddGPU ? "A" : "Not a");
|
||||||
|
|
||||||
if (xf86AutoBindGPUDisabled) {
|
if (xf86AutoBindGPUDisabled) {
|
||||||
xf86Info.autoBindGPU = FALSE;
|
xf86Info.autoBindGPU = FALSE;
|
||||||
|
@ -802,8 +803,8 @@ configServerFlags(XF86ConfFlagsPtr flagsconf, XF86OptionPtr layoutopts)
|
||||||
else {
|
else {
|
||||||
from = X_DEFAULT;
|
from = X_DEFAULT;
|
||||||
}
|
}
|
||||||
xf86Msg(from, "%sutomatically binding GPU devices\n",
|
LogMessageVerb(from, 1, "%sutomatically binding GPU devices\n",
|
||||||
xf86Info.autoBindGPU ? "A" : "Not a");
|
xf86Info.autoBindGPU ? "A" : "Not a");
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Set things up based on the config file information. Some of these
|
* Set things up based on the config file information. Some of these
|
||||||
|
@ -826,16 +827,14 @@ configServerFlags(XF86ConfFlagsPtr flagsconf, XF86OptionPtr layoutopts)
|
||||||
{
|
{
|
||||||
if ((s = xf86GetOptValString(FlagOptions, FLAG_LOG))) {
|
if ((s = xf86GetOptValString(FlagOptions, FLAG_LOG))) {
|
||||||
if (!xf86NameCmp(s, "flush")) {
|
if (!xf86NameCmp(s, "flush")) {
|
||||||
xf86Msg(X_CONFIG, "Flushing logfile enabled\n");
|
LogMessageVerb(X_CONFIG, 1, "flush log flag is noop\n");
|
||||||
LogSetParameter(XLOG_FLUSH, TRUE);
|
|
||||||
}
|
}
|
||||||
else if (!xf86NameCmp(s, "sync")) {
|
else if (!xf86NameCmp(s, "sync")) {
|
||||||
xf86Msg(X_CONFIG, "Syncing logfile enabled\n");
|
LogMessageVerb(X_CONFIG, 1, "Syncing logfile enabled\n");
|
||||||
LogSetParameter(XLOG_FLUSH, TRUE);
|
xorgLogSync = TRUE;
|
||||||
LogSetParameter(XLOG_SYNC, TRUE);
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
xf86Msg(X_WARNING, "Unknown Log option\n");
|
LogMessageVerb(X_WARNING, 1, "Unknown Log option\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -845,9 +844,9 @@ configServerFlags(XF86ConfFlagsPtr flagsconf, XF86OptionPtr layoutopts)
|
||||||
int policy = PictureParseCmapPolicy(s);
|
int policy = PictureParseCmapPolicy(s);
|
||||||
|
|
||||||
if (policy == PictureCmapPolicyInvalid)
|
if (policy == PictureCmapPolicyInvalid)
|
||||||
xf86Msg(X_WARNING, "Unknown colormap policy \"%s\"\n", s);
|
LogMessageVerb(X_WARNING, 1, "Unknown colormap policy \"%s\"\n", s);
|
||||||
else {
|
else {
|
||||||
xf86Msg(X_CONFIG, "Render colormap policy set to %s\n", s);
|
LogMessageVerb(X_CONFIG, 1, "Render colormap policy set to %s\n", s);
|
||||||
PictureCmapPolicy = policy;
|
PictureCmapPolicy = policy;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -867,7 +866,7 @@ configServerFlags(XF86ConfFlagsPtr flagsconf, XF86OptionPtr layoutopts)
|
||||||
xf86Info.glxVisuals = XF86_GlxVisualsAll;
|
xf86Info.glxVisuals = XF86_GlxVisualsAll;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
xf86Msg(X_WARNING, "Unknown GlxVisuals option\n");
|
LogMessageVerb(X_WARNING, 1, "Unknown GlxVisuals option\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -948,7 +947,7 @@ configServerFlags(XF86ConfFlagsPtr flagsconf, XF86OptionPtr layoutopts)
|
||||||
from = X_CONFIG;
|
from = X_CONFIG;
|
||||||
}
|
}
|
||||||
if (!noPanoramiXExtension)
|
if (!noPanoramiXExtension)
|
||||||
xf86Msg(from, "Xinerama: enabled\n");
|
LogMessageVerb(from, 1, "Xinerama: enabled\n");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef DRI2
|
#ifdef DRI2
|
||||||
|
@ -972,7 +971,7 @@ configServerFlags(XF86ConfFlagsPtr flagsconf, XF86OptionPtr layoutopts)
|
||||||
LimitClients = i;
|
LimitClients = i;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
xf86Msg(from, "Max clients allowed: %i, resource mask: 0x%x\n",
|
LogMessageVerb(from, 1, "Max clients allowed: %i, resource mask: 0x%x\n",
|
||||||
LimitClients, RESOURCE_ID_MASK);
|
LimitClients, RESOURCE_ID_MASK);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1081,7 +1080,7 @@ checkCoreInputDevices(serverLayoutPtr servlayoutp, Bool implicitLayout)
|
||||||
confInput = xf86findInput(xf86PointerName,
|
confInput = xf86findInput(xf86PointerName,
|
||||||
xf86configptr->conf_input_lst);
|
xf86configptr->conf_input_lst);
|
||||||
if (!confInput) {
|
if (!confInput) {
|
||||||
xf86Msg(X_ERROR, "No InputDevice section called \"%s\"\n",
|
LogMessageVerb(X_ERROR, 1, "No InputDevice section called \"%s\"\n",
|
||||||
xf86PointerName);
|
xf86PointerName);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
@ -1168,7 +1167,7 @@ checkCoreInputDevices(serverLayoutPtr servlayoutp, Bool implicitLayout)
|
||||||
|
|
||||||
if (!foundPointer && xf86Info.forceInputDevices) {
|
if (!foundPointer && xf86Info.forceInputDevices) {
|
||||||
/* This shouldn't happen. */
|
/* This shouldn't happen. */
|
||||||
xf86Msg(X_ERROR, "Cannot locate a core pointer device.\n");
|
LogMessageVerb(X_ERROR, 1, "Cannot locate a core pointer device.\n");
|
||||||
xf86DeleteInput(Pointer, 0);
|
xf86DeleteInput(Pointer, 0);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
@ -1180,7 +1179,7 @@ checkCoreInputDevices(serverLayoutPtr servlayoutp, Bool implicitLayout)
|
||||||
confInput = xf86findInput(xf86KeyboardName,
|
confInput = xf86findInput(xf86KeyboardName,
|
||||||
xf86configptr->conf_input_lst);
|
xf86configptr->conf_input_lst);
|
||||||
if (!confInput) {
|
if (!confInput) {
|
||||||
xf86Msg(X_ERROR, "No InputDevice section called \"%s\"\n",
|
LogMessageVerb(X_ERROR, 1, "No InputDevice section called \"%s\"\n",
|
||||||
xf86KeyboardName);
|
xf86KeyboardName);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
@ -1264,27 +1263,27 @@ checkCoreInputDevices(serverLayoutPtr servlayoutp, Bool implicitLayout)
|
||||||
|
|
||||||
if (!foundKeyboard && xf86Info.forceInputDevices) {
|
if (!foundKeyboard && xf86Info.forceInputDevices) {
|
||||||
/* This shouldn't happen. */
|
/* This shouldn't happen. */
|
||||||
xf86Msg(X_ERROR, "Cannot locate a core keyboard device.\n");
|
LogMessageVerb(X_ERROR, 1, "Cannot locate a core keyboard device.\n");
|
||||||
xf86DeleteInput(Keyboard, 0);
|
xf86DeleteInput(Keyboard, 0);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pointerMsg) {
|
if (pointerMsg) {
|
||||||
if (implicitLayout)
|
if (implicitLayout)
|
||||||
xf86Msg(X_DEFAULT, "No Layout section. Using the %s.\n",
|
LogMessageVerb(X_DEFAULT, 1, "No Layout section. Using the %s.\n",
|
||||||
pointerMsg);
|
pointerMsg);
|
||||||
else
|
else
|
||||||
xf86Msg(X_DEFAULT, "The core pointer device wasn't specified "
|
LogMessageVerb(X_DEFAULT, 1, "The core pointer device wasn't specified "
|
||||||
"explicitly in the layout.\n"
|
"explicitly in the layout.\n"
|
||||||
"\tUsing the %s.\n", pointerMsg);
|
"\tUsing the %s.\n", pointerMsg);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (keyboardMsg) {
|
if (keyboardMsg) {
|
||||||
if (implicitLayout)
|
if (implicitLayout)
|
||||||
xf86Msg(X_DEFAULT, "No Layout section. Using the %s.\n",
|
LogMessageVerb(X_DEFAULT, 1, "No Layout section. Using the %s.\n",
|
||||||
keyboardMsg);
|
keyboardMsg);
|
||||||
else
|
else
|
||||||
xf86Msg(X_DEFAULT, "The core keyboard device wasn't specified "
|
LogMessageVerb(X_DEFAULT, 1, "The core keyboard device wasn't specified "
|
||||||
"explicitly in the layout.\n"
|
"explicitly in the layout.\n"
|
||||||
"\tUsing the %s.\n", keyboardMsg);
|
"\tUsing the %s.\n", keyboardMsg);
|
||||||
}
|
}
|
||||||
|
@ -1300,15 +1299,15 @@ checkCoreInputDevices(serverLayoutPtr servlayoutp, Bool implicitLayout)
|
||||||
#else
|
#else
|
||||||
config_backend = "wscons";
|
config_backend = "wscons";
|
||||||
#endif
|
#endif
|
||||||
xf86Msg(X_INFO, "The server relies on %s to provide the list of "
|
LogMessageVerb(X_INFO, 1, "The server relies on %s to provide the list of "
|
||||||
"input devices.\n\tIf no devices become available, "
|
"input devices.\n\tIf no devices become available, "
|
||||||
"reconfigure %s or disable AutoAddDevices.\n",
|
"reconfigure %s or disable AutoAddDevices.\n",
|
||||||
config_backend, config_backend);
|
config_backend, config_backend);
|
||||||
#else
|
#else
|
||||||
xf86Msg(X_WARNING, "Hotplugging requested but the server was "
|
LogMessageVerb(X_WARNING, 1, "Hotplugging requested but the server was "
|
||||||
"compiled without a config backend. "
|
"compiled without a config backend. "
|
||||||
"No input devices were configured, the server "
|
"No input devices were configured, the server "
|
||||||
"will start without any input devices.\n");
|
"will start without any input devices.\n");
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1405,13 +1404,13 @@ configLayout(serverLayoutPtr servlayoutp, XF86ConfLayoutPtr conf_layout,
|
||||||
}
|
}
|
||||||
if (xf86LayoutName != NULL) {
|
if (xf86LayoutName != NULL) {
|
||||||
if ((l = xf86findLayout(xf86LayoutName, conf_layout)) == NULL) {
|
if ((l = xf86findLayout(xf86LayoutName, conf_layout)) == NULL) {
|
||||||
xf86Msg(X_ERROR, "No ServerLayout section called \"%s\"\n",
|
LogMessageVerb(X_ERROR, 1, "No ServerLayout section called \"%s\"\n",
|
||||||
xf86LayoutName);
|
xf86LayoutName);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
conf_layout = l;
|
conf_layout = l;
|
||||||
}
|
}
|
||||||
xf86Msg(from, "ServerLayout \"%s\"\n", conf_layout->lay_identifier);
|
LogMessageVerb(from, 1, "ServerLayout \"%s\"\n", conf_layout->lay_identifier);
|
||||||
adjp = conf_layout->lay_adjacency_lst;
|
adjp = conf_layout->lay_adjacency_lst;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -1531,8 +1530,8 @@ configLayout(serverLayoutPtr servlayoutp, XF86ConfLayoutPtr conf_layout,
|
||||||
}
|
}
|
||||||
if (slp[i].where != PosObsolete
|
if (slp[i].where != PosObsolete
|
||||||
&& slp[i].where != PosAbsolute && !slp[i].refscreen) {
|
&& slp[i].where != PosAbsolute && !slp[i].refscreen) {
|
||||||
xf86Msg(X_ERROR, "Screen %s doesn't exist: deleting placement\n",
|
LogMessageVerb(X_ERROR, 1, "Screen %s doesn't exist: deleting placement\n",
|
||||||
slp[i].refname);
|
slp[i].refname);
|
||||||
slp[i].where = PosAbsolute;
|
slp[i].where = PosAbsolute;
|
||||||
slp[i].x = 0;
|
slp[i].x = 0;
|
||||||
slp[i].y = 0;
|
slp[i].y = 0;
|
||||||
|
@ -1612,8 +1611,8 @@ configImpliedLayout(serverLayoutPtr servlayoutp, XF86ConfScreenPtr conf_screen,
|
||||||
from = X_CONFIG;
|
from = X_CONFIG;
|
||||||
if (xf86ScreenName != NULL) {
|
if (xf86ScreenName != NULL) {
|
||||||
if ((s = xf86findScreen(xf86ScreenName, conf_screen)) == NULL) {
|
if ((s = xf86findScreen(xf86ScreenName, conf_screen)) == NULL) {
|
||||||
xf86Msg(X_ERROR, "No Screen section called \"%s\"\n",
|
LogMessageVerb(X_ERROR, 1, "No Screen section called \"%s\"\n",
|
||||||
xf86ScreenName);
|
xf86ScreenName);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
conf_screen = s;
|
conf_screen = s;
|
||||||
|
@ -1657,12 +1656,12 @@ configXvAdaptor(confXvAdaptorPtr adaptor, XF86ConfVideoAdaptorPtr conf_adaptor)
|
||||||
int count = 0;
|
int count = 0;
|
||||||
XF86ConfVideoPortPtr conf_port;
|
XF86ConfVideoPortPtr conf_port;
|
||||||
|
|
||||||
xf86Msg(X_CONFIG, "| |-->VideoAdaptor \"%s\"\n",
|
LogMessageVerb(X_CONFIG, 1, "| |-->VideoAdaptor \"%s\"\n",
|
||||||
conf_adaptor->va_identifier);
|
conf_adaptor->va_identifier);
|
||||||
adaptor->identifier = conf_adaptor->va_identifier;
|
adaptor->identifier = conf_adaptor->va_identifier;
|
||||||
adaptor->options = conf_adaptor->va_option_lst;
|
adaptor->options = conf_adaptor->va_option_lst;
|
||||||
if (conf_adaptor->va_busid || conf_adaptor->va_driver) {
|
if (conf_adaptor->va_busid || conf_adaptor->va_driver) {
|
||||||
xf86Msg(X_CONFIG, "| | Unsupported device type, skipping entry\n");
|
LogMessageVerb(X_CONFIG, 1, "| | Unsupported device type, skipping entry\n");
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1703,11 +1702,11 @@ configScreen(confScreenPtr screenp, XF86ConfScreenPtr conf_screen, int scrnum,
|
||||||
memset(&local_conf_screen, 0, sizeof(local_conf_screen));
|
memset(&local_conf_screen, 0, sizeof(local_conf_screen));
|
||||||
conf_screen = &local_conf_screen;
|
conf_screen = &local_conf_screen;
|
||||||
conf_screen->scrn_identifier = "Default Screen Section";
|
conf_screen->scrn_identifier = "Default Screen Section";
|
||||||
xf86Msg(X_DEFAULT, "No screen section available. Using defaults.\n");
|
LogMessageVerb(X_DEFAULT, 1, "No screen section available. Using defaults.\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
xf86Msg(from, "|-->Screen \"%s\" (%d)\n", conf_screen->scrn_identifier,
|
LogMessageVerb(from, 1, "|-->Screen \"%s\" (%d)\n", conf_screen->scrn_identifier,
|
||||||
scrnum);
|
scrnum);
|
||||||
/*
|
/*
|
||||||
* now we fill in the elements of the screen
|
* now we fill in the elements of the screen
|
||||||
*/
|
*/
|
||||||
|
@ -1737,8 +1736,8 @@ configScreen(confScreenPtr screenp, XF86ConfScreenPtr conf_screen, int scrnum,
|
||||||
screenp->device = XNFcallocarray(1, sizeof(GDevRec));
|
screenp->device = XNFcallocarray(1, sizeof(GDevRec));
|
||||||
if ((!conf_screen->scrn_device) && (xf86configptr->conf_device_lst)) {
|
if ((!conf_screen->scrn_device) && (xf86configptr->conf_device_lst)) {
|
||||||
FIND_SUITABLE (XF86ConfDevicePtr, xf86configptr->conf_device_lst, conf_screen->scrn_device);
|
FIND_SUITABLE (XF86ConfDevicePtr, xf86configptr->conf_device_lst, conf_screen->scrn_device);
|
||||||
xf86Msg(X_DEFAULT, "No device specified for screen \"%s\".\n"
|
LogMessageVerb(X_DEFAULT, 1, "No device specified for screen \"%s\".\n"
|
||||||
"\tUsing the first device section listed.\n", screenp->id);
|
"\tUsing the first device section listed.\n", screenp->id);
|
||||||
}
|
}
|
||||||
if (configDevice(screenp->device, conf_screen->scrn_device, TRUE, FALSE)) {
|
if (configDevice(screenp->device, conf_screen->scrn_device, TRUE, FALSE)) {
|
||||||
screenp->device->myScreenSection = screenp;
|
screenp->device->myScreenSection = screenp;
|
||||||
|
@ -1845,8 +1844,8 @@ configScreen(confScreenPtr screenp, XF86ConfScreenPtr conf_screen, int scrnum,
|
||||||
}
|
}
|
||||||
|
|
||||||
if (defaultMonitor) {
|
if (defaultMonitor) {
|
||||||
xf86Msg(X_DEFAULT, "No monitor specified for screen \"%s\".\n"
|
LogMessageVerb(X_DEFAULT, 1, "No monitor specified for screen \"%s\".\n"
|
||||||
"\tUsing a default monitor configuration.\n", screenp->id);
|
"\tUsing a default monitor configuration.\n", screenp->id);
|
||||||
}
|
}
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
@ -1877,7 +1876,7 @@ configMonitor(MonPtr monitorp, XF86ConfMonitorPtr conf_monitor)
|
||||||
float badgamma = 0.0;
|
float badgamma = 0.0;
|
||||||
double maxPixClock;
|
double maxPixClock;
|
||||||
|
|
||||||
xf86Msg(X_CONFIG, "| |-->Monitor \"%s\"\n", conf_monitor->mon_identifier);
|
LogMessageVerb(X_CONFIG, 1, "| |-->Monitor \"%s\"\n", conf_monitor->mon_identifier);
|
||||||
monitorp->id = conf_monitor->mon_identifier;
|
monitorp->id = conf_monitor->mon_identifier;
|
||||||
monitorp->vendor = conf_monitor->mon_vendor;
|
monitorp->vendor = conf_monitor->mon_vendor;
|
||||||
monitorp->model = conf_monitor->mon_modelname;
|
monitorp->model = conf_monitor->mon_modelname;
|
||||||
|
@ -2097,14 +2096,14 @@ configDevice(GDevPtr devicep, XF86ConfDevicePtr conf_device, Bool active, Bool g
|
||||||
|
|
||||||
if (active) {
|
if (active) {
|
||||||
if (gpu)
|
if (gpu)
|
||||||
xf86Msg(X_CONFIG, "| |-->GPUDevice \"%s\"\n",
|
LogMessageVerb(X_CONFIG, 1, "| |-->GPUDevice \"%s\"\n",
|
||||||
conf_device->dev_identifier);
|
conf_device->dev_identifier);
|
||||||
else
|
else
|
||||||
xf86Msg(X_CONFIG, "| |-->Device \"%s\"\n",
|
LogMessageVerb(X_CONFIG, 1, "| |-->Device \"%s\"\n",
|
||||||
conf_device->dev_identifier);
|
conf_device->dev_identifier);
|
||||||
} else
|
} else
|
||||||
xf86Msg(X_CONFIG, "|-->Inactive Device \"%s\"\n",
|
LogMessageVerb(X_CONFIG, 1, "|-->Inactive Device \"%s\"\n",
|
||||||
conf_device->dev_identifier);
|
conf_device->dev_identifier);
|
||||||
|
|
||||||
devicep->identifier = conf_device->dev_identifier;
|
devicep->identifier = conf_device->dev_identifier;
|
||||||
devicep->vendor = conf_device->dev_vendor;
|
devicep->vendor = conf_device->dev_vendor;
|
||||||
|
@ -2198,17 +2197,17 @@ configExtensions(XF86ConfExtensionsPtr conf_ext)
|
||||||
enable = !enable;
|
enable = !enable;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
xf86Msg(X_WARNING, "Ignoring unrecognized value \"%s\"\n", val);
|
LogMessageVerb(X_WARNING, 1, "Ignoring unrecognized value \"%s\"\n", val);
|
||||||
free(n);
|
free(n);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (EnableDisableExtension(name, enable)) {
|
if (EnableDisableExtension(name, enable)) {
|
||||||
xf86Msg(X_CONFIG, "Extension \"%s\" is %s\n",
|
LogMessageVerb(X_CONFIG, 1, "Extension \"%s\" is %s\n",
|
||||||
name, enable ? "enabled" : "disabled");
|
name, enable ? "enabled" : "disabled");
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
xf86Msg(X_WARNING, "Ignoring unrecognized extension \"%s\"\n",
|
LogMessageVerb(X_WARNING, 1, "Ignoring unrecognized extension \"%s\"\n",
|
||||||
name);
|
name);
|
||||||
}
|
}
|
||||||
free(n);
|
free(n);
|
||||||
|
@ -2219,7 +2218,7 @@ configExtensions(XF86ConfExtensionsPtr conf_ext)
|
||||||
static Bool
|
static Bool
|
||||||
configInput(InputInfoPtr inputp, XF86ConfInputPtr conf_input, MessageType from)
|
configInput(InputInfoPtr inputp, XF86ConfInputPtr conf_input, MessageType from)
|
||||||
{
|
{
|
||||||
xf86Msg(from, "|-->Input Device \"%s\"\n", conf_input->inp_identifier);
|
LogMessageVerb(from, 1, "|-->Input Device \"%s\"\n", conf_input->inp_identifier);
|
||||||
inputp->name = conf_input->inp_identifier;
|
inputp->name = conf_input->inp_identifier;
|
||||||
inputp->driver = conf_input->inp_driver;
|
inputp->driver = conf_input->inp_driver;
|
||||||
inputp->options = conf_input->inp_option_lst;
|
inputp->options = conf_input->inp_option_lst;
|
||||||
|
@ -2285,12 +2284,12 @@ checkInput(serverLayoutPtr layout, Bool implicit_layout)
|
||||||
InputInfoPtr *current;
|
InputInfoPtr *current;
|
||||||
|
|
||||||
if (!warned) {
|
if (!warned) {
|
||||||
xf86Msg(X_WARNING, "Hotplugging is on, devices using "
|
LogMessageVerb(X_WARNING, 1, "Hotplugging is on, devices using "
|
||||||
"drivers 'kbd', 'mouse' or 'vmmouse' will be disabled.\n");
|
"drivers 'kbd', 'mouse' or 'vmmouse' will be disabled.\n");
|
||||||
warned = TRUE;
|
warned = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
xf86Msg(X_WARNING, "Disabling %s\n", (*dev)->name);
|
LogMessageVerb(X_WARNING, 1, "Disabling %s\n", (*dev)->name);
|
||||||
|
|
||||||
current = dev;
|
current = dev;
|
||||||
free(*dev);
|
free(*dev);
|
||||||
|
@ -2346,27 +2345,27 @@ xf86HandleConfigFile(Bool autoconfig)
|
||||||
dirname = xf86openConfigDirFiles(dirsearch, xf86ConfigDir, PROJECTROOT);
|
dirname = xf86openConfigDirFiles(dirsearch, xf86ConfigDir, PROJECTROOT);
|
||||||
filename = xf86openConfigFile(filesearch, xf86ConfigFile, PROJECTROOT);
|
filename = xf86openConfigFile(filesearch, xf86ConfigFile, PROJECTROOT);
|
||||||
if (filename) {
|
if (filename) {
|
||||||
xf86MsgVerb(filefrom, 0, "Using config file: \"%s\"\n", filename);
|
LogMessageVerb(filefrom, 0, "Using config file: \"%s\"\n", filename);
|
||||||
xf86ConfigFile = XNFstrdup(filename);
|
xf86ConfigFile = XNFstrdup(filename);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (xf86ConfigFile)
|
if (xf86ConfigFile)
|
||||||
xf86Msg(X_ERROR, "Unable to locate/open config file: \"%s\"\n",
|
LogMessageVerb(X_ERROR, 1, "Unable to locate/open config file: \"%s\"\n",
|
||||||
xf86ConfigFile);
|
xf86ConfigFile);
|
||||||
}
|
}
|
||||||
if (dirname) {
|
if (dirname) {
|
||||||
xf86MsgVerb(dirfrom, 0, "Using config directory: \"%s\"\n",
|
LogMessageVerb(dirfrom, 0, "Using config directory: \"%s\"\n",
|
||||||
dirname);
|
dirname);
|
||||||
xf86ConfigDir = XNFstrdup(dirname);
|
xf86ConfigDir = XNFstrdup(dirname);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (xf86ConfigDir)
|
if (xf86ConfigDir)
|
||||||
xf86Msg(X_ERROR,
|
LogMessageVerb(X_ERROR, 1,
|
||||||
"Unable to locate/open config directory: \"%s\"\n",
|
"Unable to locate/open config directory: \"%s\"\n",
|
||||||
xf86ConfigDir);
|
xf86ConfigDir);
|
||||||
}
|
}
|
||||||
if (sysdirname)
|
if (sysdirname)
|
||||||
xf86MsgVerb(X_DEFAULT, 0, "Using system config directory \"%s\"\n",
|
LogMessageVerb(X_DEFAULT, 0, "Using system config directory \"%s\"\n",
|
||||||
sysdirname);
|
sysdirname);
|
||||||
if (!filename && !dirname && !sysdirname)
|
if (!filename && !dirname && !sysdirname)
|
||||||
return CONFIG_NOFILE;
|
return CONFIG_NOFILE;
|
||||||
|
@ -2377,7 +2376,7 @@ xf86HandleConfigFile(Bool autoconfig)
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((xf86configptr = xf86readConfigFile()) == NULL) {
|
if ((xf86configptr = xf86readConfigFile()) == NULL) {
|
||||||
xf86Msg(X_ERROR, "Problem parsing the config file\n");
|
LogMessageVerb(X_ERROR, 1, "Problem parsing the config file\n");
|
||||||
return CONFIG_PARSE_ERROR;
|
return CONFIG_PARSE_ERROR;
|
||||||
}
|
}
|
||||||
xf86closeConfigFile();
|
xf86closeConfigFile();
|
||||||
|
@ -2399,14 +2398,14 @@ xf86HandleConfigFile(Bool autoconfig)
|
||||||
XF86ConfScreenPtr screen;
|
XF86ConfScreenPtr screen;
|
||||||
|
|
||||||
if (xf86ScreenName == NULL) {
|
if (xf86ScreenName == NULL) {
|
||||||
xf86Msg(X_DEFAULT,
|
LogMessageVerb(X_DEFAULT, 1,
|
||||||
"No Layout section. Using the first Screen section.\n");
|
"No Layout section. Using the first Screen section.\n");
|
||||||
}
|
}
|
||||||
FIND_SUITABLE (XF86ConfScreenPtr, xf86configptr->conf_screen_lst, screen);
|
FIND_SUITABLE (XF86ConfScreenPtr, xf86configptr->conf_screen_lst, screen);
|
||||||
if (!configImpliedLayout(&xf86ConfigLayout,
|
if (!configImpliedLayout(&xf86ConfigLayout,
|
||||||
screen,
|
screen,
|
||||||
xf86configptr)) {
|
xf86configptr)) {
|
||||||
xf86Msg(X_ERROR, "Unable to determine the screen layout\n");
|
LogMessageVerb(X_ERROR, 1, "Unable to determine the screen layout\n");
|
||||||
return CONFIG_PARSE_ERROR;
|
return CONFIG_PARSE_ERROR;
|
||||||
}
|
}
|
||||||
implicit_layout = TRUE;
|
implicit_layout = TRUE;
|
||||||
|
@ -2420,13 +2419,13 @@ xf86HandleConfigFile(Bool autoconfig)
|
||||||
dfltlayout =
|
dfltlayout =
|
||||||
xf86SetStrOption(optlist, "defaultserverlayout", NULL);
|
xf86SetStrOption(optlist, "defaultserverlayout", NULL);
|
||||||
if (!configLayout(&xf86ConfigLayout, layout, dfltlayout)) {
|
if (!configLayout(&xf86ConfigLayout, layout, dfltlayout)) {
|
||||||
xf86Msg(X_ERROR, "Unable to determine the screen layout\n");
|
LogMessageVerb(X_ERROR, 1, "Unable to determine the screen layout\n");
|
||||||
return CONFIG_PARSE_ERROR;
|
return CONFIG_PARSE_ERROR;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (!configLayout(&xf86ConfigLayout, layout, NULL)) {
|
if (!configLayout(&xf86ConfigLayout, layout, NULL)) {
|
||||||
xf86Msg(X_ERROR, "Unable to determine the screen layout\n");
|
LogMessageVerb(X_ERROR, 1, "Unable to determine the screen layout\n");
|
||||||
return CONFIG_PARSE_ERROR;
|
return CONFIG_PARSE_ERROR;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2444,8 +2443,8 @@ xf86HandleConfigFile(Bool autoconfig)
|
||||||
}
|
}
|
||||||
if (scanptr) {
|
if (scanptr) {
|
||||||
if (strncmp(scanptr, "PCI:", 4) != 0) {
|
if (strncmp(scanptr, "PCI:", 4) != 0) {
|
||||||
xf86Msg(X_WARNING, "Bus types other than PCI not yet isolable.\n"
|
LogMessageVerb(X_WARNING, 1, "Bus types other than PCI not yet isolable.\n"
|
||||||
"\tIgnoring IsolateDevice option.\n");
|
"\tIgnoring IsolateDevice option.\n");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
xf86PciIsolateDevice(scanptr);
|
xf86PciIsolateDevice(scanptr);
|
||||||
|
|
|
@ -68,4 +68,7 @@ ConfigStatus xf86HandleConfigFile(Bool);
|
||||||
Bool xf86AutoConfig(void);
|
Bool xf86AutoConfig(void);
|
||||||
GDevPtr autoConfigDevice(GDevPtr preconf_device);
|
GDevPtr autoConfigDevice(GDevPtr preconf_device);
|
||||||
|
|
||||||
|
void xf86SetVerbosity(int verb);
|
||||||
|
void xf86SetLogVerbosity(int verb);
|
||||||
|
|
||||||
#endif /* _xf86_config_h */
|
#endif /* _xf86_config_h */
|
||||||
|
|
|
@ -693,8 +693,8 @@ DoConfigure(void)
|
||||||
home, addslash);
|
home, addslash);
|
||||||
|
|
||||||
if (xf86writeConfigFile(filename, xf86config) == 0) {
|
if (xf86writeConfigFile(filename, xf86config) == 0) {
|
||||||
xf86Msg(X_ERROR, "Unable to write config file: \"%s\": %s\n",
|
LogMessageVerb(X_ERROR, 1, "Unable to write config file: \"%s\": %s\n",
|
||||||
filename, strerror(errno));
|
filename, strerror(errno));
|
||||||
goto bail;
|
goto bail;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -799,8 +799,8 @@ DoConfigure(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (xf86writeConfigFile(filename, xf86config) == 0) {
|
if (xf86writeConfigFile(filename, xf86config) == 0) {
|
||||||
xf86Msg(X_ERROR, "Unable to write config file: \"%s\": %s\n",
|
LogMessageVerb(X_ERROR, 1, "Unable to write config file: \"%s\": %s\n",
|
||||||
filename, strerror(errno));
|
filename, strerror(errno));
|
||||||
goto bail;
|
goto bail;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -587,9 +587,9 @@ xf86InitOrigins(void)
|
||||||
if (screen->refscreen != NULL &&
|
if (screen->refscreen != NULL &&
|
||||||
screen->refscreen->screennum >= xf86NumScreens) {
|
screen->refscreen->screennum >= xf86NumScreens) {
|
||||||
screensLeft &= ~(1 << i);
|
screensLeft &= ~(1 << i);
|
||||||
xf86Msg(X_WARNING,
|
LogMessageVerb(X_WARNING, 1,
|
||||||
"Not including screen \"%s\" in origins calculation.\n",
|
"Not including screen \"%s\" in origins calculation.\n",
|
||||||
screen->screen->id);
|
screen->screen->id);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -59,17 +59,17 @@
|
||||||
#include <X11/Xatom.h>
|
#include <X11/Xatom.h>
|
||||||
#include <X11/extensions/XI.h>
|
#include <X11/extensions/XI.h>
|
||||||
#include <X11/extensions/XIproto.h>
|
#include <X11/extensions/XIproto.h>
|
||||||
|
#include <X11/keysym.h>
|
||||||
|
|
||||||
#include "dix/input_priv.h"
|
#include "dix/input_priv.h"
|
||||||
|
|
||||||
#include "dix/dix_priv.h"
|
#include "dix/dix_priv.h"
|
||||||
|
#include "os/log_priv.h"
|
||||||
|
|
||||||
#include "misc.h"
|
#include "misc.h"
|
||||||
#include "xf86.h"
|
#include "xf86.h"
|
||||||
#include "xf86Priv.h"
|
#include "xf86Priv.h"
|
||||||
#include "xf86_os_support.h"
|
#include "xf86_os_support.h"
|
||||||
#include "xf86_OSlib.h"
|
#include "xf86_OSlib.h"
|
||||||
#include <X11/keysym.h>
|
|
||||||
|
|
||||||
#ifdef XFreeXDGA
|
#ifdef XFreeXDGA
|
||||||
#include "dgaproc.h"
|
#include "dgaproc.h"
|
||||||
|
@ -165,7 +165,7 @@ xf86ProcessActionEvent(ActionEvent action, void *arg)
|
||||||
switch (action) {
|
switch (action) {
|
||||||
case ACTION_TERMINATE:
|
case ACTION_TERMINATE:
|
||||||
if (!xf86Info.dontZap) {
|
if (!xf86Info.dontZap) {
|
||||||
xf86Msg(X_INFO, "Server zapped. Shutting down.\n");
|
LogMessageVerb(X_INFO, 1, "Server zapped. Shutting down.\n");
|
||||||
GiveUp(0);
|
GiveUp(0);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -43,6 +43,7 @@
|
||||||
|
|
||||||
#include "dix/dix_priv.h"
|
#include "dix/dix_priv.h"
|
||||||
#include "dix/input_priv.h"
|
#include "dix/input_priv.h"
|
||||||
|
#include "os/log_priv.h"
|
||||||
|
|
||||||
#include "mi.h"
|
#include "mi.h"
|
||||||
#include "os.h"
|
#include "os.h"
|
||||||
|
@ -59,6 +60,7 @@
|
||||||
#include "xf86DDC.h"
|
#include "xf86DDC.h"
|
||||||
#include "xf86Xinput.h"
|
#include "xf86Xinput.h"
|
||||||
#include "xf86InPriv.h"
|
#include "xf86InPriv.h"
|
||||||
|
#include "xf86Config.h"
|
||||||
#include "mivalidate.h"
|
#include "mivalidate.h"
|
||||||
|
|
||||||
/* For xf86GetClocks */
|
/* For xf86GetClocks */
|
||||||
|
@ -636,7 +638,7 @@ void
|
||||||
xf86PrintDepthBpp(ScrnInfoPtr scrp)
|
xf86PrintDepthBpp(ScrnInfoPtr scrp)
|
||||||
{
|
{
|
||||||
xf86DrvMsg(scrp->scrnIndex, scrp->depthFrom, "Depth %d, ", scrp->depth);
|
xf86DrvMsg(scrp->scrnIndex, scrp->depthFrom, "Depth %d, ", scrp->depth);
|
||||||
xf86Msg(scrp->bitsPerPixelFrom, "framebuffer bpp %d\n", scrp->bitsPerPixel);
|
LogMessageVerb(scrp->bitsPerPixelFrom, 1, "framebuffer bpp %d\n", scrp->bitsPerPixel);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -1093,28 +1095,6 @@ xf86IDrvMsg(InputInfoPtr dev, MessageType type, const char *format, ...)
|
||||||
va_end(ap);
|
va_end(ap);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Print non-driver messages with verbose level specified directly */
|
|
||||||
void
|
|
||||||
xf86MsgVerb(MessageType type, int verb, const char *format, ...)
|
|
||||||
{
|
|
||||||
va_list ap;
|
|
||||||
|
|
||||||
va_start(ap, format);
|
|
||||||
LogVMessageVerb(type, verb, format, ap);
|
|
||||||
va_end(ap);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Print non-driver messages with verbose level of 1 (default) */
|
|
||||||
void
|
|
||||||
xf86Msg(MessageType type, const char *format, ...)
|
|
||||||
{
|
|
||||||
va_list ap;
|
|
||||||
|
|
||||||
va_start(ap, format);
|
|
||||||
LogVMessageVerb(type, 1, format, ap);
|
|
||||||
va_end(ap);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Just like ErrorF, but with the verbose level checked */
|
/* Just like ErrorF, but with the verbose level checked */
|
||||||
void
|
void
|
||||||
xf86ErrorFVerb(int verb, const char *format, ...)
|
xf86ErrorFVerb(int verb, const char *format, ...)
|
||||||
|
@ -1123,7 +1103,7 @@ xf86ErrorFVerb(int verb, const char *format, ...)
|
||||||
|
|
||||||
va_start(ap, format);
|
va_start(ap, format);
|
||||||
if (xf86Verbose >= verb || xf86LogVerbose >= verb)
|
if (xf86Verbose >= verb || xf86LogVerbose >= verb)
|
||||||
LogVWrite(verb, format, ap);
|
LogVMessageVerb(X_NONE, verb, format, ap);
|
||||||
va_end(ap);
|
va_end(ap);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1135,7 +1115,7 @@ xf86ErrorF(const char *format, ...)
|
||||||
|
|
||||||
va_start(ap, format);
|
va_start(ap, format);
|
||||||
if (xf86Verbose >= 1 || xf86LogVerbose >= 1)
|
if (xf86Verbose >= 1 || xf86LogVerbose >= 1)
|
||||||
LogVWrite(1, format, ap);
|
LogVMessageVerb(X_NONE, 1, format, ap);
|
||||||
va_end(ap);
|
va_end(ap);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1264,7 +1244,7 @@ xf86PrintChipsets(const char *drvname, const char *drvmsg, SymTabPtr chips)
|
||||||
int len, i;
|
int len, i;
|
||||||
|
|
||||||
len = 6 + strlen(drvname) + 2 + strlen(drvmsg) + 2;
|
len = 6 + strlen(drvname) + 2 + strlen(drvmsg) + 2;
|
||||||
xf86Msg(X_INFO, "%s: %s:", drvname, drvmsg);
|
LogMessageVerb(X_INFO, 1, "%s: %s:", drvname, drvmsg);
|
||||||
for (i = 0; chips[i].name != NULL; i++) {
|
for (i = 0; chips[i].name != NULL; i++) {
|
||||||
if (i != 0) {
|
if (i != 0) {
|
||||||
xf86ErrorF(",");
|
xf86ErrorF(",");
|
||||||
|
@ -1717,7 +1697,7 @@ xf86IsUnblank(int mode)
|
||||||
case SCREEN_SAVER_CYCLE:
|
case SCREEN_SAVER_CYCLE:
|
||||||
return FALSE;
|
return FALSE;
|
||||||
default:
|
default:
|
||||||
xf86MsgVerb(X_WARNING, 0, "Unexpected save screen mode: %d\n", mode);
|
LogMessageVerb(X_WARNING, 0, "Unexpected save screen mode: %d\n", mode);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -54,6 +54,7 @@
|
||||||
#include "dix/screenint_priv.h"
|
#include "dix/screenint_priv.h"
|
||||||
#include "os/cmdline.h"
|
#include "os/cmdline.h"
|
||||||
#include "os/ddx_priv.h"
|
#include "os/ddx_priv.h"
|
||||||
|
#include "os/log_priv.h"
|
||||||
#include "os/osdep.h"
|
#include "os/osdep.h"
|
||||||
|
|
||||||
#include "servermd.h"
|
#include "servermd.h"
|
||||||
|
@ -307,7 +308,7 @@ InitOutput(ScreenInfo * pScreenInfo, int argc, char **argv)
|
||||||
|
|
||||||
t = time(NULL);
|
t = time(NULL);
|
||||||
ct = ctime(&t);
|
ct = ctime(&t);
|
||||||
xf86MsgVerb(xf86LogFileFrom, 0, "Log file: \"%s\", Time: %s",
|
LogMessageVerb(xf86LogFileFrom, 0, "Log file: \"%s\", Time: %s",
|
||||||
xf86LogFile, ct);
|
xf86LogFile, ct);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -317,7 +318,7 @@ InitOutput(ScreenInfo * pScreenInfo, int argc, char **argv)
|
||||||
case CONFIG_OK:
|
case CONFIG_OK:
|
||||||
break;
|
break;
|
||||||
case CONFIG_PARSE_ERROR:
|
case CONFIG_PARSE_ERROR:
|
||||||
xf86Msg(X_ERROR, "Error parsing the config file\n");
|
LogMessageVerb(X_ERROR, 1, "Error parsing the config file\n");
|
||||||
return;
|
return;
|
||||||
case CONFIG_NOFILE:
|
case CONFIG_NOFILE:
|
||||||
autoconfig = TRUE;
|
autoconfig = TRUE;
|
||||||
|
@ -349,7 +350,7 @@ InitOutput(ScreenInfo * pScreenInfo, int argc, char **argv)
|
||||||
|
|
||||||
if (autoconfig) {
|
if (autoconfig) {
|
||||||
if (!xf86AutoConfig()) {
|
if (!xf86AutoConfig()) {
|
||||||
xf86Msg(X_ERROR, "Auto configuration failed\n");
|
LogMessageVerb(X_ERROR, 1, "Auto configuration failed\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -372,7 +373,7 @@ InitOutput(ScreenInfo * pScreenInfo, int argc, char **argv)
|
||||||
configured_device = xf86ConfigLayout.screens->screen->device;
|
configured_device = xf86ConfigLayout.screens->screen->device;
|
||||||
if ((!configured_device) || (!configured_device->driver)) {
|
if ((!configured_device) || (!configured_device->driver)) {
|
||||||
if (!autoConfigDevice(configured_device)) {
|
if (!autoConfigDevice(configured_device)) {
|
||||||
xf86Msg(X_ERROR, "Automatic driver configuration failed\n");
|
LogMessageVerb(X_ERROR, 1, "Automatic driver configuration failed\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -402,7 +403,7 @@ InitOutput(ScreenInfo * pScreenInfo, int argc, char **argv)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (xf86NumDrivers == 0) {
|
if (xf86NumDrivers == 0) {
|
||||||
xf86Msg(X_ERROR, "No drivers available.\n");
|
LogMessageVerb(X_ERROR, 1, "No drivers available.\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -500,8 +501,8 @@ InitOutput(ScreenInfo * pScreenInfo, int argc, char **argv)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (xf86NumScreens == 0) {
|
if (xf86NumScreens == 0) {
|
||||||
xf86Msg(X_ERROR,
|
LogMessageVerb(X_ERROR, 1,
|
||||||
"Screen(s) found, but none have a usable configuration.\n");
|
"Screen(s) found, but none have a usable configuration.\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -578,7 +579,7 @@ InitOutput(ScreenInfo * pScreenInfo, int argc, char **argv)
|
||||||
if (xf86OSPMClose)
|
if (xf86OSPMClose)
|
||||||
xf86OSPMClose();
|
xf86OSPMClose();
|
||||||
if ((xf86OSPMClose = xf86OSPMOpen()) != NULL)
|
if ((xf86OSPMClose = xf86OSPMOpen()) != NULL)
|
||||||
xf86MsgVerb(X_INFO, 3, "APM registered successfully\n");
|
LogMessageVerb(X_INFO, 3, "APM registered successfully\n");
|
||||||
|
|
||||||
/* Make sure full I/O access is enabled */
|
/* Make sure full I/O access is enabled */
|
||||||
if (xorgHWAccess)
|
if (xorgHWAccess)
|
||||||
|
@ -864,24 +865,18 @@ OsVendorFatalError(const char *f, va_list args)
|
||||||
ErrorFSigSafe("\n");
|
ErrorFSigSafe("\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
void
|
||||||
xf86SetVerbosity(int verb)
|
xf86SetVerbosity(int verb)
|
||||||
{
|
{
|
||||||
int save = xf86Verbose;
|
|
||||||
|
|
||||||
xf86Verbose = verb;
|
xf86Verbose = verb;
|
||||||
LogSetParameter(XLOG_VERBOSITY, verb);
|
xorgLogVerbosity = verb;
|
||||||
return save;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
void
|
||||||
xf86SetLogVerbosity(int verb)
|
xf86SetLogVerbosity(int verb)
|
||||||
{
|
{
|
||||||
int save = xf86LogVerbose;
|
|
||||||
|
|
||||||
xf86LogVerbose = verb;
|
xf86LogVerbose = verb;
|
||||||
LogSetParameter(XLOG_FILE_VERBOSITY, verb);
|
xorgLogFileVerbosity = verb;
|
||||||
return save;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
|
@ -85,6 +85,9 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <X11/X.h>
|
#include <X11/X.h>
|
||||||
|
|
||||||
|
#include "os/log_priv.h"
|
||||||
|
|
||||||
#include "xf86Modes.h"
|
#include "xf86Modes.h"
|
||||||
#include "xf86Crtc.h"
|
#include "xf86Crtc.h"
|
||||||
#include "os.h"
|
#include "os.h"
|
||||||
|
|
|
@ -208,7 +208,7 @@ xf86HandlePMEvents(int fd, void *data)
|
||||||
const char *str = NULL;
|
const char *str = NULL;
|
||||||
int verb = eventName(events[i], &str);
|
int verb = eventName(events[i], &str);
|
||||||
|
|
||||||
xf86MsgVerb(X_INFO, verb, "PM Event received: %s\n", str);
|
LogMessageVerb(X_INFO, verb, "PM Event received: %s\n", str);
|
||||||
DoApmEvent(events[i], FALSE);
|
DoApmEvent(events[i], FALSE);
|
||||||
switch (xf86PMConfirmEventToOs(fd, events[i])) {
|
switch (xf86PMConfirmEventToOs(fd, events[i])) {
|
||||||
case PM_WAIT:
|
case PM_WAIT:
|
||||||
|
|
|
@ -151,10 +151,7 @@ xf86CloseLog(enum ExitCode error);
|
||||||
/* xf86Init.c */
|
/* xf86Init.c */
|
||||||
extern _X_EXPORT Bool
|
extern _X_EXPORT Bool
|
||||||
xf86LoadModules(const char **list, void **optlist);
|
xf86LoadModules(const char **list, void **optlist);
|
||||||
extern _X_EXPORT int
|
|
||||||
xf86SetVerbosity(int verb);
|
|
||||||
extern _X_EXPORT int
|
|
||||||
xf86SetLogVerbosity(int verb);
|
|
||||||
extern _X_EXPORT Bool
|
extern _X_EXPORT Bool
|
||||||
xf86CallDriverProbe(struct _DriverRec *drv, Bool detect_only);
|
xf86CallDriverProbe(struct _DriverRec *drv, Bool detect_only);
|
||||||
extern _X_EXPORT Bool
|
extern _X_EXPORT Bool
|
||||||
|
|
|
@ -71,8 +71,8 @@ xf86VGAarbiterInit(void)
|
||||||
{
|
{
|
||||||
if (pci_device_vgaarb_init() != 0) {
|
if (pci_device_vgaarb_init() != 0) {
|
||||||
vga_no_arb = 1;
|
vga_no_arb = 1;
|
||||||
xf86Msg(X_WARNING,
|
LogMessageVerb(X_WARNING, 1,
|
||||||
"VGA arbiter: cannot open kernel arbiter, no multi-card support\n");
|
"VGA arbiter: cannot open kernel arbiter, no multi-card support\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -167,8 +167,9 @@ xf86VGAarbiterWrapFunctions(void)
|
||||||
if (vga_count < 2 || !xf86Screens)
|
if (vga_count < 2 || !xf86Screens)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
xf86Msg(X_INFO, "Found %d VGA devices: arbiter wrapping enabled\n",
|
LogMessageVerb(X_INFO, 1,
|
||||||
vga_count);
|
"Found %d VGA devices: arbiter wrapping enabled\n",
|
||||||
|
vga_count);
|
||||||
|
|
||||||
for (i = 0; i < xf86NumScreens; i++) {
|
for (i = 0; i < xf86NumScreens; i++) {
|
||||||
pScreen = xf86Screens[i]->pScreen;
|
pScreen = xf86Screens[i]->pScreen;
|
||||||
|
|
|
@ -39,6 +39,9 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <X11/X.h>
|
#include <X11/X.h>
|
||||||
|
|
||||||
|
#include "os/log_priv.h"
|
||||||
|
|
||||||
#include "os.h"
|
#include "os.h"
|
||||||
#include "xf86.h"
|
#include "xf86.h"
|
||||||
#include "xf86Priv.h"
|
#include "xf86Priv.h"
|
||||||
|
|
|
@ -109,12 +109,12 @@
|
||||||
#include "xkbsrv.h"
|
#include "xkbsrv.h"
|
||||||
|
|
||||||
/* Valuator verification macro */
|
/* Valuator verification macro */
|
||||||
#define XI_VERIFY_VALUATORS(num_valuators) \
|
#define XI_VERIFY_VALUATORS(num_valuators) \
|
||||||
if (num_valuators > MAX_VALUATORS) { \
|
if (num_valuators > MAX_VALUATORS) { \
|
||||||
xf86Msg(X_ERROR, "%s: num_valuator %d is greater than" \
|
LogMessageVerb(X_ERROR, 1, "%s: num_valuator %d is greater than MAX_VALUATORS\n", \
|
||||||
" MAX_VALUATORS\n", __FUNCTION__, num_valuators); \
|
__FUNCTION__, num_valuators); \
|
||||||
return; \
|
return; \
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
xf86InputDevicePostInit(DeviceIntPtr dev);
|
xf86InputDevicePostInit(DeviceIntPtr dev);
|
||||||
|
@ -148,8 +148,8 @@ ProcessVelocityConfiguration(DeviceIntPtr pDev, const char *devname, void *list,
|
||||||
/* common settings (available via device properties) */
|
/* common settings (available via device properties) */
|
||||||
tempf = xf86SetRealOption(list, "ConstantDeceleration", 1.0);
|
tempf = xf86SetRealOption(list, "ConstantDeceleration", 1.0);
|
||||||
if (tempf != 1.0) {
|
if (tempf != 1.0) {
|
||||||
xf86Msg(X_CONFIG, "%s: (accel) constant deceleration by %.1f\n",
|
LogMessageVerb(X_CONFIG, 1, "%s: (accel) constant deceleration by %.1f\n",
|
||||||
devname, tempf);
|
devname, tempf);
|
||||||
prop = XIGetKnownProperty(ACCEL_PROP_CONSTANT_DECELERATION);
|
prop = XIGetKnownProperty(ACCEL_PROP_CONSTANT_DECELERATION);
|
||||||
XIChangeDeviceProperty(pDev, prop, float_prop, 32,
|
XIChangeDeviceProperty(pDev, prop, float_prop, 32,
|
||||||
PropModeReplace, 1, &tempf, FALSE);
|
PropModeReplace, 1, &tempf, FALSE);
|
||||||
|
@ -157,8 +157,8 @@ ProcessVelocityConfiguration(DeviceIntPtr pDev, const char *devname, void *list,
|
||||||
|
|
||||||
tempf = xf86SetRealOption(list, "AdaptiveDeceleration", 1.0);
|
tempf = xf86SetRealOption(list, "AdaptiveDeceleration", 1.0);
|
||||||
if (tempf > 1.0) {
|
if (tempf > 1.0) {
|
||||||
xf86Msg(X_CONFIG, "%s: (accel) adaptive deceleration by %.1f\n",
|
LogMessageVerb(X_CONFIG, 1, "%s: (accel) adaptive deceleration by %.1f\n",
|
||||||
devname, tempf);
|
devname, tempf);
|
||||||
prop = XIGetKnownProperty(ACCEL_PROP_ADAPTIVE_DECELERATION);
|
prop = XIGetKnownProperty(ACCEL_PROP_ADAPTIVE_DECELERATION);
|
||||||
XIChangeDeviceProperty(pDev, prop, float_prop, 32,
|
XIChangeDeviceProperty(pDev, prop, float_prop, 32,
|
||||||
PropModeReplace, 1, &tempf, FALSE);
|
PropModeReplace, 1, &tempf, FALSE);
|
||||||
|
@ -171,12 +171,11 @@ ProcessVelocityConfiguration(DeviceIntPtr pDev, const char *devname, void *list,
|
||||||
prop = XIGetKnownProperty(ACCEL_PROP_PROFILE_NUMBER);
|
prop = XIGetKnownProperty(ACCEL_PROP_PROFILE_NUMBER);
|
||||||
if (XIChangeDeviceProperty(pDev, prop, XA_INTEGER, 32,
|
if (XIChangeDeviceProperty(pDev, prop, XA_INTEGER, 32,
|
||||||
PropModeReplace, 1, &tempi, FALSE) == Success) {
|
PropModeReplace, 1, &tempi, FALSE) == Success) {
|
||||||
xf86Msg(X_CONFIG, "%s: (accel) acceleration profile %i\n", devname,
|
LogMessageVerb(X_CONFIG, 1, "%s: (accel) acceleration profile %i\n", devname, tempi);
|
||||||
tempi);
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
xf86Msg(X_CONFIG, "%s: (accel) acceleration profile %i is unknown\n",
|
LogMessageVerb(X_CONFIG, 1, "%s: (accel) acceleration profile %i is unknown\n",
|
||||||
devname, tempi);
|
devname, tempi);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* set scaling */
|
/* set scaling */
|
||||||
|
@ -204,8 +203,8 @@ ProcessVelocityConfiguration(DeviceIntPtr pDev, const char *devname, void *list,
|
||||||
|
|
||||||
tempf = xf86SetRealOption(list, "VelocityRelDiff", -1);
|
tempf = xf86SetRealOption(list, "VelocityRelDiff", -1);
|
||||||
if (tempf >= 0) {
|
if (tempf >= 0) {
|
||||||
xf86Msg(X_CONFIG, "%s: (accel) max rel. velocity difference: %.1f%%\n",
|
LogMessageVerb(X_CONFIG, 1, "%s: (accel) max rel. velocity difference: %.1f%%\n",
|
||||||
devname, tempf * 100.0);
|
devname, tempf * 100.0);
|
||||||
s->max_rel_diff = tempf;
|
s->max_rel_diff = tempf;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -251,18 +250,18 @@ ApplyAccelerationSettings(DeviceIntPtr dev)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (InitPointerAccelerationScheme(dev, scheme)) {
|
if (InitPointerAccelerationScheme(dev, scheme)) {
|
||||||
xf86Msg(X_CONFIG, "%s: (accel) selected scheme %s/%i\n",
|
LogMessageVerb(X_CONFIG, 1, "%s: (accel) selected scheme %s/%i\n",
|
||||||
pInfo->name, schemeStr, scheme);
|
pInfo->name, schemeStr, scheme);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
xf86Msg(X_CONFIG, "%s: (accel) could not init scheme %s\n",
|
LogMessageVerb(X_CONFIG, 1, "%s: (accel) could not init scheme %s\n",
|
||||||
pInfo->name, schemeStr);
|
pInfo->name, schemeStr);
|
||||||
scheme = dev->valuator->accelScheme.number;
|
scheme = dev->valuator->accelScheme.number;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
xf86Msg(X_CONFIG, "%s: (accel) keeping acceleration scheme %i\n",
|
LogMessageVerb(X_CONFIG, 1, "%s: (accel) keeping acceleration scheme %i\n",
|
||||||
pInfo->name, scheme);
|
pInfo->name, scheme);
|
||||||
}
|
}
|
||||||
|
|
||||||
free(schemeStr);
|
free(schemeStr);
|
||||||
|
@ -291,11 +290,11 @@ ApplyAccelerationSettings(DeviceIntPtr dev)
|
||||||
if (i >= 0)
|
if (i >= 0)
|
||||||
dev->ptrfeed->ctrl.threshold = i;
|
dev->ptrfeed->ctrl.threshold = i;
|
||||||
|
|
||||||
xf86Msg(X_CONFIG, "%s: (accel) acceleration factor: %.3f\n",
|
LogMessageVerb(X_CONFIG, 1, "%s: (accel) acceleration factor: %.3f\n",
|
||||||
pInfo->name, ((float) dev->ptrfeed->ctrl.num) /
|
pInfo->name, ((float) dev->ptrfeed->ctrl.num) /
|
||||||
((float) dev->ptrfeed->ctrl.den));
|
((float) dev->ptrfeed->ctrl.den));
|
||||||
xf86Msg(X_CONFIG, "%s: (accel) acceleration threshold: %i\n",
|
LogMessageVerb(X_CONFIG, 1, "%s: (accel) acceleration threshold: %i\n",
|
||||||
pInfo->name, dev->ptrfeed->ctrl.threshold);
|
pInfo->name, dev->ptrfeed->ctrl.threshold);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -318,9 +317,9 @@ ApplyTransformationMatrix(DeviceIntPtr dev)
|
||||||
&matrix[2], &matrix[3], &matrix[4], &matrix[5], &matrix[6],
|
&matrix[2], &matrix[3], &matrix[4], &matrix[5], &matrix[6],
|
||||||
&matrix[7], &matrix[8]);
|
&matrix[7], &matrix[8]);
|
||||||
if (rc != 9) {
|
if (rc != 9) {
|
||||||
xf86Msg(X_ERROR,
|
LogMessageVerb(X_ERROR,1,
|
||||||
"%s: invalid format for transformation matrix. Ignoring configuration.\n",
|
"%s: invalid format for transformation matrix. Ignoring configuration.\n",
|
||||||
pInfo->name);
|
pInfo->name);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -347,11 +346,11 @@ ApplyAutoRepeat(DeviceIntPtr dev)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (sscanf(repeatStr, "%ld %ld", &delay, &rate) != 2) {
|
if (sscanf(repeatStr, "%ld %ld", &delay, &rate) != 2) {
|
||||||
xf86Msg(X_ERROR, "\"%s\" is not a valid AutoRepeat value\n", repeatStr);
|
LogMessageVerb(X_ERROR, 1, "\"%s\" is not a valid AutoRepeat value\n", repeatStr);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
xf86Msg(X_CONFIG, "AutoRepeat: %ld %ld\n", delay, rate);
|
LogMessageVerb(X_CONFIG, 1, "AutoRepeat: %ld %ld\n", delay, rate);
|
||||||
xkbi->desc->ctrls->repeat_delay = delay;
|
xkbi->desc->ctrls->repeat_delay = delay;
|
||||||
xkbi->desc->ctrls->repeat_interval = 1000 / rate;
|
xkbi->desc->ctrls->repeat_interval = 1000 / rate;
|
||||||
}
|
}
|
||||||
|
@ -372,11 +371,11 @@ xf86ProcessCommonOptions(InputInfoPtr pInfo, XF86OptionPtr list)
|
||||||
!xf86SetBoolOption(list, "SendCoreEvents", 1) ||
|
!xf86SetBoolOption(list, "SendCoreEvents", 1) ||
|
||||||
!xf86SetBoolOption(list, "CorePointer", 1) ||
|
!xf86SetBoolOption(list, "CorePointer", 1) ||
|
||||||
!xf86SetBoolOption(list, "CoreKeyboard", 1)) {
|
!xf86SetBoolOption(list, "CoreKeyboard", 1)) {
|
||||||
xf86Msg(X_CONFIG, "%s: doesn't report core events\n", pInfo->name);
|
LogMessageVerb(X_CONFIG, 1, "%s: doesn't report core events\n", pInfo->name);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
pInfo->flags |= XI86_ALWAYS_CORE;
|
pInfo->flags |= XI86_ALWAYS_CORE;
|
||||||
xf86Msg(X_CONFIG, "%s: always reports core events\n", pInfo->name);
|
LogMessageVerb(X_CONFIG, 1, "%s: always reports core events\n", pInfo->name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -398,7 +397,7 @@ xf86ActivateDevice(InputInfoPtr pInfo)
|
||||||
dev = AddInputDevice(serverClient, pInfo->device_control, TRUE);
|
dev = AddInputDevice(serverClient, pInfo->device_control, TRUE);
|
||||||
|
|
||||||
if (dev == NULL) {
|
if (dev == NULL) {
|
||||||
xf86Msg(X_ERROR, "Too many input devices. Ignoring %s\n", pInfo->name);
|
LogMessageVerb(X_ERROR, 1, "Too many input devices. Ignoring %s\n", pInfo->name);
|
||||||
pInfo->dev = NULL;
|
pInfo->dev = NULL;
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
@ -415,9 +414,9 @@ xf86ActivateDevice(InputInfoPtr pInfo)
|
||||||
dev->config_info = xf86SetStrOption(pInfo->options, "config_info", NULL);
|
dev->config_info = xf86SetStrOption(pInfo->options, "config_info", NULL);
|
||||||
|
|
||||||
if (serverGeneration == 1)
|
if (serverGeneration == 1)
|
||||||
xf86Msg(X_INFO,
|
LogMessageVerb(X_INFO, 1,
|
||||||
"XINPUT: Adding extended input device \"%s\" (type: %s, id %d)\n",
|
"XINPUT: Adding extended input device \"%s\" (type: %s, id %d)\n",
|
||||||
pInfo->name, pInfo->type_name, dev->id);
|
pInfo->name, pInfo->type_name, dev->id);
|
||||||
|
|
||||||
return dev;
|
return dev;
|
||||||
}
|
}
|
||||||
|
@ -724,16 +723,16 @@ MergeInputClasses(const InputInfoPtr idev, const InputAttributes * attrs)
|
||||||
free((void *) idev->driver);
|
free((void *) idev->driver);
|
||||||
idev->driver = Xstrdup(cl->driver);
|
idev->driver = Xstrdup(cl->driver);
|
||||||
if (!idev->driver) {
|
if (!idev->driver) {
|
||||||
xf86Msg(X_ERROR, "Failed to allocate memory while merging "
|
LogMessageVerb(X_ERROR, 1, "Failed to allocate memory while merging "
|
||||||
"InputClass configuration");
|
"InputClass configuration");
|
||||||
return BadAlloc;
|
return BadAlloc;
|
||||||
}
|
}
|
||||||
classopts = xf86ReplaceStrOption(classopts, "driver", idev->driver);
|
classopts = xf86ReplaceStrOption(classopts, "driver", idev->driver);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Apply options to device with InputClass settings preferred. */
|
/* Apply options to device with InputClass settings preferred. */
|
||||||
xf86Msg(X_CONFIG, "%s: Applying InputClass \"%s\"\n",
|
LogMessageVerb(X_CONFIG, 1, "%s: Applying InputClass \"%s\"\n",
|
||||||
idev->name, cl->identifier);
|
idev->name, cl->identifier);
|
||||||
idev->options = xf86optionListMerge(idev->options, classopts);
|
idev->options = xf86optionListMerge(idev->options, classopts);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -761,8 +760,8 @@ IgnoreInputClass(const InputInfoPtr idev, const InputAttributes * attrs)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ignore)
|
if (ignore)
|
||||||
xf86Msg(X_CONFIG, "%s: Ignoring device from InputClass \"%s\"\n",
|
LogMessageVerb(X_CONFIG, 1, "%s: Ignoring device from InputClass \"%s\"\n",
|
||||||
idev->name, ignore_class);
|
idev->name, ignore_class);
|
||||||
return ignore;
|
return ignore;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -914,10 +913,10 @@ xf86NewInputDevice(InputInfoPtr pInfo, DeviceIntPtr *pdev, BOOL enable)
|
||||||
|
|
||||||
drv = xf86LoadInputDriver(pInfo->driver);
|
drv = xf86LoadInputDriver(pInfo->driver);
|
||||||
if (!drv) {
|
if (!drv) {
|
||||||
xf86Msg(X_ERROR, "No input driver matching `%s'\n", pInfo->driver);
|
LogMessageVerb(X_ERROR, 1, "No input driver matching `%s'\n", pInfo->driver);
|
||||||
|
|
||||||
if (strlen(FALLBACK_INPUT_DRIVER) > 0) {
|
if (strlen(FALLBACK_INPUT_DRIVER) > 0) {
|
||||||
xf86Msg(X_INFO, "Falling back to input driver `%s'\n",
|
LogMessageVerb(X_INFO, 1, "Falling back to input driver `%s'\n",
|
||||||
FALLBACK_INPUT_DRIVER);
|
FALLBACK_INPUT_DRIVER);
|
||||||
drv = xf86LoadInputDriver(FALLBACK_INPUT_DRIVER);
|
drv = xf86LoadInputDriver(FALLBACK_INPUT_DRIVER);
|
||||||
if (drv) {
|
if (drv) {
|
||||||
|
@ -931,13 +930,13 @@ xf86NewInputDevice(InputInfoPtr pInfo, DeviceIntPtr *pdev, BOOL enable)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
xf86Msg(X_INFO, "Using input driver '%s' for '%s'\n", drv->driverName,
|
LogMessageVerb(X_INFO, 1, "Using input driver '%s' for '%s'\n", drv->driverName,
|
||||||
pInfo->name);
|
pInfo->name);
|
||||||
|
|
||||||
if (!drv->PreInit) {
|
if (!drv->PreInit) {
|
||||||
xf86Msg(X_ERROR,
|
LogMessageVerb(X_ERROR, 1,
|
||||||
"Input driver `%s' has no PreInit function (ignoring)\n",
|
"Input driver `%s' has no PreInit function (ignoring)\n",
|
||||||
drv->driverName);
|
drv->driverName);
|
||||||
rval = BadImplementation;
|
rval = BadImplementation;
|
||||||
goto unwind;
|
goto unwind;
|
||||||
}
|
}
|
||||||
|
@ -975,7 +974,7 @@ xf86NewInputDevice(InputInfoPtr pInfo, DeviceIntPtr *pdev, BOOL enable)
|
||||||
input_unlock();
|
input_unlock();
|
||||||
|
|
||||||
if (rval != Success) {
|
if (rval != Success) {
|
||||||
xf86Msg(X_ERROR, "PreInit returned %d for \"%s\"\n", rval, pInfo->name);
|
LogMessageVerb(X_ERROR, 1, "PreInit returned %d for \"%s\"\n", rval, pInfo->name);
|
||||||
goto unwind;
|
goto unwind;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -986,14 +985,14 @@ xf86NewInputDevice(InputInfoPtr pInfo, DeviceIntPtr *pdev, BOOL enable)
|
||||||
|
|
||||||
rval = ActivateDevice(dev, TRUE);
|
rval = ActivateDevice(dev, TRUE);
|
||||||
if (rval != Success) {
|
if (rval != Success) {
|
||||||
xf86Msg(X_ERROR, "Couldn't init device \"%s\"\n", pInfo->name);
|
LogMessageVerb(X_ERROR, 1, "Couldn't init device \"%s\"\n", pInfo->name);
|
||||||
RemoveDevice(dev, TRUE);
|
RemoveDevice(dev, TRUE);
|
||||||
goto unwind;
|
goto unwind;
|
||||||
}
|
}
|
||||||
|
|
||||||
rval = xf86InputDevicePostInit(dev);
|
rval = xf86InputDevicePostInit(dev);
|
||||||
if (rval != Success) {
|
if (rval != Success) {
|
||||||
xf86Msg(X_ERROR, "Couldn't post-init device \"%s\"\n", pInfo->name);
|
LogMessageVerb(X_ERROR, 1, "Couldn't post-init device \"%s\"\n", pInfo->name);
|
||||||
RemoveDevice(dev, TRUE);
|
RemoveDevice(dev, TRUE);
|
||||||
goto unwind;
|
goto unwind;
|
||||||
}
|
}
|
||||||
|
@ -1003,7 +1002,7 @@ xf86NewInputDevice(InputInfoPtr pInfo, DeviceIntPtr *pdev, BOOL enable)
|
||||||
input_lock();
|
input_lock();
|
||||||
EnableDevice(dev, TRUE);
|
EnableDevice(dev, TRUE);
|
||||||
if (!dev->enabled) {
|
if (!dev->enabled) {
|
||||||
xf86Msg(X_ERROR, "Couldn't init device \"%s\"\n", pInfo->name);
|
LogMessageVerb(X_ERROR, 1, "Couldn't init device \"%s\"\n", pInfo->name);
|
||||||
RemoveDevice(dev, TRUE);
|
RemoveDevice(dev, TRUE);
|
||||||
rval = BadMatch;
|
rval = BadMatch;
|
||||||
input_unlock();
|
input_unlock();
|
||||||
|
@ -1108,15 +1107,14 @@ NewInputDeviceRequest(InputOption *options, InputAttributes * attrs,
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!pInfo->name) {
|
if (!pInfo->name) {
|
||||||
xf86Msg(X_INFO, "No identifier specified, ignoring this device.\n");
|
LogMessageVerb(X_INFO, 1, "No identifier specified, ignoring this device.\n");
|
||||||
rval = BadRequest;
|
rval = BadRequest;
|
||||||
goto unwind;
|
goto unwind;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!pInfo->driver) {
|
if (!pInfo->driver) {
|
||||||
xf86Msg(X_INFO, "No input driver specified, ignoring this device.\n");
|
LogMessageVerb(X_INFO, 1, "No input driver specified, ignoring this device.\n");
|
||||||
xf86Msg(X_INFO,
|
LogMessageVerb(X_INFO, 1, "This device may have been added with another device file.\n");
|
||||||
"This device may have been added with another device file.\n");
|
|
||||||
rval = BadRequest;
|
rval = BadRequest;
|
||||||
goto unwind;
|
goto unwind;
|
||||||
}
|
}
|
||||||
|
@ -1129,7 +1127,7 @@ NewInputDeviceRequest(InputOption *options, InputAttributes * attrs,
|
||||||
|
|
||||||
unwind:
|
unwind:
|
||||||
if (is_auto && !xf86Info.autoAddDevices)
|
if (is_auto && !xf86Info.autoAddDevices)
|
||||||
xf86Msg(X_INFO, "AutoAddDevices is off - not adding device.\n");
|
LogMessageVerb(X_INFO, 1, "AutoAddDevices is off - not adding device.\n");
|
||||||
xf86DeleteInput(pInfo, 0);
|
xf86DeleteInput(pInfo, 0);
|
||||||
return rval;
|
return rval;
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,18 +30,17 @@
|
||||||
#include <xorg-config.h>
|
#include <xorg-config.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include <X11/X.h>
|
||||||
|
|
||||||
|
#include "os/log_priv.h"
|
||||||
|
|
||||||
#include "misc.h"
|
#include "misc.h"
|
||||||
#include "xf86.h"
|
#include "xf86.h"
|
||||||
|
|
||||||
#include <X11/X.h>
|
|
||||||
#include "scrnintstr.h"
|
#include "scrnintstr.h"
|
||||||
#include "regionstr.h"
|
#include "regionstr.h"
|
||||||
#include "xf86fbman.h"
|
#include "xf86fbman.h"
|
||||||
|
|
||||||
/*
|
|
||||||
#define DEBUG
|
|
||||||
*/
|
|
||||||
|
|
||||||
static DevPrivateKeyRec xf86FBManagerKeyRec;
|
static DevPrivateKeyRec xf86FBManagerKeyRec;
|
||||||
static DevPrivateKey xf86FBManagerKey;
|
static DevPrivateKey xf86FBManagerKey;
|
||||||
|
|
||||||
|
|
|
@ -35,8 +35,11 @@
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <X11/X.h>
|
|
||||||
#include <pciaccess.h>
|
#include <pciaccess.h>
|
||||||
|
#include <X11/X.h>
|
||||||
|
|
||||||
|
#include "os/log_priv.h"
|
||||||
|
|
||||||
#include "os.h"
|
#include "os.h"
|
||||||
#include "Pci.h"
|
#include "Pci.h"
|
||||||
#include "xf86.h"
|
#include "xf86.h"
|
||||||
|
@ -133,8 +136,8 @@ xf86PciProbe(void)
|
||||||
primaryBus.id.pci = info;
|
primaryBus.id.pci = info;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
xf86Msg(X_NOTICE,
|
LogMessageVerb(X_NOTICE, 1,
|
||||||
"More than one possible primary device found\n");
|
"More than one possible primary device found\n");
|
||||||
primaryBus.type ^= (BusType) (-1);
|
primaryBus.type ^= (BusType) (-1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -154,10 +157,10 @@ xf86PciProbe(void)
|
||||||
if (xf86IsPrimaryPci(info))
|
if (xf86IsPrimaryPci(info))
|
||||||
prim = "*";
|
prim = "*";
|
||||||
|
|
||||||
xf86Msg(X_PROBED, "PCI:%s(%u@%u:%u:%u) %04x:%04x:%04x:%04x ", prim,
|
LogMessageVerb(X_PROBED, 1, "PCI:%s(%u@%u:%u:%u) %04x:%04x:%04x:%04x ", prim,
|
||||||
info->bus, info->domain, info->dev, info->func,
|
info->bus, info->domain, info->dev, info->func,
|
||||||
info->vendor_id, info->device_id,
|
info->vendor_id, info->device_id,
|
||||||
info->subvendor_id, info->subdevice_id);
|
info->subvendor_id, info->subdevice_id);
|
||||||
|
|
||||||
xf86ErrorF("rev %d", info->revision);
|
xf86ErrorF("rev %d", info->revision);
|
||||||
|
|
||||||
|
@ -825,11 +828,11 @@ xf86MatchPciInstances(const char *driverName, int vendorID,
|
||||||
devList[j]->screen == instances[i].screen) {
|
devList[j]->screen == instances[i].screen) {
|
||||||
|
|
||||||
if (devBus)
|
if (devBus)
|
||||||
xf86MsgVerb(X_WARNING, 0,
|
LogMessageVerb(X_WARNING, 0,
|
||||||
"%s: More than one matching Device section for "
|
"%s: More than one matching Device section for "
|
||||||
"instances\n\t(BusID: %s) found: %s\n",
|
"instances\n\t(BusID: %s) found: %s\n",
|
||||||
driverName, devList[j]->busID,
|
driverName, devList[j]->busID,
|
||||||
devList[j]->identifier);
|
devList[j]->identifier);
|
||||||
else
|
else
|
||||||
devBus = devList[j];
|
devBus = devList[j];
|
||||||
}
|
}
|
||||||
|
@ -840,13 +843,12 @@ xf86MatchPciInstances(const char *driverName, int vendorID,
|
||||||
* only assign to it to the primary device.
|
* only assign to it to the primary device.
|
||||||
*/
|
*/
|
||||||
if (xf86IsPrimaryPci(pPci)) {
|
if (xf86IsPrimaryPci(pPci)) {
|
||||||
xf86Msg(X_PROBED, "Assigning device section with no busID"
|
LogMessageVerb(X_PROBED, 1, "Assigning device section with no busID to primary device\n");
|
||||||
" to primary device\n");
|
|
||||||
if (dev || devBus)
|
if (dev || devBus)
|
||||||
xf86MsgVerb(X_WARNING, 0,
|
LogMessageVerb(X_WARNING, 0,
|
||||||
"%s: More than one matching Device section "
|
"%s: More than one matching Device section "
|
||||||
"found: %s\n", driverName,
|
"found: %s\n", driverName,
|
||||||
devList[j]->identifier);
|
devList[j]->identifier);
|
||||||
else
|
else
|
||||||
dev = devList[j];
|
dev = devList[j];
|
||||||
}
|
}
|
||||||
|
@ -856,10 +858,10 @@ xf86MatchPciInstances(const char *driverName, int vendorID,
|
||||||
dev = devBus; /* busID preferred */
|
dev = devBus; /* busID preferred */
|
||||||
if (!dev) {
|
if (!dev) {
|
||||||
if (xf86CheckPciSlot(pPci) && pciDeviceHasBars(pPci)) {
|
if (xf86CheckPciSlot(pPci) && pciDeviceHasBars(pPci)) {
|
||||||
xf86MsgVerb(X_WARNING, 0, "%s: No matching Device section "
|
LogMessageVerb(X_WARNING, 0, "%s: No matching Device section "
|
||||||
"for instance (BusID PCI:%u@%u:%u:%u) found\n",
|
"for instance (BusID PCI:%u@%u:%u:%u) found\n",
|
||||||
driverName, pPci->bus, pPci->domain, pPci->dev,
|
driverName, pPci->bus, pPci->domain, pPci->dev,
|
||||||
pPci->func);
|
pPci->func);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -888,10 +890,10 @@ xf86MatchPciInstances(const char *driverName, int vendorID,
|
||||||
if (c->token == -1) {
|
if (c->token == -1) {
|
||||||
instances[i].claimed = FALSE;
|
instances[i].claimed = FALSE;
|
||||||
numClaimedInstances--;
|
numClaimedInstances--;
|
||||||
xf86MsgVerb(X_WARNING, 0, "%s: Chipset \"%s\" in Device "
|
LogMessageVerb(X_WARNING, 0, "%s: Chipset \"%s\" in Device "
|
||||||
"section \"%s\" isn't valid for this driver\n",
|
"section \"%s\" isn't valid for this driver\n",
|
||||||
driverName, instances[i].dev->chipset,
|
driverName, instances[i].dev->chipset,
|
||||||
instances[i].dev->identifier);
|
instances[i].dev->identifier);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
instances[i].chip = c->token;
|
instances[i].chip = c->token;
|
||||||
|
@ -901,17 +903,17 @@ xf86MatchPciInstances(const char *driverName, int vendorID,
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (id->numChipset >= 0) {
|
if (id->numChipset >= 0) {
|
||||||
xf86Msg(X_CONFIG, "Chipset override: %s\n",
|
LogMessageVerb(X_CONFIG, 1, "Chipset override: %s\n",
|
||||||
instances[i].dev->chipset);
|
instances[i].dev->chipset);
|
||||||
from = X_CONFIG;
|
from = X_CONFIG;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
instances[i].claimed = FALSE;
|
instances[i].claimed = FALSE;
|
||||||
numClaimedInstances--;
|
numClaimedInstances--;
|
||||||
xf86MsgVerb(X_WARNING, 0, "%s: Chipset \"%s\" in Device "
|
LogMessageVerb(X_WARNING, 0, "%s: Chipset \"%s\" in Device "
|
||||||
"section \"%s\" isn't a valid PCI chipset\n",
|
"section \"%s\" isn't a valid PCI chipset\n",
|
||||||
driverName, instances[i].dev->chipset,
|
driverName, instances[i].dev->chipset,
|
||||||
instances[i].dev->identifier);
|
instances[i].dev->identifier);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -923,16 +925,15 @@ xf86MatchPciInstances(const char *driverName, int vendorID,
|
||||||
if (id->numChipset == -1) {
|
if (id->numChipset == -1) {
|
||||||
instances[i].claimed = FALSE;
|
instances[i].claimed = FALSE;
|
||||||
numClaimedInstances--;
|
numClaimedInstances--;
|
||||||
xf86MsgVerb(X_WARNING, 0, "%s: ChipID 0x%04X in Device "
|
LogMessageVerb(X_WARNING, 0, "%s: ChipID 0x%04X in Device "
|
||||||
"section \"%s\" isn't valid for this driver\n",
|
"section \"%s\" isn't valid for this driver\n",
|
||||||
driverName, instances[i].dev->chipID,
|
driverName, instances[i].dev->chipID,
|
||||||
instances[i].dev->identifier);
|
instances[i].dev->identifier);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
instances[i].chip = id->numChipset;
|
instances[i].chip = id->numChipset;
|
||||||
|
LogMessageVerb(X_CONFIG, 1, "ChipID override: 0x%04X\n",
|
||||||
xf86Msg(X_CONFIG, "ChipID override: 0x%04X\n",
|
instances[i].dev->chipID);
|
||||||
instances[i].dev->chipID);
|
|
||||||
from = X_CONFIG;
|
from = X_CONFIG;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -949,7 +950,7 @@ xf86MatchPciInstances(const char *driverName, int vendorID,
|
||||||
if (c->token == instances[i].chip)
|
if (c->token == instances[i].chip)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
xf86Msg(from, "Chipset %s found\n", c->name);
|
LogMessageVerb(from, 1, "Chipset %s found\n", c->name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1310,9 +1311,9 @@ xf86MatchDriverFromFiles(uint16_t match_vendor, uint16_t match_chip,
|
||||||
if (!idsdir)
|
if (!idsdir)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
xf86Msg(X_INFO,
|
LogMessageVerb(X_INFO, 1,
|
||||||
"Scanning %s directory for additional PCI ID's supported by the drivers\n",
|
"Scanning %s directory for additional PCI ID's supported by the drivers\n",
|
||||||
PCI_TXT_IDS_PATH);
|
PCI_TXT_IDS_PATH);
|
||||||
direntry = readdir(idsdir);
|
direntry = readdir(idsdir);
|
||||||
/* Read the directory */
|
/* Read the directory */
|
||||||
while (direntry) {
|
while (direntry) {
|
||||||
|
@ -1328,8 +1329,8 @@ xf86MatchDriverFromFiles(uint16_t match_vendor, uint16_t match_chip,
|
||||||
PCI_TXT_IDS_PATH, direntry->d_name);
|
PCI_TXT_IDS_PATH, direntry->d_name);
|
||||||
fp = fopen(path_name, "r");
|
fp = fopen(path_name, "r");
|
||||||
if (fp == NULL) {
|
if (fp == NULL) {
|
||||||
xf86Msg(X_ERROR, "Could not open %s for reading. Exiting.\n",
|
LogMessageVerb(X_ERROR, 1, "Could not open %s for reading. Exiting.\n",
|
||||||
path_name);
|
path_name);
|
||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
/* Read the file */
|
/* Read the file */
|
||||||
|
@ -1363,8 +1364,8 @@ xf86MatchDriverFromFiles(uint16_t match_vendor, uint16_t match_chip,
|
||||||
(char *) malloc(sizeof(char) *
|
(char *) malloc(sizeof(char) *
|
||||||
strlen(direntry->d_name) - 3);
|
strlen(direntry->d_name) - 3);
|
||||||
if (!tmpMatch) {
|
if (!tmpMatch) {
|
||||||
xf86Msg(X_ERROR,
|
LogMessageVerb(X_ERROR, 1,
|
||||||
"Could not allocate space for the module name. Exiting.\n");
|
"Could not allocate space for the module name. Exiting.\n");
|
||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
/* hack off the .ids suffix. This should guard
|
/* hack off the .ids suffix. This should guard
|
||||||
|
@ -1380,8 +1381,8 @@ xf86MatchDriverFromFiles(uint16_t match_vendor, uint16_t match_chip,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
xf86AddMatchedDriver(md, tmpMatch);
|
xf86AddMatchedDriver(md, tmpMatch);
|
||||||
xf86Msg(X_INFO, "Matched %s from file name %s\n",
|
LogMessageVerb(X_INFO, 1, "Matched %s from file name %s\n",
|
||||||
tmpMatch, direntry->d_name);
|
tmpMatch, direntry->d_name);
|
||||||
free(tmpMatch);
|
free(tmpMatch);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -233,9 +233,9 @@ xf86OutputClassDriverList(int index, XF86MatchedDrivers *md)
|
||||||
if (OutputClassMatches(cl, &xf86_platform_devices[index])) {
|
if (OutputClassMatches(cl, &xf86_platform_devices[index])) {
|
||||||
char *path = xf86_platform_odev_attributes(index)->path;
|
char *path = xf86_platform_odev_attributes(index)->path;
|
||||||
|
|
||||||
xf86Msg(X_INFO, "Applying OutputClass \"%s\" to %s\n",
|
LogMessageVerb(X_INFO, 1, "Applying OutputClass \"%s\" to %s\n",
|
||||||
cl->identifier, path);
|
cl->identifier, path);
|
||||||
xf86Msg(X_NONE, "\tloading driver: %s\n", cl->driver);
|
LogMessageVerb(X_NONE, 1, "\tloading driver: %s\n", cl->driver);
|
||||||
|
|
||||||
xf86AddMatchedDriver(md, cl->driver);
|
xf86AddMatchedDriver(md, cl->driver);
|
||||||
}
|
}
|
||||||
|
@ -283,7 +283,7 @@ void xf86PlatformScanPciDev(void)
|
||||||
if (!xf86scanpci())
|
if (!xf86scanpci())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
xf86Msg(X_CONFIG, "Scanning the platform PCI devices\n");
|
LogMessageVerb(X_CONFIG, 1, "Scanning the platform PCI devices\n");
|
||||||
for (i = 0; i < xf86_num_platform_devices; i++) {
|
for (i = 0; i < xf86_num_platform_devices; i++) {
|
||||||
char *busid = xf86_platform_odev_attributes(i)->busid;
|
char *busid = xf86_platform_odev_attributes(i)->busid;
|
||||||
|
|
||||||
|
@ -327,8 +327,8 @@ xf86platformProbe(void)
|
||||||
XNFasprintf(&path, "%s,%s", cl->modulepath,
|
XNFasprintf(&path, "%s,%s", cl->modulepath,
|
||||||
path ? path : xf86ModulePath);
|
path ? path : xf86ModulePath);
|
||||||
free(old_path);
|
free(old_path);
|
||||||
xf86Msg(X_CONFIG, "OutputClass \"%s\" ModulePath extended to \"%s\"\n",
|
LogMessageVerb(X_CONFIG, 1, "OutputClass \"%s\" ModulePath extended to \"%s\"\n",
|
||||||
cl->identifier, path);
|
cl->identifier, path);
|
||||||
LoaderSetPath(path);
|
LoaderSetPath(path);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -344,8 +344,8 @@ xf86platformProbe(void)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (xf86CheckBoolOption(cl->option_lst, "PrimaryGPU", FALSE)) {
|
if (xf86CheckBoolOption(cl->option_lst, "PrimaryGPU", FALSE)) {
|
||||||
xf86Msg(X_CONFIG, "OutputClass \"%s\" setting %s as PrimaryGPU\n",
|
LogMessageVerb(X_CONFIG, 1, "OutputClass \"%s\" setting %s as PrimaryGPU\n",
|
||||||
cl->identifier, dev->attribs->path);
|
cl->identifier, dev->attribs->path);
|
||||||
primaryBus.type = BUS_PLATFORM;
|
primaryBus.type = BUS_PLATFORM;
|
||||||
primaryBus.id.plat = dev;
|
primaryBus.id.plat = dev;
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -395,8 +395,8 @@ xf86MergeOutputClassOptions(int entityIndex, void **options)
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
xf86Msg(X_DEBUG, "xf86MergeOutputClassOptions unsupported bus type %d\n",
|
LogMessageVerb(X_DEBUG, 1, "xf86MergeOutputClassOptions unsupported bus type %d\n",
|
||||||
entity->bus.type);
|
entity->bus.type);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!dev)
|
if (!dev)
|
||||||
|
@ -406,8 +406,8 @@ xf86MergeOutputClassOptions(int entityIndex, void **options)
|
||||||
if (!OutputClassMatches(cl, dev) || !cl->option_lst)
|
if (!OutputClassMatches(cl, dev) || !cl->option_lst)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
xf86Msg(X_INFO, "Applying OutputClass \"%s\" options to %s\n",
|
LogMessageVerb(X_INFO, 1, "Applying OutputClass \"%s\" options to %s\n",
|
||||||
cl->identifier, dev->attribs->path);
|
cl->identifier, dev->attribs->path);
|
||||||
|
|
||||||
classopts = xf86optionListDup(cl->option_lst);
|
classopts = xf86optionListDup(cl->option_lst);
|
||||||
*options = xf86optionListMerge(*options, classopts);
|
*options = xf86optionListMerge(*options, classopts);
|
||||||
|
@ -653,8 +653,8 @@ xf86PlatformFindHotplugDriver(int dev_index)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Return the first driver from the match list */
|
/* Return the first driver from the match list */
|
||||||
xf86Msg(X_INFO, "matching hotplug-driver is %s\n",
|
LogMessageVerb(X_INFO, 1, "matching hotplug-driver is %s\n",
|
||||||
hp_driver ? hp_driver : "none");
|
hp_driver ? hp_driver : "none");
|
||||||
return hp_driver;
|
return hp_driver;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -811,13 +811,13 @@ void xf86platformPrimary(void)
|
||||||
{
|
{
|
||||||
/* use the first platform device as a fallback */
|
/* use the first platform device as a fallback */
|
||||||
if (primaryBus.type == BUS_NONE) {
|
if (primaryBus.type == BUS_NONE) {
|
||||||
xf86Msg(X_INFO, "no primary bus or device found\n");
|
LogMessageVerb(X_INFO, 1, "no primary bus or device found\n");
|
||||||
|
|
||||||
if (xf86_num_platform_devices > 0) {
|
if (xf86_num_platform_devices > 0) {
|
||||||
primaryBus.id.plat = &xf86_platform_devices[0];
|
primaryBus.id.plat = &xf86_platform_devices[0];
|
||||||
primaryBus.type = BUS_PLATFORM;
|
primaryBus.type = BUS_PLATFORM;
|
||||||
|
|
||||||
xf86Msg(X_NONE, "\tfalling back to %s\n", primaryBus.id.plat->attribs->syspath);
|
LogMessageVerb(X_NONE, 1, "\tfalling back to %s\n", primaryBus.id.plat->attribs->syspath);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -224,7 +224,7 @@ xf86SbusProbe(void)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
xf86Msg(X_PROBED, "SBUS:(0x%08x) %s", psdp->node.node, psdp->descr);
|
LogMessageVerb(X_PROBED, 1, "SBUS:(0x%08x) %s", psdp->node.node, psdp->descr);
|
||||||
promPath = sparcPromNode2Pathname(&psdp->node);
|
promPath = sparcPromNode2Pathname(&psdp->node);
|
||||||
if (promPath) {
|
if (promPath) {
|
||||||
xf86ErrorF(" at %s", promPath);
|
xf86ErrorF(" at %s", promPath);
|
||||||
|
@ -232,7 +232,7 @@ xf86SbusProbe(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
xf86Msg(X_PROBED, "SBUS: %s", psdp->descr);
|
LogMessageVerb(X_PROBED, 1, "SBUS: %s", psdp->descr);
|
||||||
xf86ErrorF("\n");
|
xf86ErrorF("\n");
|
||||||
}
|
}
|
||||||
if (useProm)
|
if (useProm)
|
||||||
|
@ -464,11 +464,11 @@ xf86MatchSbusInstances(const char *driverName, int sbusDevId,
|
||||||
if (devList[j]->busID && *devList[j]->busID) {
|
if (devList[j]->busID && *devList[j]->busID) {
|
||||||
if (xf86CompareSbusBusString(devList[j]->busID, psdp->fbNum)) {
|
if (xf86CompareSbusBusString(devList[j]->busID, psdp->fbNum)) {
|
||||||
if (devBus)
|
if (devBus)
|
||||||
xf86MsgVerb(X_WARNING, 0,
|
LogMessageVerb(X_WARNING, 0,
|
||||||
"%s: More than one matching Device section for "
|
"%s: More than one matching Device section for "
|
||||||
"instance (BusID: %s) found: %s\n",
|
"instance (BusID: %s) found: %s\n",
|
||||||
driverName, devList[j]->identifier,
|
driverName, devList[j]->identifier,
|
||||||
devList[j]->busID);
|
devList[j]->busID);
|
||||||
else
|
else
|
||||||
devBus = devList[j];
|
devBus = devList[j];
|
||||||
}
|
}
|
||||||
|
@ -476,34 +476,34 @@ xf86MatchSbusInstances(const char *driverName, int sbusDevId,
|
||||||
else {
|
else {
|
||||||
if (!dev && !devBus) {
|
if (!dev && !devBus) {
|
||||||
if (promPath)
|
if (promPath)
|
||||||
xf86Msg(X_PROBED,
|
LogMessageVerb(X_PROBED, 1,
|
||||||
"Assigning device section with no busID to SBUS:%s\n",
|
"Assigning device section with no busID to SBUS:%s\n",
|
||||||
promPath);
|
promPath);
|
||||||
else
|
else
|
||||||
xf86Msg(X_PROBED,
|
LogMessageVerb(X_PROBED, 1,
|
||||||
"Assigning device section with no busID to SBUS:fb%d\n",
|
"Assigning device section with no busID to SBUS:fb%d\n",
|
||||||
psdp->fbNum);
|
psdp->fbNum);
|
||||||
dev = devList[j];
|
dev = devList[j];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
xf86MsgVerb(X_WARNING, 0,
|
LogMessageVerb(X_WARNING, 0,
|
||||||
"%s: More than one matching Device section "
|
"%s: More than one matching Device section "
|
||||||
"found: %s\n", driverName,
|
"found: %s\n", driverName,
|
||||||
devList[j]->identifier);
|
devList[j]->identifier);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (devBus)
|
if (devBus)
|
||||||
dev = devBus; /* busID preferred */
|
dev = devBus; /* busID preferred */
|
||||||
if (!dev && psdp->fd != -2) {
|
if (!dev && psdp->fd != -2) {
|
||||||
if (promPath) {
|
if (promPath) {
|
||||||
xf86MsgVerb(X_WARNING, 0, "%s: No matching Device section "
|
LogMessageVerb(X_WARNING, 0, "%s: No matching Device section "
|
||||||
"for instance (BusID SBUS:%s) found\n",
|
"for instance (BusID SBUS:%s) found\n",
|
||||||
driverName, promPath);
|
driverName, promPath);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
xf86MsgVerb(X_WARNING, 0, "%s: No matching Device section "
|
LogMessageVerb(X_WARNING, 0, "%s: No matching Device section "
|
||||||
"for instance (BusID SBUS:fb%d) found\n",
|
"for instance (BusID SBUS:fb%d) found\n",
|
||||||
driverName, psdp->fbNum);
|
driverName, psdp->fbNum);
|
||||||
}
|
}
|
||||||
else if (dev) {
|
else if (dev) {
|
||||||
numClaimedInstances++;
|
numClaimedInstances++;
|
||||||
|
|
|
@ -89,8 +89,8 @@ handle_edid_quirks(xf86MonPtr m)
|
||||||
|
|
||||||
xf86ForEachDetailedBlock(m, find_max_detailed_clock, &clock);
|
xf86ForEachDetailedBlock(m, find_max_detailed_clock, &clock);
|
||||||
if (clock && (ranges->max_clock * 1e6 < clock)) {
|
if (clock && (ranges->max_clock * 1e6 < clock)) {
|
||||||
xf86Msg(X_WARNING, "EDID timing clock %.2f exceeds claimed max "
|
LogMessageVerb(X_WARNING, 1, "EDID timing clock %.2f exceeds claimed max "
|
||||||
"%dMHz, fixing\n", clock / 1.0e6, ranges->max_clock);
|
"%dMHz, fixing\n", clock / 1.0e6, ranges->max_clock);
|
||||||
ranges->max_clock = (clock + 999999) / 1e6;
|
ranges->max_clock = (clock + 999999) / 1e6;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -159,8 +159,8 @@ encode_aspect_ratio(xf86MonPtr m)
|
||||||
m->features.vsize = (p.real_vsize + 5) / 10;
|
m->features.vsize = (p.real_vsize + 5) / 10;
|
||||||
}
|
}
|
||||||
|
|
||||||
xf86Msg(X_INFO, "Quirked EDID physical size to %dx%d cm\n",
|
LogMessageVerb(X_INFO, 1, "Quirked EDID physical size to %dx%d cm\n",
|
||||||
m->features.hsize, m->features.vsize);
|
m->features.hsize, m->features.vsize);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -5630,17 +5630,6 @@ strongly encouraged to improve the consistency of driver behaviour.
|
||||||
|
|
||||||
</blockquote></para></blockquote>
|
</blockquote></para></blockquote>
|
||||||
|
|
||||||
<blockquote><para>
|
|
||||||
<programlisting>
|
|
||||||
xf86MsgVerb(MessageType type, int verb, const char *format, ...);
|
|
||||||
</programlisting>
|
|
||||||
<blockquote><para>
|
|
||||||
Like <function>xf86Msg()</function>, but with the verbosity level given
|
|
||||||
explicitly.
|
|
||||||
</para>
|
|
||||||
|
|
||||||
</blockquote></para></blockquote>
|
|
||||||
|
|
||||||
<blockquote><para>
|
<blockquote><para>
|
||||||
<programlisting>
|
<programlisting>
|
||||||
xf86DrvMsg(int scrnIndex, MessageType type, const char *format, ...);
|
xf86DrvMsg(int scrnIndex, MessageType type, const char *format, ...);
|
||||||
|
|
|
@ -28,7 +28,7 @@ fbdevHWProbe(struct pci_device *pPci, char *device, char **namep)
|
||||||
Bool
|
Bool
|
||||||
fbdevHWInit(ScrnInfoPtr pScrn, struct pci_device *pPci, char *device)
|
fbdevHWInit(ScrnInfoPtr pScrn, struct pci_device *pPci, char *device)
|
||||||
{
|
{
|
||||||
xf86Msg(X_ERROR, "fbdevhw is not available on this platform\n");
|
LogMessageVerb(X_ERROR, 1, "fbdevhw is not available on this platform\n");
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -752,9 +752,9 @@ xf86DestroyI2CBusRec(I2CBusPtr b, Bool unalloc, Bool devs_too)
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (unalloc) {
|
if (unalloc) {
|
||||||
xf86Msg(X_ERROR,
|
LogMessageVerb(X_ERROR, 1,
|
||||||
"i2c bug: Attempt to remove I2C bus \"%s\", "
|
"i2c bug: Attempt to remove I2C bus \"%s\", "
|
||||||
"but device list is not empty.\n", b->BusName);
|
"but device list is not empty.\n", b->BusName);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -211,7 +211,7 @@ stack_trace(xf86Int10InfoPtr pInt)
|
||||||
if (stack >= tail)
|
if (stack >= tail)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
xf86MsgVerb(X_INFO, 3, "stack at 0x%8.8lx:\n", stack);
|
LogMessageVerb(X_INFO, 3, "stack at 0x%8.8lx:\n", stack);
|
||||||
for (; stack < tail; stack++) {
|
for (; stack < tail; stack++) {
|
||||||
xf86ErrorFVerb(3, " %2.2x", MEM_RB(pInt, stack));
|
xf86ErrorFVerb(3, " %2.2x", MEM_RB(pInt, stack));
|
||||||
i = (i + 1) % 0x10;
|
i = (i + 1) % 0x10;
|
||||||
|
|
|
@ -36,6 +36,8 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
#include "os/log_priv.h"
|
||||||
|
|
||||||
#include "xf86.h"
|
#include "xf86.h"
|
||||||
#include "vbe.h"
|
#include "vbe.h"
|
||||||
#include "vbeModes.h"
|
#include "vbeModes.h"
|
||||||
|
|
|
@ -75,19 +75,18 @@ LoaderInit(void)
|
||||||
LogMessageVerb(X_INFO, 2, "Loader magic: %p\n", (void *) xorg_symbols);
|
LogMessageVerb(X_INFO, 2, "Loader magic: %p\n", (void *) xorg_symbols);
|
||||||
#endif
|
#endif
|
||||||
LogMessageVerb(X_INFO, 2, "Module ABI versions:\n");
|
LogMessageVerb(X_INFO, 2, "Module ABI versions:\n");
|
||||||
LogWrite(2, "\t%s: %d.%d\n", ABI_CLASS_ANSIC,
|
LogMessageVerb(X_NONE, 2, "\t%s: %d.%d\n", ABI_CLASS_ANSIC,
|
||||||
GET_ABI_MAJOR(LoaderVersionInfo.ansicVersion),
|
GET_ABI_MAJOR(LoaderVersionInfo.ansicVersion),
|
||||||
GET_ABI_MINOR(LoaderVersionInfo.ansicVersion));
|
GET_ABI_MINOR(LoaderVersionInfo.ansicVersion));
|
||||||
LogWrite(2, "\t%s: %d.%d\n", ABI_CLASS_VIDEODRV,
|
LogMessageVerb(X_NONE, 2, "\t%s: %d.%d\n", ABI_CLASS_VIDEODRV,
|
||||||
GET_ABI_MAJOR(LoaderVersionInfo.videodrvVersion),
|
GET_ABI_MAJOR(LoaderVersionInfo.videodrvVersion),
|
||||||
GET_ABI_MINOR(LoaderVersionInfo.videodrvVersion));
|
GET_ABI_MINOR(LoaderVersionInfo.videodrvVersion));
|
||||||
LogWrite(2, "\t%s : %d.%d\n", ABI_CLASS_XINPUT,
|
LogMessageVerb(X_NONE, 2, "\t%s : %d.%d\n", ABI_CLASS_XINPUT,
|
||||||
GET_ABI_MAJOR(LoaderVersionInfo.xinputVersion),
|
GET_ABI_MAJOR(LoaderVersionInfo.xinputVersion),
|
||||||
GET_ABI_MINOR(LoaderVersionInfo.xinputVersion));
|
GET_ABI_MINOR(LoaderVersionInfo.xinputVersion));
|
||||||
LogWrite(2, "\t%s : %d.%d\n", ABI_CLASS_EXTENSION,
|
LogMessageVerb(X_NONE, 2, "\t%s : %d.%d\n", ABI_CLASS_EXTENSION,
|
||||||
GET_ABI_MAJOR(LoaderVersionInfo.extensionVersion),
|
GET_ABI_MAJOR(LoaderVersionInfo.extensionVersion),
|
||||||
GET_ABI_MINOR(LoaderVersionInfo.extensionVersion));
|
GET_ABI_MINOR(LoaderVersionInfo.extensionVersion));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Public Interface to the loader. */
|
/* Public Interface to the loader. */
|
||||||
|
|
|
@ -438,14 +438,14 @@ CheckVersion(const char *module, XF86ModuleVersionInfo * data,
|
||||||
vercode[1] = (ver / 100000) % 100;
|
vercode[1] = (ver / 100000) % 100;
|
||||||
vercode[2] = (ver / 1000) % 100;
|
vercode[2] = (ver / 1000) % 100;
|
||||||
vercode[3] = ver % 1000;
|
vercode[3] = ver % 1000;
|
||||||
LogWrite(1, "\tcompiled for %d.%d.%d", vercode[0], vercode[1], vercode[2]);
|
LogMessageVerb(X_NONE, 1, "\tcompiled for %d.%d.%d", vercode[0], vercode[1], vercode[2]);
|
||||||
if (vercode[3] != 0)
|
if (vercode[3] != 0)
|
||||||
LogWrite(1, ".%d", vercode[3]);
|
LogMessageVerb(X_NONE, 1, ".%d", vercode[3]);
|
||||||
LogWrite(1, ", module version = %d.%d.%d\n", data->majorversion,
|
LogMessageVerb(X_NONE, 1, ", module version = %d.%d.%d\n", data->majorversion,
|
||||||
data->minorversion, data->patchlevel);
|
data->minorversion, data->patchlevel);
|
||||||
|
|
||||||
if (data->moduleclass)
|
if (data->moduleclass)
|
||||||
LogWrite(2, "\tModule class: %s\n", data->moduleclass);
|
LogMessageVerb(X_NONE, 2, "\tModule class: %s\n", data->moduleclass);
|
||||||
|
|
||||||
ver = -1;
|
ver = -1;
|
||||||
if (data->abiclass) {
|
if (data->abiclass) {
|
||||||
|
@ -463,7 +463,7 @@ CheckVersion(const char *module, XF86ModuleVersionInfo * data,
|
||||||
|
|
||||||
abimaj = GET_ABI_MAJOR(data->abiversion);
|
abimaj = GET_ABI_MAJOR(data->abiversion);
|
||||||
abimin = GET_ABI_MINOR(data->abiversion);
|
abimin = GET_ABI_MINOR(data->abiversion);
|
||||||
LogWrite(2, "\tABI class: %s, version %d.%d\n",
|
LogMessageVerb(X_NONE, 2, "\tABI class: %s, version %d.%d\n",
|
||||||
data->abiclass, abimaj, abimin);
|
data->abiclass, abimaj, abimin);
|
||||||
if (ver != -1) {
|
if (ver != -1) {
|
||||||
vermaj = GET_ABI_MAJOR(ver);
|
vermaj = GET_ABI_MAJOR(ver);
|
||||||
|
@ -686,14 +686,14 @@ LoadModule(const char *module, void *options, const XF86ModReqInfo *modreq,
|
||||||
name = LoaderGetCanonicalName(module, patterns);
|
name = LoaderGetCanonicalName(module, patterns);
|
||||||
noncanonical = (name && strcmp(module, name) != 0);
|
noncanonical = (name && strcmp(module, name) != 0);
|
||||||
if (noncanonical) {
|
if (noncanonical) {
|
||||||
LogWrite(3, " (%s)\n", name);
|
LogMessageVerb(X_NONE, 3, " (%s)\n", name);
|
||||||
LogMessageVerb(X_WARNING, 1,
|
LogMessageVerb(X_WARNING, 1,
|
||||||
"LoadModule: given non-canonical module name \"%s\"\n",
|
"LoadModule: given non-canonical module name \"%s\"\n",
|
||||||
module);
|
module);
|
||||||
m = name;
|
m = name;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
LogWrite(3, "\n");
|
LogMessageVerb(X_NONE, 3, "\n");
|
||||||
m = (char *) module;
|
m = (char *) module;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -71,7 +71,7 @@ dense_base(void)
|
||||||
init_abw();
|
init_abw();
|
||||||
|
|
||||||
/* XXX check abst_flags for ABST_DENSE just to be safe? */
|
/* XXX check abst_flags for ABST_DENSE just to be safe? */
|
||||||
xf86Msg(X_INFO, "dense base = %#lx\n", abw[0].abw_abst.abst_sys_start); /* XXXX */
|
LogMessageVerb(X_INFO, 1, "dense base = %#lx\n", abw[0].abw_abst.abst_sys_start);
|
||||||
return abw[0].abw_abst.abst_sys_start;
|
return abw[0].abw_abst.abst_sys_start;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -120,14 +120,14 @@ checkDevMem(Bool warn)
|
||||||
if (base != MAP_FAILED) {
|
if (base != MAP_FAILED) {
|
||||||
munmap((caddr_t) base, 4096);
|
munmap((caddr_t) base, 4096);
|
||||||
devMemFd = fd;
|
devMemFd = fd;
|
||||||
xf86Msg(X_INFO, "checkDevMem: using aperture driver %s\n",
|
LogMessageVerb(X_INFO, 1, "checkDevMem: using aperture driver %s\n",
|
||||||
DEV_APERTURE);
|
DEV_APERTURE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (warn) {
|
if (warn) {
|
||||||
xf86Msg(X_WARNING, "checkDevMem: failed to mmap %s (%s)\n",
|
LogMessageVerb(X_WARNING, 1, "checkDevMem: failed to mmap %s (%s)\n",
|
||||||
DEV_APERTURE, strerror(errno));
|
DEV_APERTURE, strerror(errno));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -144,23 +144,23 @@ checkDevMem(Bool warn)
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (warn) {
|
if (warn) {
|
||||||
xf86Msg(X_WARNING, "checkDevMem: failed to mmap %s (%s)\n",
|
LogMessageVerb(X_WARNING, 1, "checkDevMem: failed to mmap %s (%s)\n",
|
||||||
DEV_MEM, strerror(errno));
|
DEV_MEM, strerror(errno));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (warn) {
|
if (warn) {
|
||||||
#ifndef HAS_APERTURE_DRV
|
#ifndef HAS_APERTURE_DRV
|
||||||
xf86Msg(X_WARNING, "checkDevMem: failed to open/mmap %s (%s)\n",
|
LogMessageVerb(X_WARNING, 1, "checkDevMem: failed to open/mmap %s (%s)\n",
|
||||||
DEV_MEM, strerror(errno));
|
DEV_MEM, strerror(errno));
|
||||||
#else
|
#else
|
||||||
#ifndef __OpenBSD__
|
#ifndef __OpenBSD__
|
||||||
xf86Msg(X_WARNING, "checkDevMem: failed to open %s and %s\n"
|
LogMessageVerb(X_WARNING, 1, "checkDevMem: failed to open %s and %s\n"
|
||||||
"\t(%s)\n", DEV_APERTURE, DEV_MEM, strerror(errno));
|
"\t(%s)\n", DEV_APERTURE, DEV_MEM, strerror(errno));
|
||||||
#else /* __OpenBSD__ */
|
#else /* __OpenBSD__ */
|
||||||
xf86Msg(X_WARNING, "checkDevMem: failed to open %s and %s\n"
|
LogMessageVerb(X_WARNING, 1, "checkDevMem: failed to open %s and %s\n"
|
||||||
"\t(%s)\n%s", DEV_APERTURE, DEV_MEM, strerror(errno),
|
"\t(%s)\n%s", DEV_APERTURE, DEV_MEM, strerror(errno),
|
||||||
SYSCTL_MSG);
|
SYSCTL_MSG);
|
||||||
#endif /* __OpenBSD__ */
|
#endif /* __OpenBSD__ */
|
||||||
#endif
|
#endif
|
||||||
xf86ErrorF("\tlinear framebuffer access unavailable\n");
|
xf86ErrorF("\tlinear framebuffer access unavailable\n");
|
||||||
|
|
|
@ -113,15 +113,15 @@ checkDevMem(Bool warn)
|
||||||
else {
|
else {
|
||||||
/* This should not happen */
|
/* This should not happen */
|
||||||
if (warn) {
|
if (warn) {
|
||||||
xf86Msg(X_WARNING, "checkDevMem: failed to mmap %s (%s)\n",
|
LogMessageVerb(X_WARNING, 1, "checkDevMem: failed to mmap %s (%s)\n",
|
||||||
DEV_MEM, strerror(errno));
|
DEV_MEM, strerror(errno));
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (warn) {
|
if (warn) {
|
||||||
xf86Msg(X_WARNING, "checkDevMem: failed to open %s (%s)\n",
|
LogMessageVerb(X_WARNING, 1, "checkDevMem: failed to open %s (%s)\n",
|
||||||
DEV_MEM, strerror(errno));
|
DEV_MEM, strerror(errno));
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -144,8 +144,8 @@ xf86EnableIO()
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
if ((IoFd = open("/dev/io", O_RDWR)) == -1) {
|
if ((IoFd = open("/dev/io", O_RDWR)) == -1) {
|
||||||
xf86Msg(X_WARNING, "xf86EnableIO: "
|
LogMessageVerb(X_WARNING, 1,
|
||||||
"Failed to open /dev/io for extended I/O\n");
|
"xf86EnableIO: Failed to open /dev/io for extended I/O\n");
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
@ -186,14 +186,16 @@ xf86EnableIO()
|
||||||
IOPortBase = base;
|
IOPortBase = base;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
xf86Msg(X_WARNING, "EnableIO: failed to mmap %s (%s)\n",
|
LogMessageVerb(X_WARNING, 1,
|
||||||
"/dev/ttyC0", strerror(errno));
|
"EnableIO: failed to mmap /dev/ttyC0 (%s)\n",
|
||||||
|
strerror(errno));
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
xf86Msg("EnableIO: failed to open %s (%s)\n",
|
LogMessageVerb(X_WARNING, 1,
|
||||||
"/dev/ttyC0", strerror(errno));
|
"EnableIO: failed to open /dev/ttyC0 (%s)\n",
|
||||||
|
strerror(errno));
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -221,9 +221,9 @@ xf86OpenConsole(void)
|
||||||
* /dev/console
|
* /dev/console
|
||||||
*/
|
*/
|
||||||
if ((devConsoleFd = open("/dev/console", O_WRONLY, 0)) < 0) {
|
if ((devConsoleFd = open("/dev/console", O_WRONLY, 0)) < 0) {
|
||||||
xf86Msg(X_WARNING,
|
LogMessageVerb(X_WARNING, 1,
|
||||||
"xf86OpenConsole: couldn't open /dev/console (%s)\n",
|
"xf86OpenConsole: couldn't open /dev/console (%s)\n",
|
||||||
strerror(errno));
|
strerror(errno));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
|
@ -250,7 +250,7 @@ xf86OpenConsole(void)
|
||||||
if (initialVT != 1) {
|
if (initialVT != 1) {
|
||||||
|
|
||||||
if (ioctl(xf86Info.consoleFd, VT_ACTIVATE, 1) != 0) {
|
if (ioctl(xf86Info.consoleFd, VT_ACTIVATE, 1) != 0) {
|
||||||
xf86Msg(X_WARNING, "xf86OpenConsole: VT_ACTIVATE failed\n");
|
LogMessageVerb(X_WARNING, 1, "xf86OpenConsole: VT_ACTIVATE failed\n");
|
||||||
}
|
}
|
||||||
sleep(1);
|
sleep(1);
|
||||||
}
|
}
|
||||||
|
@ -265,14 +265,14 @@ xf86OpenConsole(void)
|
||||||
SYSCALL(result =
|
SYSCALL(result =
|
||||||
ioctl(xf86Info.consoleFd, VT_ACTIVATE, xf86Info.vtno));
|
ioctl(xf86Info.consoleFd, VT_ACTIVATE, xf86Info.vtno));
|
||||||
if (result != 0) {
|
if (result != 0) {
|
||||||
xf86Msg(X_WARNING, "xf86OpenConsole: VT_ACTIVATE failed\n");
|
LogMessageVerb(X_WARNING, 1, "xf86OpenConsole: VT_ACTIVATE failed\n");
|
||||||
}
|
}
|
||||||
SYSCALL(result =
|
SYSCALL(result =
|
||||||
ioctl(xf86Info.consoleFd, VT_WAITACTIVE,
|
ioctl(xf86Info.consoleFd, VT_WAITACTIVE,
|
||||||
xf86Info.vtno));
|
xf86Info.vtno));
|
||||||
if (result != 0) {
|
if (result != 0) {
|
||||||
xf86Msg(X_WARNING,
|
LogMessageVerb(X_WARNING, 1,
|
||||||
"xf86OpenConsole: VT_WAITACTIVE failed\n");
|
"xf86OpenConsole: VT_WAITACTIVE failed\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
OsSignal(SIGUSR1, xf86VTRequest);
|
OsSignal(SIGUSR1, xf86VTRequest);
|
||||||
|
@ -312,7 +312,7 @@ xf86OpenConsole(void)
|
||||||
if (!xf86Info.ShareVTs && xf86Info.autoVTSwitch &&
|
if (!xf86Info.ShareVTs && xf86Info.autoVTSwitch &&
|
||||||
(xf86Info.consType == SYSCONS || xf86Info.consType == PCVT)) {
|
(xf86Info.consType == SYSCONS || xf86Info.consType == PCVT)) {
|
||||||
if (ioctl(xf86Info.consoleFd, VT_ACTIVATE, xf86Info.vtno) != 0) {
|
if (ioctl(xf86Info.consoleFd, VT_ACTIVATE, xf86Info.vtno) != 0) {
|
||||||
xf86Msg(X_WARNING, "xf86OpenConsole: VT_ACTIVATE failed\n");
|
LogMessageVerb(X_WARNING, 1, "xf86OpenConsole: VT_ACTIVATE failed\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif /* SYSCONS_SUPPORT || PCVT_SUPPORT */
|
#endif /* SYSCONS_SUPPORT || PCVT_SUPPORT */
|
||||||
|
@ -338,7 +338,7 @@ xf86OpenPccons(void)
|
||||||
CHECK_DRIVER_MSG);
|
CHECK_DRIVER_MSG);
|
||||||
}
|
}
|
||||||
xf86Info.consType = PCCONS;
|
xf86Info.consType = PCCONS;
|
||||||
xf86Msg(X_PROBED, "Using pccons driver with X support\n");
|
LogMessageVerb(X_PROBED, 1, "Using pccons driver with X support\n");
|
||||||
}
|
}
|
||||||
return fd;
|
return fd;
|
||||||
}
|
}
|
||||||
|
@ -430,7 +430,7 @@ xf86OpenSyscons(void)
|
||||||
FatalError("xf86OpenSyscons: VT_GETMODE failed");
|
FatalError("xf86OpenSyscons: VT_GETMODE failed");
|
||||||
}
|
}
|
||||||
xf86Info.consType = SYSCONS;
|
xf86Info.consType = SYSCONS;
|
||||||
xf86Msg(X_PROBED, "Using syscons driver with X support");
|
LogMessageVerb(X_PROBED, 1, "Using syscons driver with X support");
|
||||||
if (syscons_version >= 0x100) {
|
if (syscons_version >= 0x100) {
|
||||||
xf86ErrorF(" (version %ld.%ld)\n", syscons_version >> 8,
|
xf86ErrorF(" (version %ld.%ld)\n", syscons_version >> 8,
|
||||||
syscons_version & 0xFF);
|
syscons_version & 0xFF);
|
||||||
|
@ -438,7 +438,7 @@ xf86OpenSyscons(void)
|
||||||
else {
|
else {
|
||||||
xf86ErrorF(" (version 0.x)\n");
|
xf86ErrorF(" (version 0.x)\n");
|
||||||
}
|
}
|
||||||
xf86Msg(from, "using VT number %d\n\n", xf86Info.vtno);
|
LogMessageVerb(from, 1, "using VT number %d\n\n", xf86Info.vtno);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
/* VT_GETMODE failed, probably not syscons */
|
/* VT_GETMODE failed, probably not syscons */
|
||||||
|
@ -533,21 +533,21 @@ xf86OpenPcvt(void)
|
||||||
xf86Info.consType = PCVT;
|
xf86Info.consType = PCVT;
|
||||||
#ifdef WSCONS_SUPPORT
|
#ifdef WSCONS_SUPPORT
|
||||||
#ifdef __NetBSD__
|
#ifdef __NetBSD__
|
||||||
xf86Msg(X_PROBED,
|
LogMessageVerb(X_PROBED, 1,
|
||||||
"Using wscons driver on %s in pcvt compatibility mode "
|
"Using wscons driver on %s in pcvt compatibility mode "
|
||||||
"(version %d.%d)\n", vtname,
|
"(version %d.%d)\n", vtname,
|
||||||
pcvt_version.rmajor, pcvt_version.rminor);
|
pcvt_version.rmajor, pcvt_version.rminor);
|
||||||
#else
|
#else
|
||||||
xf86Msg(X_PROBED,
|
LogMessageVerb(X_PROBED, 1,
|
||||||
"Using wscons driver on %s in pcvt compatibility mode ",
|
"Using wscons driver on %s in pcvt compatibility mode ",
|
||||||
vtname);
|
vtname);
|
||||||
#endif
|
#endif
|
||||||
#else
|
#else
|
||||||
# ifdef __NetBSD__
|
# ifdef __NetBSD__
|
||||||
xf86Msg(X_PROBED, "Using pcvt driver (version %d.%d)\n",
|
LogMessageVerb(X_PROBED, 1, "Using pcvt driver (version %d.%d)\n",
|
||||||
pcvt_version.rmajor, pcvt_version.rminor);
|
pcvt_version.rmajor, pcvt_version.rminor);
|
||||||
# else
|
# else
|
||||||
xf86Msg(X_PROBED, "Using pcvt driver\n");
|
LogMessageVerb(X_PROBED, 1, "Using pcvt driver\n");
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
#ifdef __NetBSD__
|
#ifdef __NetBSD__
|
||||||
|
@ -590,7 +590,7 @@ xf86OpenWScons(void)
|
||||||
"xf86OpenConsole", strerror(errno), CHECK_DRIVER_MSG);
|
"xf86OpenConsole", strerror(errno), CHECK_DRIVER_MSG);
|
||||||
}
|
}
|
||||||
xf86Info.consType = WSCONS;
|
xf86Info.consType = WSCONS;
|
||||||
xf86Msg(X_PROBED, "Using wscons driver\n");
|
LogMessageVerb(X_PROBED, 1, "Using wscons driver\n");
|
||||||
}
|
}
|
||||||
return fd;
|
return fd;
|
||||||
}
|
}
|
||||||
|
|
|
@ -92,8 +92,8 @@ checkDevMem(Bool warn)
|
||||||
else {
|
else {
|
||||||
/* This should not happen */
|
/* This should not happen */
|
||||||
if (warn) {
|
if (warn) {
|
||||||
xf86Msg(X_WARNING, "checkDevMem: failed to mmap %s (%s)\n",
|
LogMessageVerb(X_WARNING, 1, "checkDevMem: failed to mmap %s (%s)\n",
|
||||||
DEV_MEM, strerror(errno));
|
DEV_MEM, strerror(errno));
|
||||||
}
|
}
|
||||||
useDevMem = FALSE;
|
useDevMem = FALSE;
|
||||||
return;
|
return;
|
||||||
|
@ -101,8 +101,8 @@ checkDevMem(Bool warn)
|
||||||
}
|
}
|
||||||
#ifndef HAS_APERTURE_DRV
|
#ifndef HAS_APERTURE_DRV
|
||||||
if (warn) {
|
if (warn) {
|
||||||
xf86Msg(X_WARNING, "checkDevMem: failed to open %s (%s)\n",
|
LogMessageVerb(X_WARNING, 1, "checkDevMem: failed to open %s (%s)\n",
|
||||||
DEV_MEM, strerror(errno));
|
DEV_MEM, strerror(errno));
|
||||||
}
|
}
|
||||||
useDevMem = FALSE;
|
useDevMem = FALSE;
|
||||||
return;
|
return;
|
||||||
|
@ -117,27 +117,27 @@ checkDevMem(Bool warn)
|
||||||
munmap((caddr_t) base, 4096);
|
munmap((caddr_t) base, 4096);
|
||||||
devMemFd = fd;
|
devMemFd = fd;
|
||||||
useDevMem = TRUE;
|
useDevMem = TRUE;
|
||||||
xf86Msg(X_INFO, "checkDevMem: using aperture driver %s\n",
|
LogMessageVerb(X_INFO, 1, "checkDevMem: using aperture driver %s\n",
|
||||||
DEV_APERTURE);
|
DEV_APERTURE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
||||||
if (warn) {
|
if (warn) {
|
||||||
xf86Msg(X_WARNING, "checkDevMem: failed to mmap %s (%s)\n",
|
LogMessageVerb(X_WARNING, 1, "checkDevMem: failed to mmap %s (%s)\n",
|
||||||
DEV_APERTURE, strerror(errno));
|
DEV_APERTURE, strerror(errno));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (warn) {
|
if (warn) {
|
||||||
#ifndef __OpenBSD__
|
#ifndef __OpenBSD__
|
||||||
xf86Msg(X_WARNING, "checkDevMem: failed to open %s and %s\n"
|
LogMessageVerb(X_WARNING, 1, "checkDevMem: failed to open %s and %s\n"
|
||||||
"\t(%s)\n", DEV_MEM, DEV_APERTURE, strerror(errno));
|
"\t(%s)\n", DEV_MEM, DEV_APERTURE, strerror(errno));
|
||||||
#else /* __OpenBSD__ */
|
#else /* __OpenBSD__ */
|
||||||
xf86Msg(X_WARNING, "checkDevMem: failed to open %s and %s\n"
|
LogMessageVerb(X_WARNING, 1, "checkDevMem: failed to open %s and %s\n"
|
||||||
"\t(%s)\n%s", DEV_MEM, DEV_APERTURE, strerror(errno),
|
"\t(%s)\n%s", DEV_MEM, DEV_APERTURE, strerror(errno),
|
||||||
SYSCTL_MSG);
|
SYSCTL_MSG);
|
||||||
#endif /* __OpenBSD__ */
|
#endif /* __OpenBSD__ */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -173,11 +173,9 @@ xf86EnableIO(void)
|
||||||
|
|
||||||
if (i386_iopl(TRUE) < 0) {
|
if (i386_iopl(TRUE) < 0) {
|
||||||
#ifndef __OpenBSD__
|
#ifndef __OpenBSD__
|
||||||
xf86Msg(X_WARNING, "%s: Failed to set IOPL for extended I/O",
|
LogMessageVerb(X_WARNING, 1, "xf86EnableIO: Failed to set IOPL for extended I/O");
|
||||||
"xf86EnableIO");
|
|
||||||
#else
|
#else
|
||||||
xf86Msg(X_WARNING, "%s: Failed to set IOPL for extended I/O\n%s",
|
LogMessageVerb(X_WARNING, 1, "xf86EnableIO: Failed to set IOPL for extended I/O\n%s", SYSCTL_MSG);
|
||||||
"xf86EnableIO", SYSCTL_MSG);
|
|
||||||
#endif
|
#endif
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
@ -218,11 +216,9 @@ xf86EnableIO(void)
|
||||||
|
|
||||||
if (amd64_iopl(TRUE) < 0) {
|
if (amd64_iopl(TRUE) < 0) {
|
||||||
#ifndef __OpenBSD__
|
#ifndef __OpenBSD__
|
||||||
xf86Msg(X_WARNING, "%s: Failed to set IOPL for extended I/O",
|
LogMessageVerb(X_WARNING, 1, "xf86EnableIO: Failed to set IOPL for extended I/O");
|
||||||
"xf86EnableIO");
|
|
||||||
#else
|
#else
|
||||||
xf86Msg(X_WARNING, "%s: Failed to set IOPL for extended I/O\n%s",
|
LogMessageVerb(X_WARNING, 1, "xf86EnableIO: Failed to set IOPL for extended I/O\n%s", SYSCTL_MSG);
|
||||||
"xf86EnableIO", SYSCTL_MSG);
|
|
||||||
#endif
|
#endif
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
@ -258,8 +254,7 @@ xf86EnableIO(void)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
if ((IoFd = open("/dev/io", O_RDWR)) == -1) {
|
if ((IoFd = open("/dev/io", O_RDWR)) == -1) {
|
||||||
xf86Msg(X_WARNING, "xf86EnableIO: "
|
LogMessageVerb(X_WARNING, 1, "xf86EnableIO: Failed to open /dev/io for extended I/O");
|
||||||
"Failed to open /dev/io for extended I/O");
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
@ -290,9 +285,9 @@ xf86SetTVOut(int mode)
|
||||||
case PCCONS:{
|
case PCCONS:{
|
||||||
|
|
||||||
if (ioctl(xf86Info.consoleFd, CONSOLE_X_TV_ON, &mode) < 0) {
|
if (ioctl(xf86Info.consoleFd, CONSOLE_X_TV_ON, &mode) < 0) {
|
||||||
xf86Msg(X_WARNING,
|
LogMessageVerb(X_WARNING, 1,
|
||||||
"xf86SetTVOut: Could not set console to TV output, %s\n",
|
"xf86SetTVOut: Could not set console to TV output, %s\n",
|
||||||
strerror(errno));
|
strerror(errno));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -313,9 +308,9 @@ xf86SetRGBOut(void)
|
||||||
case PCCONS:{
|
case PCCONS:{
|
||||||
|
|
||||||
if (ioctl(xf86Info.consoleFd, CONSOLE_X_TV_OFF, 0) < 0) {
|
if (ioctl(xf86Info.consoleFd, CONSOLE_X_TV_OFF, 0) < 0) {
|
||||||
xf86Msg(X_WARNING,
|
LogMessageVerb(X_WARNING, 1,
|
||||||
"xf86SetTVOut: Could not set console to RGB output, %s\n",
|
"xf86SetTVOut: Could not set console to RGB output, %s\n",
|
||||||
strerror(errno));
|
strerror(errno));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -58,13 +58,13 @@ xf86EnableIO()
|
||||||
{
|
{
|
||||||
int fd = xf86Info.consoleFd;
|
int fd = xf86Info.consoleFd;
|
||||||
|
|
||||||
xf86MsgVerb(X_WARNING, 3, "xf86EnableIO %d\n", fd);
|
LogMessageVerb(X_WARNING, 3, "xf86EnableIO %d\n", fd);
|
||||||
if (ioBase == MAP_FAILED) {
|
if (ioBase == MAP_FAILED) {
|
||||||
ioBase = mmap(NULL, 0x10000, PROT_READ | PROT_WRITE, MAP_SHARED, fd,
|
ioBase = mmap(NULL, 0x10000, PROT_READ | PROT_WRITE, MAP_SHARED, fd,
|
||||||
0xf2000000);
|
0xf2000000);
|
||||||
xf86MsgVerb(X_INFO, 3, "xf86EnableIO: %08x\n", ioBase);
|
LogMessageVerb(X_INFO, 3, "xf86EnableIO: %08x\n", ioBase);
|
||||||
if (ioBase == MAP_FAILED) {
|
if (ioBase == MAP_FAILED) {
|
||||||
xf86MsgVerb(X_WARNING, 3, "Can't map IO space!\n");
|
LogMessageVerb(X_WARNING, 3, "Can't map IO space!\n");
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,6 +10,8 @@
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|
||||||
|
#include "os/log_priv.h"
|
||||||
|
|
||||||
#include "os.h"
|
#include "os.h"
|
||||||
#include "xf86.h"
|
#include "xf86.h"
|
||||||
#include "xf86Priv.h"
|
#include "xf86Priv.h"
|
||||||
|
@ -149,7 +151,7 @@ lnxACPIOpen(void)
|
||||||
strcpy(addr.sun_path, ACPI_SOCKET);
|
strcpy(addr.sun_path, ACPI_SOCKET);
|
||||||
if ((r = connect(fd, (struct sockaddr *) &addr, sizeof(addr))) == -1) {
|
if ((r = connect(fd, (struct sockaddr *) &addr, sizeof(addr))) == -1) {
|
||||||
if (!warned)
|
if (!warned)
|
||||||
xf86MsgVerb(X_WARNING, 3, "Open ACPI failed (%s) (%s)\n",
|
LogMessageVerb(X_WARNING, 3, "Open ACPI failed (%s) (%s)\n",
|
||||||
ACPI_SOCKET, strerror(errno));
|
ACPI_SOCKET, strerror(errno));
|
||||||
warned = 1;
|
warned = 1;
|
||||||
shutdown(fd, 2);
|
shutdown(fd, 2);
|
||||||
|
@ -161,7 +163,7 @@ lnxACPIOpen(void)
|
||||||
xf86PMGetEventFromOs = lnxACPIGetEventFromOs;
|
xf86PMGetEventFromOs = lnxACPIGetEventFromOs;
|
||||||
xf86PMConfirmEventToOs = lnxACPIConfirmEventToOs;
|
xf86PMConfirmEventToOs = lnxACPIConfirmEventToOs;
|
||||||
ACPIihPtr = xf86AddGeneralHandler(fd, xf86HandlePMEvents, NULL);
|
ACPIihPtr = xf86AddGeneralHandler(fd, xf86HandlePMEvents, NULL);
|
||||||
xf86MsgVerb(X_INFO, 3, "Open ACPI successful (%s)\n", ACPI_SOCKET);
|
LogMessageVerb(X_INFO, 3, "Open ACPI successful (%s)\n", ACPI_SOCKET);
|
||||||
warned = 0;
|
warned = 0;
|
||||||
|
|
||||||
return lnxCloseACPI;
|
return lnxCloseACPI;
|
||||||
|
|
|
@ -4,6 +4,9 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <X11/X.h>
|
#include <X11/X.h>
|
||||||
|
|
||||||
|
#include "os/log_priv.h"
|
||||||
|
|
||||||
#include "os.h"
|
#include "os.h"
|
||||||
#include "xf86.h"
|
#include "xf86.h"
|
||||||
#include "xf86Priv.h"
|
#include "xf86Priv.h"
|
||||||
|
@ -165,7 +168,7 @@ lnxAPMOpen(void)
|
||||||
DebugF("APM: Opening device\n");
|
DebugF("APM: Opening device\n");
|
||||||
if ((fd = open(APM_DEVICE, O_RDWR)) > -1) {
|
if ((fd = open(APM_DEVICE, O_RDWR)) > -1) {
|
||||||
if (access(APM_PROC, R_OK) || ((pfd = open(APM_PROC, O_RDONLY)) == -1)) {
|
if (access(APM_PROC, R_OK) || ((pfd = open(APM_PROC, O_RDONLY)) == -1)) {
|
||||||
xf86MsgVerb(X_WARNING, 3, "Cannot open APM (%s) (%s)\n",
|
LogMessageVerb(X_WARNING, 3, "Cannot open APM (%s) (%s)\n",
|
||||||
APM_PROC, strerror(errno));
|
APM_PROC, strerror(errno));
|
||||||
close(fd);
|
close(fd);
|
||||||
return NULL;
|
return NULL;
|
||||||
|
@ -175,7 +178,7 @@ lnxAPMOpen(void)
|
||||||
xf86PMGetEventFromOs = lnxPMGetEventFromOs;
|
xf86PMGetEventFromOs = lnxPMGetEventFromOs;
|
||||||
xf86PMConfirmEventToOs = lnxPMConfirmEventToOs;
|
xf86PMConfirmEventToOs = lnxPMConfirmEventToOs;
|
||||||
APMihPtr = xf86AddGeneralHandler(fd, xf86HandlePMEvents, NULL);
|
APMihPtr = xf86AddGeneralHandler(fd, xf86HandlePMEvents, NULL);
|
||||||
xf86MsgVerb(X_INFO, 3, "Open APM successful\n");
|
LogMessageVerb(X_INFO, 3, "Open APM successful\n");
|
||||||
return lnxCloseAPM;
|
return lnxCloseAPM;
|
||||||
}
|
}
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
|
@ -73,13 +73,13 @@ switch_to(int vt, const char *from)
|
||||||
|
|
||||||
SYSCALL(ret = ioctl(xf86Info.consoleFd, VT_ACTIVATE, vt));
|
SYSCALL(ret = ioctl(xf86Info.consoleFd, VT_ACTIVATE, vt));
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
xf86Msg(X_WARNING, "%s: VT_ACTIVATE failed: %s\n", from, strerror(errno));
|
LogMessageVerb(X_WARNING, 1, "%s: VT_ACTIVATE failed: %s\n", from, strerror(errno));
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
SYSCALL(ret = ioctl(xf86Info.consoleFd, VT_WAITACTIVE, vt));
|
SYSCALL(ret = ioctl(xf86Info.consoleFd, VT_WAITACTIVE, vt));
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
xf86Msg(X_WARNING, "%s: VT_WAITACTIVE failed: %s\n", from, strerror(errno));
|
LogMessageVerb(X_WARNING, 1, "%s: VT_WAITACTIVE failed: %s\n", from, strerror(errno));
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -145,7 +145,7 @@ linux_parse_vt_settings(int may_fail)
|
||||||
close(fd);
|
close(fd);
|
||||||
}
|
}
|
||||||
|
|
||||||
xf86Msg(from, "using VT number %d\n\n", xf86Info.vtno);
|
LogMessageVerb(from, 1, "using VT number %d\n\n", xf86Info.vtno);
|
||||||
|
|
||||||
/* Some of stdin / stdout / stderr maybe redirected to a file */
|
/* Some of stdin / stdout / stderr maybe redirected to a file */
|
||||||
for (i = STDIN_FILENO; i <= STDERR_FILENO; i++) {
|
for (i = STDIN_FILENO; i <= STDERR_FILENO; i++) {
|
||||||
|
@ -157,9 +157,9 @@ linux_parse_vt_settings(int may_fail)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!KeepTty && current_vt == xf86Info.vtno) {
|
if (!KeepTty && current_vt == xf86Info.vtno) {
|
||||||
xf86Msg(X_PROBED,
|
LogMessageVerb(X_PROBED, 1,
|
||||||
"controlling tty is VT number %d, auto-enabling KeepTty\n",
|
"controlling tty is VT number %d, auto-enabling KeepTty\n",
|
||||||
current_vt);
|
current_vt);
|
||||||
KeepTty = TRUE;
|
KeepTty = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -196,13 +196,13 @@ xf86OpenConsole(void)
|
||||||
* group leader
|
* group leader
|
||||||
*/
|
*/
|
||||||
if (setpgid(0, ppgid) < 0)
|
if (setpgid(0, ppgid) < 0)
|
||||||
xf86Msg(X_WARNING, "xf86OpenConsole: setpgid failed: %s\n",
|
LogMessageVerb(X_WARNING, 1, "xf86OpenConsole: setpgid failed: %s\n",
|
||||||
strerror(errno));
|
strerror(errno));
|
||||||
|
|
||||||
/* become process group leader */
|
/* become process group leader */
|
||||||
if ((setsid() < 0))
|
if ((setsid() < 0))
|
||||||
xf86Msg(X_WARNING, "xf86OpenConsole: setsid failed: %s\n",
|
LogMessageVerb(X_WARNING, 1, "xf86OpenConsole: setsid failed: %s\n",
|
||||||
strerror(errno));
|
strerror(errno));
|
||||||
}
|
}
|
||||||
|
|
||||||
i = 0;
|
i = 0;
|
||||||
|
@ -223,8 +223,8 @@ xf86OpenConsole(void)
|
||||||
*/
|
*/
|
||||||
SYSCALL(ret = ioctl(xf86Info.consoleFd, VT_GETSTATE, &vts));
|
SYSCALL(ret = ioctl(xf86Info.consoleFd, VT_GETSTATE, &vts));
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
xf86Msg(X_WARNING, "xf86OpenConsole: VT_GETSTATE failed: %s\n",
|
LogMessageVerb(X_WARNING, 1, "xf86OpenConsole: VT_GETSTATE failed: %s\n",
|
||||||
strerror(errno));
|
strerror(errno));
|
||||||
else
|
else
|
||||||
activeVT = vts.v_active;
|
activeVT = vts.v_active;
|
||||||
|
|
||||||
|
@ -320,23 +320,23 @@ xf86CloseConsole(void)
|
||||||
/* Back to text mode ... */
|
/* Back to text mode ... */
|
||||||
SYSCALL(ret = ioctl(xf86Info.consoleFd, KDSETMODE, KD_TEXT));
|
SYSCALL(ret = ioctl(xf86Info.consoleFd, KDSETMODE, KD_TEXT));
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
xf86Msg(X_WARNING, "xf86CloseConsole: KDSETMODE failed: %s\n",
|
LogMessageVerb(X_WARNING, 1, "xf86CloseConsole: KDSETMODE failed: %s\n",
|
||||||
strerror(errno));
|
strerror(errno));
|
||||||
|
|
||||||
SYSCALL(ioctl(xf86Info.consoleFd, KDSKBMODE, tty_mode));
|
SYSCALL(ioctl(xf86Info.consoleFd, KDSKBMODE, tty_mode));
|
||||||
tcsetattr(xf86Info.consoleFd, TCSANOW, &tty_attr);
|
tcsetattr(xf86Info.consoleFd, TCSANOW, &tty_attr);
|
||||||
|
|
||||||
SYSCALL(ret = ioctl(xf86Info.consoleFd, VT_GETMODE, &VT));
|
SYSCALL(ret = ioctl(xf86Info.consoleFd, VT_GETMODE, &VT));
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
xf86Msg(X_WARNING, "xf86CloseConsole: VT_GETMODE failed: %s\n",
|
LogMessageVerb(X_WARNING, 1, "xf86CloseConsole: VT_GETMODE failed: %s\n",
|
||||||
strerror(errno));
|
strerror(errno));
|
||||||
else {
|
else {
|
||||||
/* set dflt vt handling */
|
/* set dflt vt handling */
|
||||||
VT.mode = VT_AUTO;
|
VT.mode = VT_AUTO;
|
||||||
SYSCALL(ret = ioctl(xf86Info.consoleFd, VT_SETMODE, &VT));
|
SYSCALL(ret = ioctl(xf86Info.consoleFd, VT_SETMODE, &VT));
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
xf86Msg(X_WARNING, "xf86CloseConsole: VT_SETMODE failed: %s\n",
|
LogMessageVerb(X_WARNING, 1, "xf86CloseConsole: VT_SETMODE failed: %s\n",
|
||||||
strerror(errno));
|
strerror(errno));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (xf86Info.autoVTSwitch) {
|
if (xf86Info.autoVTSwitch) {
|
||||||
|
@ -347,8 +347,8 @@ xf86CloseConsole(void)
|
||||||
if (activeVT >= 0) {
|
if (activeVT >= 0) {
|
||||||
SYSCALL(ret = ioctl(xf86Info.consoleFd, VT_GETSTATE, &vts));
|
SYSCALL(ret = ioctl(xf86Info.consoleFd, VT_GETSTATE, &vts));
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
xf86Msg(X_WARNING, "xf86OpenConsole: VT_GETSTATE failed: %s\n",
|
LogMessageVerb(X_WARNING, 1, "xf86OpenConsole: VT_GETSTATE failed: %s\n",
|
||||||
strerror(errno));
|
strerror(errno));
|
||||||
} else {
|
} else {
|
||||||
if (vts.v_active == xf86Info.vtno) {
|
if (vts.v_active == xf86Info.vtno) {
|
||||||
switch_to(activeVT, "xf86CloseConsole");
|
switch_to(activeVT, "xf86CloseConsole");
|
||||||
|
|
|
@ -72,12 +72,12 @@ xf86LoadKernelModule(const char *modName)
|
||||||
* preinstall agpgart module for some DRM modules
|
* preinstall agpgart module for some DRM modules
|
||||||
*/
|
*/
|
||||||
if (setreuid(0, 0)) {
|
if (setreuid(0, 0)) {
|
||||||
xf86Msg(X_WARNING, "LoadKernelModule: "
|
LogMessageVerb(X_WARNING, 1, "LoadKernelModule: "
|
||||||
"Setting of real/effective user Id to 0/0 failed");
|
"Setting of real/effective user Id to 0/0 failed");
|
||||||
}
|
}
|
||||||
setenv("PATH", "/sbin", 1);
|
setenv("PATH", "/sbin", 1);
|
||||||
execl(mpPath, "modprobe", modName, NULL);
|
execl(mpPath, "modprobe", modName, NULL);
|
||||||
xf86Msg(X_WARNING, "LoadKernelModule %s\n", strerror(errno));
|
LogMessageVerb(X_WARNING, 1, "LoadKernelModule %s\n", strerror(errno));
|
||||||
exit(EXIT_FAILURE); /* if we get here the child's exec failed */
|
exit(EXIT_FAILURE); /* if we get here the child's exec failed */
|
||||||
break;
|
break;
|
||||||
case -1: /* fork failed */
|
case -1: /* fork failed */
|
||||||
|
|
|
@ -60,7 +60,7 @@ get_drm_info(struct OdevAttributes *attribs, char *path, int delayed_index)
|
||||||
|
|
||||||
v = drmGetVersion(fd);
|
v = drmGetVersion(fd);
|
||||||
if (!v) {
|
if (!v) {
|
||||||
xf86Msg(X_ERROR, "%s: failed to query DRM version\n", path);
|
LogMessageVerb(X_ERROR, 1, "%s: failed to query DRM version\n", path);
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -59,6 +59,7 @@
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <X11/X.h>
|
#include <X11/X.h>
|
||||||
|
|
||||||
|
#include "os/log_priv.h"
|
||||||
#include "os/xserver_poll.h"
|
#include "os/xserver_poll.h"
|
||||||
|
|
||||||
#include "xf86.h"
|
#include "xf86.h"
|
||||||
|
@ -124,7 +125,7 @@ xf86OpenSerial(XF86OptionPtr options)
|
||||||
|
|
||||||
dev = xf86SetStrOption(options, "Device", NULL);
|
dev = xf86SetStrOption(options, "Device", NULL);
|
||||||
if (!dev) {
|
if (!dev) {
|
||||||
xf86Msg(X_ERROR, "xf86OpenSerial: No Device specified.\n");
|
LogMessageVerb(X_ERROR, 1, "xf86OpenSerial: No Device specified.\n");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -134,9 +135,9 @@ xf86OpenSerial(XF86OptionPtr options)
|
||||||
SYSCALL(fd = open(dev, O_RDWR | O_NONBLOCK));
|
SYSCALL(fd = open(dev, O_RDWR | O_NONBLOCK));
|
||||||
|
|
||||||
if (fd == -1) {
|
if (fd == -1) {
|
||||||
xf86Msg(X_ERROR,
|
LogMessageVerb(X_ERROR, 1,
|
||||||
"xf86OpenSerial: Cannot open device %s\n\t%s.\n",
|
"xf86OpenSerial: Cannot open device %s\n\t%s.\n",
|
||||||
dev, strerror(errno));
|
dev, strerror(errno));
|
||||||
free(dev);
|
free(dev);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
@ -209,7 +210,7 @@ xf86SetSerial(int fd, XF86OptionPtr options)
|
||||||
cfsetospeed(&t, baud);
|
cfsetospeed(&t, baud);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
xf86Msg(X_ERROR, "Invalid Option BaudRate value: %d\n", val);
|
LogMessageVerb(X_ERROR, 1, "Invalid Option BaudRate value: %d\n", val);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -223,7 +224,7 @@ xf86SetSerial(int fd, XF86OptionPtr options)
|
||||||
t.c_cflag |= CSTOPB;
|
t.c_cflag |= CSTOPB;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
xf86Msg(X_ERROR, "Invalid Option StopBits value: %d\n", val);
|
LogMessageVerb(X_ERROR, 1, "Invalid Option StopBits value: %d\n", val);
|
||||||
return -1;
|
return -1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -248,7 +249,7 @@ xf86SetSerial(int fd, XF86OptionPtr options)
|
||||||
t.c_cflag |= CS8;
|
t.c_cflag |= CS8;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
xf86Msg(X_ERROR, "Invalid Option DataBits value: %d\n", val);
|
LogMessageVerb(X_ERROR, 1, "Invalid Option DataBits value: %d\n", val);
|
||||||
return -1;
|
return -1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -266,7 +267,7 @@ xf86SetSerial(int fd, XF86OptionPtr options)
|
||||||
t.c_cflag &= ~(PARENB);
|
t.c_cflag &= ~(PARENB);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
xf86Msg(X_ERROR, "Invalid Option Parity value: %s\n", s);
|
LogMessageVerb(X_ERROR, 1, "Invalid Option Parity value: %s\n", s);
|
||||||
free(s);
|
free(s);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
@ -295,7 +296,7 @@ xf86SetSerial(int fd, XF86OptionPtr options)
|
||||||
t.c_iflag &= ~(IXON | IXOFF);
|
t.c_iflag &= ~(IXON | IXOFF);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
xf86Msg(X_ERROR, "Invalid Option FlowControl value: %s\n", s);
|
LogMessageVerb(X_ERROR, 1, "Invalid Option FlowControl value: %s\n", s);
|
||||||
free(s);
|
free(s);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
@ -311,14 +312,14 @@ xf86SetSerial(int fd, XF86OptionPtr options)
|
||||||
SYSCALL(ioctl(fd, TIOCCDTR, NULL));
|
SYSCALL(ioctl(fd, TIOCCDTR, NULL));
|
||||||
#endif
|
#endif
|
||||||
#else
|
#else
|
||||||
xf86Msg(X_WARNING, "Option ClearDTR not supported on this OS\n");
|
LogMessageVerb(X_WARNING, 1, "Option ClearDTR not supported on this OS\n");
|
||||||
return -1;
|
return -1;
|
||||||
#endif
|
#endif
|
||||||
xf86MarkOptionUsedByName(options, "ClearDTR");
|
xf86MarkOptionUsedByName(options, "ClearDTR");
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((xf86SetBoolOption(options, "ClearRTS", FALSE))) {
|
if ((xf86SetBoolOption(options, "ClearRTS", FALSE))) {
|
||||||
xf86Msg(X_WARNING, "Option ClearRTS not supported on this OS\n");
|
LogMessageVerb(X_WARNING, 1, "Option ClearRTS not supported on this OS\n");
|
||||||
return -1;
|
return -1;
|
||||||
xf86MarkOptionUsedByName(options, "ClearRTS");
|
xf86MarkOptionUsedByName(options, "ClearRTS");
|
||||||
}
|
}
|
||||||
|
@ -347,7 +348,7 @@ xf86SetSerialSpeed(int fd, int speed)
|
||||||
cfsetospeed(&t, baud);
|
cfsetospeed(&t, baud);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
xf86Msg(X_ERROR, "Invalid Option BaudRate value: %d\n", speed);
|
LogMessageVerb(X_ERROR, 1, "Invalid Option BaudRate value: %d\n", speed);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -145,7 +145,7 @@ xf86SIGIO(int sig)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (r > 0) {
|
if (r > 0) {
|
||||||
xf86Msg(X_ERROR, "SIGIO %d descriptors not handled\n", r);
|
LogMessageVerb(X_ERROR, 1, "SIGIO %d descriptors not handled\n", r);
|
||||||
}
|
}
|
||||||
/* restore global errno */
|
/* restore global errno */
|
||||||
errno = save_errno;
|
errno = save_errno;
|
||||||
|
@ -198,13 +198,13 @@ xf86InstallSIGIOHandler(int fd, void (*f) (int, void *), void *closure)
|
||||||
block_sigio();
|
block_sigio();
|
||||||
#ifdef O_ASYNC
|
#ifdef O_ASYNC
|
||||||
if (fcntl(fd, F_SETFL, fcntl(fd, F_GETFL) | O_ASYNC) == -1) {
|
if (fcntl(fd, F_SETFL, fcntl(fd, F_GETFL) | O_ASYNC) == -1) {
|
||||||
xf86Msg(X_WARNING, "fcntl(%d, O_ASYNC): %s\n",
|
LogMessageVerb(X_WARNING, 1, "fcntl(%d, O_ASYNC): %s\n",
|
||||||
fd, strerror(errno));
|
fd, strerror(errno));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (fcntl(fd, F_SETOWN, getpid()) == -1) {
|
if (fcntl(fd, F_SETOWN, getpid()) == -1) {
|
||||||
xf86Msg(X_WARNING, "fcntl(%d, F_SETOWN): %s\n",
|
LogMessageVerb(X_WARNING, 1, "fcntl(%d, F_SETOWN): %s\n",
|
||||||
fd, strerror(errno));
|
fd, strerror(errno));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
installed = TRUE;
|
installed = TRUE;
|
||||||
|
@ -215,8 +215,8 @@ xf86InstallSIGIOHandler(int fd, void (*f) (int, void *), void *closure)
|
||||||
/* System V Streams - used on Solaris for input devices */
|
/* System V Streams - used on Solaris for input devices */
|
||||||
if (!installed && isastream(fd)) {
|
if (!installed && isastream(fd)) {
|
||||||
if (ioctl(fd, I_SETSIG, S_INPUT | S_ERROR | S_HANGUP) == -1) {
|
if (ioctl(fd, I_SETSIG, S_INPUT | S_ERROR | S_HANGUP) == -1) {
|
||||||
xf86Msg(X_WARNING, "fcntl(%d, I_SETSIG): %s\n",
|
LogMessageVerb(X_WARNING, 1, "fcntl(%d, I_SETSIG): %s\n",
|
||||||
fd, strerror(errno));
|
fd, strerror(errno));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
installed = TRUE;
|
installed = TRUE;
|
||||||
|
@ -283,8 +283,8 @@ xf86RemoveSIGIOHandler(int fd)
|
||||||
#if defined(I_SETSIG) && defined(HAVE_ISASTREAM)
|
#if defined(I_SETSIG) && defined(HAVE_ISASTREAM)
|
||||||
if (isastream(fd)) {
|
if (isastream(fd)) {
|
||||||
if (ioctl(fd, I_SETSIG, 0) == -1) {
|
if (ioctl(fd, I_SETSIG, 0) == -1) {
|
||||||
xf86Msg(X_WARNING, "fcntl(%d, I_SETSIG, 0): %s\n",
|
LogMessageVerb(X_WARNING, 1, "fcntl(%d, I_SETSIG, 0): %s\n",
|
||||||
fd, strerror(errno));
|
fd, strerror(errno));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -116,14 +116,14 @@ sunPMGetEventFromOS(int fd, pmEvent * events, int num)
|
||||||
|
|
||||||
if (ioctl(fd, SRN_IOC_NEXTEVENT, &sunEvent) < 0) {
|
if (ioctl(fd, SRN_IOC_NEXTEVENT, &sunEvent) < 0) {
|
||||||
if (errno != EAGAIN) {
|
if (errno != EAGAIN) {
|
||||||
xf86Msg(X_WARNING, "sunPMGetEventFromOS: SRN_IOC_NEXTEVENT"
|
LogMessageVerb(X_WARNING, 1, "sunPMGetEventFromOS: SRN_IOC_NEXTEVENT"
|
||||||
" %s\n", strerror(errno));
|
" %s\n", strerror(errno));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
events[i] = sunToXF86(sunEvent.type);
|
events[i] = sunToXF86(sunEvent.type);
|
||||||
}
|
}
|
||||||
xf86Msg(X_WARNING, "Got some events\n");
|
LogMessageVerb(X_WARNING, 1, "Got some events\n");
|
||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -141,11 +141,11 @@ sunPMConfirmEventToOs(int fd, pmEvent event)
|
||||||
case XF86_APM_SYS_SUSPEND:
|
case XF86_APM_SYS_SUSPEND:
|
||||||
case XF86_APM_CRITICAL_SUSPEND:
|
case XF86_APM_CRITICAL_SUSPEND:
|
||||||
case XF86_APM_USER_SUSPEND:
|
case XF86_APM_USER_SUSPEND:
|
||||||
xf86Msg(X_WARNING, "Got SUSPENDED\n");
|
LogMessageVerb(X_WARNING, 1, "Got SUSPENDED\n");
|
||||||
if (ioctl(fd, SRN_IOC_SUSPEND, NULL) == 0)
|
if (ioctl(fd, SRN_IOC_SUSPEND, NULL) == 0)
|
||||||
return PM_CONTINUE;
|
return PM_CONTINUE;
|
||||||
else {
|
else {
|
||||||
xf86Msg(X_WARNING, "sunPMConfirmEventToOs: SRN_IOC_SUSPEND"
|
LogMessageVerb(X_WARNING, 1, "sunPMConfirmEventToOs: SRN_IOC_SUSPEND"
|
||||||
" %s\n", strerror(errno));
|
" %s\n", strerror(errno));
|
||||||
return PM_FAILED;
|
return PM_FAILED;
|
||||||
}
|
}
|
||||||
|
@ -154,11 +154,11 @@ sunPMConfirmEventToOs(int fd, pmEvent event)
|
||||||
case XF86_APM_CRITICAL_RESUME:
|
case XF86_APM_CRITICAL_RESUME:
|
||||||
case XF86_APM_STANDBY_FAILED:
|
case XF86_APM_STANDBY_FAILED:
|
||||||
case XF86_APM_SUSPEND_FAILED:
|
case XF86_APM_SUSPEND_FAILED:
|
||||||
xf86Msg(X_WARNING, "Got RESUME\n");
|
LogMessageVerb(X_WARNING, 1, "Got RESUME\n");
|
||||||
if (ioctl(fd, SRN_IOC_RESUME, NULL) == 0)
|
if (ioctl(fd, SRN_IOC_RESUME, NULL) == 0)
|
||||||
return PM_CONTINUE;
|
return PM_CONTINUE;
|
||||||
else {
|
else {
|
||||||
xf86Msg(X_WARNING, "sunPMConfirmEventToOs: SRN_IOC_RESUME"
|
LogMessageVerb(X_WARNING, 1, "sunPMConfirmEventToOs: SRN_IOC_RESUME"
|
||||||
" %s\n", strerror(errno));
|
" %s\n", strerror(errno));
|
||||||
return PM_FAILED;
|
return PM_FAILED;
|
||||||
}
|
}
|
||||||
|
|
|
@ -71,8 +71,8 @@ xf86OSRingBell(int loudness, int pitch, int duration)
|
||||||
|
|
||||||
audioFD = open(AUDIO_DEVICE, O_WRONLY | O_NONBLOCK);
|
audioFD = open(AUDIO_DEVICE, O_WRONLY | O_NONBLOCK);
|
||||||
if (audioFD == -1) {
|
if (audioFD == -1) {
|
||||||
xf86Msg(X_ERROR, "Bell: cannot open audio device \"%s\": %s\n",
|
LogMessageVerb(X_ERROR, 1, "Bell: cannot open audio device \"%s\": %s\n",
|
||||||
AUDIO_DEVICE, strerror(errno));
|
AUDIO_DEVICE, strerror(errno));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -119,9 +119,9 @@ xf86OSRingBell(int loudness, int pitch, int duration)
|
||||||
audioInfo.play.gain = min(AUDIO_MAX_GAIN, AUDIO_MAX_GAIN * loudness / 100);
|
audioInfo.play.gain = min(AUDIO_MAX_GAIN, AUDIO_MAX_GAIN * loudness / 100);
|
||||||
|
|
||||||
if (ioctl(audioFD, AUDIO_SETINFO, &audioInfo) < 0) {
|
if (ioctl(audioFD, AUDIO_SETINFO, &audioInfo) < 0) {
|
||||||
xf86Msg(X_ERROR,
|
LogMessageVerb(X_ERROR, 1,
|
||||||
"Bell: AUDIO_SETINFO failed on audio device \"%s\": %s\n",
|
"Bell: AUDIO_SETINFO failed on audio device \"%s\": %s\n",
|
||||||
AUDIO_DEVICE, strerror(errno));
|
AUDIO_DEVICE, strerror(errno));
|
||||||
close(audioFD);
|
close(audioFD);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -150,9 +150,9 @@ xf86OSRingBell(int loudness, int pitch, int duration)
|
||||||
|
|
||||||
if (written == -1) {
|
if (written == -1) {
|
||||||
if (errno != EAGAIN) {
|
if (errno != EAGAIN) {
|
||||||
xf86Msg(X_ERROR,
|
LogMessageVerb(X_ERROR, 1,
|
||||||
"Bell: writev failed on audio device \"%s\": %s\n",
|
"Bell: writev failed on audio device \"%s\": %s\n",
|
||||||
AUDIO_DEVICE, strerror(errno));
|
AUDIO_DEVICE, strerror(errno));
|
||||||
close(audioFD);
|
close(audioFD);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -77,13 +77,13 @@ switch_to(int vt, const char *from)
|
||||||
|
|
||||||
SYSCALL(ret = ioctl(xf86Info.consoleFd, VT_ACTIVATE, vt));
|
SYSCALL(ret = ioctl(xf86Info.consoleFd, VT_ACTIVATE, vt));
|
||||||
if (ret != 0)
|
if (ret != 0)
|
||||||
xf86Msg(X_WARNING, "%s: VT_ACTIVATE failed: %s\n",
|
LogMessageVerb(X_WARNING, 1, "%s: VT_ACTIVATE failed: %s\n",
|
||||||
from, strerror(errno));
|
from, strerror(errno));
|
||||||
|
|
||||||
SYSCALL(ret = ioctl(xf86Info.consoleFd, VT_WAITACTIVE, vt));
|
SYSCALL(ret = ioctl(xf86Info.consoleFd, VT_WAITACTIVE, vt));
|
||||||
if (ret != 0)
|
if (ret != 0)
|
||||||
xf86Msg(X_WARNING, "%s: VT_WAITACTIVE failed: %s\n",
|
LogMessageVerb(X_WARNING, 1, "%s: VT_WAITACTIVE failed: %s\n",
|
||||||
from, strerror(errno));
|
from, strerror(errno));
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -146,7 +146,7 @@ xf86OpenConsole(void)
|
||||||
if (vtEnabled == 0) {
|
if (vtEnabled == 0) {
|
||||||
/* VT not enabled - kernel too old or Sparc platforms
|
/* VT not enabled - kernel too old or Sparc platforms
|
||||||
without visual_io support */
|
without visual_io support */
|
||||||
xf86Msg(from, "VT infrastructure is not available\n");
|
LogMessageVerb(from, 1, "VT infrastructure is not available\n");
|
||||||
|
|
||||||
xf86StartVT = 0;
|
xf86StartVT = 0;
|
||||||
xf86Info.vtno = 0;
|
xf86Info.vtno = 0;
|
||||||
|
@ -174,7 +174,7 @@ xf86OpenConsole(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
xf86Msg(from, "using VT number %d\n\n", xf86Info.vtno);
|
LogMessageVerb(from, 1, "using VT number %d\n\n", xf86Info.vtno);
|
||||||
snprintf(consoleDev, PATH_MAX, "/dev/vt/%d", xf86Info.vtno);
|
snprintf(consoleDev, PATH_MAX, "/dev/vt/%d", xf86Info.vtno);
|
||||||
|
|
||||||
if (fd != -1) {
|
if (fd != -1) {
|
||||||
|
@ -207,8 +207,8 @@ xf86OpenConsole(void)
|
||||||
#ifdef VT_SET_CONSUSER /* added in snv_139 */
|
#ifdef VT_SET_CONSUSER /* added in snv_139 */
|
||||||
if (strcmp(display, "0") == 0)
|
if (strcmp(display, "0") == 0)
|
||||||
if (ioctl(xf86Info.consoleFd, VT_SET_CONSUSER) != 0)
|
if (ioctl(xf86Info.consoleFd, VT_SET_CONSUSER) != 0)
|
||||||
xf86Msg(X_WARNING,
|
LogMessageVerb(X_WARNING, 1,
|
||||||
"xf86OpenConsole: VT_SET_CONSUSER failed\n");
|
"xf86OpenConsole: VT_SET_CONSUSER failed\n");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (ioctl(xf86Info.consoleFd, VT_GETMODE, &VT) < 0)
|
if (ioctl(xf86Info.consoleFd, VT_GETMODE, &VT) < 0)
|
||||||
|
@ -225,16 +225,16 @@ xf86OpenConsole(void)
|
||||||
FatalError("xf86OpenConsole: VT_SETMODE VT_PROCESS failed\n");
|
FatalError("xf86OpenConsole: VT_SETMODE VT_PROCESS failed\n");
|
||||||
|
|
||||||
if (ioctl(xf86Info.consoleFd, VT_SETDISPINFO, atoi(display)) < 0)
|
if (ioctl(xf86Info.consoleFd, VT_SETDISPINFO, atoi(display)) < 0)
|
||||||
xf86Msg(X_WARNING, "xf86OpenConsole: VT_SETDISPINFO failed\n");
|
LogMessageVerb(X_WARNING, 1, "xf86OpenConsole: VT_SETDISPINFO failed\n");
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef KDSETMODE
|
#ifdef KDSETMODE
|
||||||
SYSCALL(i = ioctl(xf86Info.consoleFd, KDSETMODE, KD_GRAPHICS));
|
SYSCALL(i = ioctl(xf86Info.consoleFd, KDSETMODE, KD_GRAPHICS));
|
||||||
if (i < 0) {
|
if (i < 0) {
|
||||||
xf86Msg(X_WARNING,
|
LogMessageVerb(X_WARNING, 1,
|
||||||
"xf86OpenConsole: KDSETMODE KD_GRAPHICS failed on %s (%s)\n",
|
"xf86OpenConsole: KDSETMODE KD_GRAPHICS failed on %s (%s)\n",
|
||||||
consoleDev, strerror(errno));
|
consoleDev, strerror(errno));
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -251,8 +251,8 @@ xf86OpenConsole(void)
|
||||||
#ifdef VT_SET_CONSUSER /* added in snv_139 */
|
#ifdef VT_SET_CONSUSER /* added in snv_139 */
|
||||||
if (strcmp(display, "0") == 0)
|
if (strcmp(display, "0") == 0)
|
||||||
if (ioctl(xf86Info.consoleFd, VT_SET_CONSUSER) != 0)
|
if (ioctl(xf86Info.consoleFd, VT_SET_CONSUSER) != 0)
|
||||||
xf86Msg(X_WARNING,
|
LogMessageVerb(X_WARNING, 1,
|
||||||
"xf86OpenConsole: VT_SET_CONSUSER failed\n");
|
"xf86OpenConsole: VT_SET_CONSUSER failed\n");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -288,18 +288,18 @@ xf86CloseConsole(void)
|
||||||
* the system, rather than only the console.
|
* the system, rather than only the console.
|
||||||
*/
|
*/
|
||||||
if ((fd = open(xf86SolarisFbDev, O_RDWR, 0)) < 0) {
|
if ((fd = open(xf86SolarisFbDev, O_RDWR, 0)) < 0) {
|
||||||
xf86Msg(X_WARNING,
|
LogMessageVerb(X_WARNING, 1,
|
||||||
"xf86CloseConsole(): unable to open framebuffer (%s)\n",
|
"xf86CloseConsole(): unable to open framebuffer (%s)\n",
|
||||||
strerror(errno));
|
strerror(errno));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
struct fbgattr fbattr;
|
struct fbgattr fbattr;
|
||||||
|
|
||||||
if ((ioctl(fd, FBIOGATTR, &fbattr) < 0) &&
|
if ((ioctl(fd, FBIOGATTR, &fbattr) < 0) &&
|
||||||
(ioctl(fd, FBIOGTYPE, &fbattr.fbtype) < 0)) {
|
(ioctl(fd, FBIOGTYPE, &fbattr.fbtype) < 0)) {
|
||||||
xf86Msg(X_WARNING,
|
LogMessageVerb(X_WARNING, 1,
|
||||||
"xf86CloseConsole(): unable to retrieve framebuffer"
|
"xf86CloseConsole(): unable to retrieve framebuffer"
|
||||||
" attributes (%s)\n", strerror(errno));
|
" attributes (%s)\n", strerror(errno));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
void *fbdata;
|
void *fbdata;
|
||||||
|
@ -307,9 +307,9 @@ xf86CloseConsole(void)
|
||||||
fbdata = mmap(NULL, fbattr.fbtype.fb_size,
|
fbdata = mmap(NULL, fbattr.fbtype.fb_size,
|
||||||
PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
|
PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
|
||||||
if (fbdata == MAP_FAILED) {
|
if (fbdata == MAP_FAILED) {
|
||||||
xf86Msg(X_WARNING,
|
LogMessageVerb(X_WARNING, 1,
|
||||||
"xf86CloseConsole(): unable to mmap framebuffer"
|
"xf86CloseConsole(): unable to mmap framebuffer"
|
||||||
" (%s)\n", strerror(errno));
|
" (%s)\n", strerror(errno));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
memset(fbdata, 0, fbattr.fbtype.fb_size);
|
memset(fbdata, 0, fbattr.fbtype.fb_size);
|
||||||
|
|
|
@ -92,7 +92,7 @@ xf86EnableIO(void)
|
||||||
{
|
{
|
||||||
#if defined(__i386__) || defined(__i386) || defined(__x86)
|
#if defined(__i386__) || defined(__i386) || defined(__x86)
|
||||||
if (sysi86(SI86V86, V86SC_IOPL, PS_IOPL) < 0) {
|
if (sysi86(SI86V86, V86SC_IOPL, PS_IOPL) < 0) {
|
||||||
xf86Msg(X_WARNING, "xf86EnableIO: Failed to set IOPL for I/O\n");
|
LogMessageVerb(X_WARNING, 1, "xf86EnableIO: Failed to set IOPL for I/O\n");
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
#endif /* i386 */
|
#endif /* i386 */
|
||||||
|
|
|
@ -16,6 +16,9 @@
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
#include <X11/X.h>
|
#include <X11/X.h>
|
||||||
|
|
||||||
|
#include "os/log_priv.h"
|
||||||
|
|
||||||
#include "misc.h"
|
#include "misc.h"
|
||||||
|
|
||||||
#include "xf86.h"
|
#include "xf86.h"
|
||||||
|
|
|
@ -25,6 +25,7 @@ is" without express or implied warranty.
|
||||||
|
|
||||||
#include "dix/screenint_priv.h"
|
#include "dix/screenint_priv.h"
|
||||||
#include "os/ddx_priv.h"
|
#include "os/ddx_priv.h"
|
||||||
|
#include "os/log_priv.h"
|
||||||
#include "os/osdep.h"
|
#include "os/osdep.h"
|
||||||
|
|
||||||
#include "screenint.h"
|
#include "screenint.h"
|
||||||
|
|
|
@ -37,6 +37,7 @@
|
||||||
#include <X11/Xproto.h>
|
#include <X11/Xproto.h>
|
||||||
|
|
||||||
#include "os/ddx_priv.h"
|
#include "os/ddx_priv.h"
|
||||||
|
#include "os/log_priv.h"
|
||||||
#include "os/osdep.h"
|
#include "os/osdep.h"
|
||||||
|
|
||||||
#include "os.h"
|
#include "os.h"
|
||||||
|
|
|
@ -30,6 +30,8 @@
|
||||||
#include <drm_fourcc.h>
|
#include <drm_fourcc.h>
|
||||||
#include <wayland-util.h>
|
#include <wayland-util.h>
|
||||||
|
|
||||||
|
#include "os/log_priv.h"
|
||||||
|
|
||||||
#include "xwayland-dmabuf.h"
|
#include "xwayland-dmabuf.h"
|
||||||
#include "xwayland-glamor-gbm.h"
|
#include "xwayland-glamor-gbm.h"
|
||||||
#include "xwayland-screen.h"
|
#include "xwayland-screen.h"
|
||||||
|
|
|
@ -32,6 +32,7 @@
|
||||||
#include "dix/dix_priv.h"
|
#include "dix/dix_priv.h"
|
||||||
#include "dix/input_priv.h"
|
#include "dix/input_priv.h"
|
||||||
#include "randr/randrstr_priv.h"
|
#include "randr/randrstr_priv.h"
|
||||||
|
#include "os/log_priv.h"
|
||||||
|
|
||||||
#include "xwayland-cvt.h"
|
#include "xwayland-cvt.h"
|
||||||
#include "xwayland-output.h"
|
#include "xwayland-output.h"
|
||||||
|
|
|
@ -39,6 +39,7 @@
|
||||||
|
|
||||||
#include "dix/input_priv.h"
|
#include "dix/input_priv.h"
|
||||||
#include "dix/property_priv.h"
|
#include "dix/property_priv.h"
|
||||||
|
#include "os/log_priv.h"
|
||||||
#include "os/osdep.h"
|
#include "os/osdep.h"
|
||||||
#include "os/xserver_poll.h"
|
#include "os/xserver_poll.h"
|
||||||
|
|
||||||
|
|
|
@ -36,6 +36,7 @@
|
||||||
|
|
||||||
#include "dix/dix_priv.h"
|
#include "dix/dix_priv.h"
|
||||||
#include "dix/property_priv.h"
|
#include "dix/property_priv.h"
|
||||||
|
#include "os/log_priv.h"
|
||||||
|
|
||||||
#include "compositeext.h"
|
#include "compositeext.h"
|
||||||
#include "compint.h"
|
#include "compint.h"
|
||||||
|
|
|
@ -32,6 +32,7 @@
|
||||||
|
|
||||||
#include "dix/dix_priv.h"
|
#include "dix/dix_priv.h"
|
||||||
#include "dix/input_priv.h"
|
#include "dix/input_priv.h"
|
||||||
|
#include "os/log_priv.h"
|
||||||
|
|
||||||
#include <inputstr.h>
|
#include <inputstr.h>
|
||||||
#include <inpututils.h>
|
#include <inpututils.h>
|
||||||
|
|
|
@ -39,6 +39,7 @@
|
||||||
#include "dix/screenint_priv.h"
|
#include "dix/screenint_priv.h"
|
||||||
#include "os/cmdline.h"
|
#include "os/cmdline.h"
|
||||||
#include "os/ddx_priv.h"
|
#include "os/ddx_priv.h"
|
||||||
|
#include "os/log_priv.h"
|
||||||
#include "os/osdep.h"
|
#include "os/osdep.h"
|
||||||
#include "os/xserver_poll.h"
|
#include "os/xserver_poll.h"
|
||||||
|
|
||||||
|
@ -235,11 +236,11 @@ ddxProcessArgument(int argc, char *argv[], int i)
|
||||||
val = strtol(argv[i], &end, 0);
|
val = strtol(argv[i], &end, 0);
|
||||||
if (*end == '\0') {
|
if (*end == '\0') {
|
||||||
verbosity = val;
|
verbosity = val;
|
||||||
LogSetParameter(XLOG_VERBOSITY, verbosity);
|
xorgLogVerbosity = verbosity;
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
LogSetParameter(XLOG_VERBOSITY, ++verbosity);
|
xorgLogVerbosity = ++verbosity;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
else if (strcmp(argv[i], "-version") == 0) {
|
else if (strcmp(argv[i], "-version") == 0) {
|
||||||
|
|
|
@ -37,6 +37,7 @@ from The Open Group.
|
||||||
#include "dix/dix_priv.h"
|
#include "dix/dix_priv.h"
|
||||||
#include "dix/screenint_priv.h"
|
#include "dix/screenint_priv.h"
|
||||||
#include "os/ddx_priv.h"
|
#include "os/ddx_priv.h"
|
||||||
|
#include "os/log_priv.h"
|
||||||
#include "os/osdep.h"
|
#include "os/osdep.h"
|
||||||
|
|
||||||
#include "winmsg.h"
|
#include "winmsg.h"
|
||||||
|
@ -646,9 +647,8 @@ OsVendorInit(void)
|
||||||
g_pszLogFile = LogInit(g_pszLogFile, ".old");
|
g_pszLogFile = LogInit(g_pszLogFile, ".old");
|
||||||
|
|
||||||
}
|
}
|
||||||
LogSetParameter(XLOG_FLUSH, 1);
|
xorgLogVerbosity = g_iLogVerbose;
|
||||||
LogSetParameter(XLOG_VERBOSITY, g_iLogVerbose);
|
xorgLogFileVerbosity = g_iLogVerbose;
|
||||||
LogSetParameter(XLOG_FILE_VERBOSITY, g_iLogVerbose);
|
|
||||||
|
|
||||||
/* Log the version information */
|
/* Log the version information */
|
||||||
if (serverGeneration == 1)
|
if (serverGeneration == 1)
|
||||||
|
|
|
@ -109,7 +109,7 @@ srcs_windows += [
|
||||||
|
|
||||||
rsrc = windows.compile_resources(
|
rsrc = windows.compile_resources(
|
||||||
'XWin.rc',
|
'XWin.rc',
|
||||||
include_directories: include_directories('../../include/'),
|
include_directories: include_directories('../../include/', '../..'),
|
||||||
depend_files: ['XWin.exe.manifest', 'X.ico'],
|
depend_files: ['XWin.exe.manifest', 'X.ico'],
|
||||||
)
|
)
|
||||||
srcs_windows += rsrc
|
srcs_windows += rsrc
|
||||||
|
|
|
@ -32,6 +32,7 @@
|
||||||
#include <xwin-config.h>
|
#include <xwin-config.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include "os/log_priv.h"
|
||||||
#include "os/osdep.h"
|
#include "os/osdep.h"
|
||||||
|
|
||||||
#include <../xfree86/common/xorgVersion.h>
|
#include <../xfree86/common/xorgVersion.h>
|
||||||
|
@ -50,7 +51,7 @@ OsVendorVErrorF(const char *pszFormat, va_list va_args)
|
||||||
pthread_mutex_lock(&s_pmPrinting);
|
pthread_mutex_lock(&s_pmPrinting);
|
||||||
|
|
||||||
/* Print the error message to a log file, could be stderr */
|
/* Print the error message to a log file, could be stderr */
|
||||||
LogVWrite(0, pszFormat, va_args);
|
LogVMessageVerb(X_NONE, 0, pszFormat, va_args);
|
||||||
|
|
||||||
/* Unlock the printing mutex */
|
/* Unlock the printing mutex */
|
||||||
pthread_mutex_unlock(&s_pmPrinting);
|
pthread_mutex_unlock(&s_pmPrinting);
|
||||||
|
|
|
@ -325,15 +325,6 @@ conf_data.set('WSCONS_SUPPORT', supports_wscons ? '1' : false)
|
||||||
conf_data.set('XSERVER_LIBPCIACCESS', get_option('pciaccess') ? '1' : false)
|
conf_data.set('XSERVER_LIBPCIACCESS', get_option('pciaccess') ? '1' : false)
|
||||||
conf_data.set('XSERVER_PLATFORM_BUS', build_udev_kms ? '1' : false)
|
conf_data.set('XSERVER_PLATFORM_BUS', build_udev_kms ? '1' : false)
|
||||||
|
|
||||||
configure_file(output : 'dix-config.h',
|
|
||||||
configuration : conf_data)
|
|
||||||
|
|
||||||
configure_file(output : 'xorg-server.h',
|
|
||||||
input : 'xorg-server.h.meson.in',
|
|
||||||
configuration : conf_data,
|
|
||||||
install: build_xorg,
|
|
||||||
install_dir: xorgsdkdir)
|
|
||||||
|
|
||||||
version_data = configuration_data()
|
version_data = configuration_data()
|
||||||
version_data.set('VENDOR_RELEASE', '@0@'.format(release))
|
version_data.set('VENDOR_RELEASE', '@0@'.format(release))
|
||||||
version_data.set_quoted('VENDOR_NAME', get_option('vendor_name'))
|
version_data.set_quoted('VENDOR_NAME', get_option('vendor_name'))
|
||||||
|
|
37
include/os.h
37
include/os.h
|
@ -324,14 +324,6 @@ extern _X_EXPORT int
|
||||||
timingsafe_memcmp(const void *b1, const void *b2, size_t len);
|
timingsafe_memcmp(const void *b1, const void *b2, size_t len);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Logging. */
|
|
||||||
typedef enum _LogParameter {
|
|
||||||
XLOG_FLUSH,
|
|
||||||
XLOG_SYNC,
|
|
||||||
XLOG_VERBOSITY,
|
|
||||||
XLOG_FILE_VERBOSITY
|
|
||||||
} LogParameter;
|
|
||||||
|
|
||||||
/* Flags for log messages. */
|
/* Flags for log messages. */
|
||||||
typedef enum {
|
typedef enum {
|
||||||
X_PROBED, /* Value was probed */
|
X_PROBED, /* Value was probed */
|
||||||
|
@ -348,20 +340,6 @@ typedef enum {
|
||||||
X_UNKNOWN = -1 /* unknown -- this must always be last */
|
X_UNKNOWN = -1 /* unknown -- this must always be last */
|
||||||
} MessageType;
|
} MessageType;
|
||||||
|
|
||||||
extern _X_EXPORT const char *
|
|
||||||
LogInit(const char *fname, const char *backup);
|
|
||||||
extern void
|
|
||||||
LogSetDisplay(void);
|
|
||||||
extern _X_EXPORT void
|
|
||||||
LogClose(enum ExitCode error);
|
|
||||||
extern _X_EXPORT Bool
|
|
||||||
LogSetParameter(LogParameter param, int value);
|
|
||||||
extern _X_EXPORT void
|
|
||||||
LogVWrite(int verb, const char *f, va_list args)
|
|
||||||
_X_ATTRIBUTE_PRINTF(2, 0);
|
|
||||||
extern _X_EXPORT void
|
|
||||||
LogWrite(int verb, const char *f, ...)
|
|
||||||
_X_ATTRIBUTE_PRINTF(2, 3);
|
|
||||||
extern _X_EXPORT void
|
extern _X_EXPORT void
|
||||||
LogVMessageVerb(MessageType type, int verb, const char *format, va_list args)
|
LogVMessageVerb(MessageType type, int verb, const char *format, va_list args)
|
||||||
_X_ATTRIBUTE_PRINTF(3, 0);
|
_X_ATTRIBUTE_PRINTF(3, 0);
|
||||||
|
@ -378,7 +356,7 @@ extern _X_EXPORT void
|
||||||
LogVMessageVerbSigSafe(MessageType type, int verb, const char *format, va_list args)
|
LogVMessageVerbSigSafe(MessageType type, int verb, const char *format, va_list args)
|
||||||
_X_ATTRIBUTE_PRINTF(3, 0);
|
_X_ATTRIBUTE_PRINTF(3, 0);
|
||||||
|
|
||||||
extern _X_EXPORT void
|
void
|
||||||
LogVHdrMessageVerb(MessageType type, int verb,
|
LogVHdrMessageVerb(MessageType type, int verb,
|
||||||
const char *msg_format, va_list msg_args,
|
const char *msg_format, va_list msg_args,
|
||||||
const char *hdr_format, va_list hdr_args)
|
const char *hdr_format, va_list hdr_args)
|
||||||
|
@ -390,23 +368,12 @@ LogHdrMessageVerb(MessageType type, int verb,
|
||||||
const char *hdr_format, ...)
|
const char *hdr_format, ...)
|
||||||
_X_ATTRIBUTE_PRINTF(3, 0)
|
_X_ATTRIBUTE_PRINTF(3, 0)
|
||||||
_X_ATTRIBUTE_PRINTF(5, 6);
|
_X_ATTRIBUTE_PRINTF(5, 6);
|
||||||
extern _X_EXPORT void
|
|
||||||
LogHdrMessage(MessageType type, const char *msg_format,
|
|
||||||
va_list msg_args, const char *hdr_format, ...)
|
|
||||||
_X_ATTRIBUTE_PRINTF(2, 0)
|
|
||||||
_X_ATTRIBUTE_PRINTF(4, 5);
|
|
||||||
|
|
||||||
extern _X_EXPORT void
|
extern _X_EXPORT void
|
||||||
FatalError(const char *f, ...)
|
FatalError(const char *f, ...)
|
||||||
_X_ATTRIBUTE_PRINTF(1, 2)
|
_X_ATTRIBUTE_PRINTF(1, 2)
|
||||||
_X_NORETURN;
|
_X_NORETURN;
|
||||||
|
|
||||||
#ifdef DEBUG
|
|
||||||
#define DebugF ErrorF
|
|
||||||
#else
|
|
||||||
#define DebugF(...) /* */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
extern _X_EXPORT void
|
extern _X_EXPORT void
|
||||||
VErrorF(const char *f, va_list args)
|
VErrorF(const char *f, va_list args)
|
||||||
_X_ATTRIBUTE_PRINTF(1, 0);
|
_X_ATTRIBUTE_PRINTF(1, 0);
|
||||||
|
@ -419,7 +386,7 @@ _X_ATTRIBUTE_PRINTF(1, 0);
|
||||||
extern _X_EXPORT void
|
extern _X_EXPORT void
|
||||||
ErrorFSigSafe(const char *f, ...)
|
ErrorFSigSafe(const char *f, ...)
|
||||||
_X_ATTRIBUTE_PRINTF(1, 2);
|
_X_ATTRIBUTE_PRINTF(1, 2);
|
||||||
extern _X_EXPORT void
|
void
|
||||||
LogPrintMarkers(void);
|
LogPrintMarkers(void);
|
||||||
|
|
||||||
extern _X_EXPORT void
|
extern _X_EXPORT void
|
||||||
|
|
11
meson.build
11
meson.build
|
@ -907,3 +907,14 @@ if build_docs or build_docs_devel
|
||||||
configuration: docxmlconfig
|
configuration: docxmlconfig
|
||||||
)
|
)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
# finally write config files. doing that very late, so other subdirs still
|
||||||
|
# have a change to add config items
|
||||||
|
configure_file(output : 'dix-config.h',
|
||||||
|
configuration : conf_data)
|
||||||
|
|
||||||
|
configure_file(output : 'xorg-server.h',
|
||||||
|
input : 'include/xorg-server.h.meson.in',
|
||||||
|
configuration : conf_data,
|
||||||
|
install: build_xorg,
|
||||||
|
install_dir: xorgsdkdir)
|
||||||
|
|
|
@ -85,6 +85,7 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "os/auth.h"
|
#include "os/auth.h"
|
||||||
|
#include "os/log_priv.h"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Try to determine a PID for a client from its connection
|
* Try to determine a PID for a client from its connection
|
||||||
|
|
|
@ -0,0 +1,32 @@
|
||||||
|
/* SPDX-License-Identifier: MIT OR X11
|
||||||
|
*
|
||||||
|
* Copyright © 2024 Enrico Weigelt, metux IT consult <info@metux.net>
|
||||||
|
*
|
||||||
|
* @brief command line helper functions
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <dix-config.h>
|
||||||
|
|
||||||
|
#include <string.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
|
||||||
|
#include "os/cmdline.h"
|
||||||
|
|
||||||
|
int ProcessCmdLineMultiInt(int argc, char *argv[], int *idx, const char* name, int *value)
|
||||||
|
{
|
||||||
|
if (strcmp(argv[*idx], name))
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
int i2 = *idx+1;
|
||||||
|
if (i2 < argc && argv[i2]) {
|
||||||
|
char *end;
|
||||||
|
long val = strtol(argv[i2], &end, 0);
|
||||||
|
if (*end == '\0') {
|
||||||
|
(*idx)++;
|
||||||
|
(*value) = val;
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
(*value)++;
|
||||||
|
return 1;
|
||||||
|
}
|
15
os/cmdline.h
15
os/cmdline.h
|
@ -17,4 +17,19 @@ void UseMsg(void);
|
||||||
void ProcessCommandLine(int argc, char * argv[]);
|
void ProcessCommandLine(int argc, char * argv[]);
|
||||||
void CheckUserParameters(int argc, char **argv, char **envp);
|
void CheckUserParameters(int argc, char **argv, char **envp);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* @brief check for and parse an counting-flag or value-flag option
|
||||||
|
*
|
||||||
|
* Parses an option that may either be used for setting an integer value or
|
||||||
|
* given one or multiple times (without argument) to increase an value
|
||||||
|
*
|
||||||
|
* @param argc total number of elements in argv
|
||||||
|
* @param argv array of pointers to cmdline argument strings
|
||||||
|
* @param idx pointer to current index in argv -- eventually will be modified
|
||||||
|
* @param name the command line argument name
|
||||||
|
* @param value pointer to the field holding the setting value
|
||||||
|
* @return non-zero if the flag was found and parsed
|
||||||
|
*/
|
||||||
|
int ProcessCmdLineMultiInt(int argc, char *argv[], int *idx, const char* name, int *value);
|
||||||
|
|
||||||
#endif /* _XSERVER_OS_CMELINE_H */
|
#endif /* _XSERVER_OS_CMELINE_H */
|
||||||
|
|
|
@ -99,6 +99,7 @@ SOFTWARE.
|
||||||
#include "dix/dix_priv.h"
|
#include "dix/dix_priv.h"
|
||||||
#include "os/audit.h"
|
#include "os/audit.h"
|
||||||
#include "os/auth.h"
|
#include "os/auth.h"
|
||||||
|
#include "os/log_priv.h"
|
||||||
#include "os/osdep.h"
|
#include "os/osdep.h"
|
||||||
|
|
||||||
#include "misc.h" /* for typedef of pointer */
|
#include "misc.h" /* for typedef of pointer */
|
||||||
|
|
|
@ -37,6 +37,7 @@
|
||||||
|
|
||||||
#include "dix/input_priv.h"
|
#include "dix/input_priv.h"
|
||||||
#include "os/ddx_priv.h"
|
#include "os/ddx_priv.h"
|
||||||
|
#include "os/log_priv.h"
|
||||||
|
|
||||||
#include "inputstr.h"
|
#include "inputstr.h"
|
||||||
#include "opaque.h"
|
#include "opaque.h"
|
||||||
|
|
203
os/log.c
203
os/log.c
|
@ -75,9 +75,7 @@ OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
* authorization from the copyright holder(s) and author(s).
|
* authorization from the copyright holder(s) and author(s).
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef HAVE_DIX_CONFIG_H
|
|
||||||
#include <dix-config.h>
|
#include <dix-config.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
@ -88,11 +86,16 @@ OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
#include <X11/Xfuncproto.h>
|
#include <X11/Xfuncproto.h>
|
||||||
#include <X11/Xos.h>
|
#include <X11/Xos.h>
|
||||||
|
|
||||||
|
#ifdef CONFIG_SYSLOG
|
||||||
|
#include <syslog.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "dix/dix_priv.h"
|
#include "dix/dix_priv.h"
|
||||||
#include "dix/input_priv.h"
|
#include "dix/input_priv.h"
|
||||||
#include "os/audit.h"
|
#include "os/audit.h"
|
||||||
#include "os/ddx_priv.h"
|
#include "os/ddx_priv.h"
|
||||||
#include "os/fmt.h"
|
#include "os/fmt.h"
|
||||||
|
#include "os/log_priv.h"
|
||||||
#include "os/osdep.h"
|
#include "os/osdep.h"
|
||||||
|
|
||||||
#include "opaque.h"
|
#include "opaque.h"
|
||||||
|
@ -113,19 +116,18 @@ OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
void (*OsVendorVErrorFProc) (const char *, va_list args) = NULL;
|
void (*OsVendorVErrorFProc) (const char *, va_list args) = NULL;
|
||||||
|
|
||||||
/* Default logging parameters. */
|
/* Default logging parameters. */
|
||||||
#ifndef DEFAULT_LOG_VERBOSITY
|
|
||||||
#define DEFAULT_LOG_VERBOSITY 0
|
#define DEFAULT_LOG_VERBOSITY 0
|
||||||
#endif
|
|
||||||
#ifndef DEFAULT_LOG_FILE_VERBOSITY
|
|
||||||
#define DEFAULT_LOG_FILE_VERBOSITY 3
|
#define DEFAULT_LOG_FILE_VERBOSITY 3
|
||||||
#endif
|
#define DEFAULT_SYSLOG_VERBOSITY 0
|
||||||
|
|
||||||
static FILE *logFile = NULL;
|
|
||||||
static int logFileFd = -1;
|
static int logFileFd = -1;
|
||||||
static Bool logFlush = FALSE;
|
Bool xorgLogSync = FALSE;
|
||||||
static Bool logSync = FALSE;
|
int xorgLogVerbosity = DEFAULT_LOG_VERBOSITY;
|
||||||
static int logVerbosity = DEFAULT_LOG_VERBOSITY;
|
int xorgLogFileVerbosity = DEFAULT_LOG_FILE_VERBOSITY;
|
||||||
static int logFileVerbosity = DEFAULT_LOG_FILE_VERBOSITY;
|
#ifdef CONFIG_SYSLOG
|
||||||
|
int xorgSyslogVerbosity = DEFAULT_SYSLOG_VERBOSITY;
|
||||||
|
const char *xorgSyslogIdent = "X";
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Buffer to information logged before the log file is opened. */
|
/* Buffer to information logged before the log file is opened. */
|
||||||
static char *saveBuffer = NULL;
|
static char *saveBuffer = NULL;
|
||||||
|
@ -141,42 +143,18 @@ asm(".desc ___crashreporter_info__, 0x10");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Prefix strings for log messages. */
|
/* Prefix strings for log messages. */
|
||||||
#ifndef X_UNKNOWN_STRING
|
|
||||||
#define X_UNKNOWN_STRING "(\?\?)"
|
#define X_UNKNOWN_STRING "(\?\?)"
|
||||||
#endif
|
|
||||||
#ifndef X_PROBE_STRING
|
|
||||||
#define X_PROBE_STRING "(--)"
|
#define X_PROBE_STRING "(--)"
|
||||||
#endif
|
|
||||||
#ifndef X_CONFIG_STRING
|
|
||||||
#define X_CONFIG_STRING "(**)"
|
#define X_CONFIG_STRING "(**)"
|
||||||
#endif
|
|
||||||
#ifndef X_DEFAULT_STRING
|
|
||||||
#define X_DEFAULT_STRING "(==)"
|
#define X_DEFAULT_STRING "(==)"
|
||||||
#endif
|
|
||||||
#ifndef X_CMDLINE_STRING
|
|
||||||
#define X_CMDLINE_STRING "(++)"
|
#define X_CMDLINE_STRING "(++)"
|
||||||
#endif
|
|
||||||
#ifndef X_NOTICE_STRING
|
|
||||||
#define X_NOTICE_STRING "(!!)"
|
#define X_NOTICE_STRING "(!!)"
|
||||||
#endif
|
|
||||||
#ifndef X_ERROR_STRING
|
|
||||||
#define X_ERROR_STRING "(EE)"
|
#define X_ERROR_STRING "(EE)"
|
||||||
#endif
|
|
||||||
#ifndef X_WARNING_STRING
|
|
||||||
#define X_WARNING_STRING "(WW)"
|
#define X_WARNING_STRING "(WW)"
|
||||||
#endif
|
|
||||||
#ifndef X_INFO_STRING
|
|
||||||
#define X_INFO_STRING "(II)"
|
#define X_INFO_STRING "(II)"
|
||||||
#endif
|
|
||||||
#ifndef X_NOT_IMPLEMENTED_STRING
|
|
||||||
#define X_NOT_IMPLEMENTED_STRING "(NI)"
|
#define X_NOT_IMPLEMENTED_STRING "(NI)"
|
||||||
#endif
|
|
||||||
#ifndef X_DEBUG_STRING
|
|
||||||
#define X_DEBUG_STRING "(DB)"
|
#define X_DEBUG_STRING "(DB)"
|
||||||
#endif
|
|
||||||
#ifndef X_NONE_STRING
|
|
||||||
#define X_NONE_STRING ""
|
#define X_NONE_STRING ""
|
||||||
#endif
|
|
||||||
|
|
||||||
static size_t
|
static size_t
|
||||||
strlen_sigsafe(const char *s)
|
strlen_sigsafe(const char *s)
|
||||||
|
@ -235,6 +213,24 @@ LogFilePrep(const char *fname, const char *backup, const char *idstring)
|
||||||
}
|
}
|
||||||
#pragma GCC diagnostic pop
|
#pragma GCC diagnostic pop
|
||||||
|
|
||||||
|
static inline void doLogSync(void) {
|
||||||
|
#ifndef WIN32
|
||||||
|
fsync(logFileFd);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
static void initSyslog(void) {
|
||||||
|
#ifdef CONFIG_SYSLOG
|
||||||
|
char buffer[4096];
|
||||||
|
strcpy(buffer, xorgSyslogIdent);
|
||||||
|
|
||||||
|
snprintf(buffer, sizeof(buffer), "%s :%s", xorgSyslogIdent, (display ? display : "<>"));
|
||||||
|
|
||||||
|
/* initialize syslog */
|
||||||
|
openlog(buffer, LOG_PID, LOG_LOCAL1);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* LogInit is called to start logging to a file. It is also called (with
|
* LogInit is called to start logging to a file. It is also called (with
|
||||||
* NULL arguments) when logging to a file is not wanted. It must always be
|
* NULL arguments) when logging to a file is not wanted. It must always be
|
||||||
|
@ -270,19 +266,14 @@ LogInit(const char *fname, const char *backup)
|
||||||
saved_log_backup = strdup(backup);
|
saved_log_backup = strdup(backup);
|
||||||
} else
|
} else
|
||||||
logFileName = LogFilePrep(fname, backup, display);
|
logFileName = LogFilePrep(fname, backup, display);
|
||||||
if ((logFile = fopen(logFileName, "w")) == NULL)
|
|
||||||
FatalError("Cannot open log file \"%s\"\n", logFileName);
|
|
||||||
setvbuf(logFile, NULL, _IONBF, 0);
|
|
||||||
|
|
||||||
logFileFd = fileno(logFile);
|
if ((logFileFd = open(logFileName, O_WRONLY | O_CREAT)) == -1)
|
||||||
|
FatalError("Cannot open log file \"%s\": %s\n", logFileName, strerror(errno));
|
||||||
|
|
||||||
/* Flush saved log information. */
|
/* Flush saved log information. */
|
||||||
if (saveBuffer && bufferSize > 0) {
|
if (saveBuffer && bufferSize > 0) {
|
||||||
fwrite(saveBuffer, bufferPos, 1, logFile);
|
write(logFileFd, saveBuffer, bufferPos);
|
||||||
fflush(logFile);
|
doLogSync();
|
||||||
#ifndef WIN32
|
|
||||||
fsync(fileno(logFile));
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -297,6 +288,7 @@ LogInit(const char *fname, const char *backup)
|
||||||
}
|
}
|
||||||
needBuffer = FALSE;
|
needBuffer = FALSE;
|
||||||
|
|
||||||
|
initSyslog();
|
||||||
return logFileName;
|
return logFileName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -328,44 +320,23 @@ LogSetDisplay(void)
|
||||||
free(saved_log_fname);
|
free(saved_log_fname);
|
||||||
free(saved_log_backup);
|
free(saved_log_backup);
|
||||||
}
|
}
|
||||||
|
initSyslog();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
LogClose(enum ExitCode error)
|
LogClose(enum ExitCode error)
|
||||||
{
|
{
|
||||||
if (logFile) {
|
if (logFileFd != -1) {
|
||||||
int msgtype = (error == EXIT_NO_ERROR) ? X_INFO : X_ERROR;
|
int msgtype = (error == EXIT_NO_ERROR) ? X_INFO : X_ERROR;
|
||||||
LogMessageVerbSigSafe(msgtype, -1,
|
LogMessageVerbSigSafe(msgtype, -1,
|
||||||
"Server terminated %s (%d). Closing log file.\n",
|
"Server terminated %s (%d). Closing log file.\n",
|
||||||
(error == EXIT_NO_ERROR) ? "successfully" : "with error",
|
(error == EXIT_NO_ERROR) ? "successfully" : "with error",
|
||||||
error);
|
error);
|
||||||
fclose(logFile);
|
close(logFileFd);
|
||||||
logFile = NULL;
|
|
||||||
logFileFd = -1;
|
logFileFd = -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Bool
|
|
||||||
LogSetParameter(LogParameter param, int value)
|
|
||||||
{
|
|
||||||
switch (param) {
|
|
||||||
case XLOG_FLUSH:
|
|
||||||
logFlush = value ? TRUE : FALSE;
|
|
||||||
return TRUE;
|
|
||||||
case XLOG_SYNC:
|
|
||||||
logSync = value ? TRUE : FALSE;
|
|
||||||
return TRUE;
|
|
||||||
case XLOG_VERBOSITY:
|
|
||||||
logVerbosity = value;
|
|
||||||
return TRUE;
|
|
||||||
case XLOG_FILE_VERBOSITY:
|
|
||||||
logFileVerbosity = value;
|
|
||||||
return TRUE;
|
|
||||||
default:
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
LMOD_LONG = 0x1,
|
LMOD_LONG = 0x1,
|
||||||
LMOD_LONGLONG = 0x2,
|
LMOD_LONGLONG = 0x2,
|
||||||
|
@ -596,6 +567,19 @@ pnprintf(char *string, int size, const char *f, ...)
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
LogSyslogWrite(int verb, const char *buf, size_t len, Bool end_line) {
|
||||||
|
#ifdef CONFIG_SYSLOG
|
||||||
|
if (inSignalContext) // syslog() ins't signal-safe yet :(
|
||||||
|
return; // shall we try syslog(2) syscall instead ?
|
||||||
|
|
||||||
|
if (verb >= 0 && xorgSyslogVerbosity < verb)
|
||||||
|
return;
|
||||||
|
|
||||||
|
syslog(LOG_PID, "%.*s", (int)len, buf);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
/* This function does the actual log message writes. It must be signal safe.
|
/* This function does the actual log message writes. It must be signal safe.
|
||||||
* When attempting to call non-signal-safe functions, guard them with a check
|
* When attempting to call non-signal-safe functions, guard them with a check
|
||||||
* of the inSignalContext global variable. */
|
* of the inSignalContext global variable. */
|
||||||
|
@ -605,18 +589,18 @@ LogSWrite(int verb, const char *buf, size_t len, Bool end_line)
|
||||||
static Bool newline = TRUE;
|
static Bool newline = TRUE;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
if (verb < 0 || logVerbosity >= verb)
|
LogSyslogWrite(verb, buf, len, end_line);
|
||||||
|
|
||||||
|
if (verb < 0 || xorgLogVerbosity >= verb)
|
||||||
ret = write(2, buf, len);
|
ret = write(2, buf, len);
|
||||||
|
|
||||||
if (verb < 0 || logFileVerbosity >= verb) {
|
if (verb < 0 || xorgLogFileVerbosity >= verb) {
|
||||||
if (inSignalContext && logFileFd >= 0) {
|
if (inSignalContext && logFileFd >= 0) {
|
||||||
ret = write(logFileFd, buf, len);
|
ret = write(logFileFd, buf, len);
|
||||||
#ifndef WIN32
|
if (xorgLogSync)
|
||||||
if (logFlush && logSync)
|
doLogSync();
|
||||||
fsync(logFileFd);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
else if (!inSignalContext && logFile) {
|
else if (!inSignalContext && logFileFd != -1) {
|
||||||
if (newline) {
|
if (newline) {
|
||||||
time_t t = time(NULL);
|
time_t t = time(NULL);
|
||||||
struct tm tm;
|
struct tm tm;
|
||||||
|
@ -627,19 +611,13 @@ LogSWrite(int verb, const char *buf, size_t len, Bool end_line)
|
||||||
#else
|
#else
|
||||||
localtime_r(&t, &tm);
|
localtime_r(&t, &tm);
|
||||||
#endif
|
#endif
|
||||||
strftime(fmt_tm, sizeof(fmt_tm) - 1, "%Y-%m-%d %H:%M:%S", &tm);
|
strftime(fmt_tm, sizeof(fmt_tm) - 1, "[%Y-%m-%d %H:%M:%S] ", &tm);
|
||||||
|
write(logFileFd, fmt_tm, strlen(fmt_tm));
|
||||||
fprintf(logFile, "[%s] ", fmt_tm);
|
|
||||||
}
|
}
|
||||||
newline = end_line;
|
newline = end_line;
|
||||||
fwrite(buf, len, 1, logFile);
|
write(logFileFd, buf, len);
|
||||||
if (logFlush) {
|
if (xorgLogSync)
|
||||||
fflush(logFile);
|
doLogSync();
|
||||||
#ifndef WIN32
|
|
||||||
if (logSync)
|
|
||||||
fsync(fileno(logFile));
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else if (!inSignalContext && needBuffer) {
|
else if (!inSignalContext && needBuffer) {
|
||||||
if (len > bufferUnused) {
|
if (len > bufferUnused) {
|
||||||
|
@ -661,22 +639,6 @@ LogSWrite(int verb, const char *buf, size_t len, Bool end_line)
|
||||||
(void) ret;
|
(void) ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
LogVWrite(int verb, const char *f, va_list args)
|
|
||||||
{
|
|
||||||
return LogVMessageVerb(X_NONE, verb, f, args);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
LogWrite(int verb, const char *f, ...)
|
|
||||||
{
|
|
||||||
va_list args;
|
|
||||||
|
|
||||||
va_start(args, f);
|
|
||||||
LogVWrite(verb, f, args);
|
|
||||||
va_end(args);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Returns the Message Type string to prepend to a logging message, or NULL
|
/* Returns the Message Type string to prepend to a logging message, or NULL
|
||||||
* if the message will be dropped due to insufficient verbosity. */
|
* if the message will be dropped due to insufficient verbosity. */
|
||||||
static const char *
|
static const char *
|
||||||
|
@ -685,7 +647,7 @@ LogMessageTypeVerbString(MessageType type, int verb)
|
||||||
if (type == X_ERROR)
|
if (type == X_ERROR)
|
||||||
verb = 0;
|
verb = 0;
|
||||||
|
|
||||||
if (logVerbosity < verb && logFileVerbosity < verb)
|
if (xorgLogVerbosity < verb && xorgLogFileVerbosity < verb)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
switch (type) {
|
switch (type) {
|
||||||
|
@ -866,37 +828,6 @@ LogHdrMessageVerb(MessageType type, int verb, const char *msg_format,
|
||||||
va_end(hdr_args);
|
va_end(hdr_args);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
LogHdrMessage(MessageType type, const char *msg_format, va_list msg_args,
|
|
||||||
const char *hdr_format, ...)
|
|
||||||
{
|
|
||||||
va_list hdr_args;
|
|
||||||
|
|
||||||
va_start(hdr_args, hdr_format);
|
|
||||||
LogVHdrMessageVerb(type, 1, msg_format, msg_args, hdr_format, hdr_args);
|
|
||||||
va_end(hdr_args);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
AbortServer(void)
|
|
||||||
_X_NORETURN;
|
|
||||||
|
|
||||||
void
|
|
||||||
AbortServer(void)
|
|
||||||
{
|
|
||||||
#ifdef XF86BIGFONT
|
|
||||||
XF86BigfontCleanup();
|
|
||||||
#endif
|
|
||||||
CloseWellKnownConnections();
|
|
||||||
OsCleanup(TRUE);
|
|
||||||
AbortDevices();
|
|
||||||
ddxGiveUp(EXIT_ERR_ABORT);
|
|
||||||
fflush(stderr);
|
|
||||||
if (CoreDump)
|
|
||||||
OsAbort();
|
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
#define AUDIT_PREFIX "AUDIT: %s: %ld: "
|
#define AUDIT_PREFIX "AUDIT: %s: %ld: "
|
||||||
#ifndef AUDIT_TIMEOUT
|
#ifndef AUDIT_TIMEOUT
|
||||||
#define AUDIT_TIMEOUT ((CARD32)(120 * 1000)) /* 2 mn */
|
#define AUDIT_TIMEOUT ((CARD32)(120 * 1000)) /* 2 mn */
|
||||||
|
@ -1045,7 +976,7 @@ VErrorF(const char *f, va_list args)
|
||||||
if (OsVendorVErrorFProc)
|
if (OsVendorVErrorFProc)
|
||||||
OsVendorVErrorFProc(f, args);
|
OsVendorVErrorFProc(f, args);
|
||||||
else
|
else
|
||||||
LogVWrite(-1, f, args);
|
LogVMessageVerb(X_NONE, -1, f, args);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -1078,7 +1009,7 @@ void
|
||||||
LogPrintMarkers(void)
|
LogPrintMarkers(void)
|
||||||
{
|
{
|
||||||
/* Show what the message marker symbols mean. */
|
/* Show what the message marker symbols mean. */
|
||||||
LogWrite(0, "Markers: ");
|
LogMessageVerb(X_NONE, 0, "Markers: ");
|
||||||
LogMessageVerb(X_PROBED, 0, "probed, ");
|
LogMessageVerb(X_PROBED, 0, "probed, ");
|
||||||
LogMessageVerb(X_CONFIG, 0, "from config file, ");
|
LogMessageVerb(X_CONFIG, 0, "from config file, ");
|
||||||
LogMessageVerb(X_DEFAULT, 0, "default setting,\n\t");
|
LogMessageVerb(X_DEFAULT, 0, "default setting,\n\t");
|
||||||
|
|
|
@ -0,0 +1,92 @@
|
||||||
|
/* SPDX-License-Identifier: MIT OR X11
|
||||||
|
*
|
||||||
|
* Copyright © 2024 Enrico Weigelt, metux IT consult <info@metux.net>
|
||||||
|
*/
|
||||||
|
#ifndef __XORG_OS_LOGGING_H
|
||||||
|
#define __XORG_OS_LOGGING_H
|
||||||
|
|
||||||
|
#include "include/os.h"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief initialize logging and open log files
|
||||||
|
*
|
||||||
|
* Make backup of existing log file, create a new one and open it for logging.
|
||||||
|
*
|
||||||
|
* - May be called with NULL or "", if no logging is desired.
|
||||||
|
*
|
||||||
|
* - Must always be called, otherwise log messages will fill up the buffer and
|
||||||
|
* let it grow infinitely.
|
||||||
|
*
|
||||||
|
* - if "%s" is present in fname, it will be replaced with the display string or pid
|
||||||
|
*
|
||||||
|
* @param fname log file name template. if NULL, dont write any log.
|
||||||
|
* @param backup name for the old logfile.
|
||||||
|
* @return new log file name
|
||||||
|
*/
|
||||||
|
const char* LogInit(const char *fname, const char *backup);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief rename the current log file according display name
|
||||||
|
*
|
||||||
|
* Renames the current log file with per display prefix (e.g. "Xorg.log.0")
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
void LogSetDisplay(void);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief log exit code, then flush and close log file and write
|
||||||
|
*
|
||||||
|
* Logs the exit code (and success/error state), then flush and close log file.
|
||||||
|
*/
|
||||||
|
void LogClose(enum ExitCode error);
|
||||||
|
|
||||||
|
#ifdef DEBUG
|
||||||
|
/**
|
||||||
|
* @brief log debug messages (like errors) if symbol DEBUG is defined
|
||||||
|
*/
|
||||||
|
#define DebugF ErrorF
|
||||||
|
#else
|
||||||
|
#define DebugF(...) /* */
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief console log verbosity (stderr)
|
||||||
|
*
|
||||||
|
* The verbosity level of logging to console. All messages with verbosity
|
||||||
|
* level below this one will be written to stderr
|
||||||
|
*/
|
||||||
|
extern int xorgLogVerbosity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief log file verbosity
|
||||||
|
*
|
||||||
|
* The verbosity level of logging to per-display file. All messages with
|
||||||
|
* verbosity level below this one will be written to the log file.
|
||||||
|
*/
|
||||||
|
extern int xorgLogFileVerbosity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief force fsync() on each log write
|
||||||
|
*
|
||||||
|
* If set to TRUE, force fsync() on each log write.
|
||||||
|
*/
|
||||||
|
extern Bool xorgLogSync;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief syslog verbosity
|
||||||
|
*
|
||||||
|
* The verbosity level of logging to syslog. All messages with
|
||||||
|
* verbosity level below this one will be sent to local syslog daemon.
|
||||||
|
*/
|
||||||
|
extern int xorgSyslogVerbosity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief syslog identifier
|
||||||
|
*
|
||||||
|
* The identifier prefix used for syslog logging.
|
||||||
|
* Per default will be filled with basename(argv[0]). DDX'es can override
|
||||||
|
* this before calling LogInit()
|
||||||
|
*/
|
||||||
|
extern const char *xorgSyslogIdent;
|
||||||
|
|
||||||
|
#endif /* __XORG_OS_LOGGING_H */
|
|
@ -5,6 +5,7 @@ srcs_os = [
|
||||||
'auth.c',
|
'auth.c',
|
||||||
'backtrace.c',
|
'backtrace.c',
|
||||||
'client.c',
|
'client.c',
|
||||||
|
'cmdline.c',
|
||||||
'connection.c',
|
'connection.c',
|
||||||
'fmt.c',
|
'fmt.c',
|
||||||
'inputthread.c',
|
'inputthread.c',
|
||||||
|
@ -22,6 +23,8 @@ srcs_os = [
|
||||||
'log.c',
|
'log.c',
|
||||||
]
|
]
|
||||||
|
|
||||||
|
conf_data.set('CONFIG_SYSLOG', cc.has_header('syslog.h') ? '1' : false)
|
||||||
|
|
||||||
# Wrapper code for missing C library functions. Note that conf_data contains either '1' or false.
|
# Wrapper code for missing C library functions. Note that conf_data contains either '1' or false.
|
||||||
srcs_libc = []
|
srcs_libc = []
|
||||||
if conf_data.get('HAVE_REALLOCARRAY').to_int() == 0
|
if conf_data.get('HAVE_REALLOCARRAY').to_int() == 0
|
||||||
|
|
|
@ -189,6 +189,7 @@ void OsBlockSignals(void);
|
||||||
void OsReleaseSignals(void);
|
void OsReleaseSignals(void);
|
||||||
void OsResetSignals(void);
|
void OsResetSignals(void);
|
||||||
void OsAbort(void) _X_NORETURN;
|
void OsAbort(void) _X_NORETURN;
|
||||||
|
void AbortServer(void) _X_NORETURN;
|
||||||
|
|
||||||
void MakeClientGrabPervious(ClientPtr client);
|
void MakeClientGrabPervious(ClientPtr client);
|
||||||
void MakeClientGrabImpervious(ClientPtr client);
|
void MakeClientGrabImpervious(ClientPtr client);
|
||||||
|
|
|
@ -62,6 +62,7 @@ SOFTWARE.
|
||||||
|
|
||||||
#include "dix/dix_priv.h"
|
#include "dix/dix_priv.h"
|
||||||
#include "os/busfault.h"
|
#include "os/busfault.h"
|
||||||
|
#include "os/log_priv.h"
|
||||||
#include "os/osdep.h"
|
#include "os/osdep.h"
|
||||||
#include "os/serverlock.h"
|
#include "os/serverlock.h"
|
||||||
|
|
||||||
|
|
29
os/utils.c
29
os/utils.c
|
@ -79,7 +79,7 @@ __stdcall unsigned long GetTickCount(void);
|
||||||
#define TRANS_REOPEN
|
#define TRANS_REOPEN
|
||||||
#include <X11/Xtrans/Xtrans.h>
|
#include <X11/Xtrans/Xtrans.h>
|
||||||
|
|
||||||
#include "os/audit.h"
|
#include <libgen.h>
|
||||||
|
|
||||||
#include "input.h"
|
#include "input.h"
|
||||||
#include "dixfont.h"
|
#include "dixfont.h"
|
||||||
|
@ -107,9 +107,11 @@ __stdcall unsigned long GetTickCount(void);
|
||||||
|
|
||||||
#include "dix/dix_priv.h"
|
#include "dix/dix_priv.h"
|
||||||
#include "dix/input_priv.h"
|
#include "dix/input_priv.h"
|
||||||
|
#include "os/audit.h"
|
||||||
#include "os/auth.h"
|
#include "os/auth.h"
|
||||||
#include "os/cmdline.h"
|
#include "os/cmdline.h"
|
||||||
#include "os/ddx_priv.h"
|
#include "os/ddx_priv.h"
|
||||||
|
#include "os/log_priv.h"
|
||||||
#include "os/osdep.h"
|
#include "os/osdep.h"
|
||||||
#include "os/serverlock.h"
|
#include "os/serverlock.h"
|
||||||
|
|
||||||
|
@ -498,6 +500,12 @@ ProcessCommandLine(int argc, char *argv[])
|
||||||
}
|
}
|
||||||
SeatId = getenv("XDG_SEAT");
|
SeatId = getenv("XDG_SEAT");
|
||||||
|
|
||||||
|
#ifdef CONFIG_SYSLOG
|
||||||
|
xorgSyslogIdent = getenv("SYSLOG_IDENT");
|
||||||
|
if (!xorgSyslogIdent)
|
||||||
|
xorgSyslogIdent = strdup(basename(argv[0]));
|
||||||
|
#endif
|
||||||
|
|
||||||
for (i = 1; i < argc; i++) {
|
for (i = 1; i < argc; i++) {
|
||||||
/* call ddx first, so it can peek/override if it wants */
|
/* call ddx first, so it can peek/override if it wants */
|
||||||
if ((skip = ddxProcessArgument(argc, argv, i))) {
|
if ((skip = ddxProcessArgument(argc, argv, i))) {
|
||||||
|
@ -867,6 +875,9 @@ ProcessCommandLine(int argc, char *argv[])
|
||||||
else
|
else
|
||||||
UseMsg();
|
UseMsg();
|
||||||
}
|
}
|
||||||
|
#ifdef CONFIG_SYSLOG
|
||||||
|
else if (ProcessCmdLineMultiInt(argc, argv, &i, "-syslogverbose", &xorgSyslogVerbosity));
|
||||||
|
#endif
|
||||||
else {
|
else {
|
||||||
ErrorF("Unrecognized option: %s\n", argv[i]);
|
ErrorF("Unrecognized option: %s\n", argv[i]);
|
||||||
UseMsg();
|
UseMsg();
|
||||||
|
@ -1602,3 +1613,19 @@ os_move_fd(int fd)
|
||||||
return newfd;
|
return newfd;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
void
|
||||||
|
AbortServer(void)
|
||||||
|
{
|
||||||
|
#ifdef XF86BIGFONT
|
||||||
|
XF86BigfontCleanup();
|
||||||
|
#endif
|
||||||
|
CloseWellKnownConnections();
|
||||||
|
OsCleanup(TRUE);
|
||||||
|
AbortDevices();
|
||||||
|
ddxGiveUp(EXIT_ERR_ABORT);
|
||||||
|
fflush(stderr);
|
||||||
|
if (CoreDump)
|
||||||
|
OsAbort();
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
|
@ -32,6 +32,7 @@
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
#include "os/fmt.h"
|
#include "os/fmt.h"
|
||||||
|
#include "os/log_priv.h"
|
||||||
|
|
||||||
#include "assert.h"
|
#include "assert.h"
|
||||||
#include "misc.h"
|
#include "misc.h"
|
||||||
|
@ -151,7 +152,7 @@ number_formatting(void)
|
||||||
-0x7FFFFFFFFFFFFFFF, /* Maximum 64-bit signed number */
|
-0x7FFFFFFFFFFFFFFF, /* Maximum 64-bit signed number */
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
LogSetParameter(XLOG_VERBOSITY, -1);
|
xorgLogVerbosity = -1;
|
||||||
|
|
||||||
for (i = 0; i < ARRAY_SIZE(unsigned_tests); i++)
|
for (i = 0; i < ARRAY_SIZE(unsigned_tests); i++)
|
||||||
assert(check_number_format_test(unsigned_tests[i]));
|
assert(check_number_format_test(unsigned_tests[i]));
|
||||||
|
@ -183,7 +184,7 @@ static void logging_format(void)
|
||||||
uintptr_t ptr;
|
uintptr_t ptr;
|
||||||
char *fname = NULL;
|
char *fname = NULL;
|
||||||
|
|
||||||
LogSetParameter(XLOG_VERBOSITY, -1);
|
xorgLogVerbosity = -1;
|
||||||
|
|
||||||
/* set up buf to contain ".....end" */
|
/* set up buf to contain ".....end" */
|
||||||
memset(buf, '.', sizeof(buf));
|
memset(buf, '.', sizeof(buf));
|
||||||
|
|
|
@ -31,9 +31,12 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <X11/X.h>
|
#include <X11/X.h>
|
||||||
#include <X11/Xproto.h>
|
#include <X11/Xproto.h>
|
||||||
|
#include <X11/keysym.h>
|
||||||
|
|
||||||
|
#include "os/log_priv.h"
|
||||||
|
|
||||||
#include "misc.h"
|
#include "misc.h"
|
||||||
#include "inputstr.h"
|
#include "inputstr.h"
|
||||||
#include <X11/keysym.h>
|
|
||||||
#include <xkbsrv.h>
|
#include <xkbsrv.h>
|
||||||
|
|
||||||
/***====================================================================***/
|
/***====================================================================***/
|
||||||
|
|
|
@ -41,6 +41,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
#include <X11/extensions/XKM.h>
|
#include <X11/extensions/XKM.h>
|
||||||
|
|
||||||
#include "dix/dix_priv.h"
|
#include "dix/dix_priv.h"
|
||||||
|
#include "os/log_priv.h"
|
||||||
#include "os/osdep.h"
|
#include "os/osdep.h"
|
||||||
|
|
||||||
#include "inputstr.h"
|
#include "inputstr.h"
|
||||||
|
|
|
@ -42,6 +42,9 @@
|
||||||
#include <X11/Xfuncs.h>
|
#include <X11/Xfuncs.h>
|
||||||
#include <X11/Xatom.h>
|
#include <X11/Xatom.h>
|
||||||
#include <X11/keysym.h>
|
#include <X11/keysym.h>
|
||||||
|
|
||||||
|
#include "os/log_priv.h"
|
||||||
|
|
||||||
#include "misc.h"
|
#include "misc.h"
|
||||||
#include "inputstr.h"
|
#include "inputstr.h"
|
||||||
#include "dix.h"
|
#include "dix.h"
|
||||||
|
|
|
@ -39,6 +39,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
#include <X11/extensions/XIproto.h>
|
#include <X11/extensions/XIproto.h>
|
||||||
|
|
||||||
#include "dix/input_priv.h"
|
#include "dix/input_priv.h"
|
||||||
|
#include "os/log_priv.h"
|
||||||
#include "xkb/xkbsrv_priv.h"
|
#include "xkb/xkbsrv_priv.h"
|
||||||
|
|
||||||
#include "exglobals.h"
|
#include "exglobals.h"
|
||||||
|
|
|
@ -36,6 +36,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
#include <X11/extensions/XIproto.h>
|
#include <X11/extensions/XIproto.h>
|
||||||
|
|
||||||
#include "dix/exevents_priv.h"
|
#include "dix/exevents_priv.h"
|
||||||
|
#include "os/log_priv.h"
|
||||||
|
|
||||||
#include "inputstr.h"
|
#include "inputstr.h"
|
||||||
#include "exglobals.h"
|
#include "exglobals.h"
|
||||||
|
|
|
@ -42,6 +42,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
#include <X11/extensions/XKMformat.h>
|
#include <X11/extensions/XKMformat.h>
|
||||||
|
|
||||||
#include "os/cmdline.h"
|
#include "os/cmdline.h"
|
||||||
|
#include "os/log_priv.h"
|
||||||
#include "xkb/xkbsrv_priv.h"
|
#include "xkb/xkbsrv_priv.h"
|
||||||
|
|
||||||
#include "misc.h"
|
#include "misc.h"
|
||||||
|
|
|
@ -36,6 +36,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
#include <X11/keysym.h>
|
#include <X11/keysym.h>
|
||||||
|
|
||||||
#include "dix/input_priv.h"
|
#include "dix/input_priv.h"
|
||||||
|
#include "os/log_priv.h"
|
||||||
#include "xkb/xkbsrv_priv.h"
|
#include "xkb/xkbsrv_priv.h"
|
||||||
|
|
||||||
#include "misc.h"
|
#include "misc.h"
|
||||||
|
|
|
@ -60,6 +60,7 @@ DEALINGS IN THE SOFTWARE.
|
||||||
#define XK_CYRILLIC
|
#define XK_CYRILLIC
|
||||||
#include <X11/keysym.h>
|
#include <X11/keysym.h>
|
||||||
|
|
||||||
|
#include "os/log_priv.h"
|
||||||
#include "xkb/xkbsrv_priv.h"
|
#include "xkb/xkbsrv_priv.h"
|
||||||
|
|
||||||
#include "os.h"
|
#include "os.h"
|
||||||
|
|
|
@ -32,11 +32,13 @@
|
||||||
|
|
||||||
#include <X11/Xos.h>
|
#include <X11/Xos.h>
|
||||||
#include <X11/Xfuncs.h>
|
#include <X11/Xfuncs.h>
|
||||||
|
|
||||||
#include <X11/X.h>
|
#include <X11/X.h>
|
||||||
#include <X11/Xproto.h>
|
#include <X11/Xproto.h>
|
||||||
#include <X11/keysym.h>
|
#include <X11/keysym.h>
|
||||||
#include <X11/extensions/XKMformat.h>
|
#include <X11/extensions/XKMformat.h>
|
||||||
|
|
||||||
|
#include "os/log_priv.h"
|
||||||
|
|
||||||
#include "misc.h"
|
#include "misc.h"
|
||||||
#include "inputstr.h"
|
#include "inputstr.h"
|
||||||
#include "xkbstr.h"
|
#include "xkbstr.h"
|
||||||
|
|
Loading…
Reference in New Issue