diff --git a/hw/xfree86/common/xf86AutoConfig.c b/hw/xfree86/common/xf86AutoConfig.c index c121b03ef..5bbf876d9 100644 --- a/hw/xfree86/common/xf86AutoConfig.c +++ b/hw/xfree86/common/xf86AutoConfig.c @@ -160,7 +160,7 @@ xf86AddMatchedDriver(XF86MatchedDrivers *md, const char *driver) md->nmatches++; } 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 */ } else { - xf86Msg(X_ERROR, "Couldn't allocate Config record.\n"); + LogMessageVerb(X_ERROR, 1, "Couldn't allocate Config record.\n"); return FALSE; } @@ -220,7 +220,7 @@ xf86AutoConfig(void) FreeConfig(); 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; } @@ -253,12 +253,12 @@ listPossibleVideoDrivers(XF86MatchedDrivers *md) } if (iret < 0) { - xf86Msg(X_WARNING, - "could not get frame buffer identifier from %s\n", - xf86SolarisFbDev); + LogMessageVerb(X_WARNING, 1, + "could not get frame buffer identifier from %s\n", + xf86SolarisFbDev); } 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 */ if (strcmp(visid.name, "NVDAnvda") == 0) { @@ -392,7 +392,7 @@ autoConfigDevice(GDevPtr preconf_device) /* get all possible video drivers and count them */ listPossibleVideoDrivers(&md); 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); } @@ -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; } diff --git a/hw/xfree86/common/xf86Bus.c b/hw/xfree86/common/xf86Bus.c index 6c3921717..b5bd7364e 100644 --- a/hw/xfree86/common/xf86Bus.c +++ b/hw/xfree86/common/xf86Bus.c @@ -99,7 +99,7 @@ xf86CallDriverProbe(DriverPtr drv, Bool detect_only) } #endif 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); foundScreen = (*drv->Probe) (drv, (detect_only) ? PROBE_DETECT : PROBE_DEFAULT); @@ -184,7 +184,7 @@ xf86BusConfig(void) /* If nothing was detected, return now */ if (xf86NumScreens == 0) { - xf86Msg(X_ERROR, "No devices detected.\n"); + LogMessageVerb(X_ERROR, 1, "No devices detected.\n"); return FALSE; } @@ -208,9 +208,9 @@ xf86BusConfig(void) xf86Screens[i]->confScreen = layout->screen; else { /* No match found */ - xf86Msg(X_ERROR, - "Screen %d deleted because of no matching config section.\n", - i); + LogMessageVerb(X_ERROR, 1, + "Screen %d deleted because of no matching config section.\n", + i); xf86DeleteScreen(xf86Screens[i--]); } } @@ -224,8 +224,8 @@ xf86BusConfig(void) /* If no screens left, return now. */ if (xf86NumScreens == 0) { - xf86Msg(X_ERROR, - "Device(s) detected, but none match those in the config file.\n"); + LogMessageVerb(X_ERROR, 1, + "Device(s) detected, but none match those in the config file.\n"); return FALSE; } diff --git a/hw/xfree86/common/xf86Config.c b/hw/xfree86/common/xf86Config.c index 8c32314a5..ba5ab72d5 100644 --- a/hw/xfree86/common/xf86Config.c +++ b/hw/xfree86/common/xf86Config.c @@ -196,8 +196,8 @@ xf86ValidateFontPath(char *path) if (!S_ISDIR(stat_buf.st_mode)) flag = -1; if (flag != 0) { - xf86Msg(X_WARNING, "The directory \"%s\" does not exist.\n", - dir_elem); + LogMessageVerb(X_WARNING, 1, "The directory \"%s\" does not exist.\n", + dir_elem); xf86ErrorF("\tEntry deleted from font path.\n"); free(dir_elem); continue; @@ -210,9 +210,9 @@ xf86ValidateFontPath(char *path) flag = -1; free(p1); if (flag != 0) { - xf86Msg(X_WARNING, - "`fonts.dir' not found (or not valid) in \"%s\".\n", - dir_elem); + LogMessageVerb(X_WARNING, 1, + "`fonts.dir' not found (or not valid) in \"%s\".\n", + dir_elem); xf86ErrorF("\tEntry deleted from font path.\n"); xf86ErrorF("\t(Run 'mkfontdir' on \"%s\").\n", dir_elem); free(dir_elem); @@ -270,7 +270,7 @@ xf86ModulelistFromConfig(void ***optlist) * ModulePath */ 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; } @@ -280,9 +280,9 @@ xf86ModulelistFromConfig(void ***optlist) */ modp = xf86configptr->conf_modules->mod_disable_lst; while (modp) { - xf86Msg(X_WARNING, - "\"%s\" will not be loaded unless you've specified it to be loaded elsewhere.\n", - modp->load_name); + LogMessageVerb(X_WARNING, 1, + "\"%s\" will not be loaded unless you've specified it to be loaded elsewhere.\n", + modp->load_name); modp = (XF86LoadPtr) modp->list.next; } /* @@ -293,18 +293,18 @@ xf86ModulelistFromConfig(void ***optlist) */ for (i = 0; ModuleDefaults[i].name != NULL; i++) { if (ModuleDefaults[i].toLoad == FALSE) { - xf86Msg(X_WARNING, - "\"%s\" is not to be loaded by default. Skipping.\n", - ModuleDefaults[i].name); + LogMessageVerb(X_WARNING, 1, + "\"%s\" is not to be loaded by default. Skipping.\n", + ModuleDefaults[i].name); continue; } found = FALSE; modp = xf86configptr->conf_modules->mod_load_lst; while (modp) { if (strcmp(modp->load_name, ModuleDefaults[i].name) == 0) { - xf86Msg(X_INFO, - "\"%s\" will be loaded. This was enabled by default and also specified in the config file.\n", - ModuleDefaults[i].name); + LogMessageVerb(X_INFO, 1, + "\"%s\" will be loaded. This was enabled by default and also specified in the config file.\n", + ModuleDefaults[i].name); found = TRUE; break; } @@ -314,9 +314,9 @@ xf86ModulelistFromConfig(void ***optlist) modp = xf86configptr->conf_modules->mod_disable_lst; while (modp) { if (strcmp(modp->load_name, ModuleDefaults[i].name) == 0) { - xf86Msg(X_INFO, - "\"%s\" will be loaded even though the default is to disable it.\n", - ModuleDefaults[i].name); + LogMessageVerb(X_INFO, 1, + "\"%s\" will be loaded even though the default is to disable it.\n", + ModuleDefaults[i].name); found = TRUE; break; } @@ -329,8 +329,8 @@ xf86ModulelistFromConfig(void ***optlist) xf86addNewLoadDirective(ptr, ModuleDefaults[i].name, XF86_LOAD_MODULE, ModuleDefaults[i].load_opt); - xf86Msg(X_INFO, "\"%s\" will be loaded by default.\n", - ModuleDefaults[i].name); + LogMessageVerb(X_INFO, 1, "\"%s\" will be loaded by default.\n", + ModuleDefaults[i].name); } } } @@ -402,7 +402,7 @@ xf86DriverlistFromConfig(void) * ModulePath */ 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; } @@ -479,7 +479,7 @@ xf86InputDriverlistFromConfig(void) * ModulePath */ 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; } @@ -583,7 +583,7 @@ configFiles(XF86ConfFilesPtr fileconf) /* copy last entry */ *(temp_path++) = '\t'; 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); /* ModulePath */ @@ -595,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) { XkbBaseDirectory = fileconf->file_xkbdir; - xf86Msg(X_CONFIG, "XKB base directory set to \"%s\"\n", - XkbBaseDirectory); + LogMessageVerb(X_CONFIG, 1, "XKB base directory set to \"%s\"\n", + XkbBaseDirectory); } #if 0 /* LogFile */ @@ -750,12 +750,12 @@ configServerFlags(XF86ConfFlagsPtr flagsconf, XF86OptionPtr layoutopts) xf86GetOptValBool(FlagOptions, FLAG_IGNORE_ABI, &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); 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)) { @@ -766,8 +766,8 @@ configServerFlags(XF86ConfFlagsPtr flagsconf, XF86OptionPtr layoutopts) else { from = X_DEFAULT; } - xf86Msg(from, "%sutomatically adding devices\n", - xf86Info.autoAddDevices ? "A" : "Not a"); + LogMessageVerb(from, 1, "%sutomatically adding devices\n", + xf86Info.autoAddDevices ? "A" : "Not a"); if (xf86IsOptionSet(FlagOptions, FLAG_AUTO_ENABLE_DEVICES)) { xf86GetOptValBool(FlagOptions, FLAG_AUTO_ENABLE_DEVICES, @@ -777,8 +777,8 @@ configServerFlags(XF86ConfFlagsPtr flagsconf, XF86OptionPtr layoutopts) else { from = X_DEFAULT; } - xf86Msg(from, "%sutomatically enabling devices\n", - xf86Info.autoEnableDevices ? "A" : "Not a"); + LogMessageVerb(from, 1, "%sutomatically enabling devices\n", + xf86Info.autoEnableDevices ? "A" : "Not a"); if (xf86IsOptionSet(FlagOptions, FLAG_AUTO_ADD_GPU)) { xf86GetOptValBool(FlagOptions, FLAG_AUTO_ADD_GPU, @@ -788,8 +788,8 @@ configServerFlags(XF86ConfFlagsPtr flagsconf, XF86OptionPtr layoutopts) else { from = X_DEFAULT; } - xf86Msg(from, "%sutomatically adding GPU devices\n", - xf86Info.autoAddGPU ? "A" : "Not a"); + LogMessageVerb(from, 1, "%sutomatically adding GPU devices\n", + xf86Info.autoAddGPU ? "A" : "Not a"); if (xf86AutoBindGPUDisabled) { xf86Info.autoBindGPU = FALSE; @@ -803,8 +803,8 @@ configServerFlags(XF86ConfFlagsPtr flagsconf, XF86OptionPtr layoutopts) else { from = X_DEFAULT; } - xf86Msg(from, "%sutomatically binding GPU devices\n", - xf86Info.autoBindGPU ? "A" : "Not a"); + LogMessageVerb(from, 1, "%sutomatically binding GPU devices\n", + xf86Info.autoBindGPU ? "A" : "Not a"); /* * Set things up based on the config file information. Some of these @@ -827,16 +827,16 @@ configServerFlags(XF86ConfFlagsPtr flagsconf, XF86OptionPtr layoutopts) { if ((s = xf86GetOptValString(FlagOptions, FLAG_LOG))) { if (!xf86NameCmp(s, "flush")) { - xf86Msg(X_CONFIG, "Flushing logfile enabled\n"); + LogMessageVerb(X_CONFIG, 1, "Flushing logfile enabled\n"); LogSetParameter(XLOG_FLUSH, TRUE); } else if (!xf86NameCmp(s, "sync")) { - xf86Msg(X_CONFIG, "Syncing logfile enabled\n"); + LogMessageVerb(X_CONFIG, 1, "Syncing logfile enabled\n"); LogSetParameter(XLOG_FLUSH, TRUE); LogSetParameter(XLOG_SYNC, TRUE); } else { - xf86Msg(X_WARNING, "Unknown Log option\n"); + LogMessageVerb(X_WARNING, 1, "Unknown Log option\n"); } } } @@ -846,9 +846,9 @@ configServerFlags(XF86ConfFlagsPtr flagsconf, XF86OptionPtr layoutopts) int policy = PictureParseCmapPolicy(s); if (policy == PictureCmapPolicyInvalid) - xf86Msg(X_WARNING, "Unknown colormap policy \"%s\"\n", s); + LogMessageVerb(X_WARNING, 1, "Unknown colormap policy \"%s\"\n", s); 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; } } @@ -868,7 +868,7 @@ configServerFlags(XF86ConfFlagsPtr flagsconf, XF86OptionPtr layoutopts) xf86Info.glxVisuals = XF86_GlxVisualsAll; } else { - xf86Msg(X_WARNING, "Unknown GlxVisuals option\n"); + LogMessageVerb(X_WARNING, 1, "Unknown GlxVisuals option\n"); } } @@ -949,7 +949,7 @@ configServerFlags(XF86ConfFlagsPtr flagsconf, XF86OptionPtr layoutopts) from = X_CONFIG; } if (!noPanoramiXExtension) - xf86Msg(from, "Xinerama: enabled\n"); + LogMessageVerb(from, 1, "Xinerama: enabled\n"); #endif /* XINERAMA */ #ifdef DRI2 @@ -973,7 +973,7 @@ configServerFlags(XF86ConfFlagsPtr flagsconf, XF86OptionPtr layoutopts) 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); } @@ -1082,7 +1082,7 @@ checkCoreInputDevices(serverLayoutPtr servlayoutp, Bool implicitLayout) confInput = xf86findInput(xf86PointerName, xf86configptr->conf_input_lst); if (!confInput) { - xf86Msg(X_ERROR, "No InputDevice section called \"%s\"\n", + LogMessageVerb(X_ERROR, 1, "No InputDevice section called \"%s\"\n", xf86PointerName); return FALSE; } @@ -1169,7 +1169,7 @@ checkCoreInputDevices(serverLayoutPtr servlayoutp, Bool implicitLayout) if (!foundPointer && xf86Info.forceInputDevices) { /* 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); return FALSE; } @@ -1181,7 +1181,7 @@ checkCoreInputDevices(serverLayoutPtr servlayoutp, Bool implicitLayout) confInput = xf86findInput(xf86KeyboardName, xf86configptr->conf_input_lst); if (!confInput) { - xf86Msg(X_ERROR, "No InputDevice section called \"%s\"\n", + LogMessageVerb(X_ERROR, 1, "No InputDevice section called \"%s\"\n", xf86KeyboardName); return FALSE; } @@ -1265,27 +1265,27 @@ checkCoreInputDevices(serverLayoutPtr servlayoutp, Bool implicitLayout) if (!foundKeyboard && xf86Info.forceInputDevices) { /* 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); return FALSE; } if (pointerMsg) { if (implicitLayout) - xf86Msg(X_DEFAULT, "No Layout section. Using the %s.\n", + LogMessageVerb(X_DEFAULT, 1, "No Layout section. Using the %s.\n", pointerMsg); 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" "\tUsing the %s.\n", pointerMsg); } if (keyboardMsg) { if (implicitLayout) - xf86Msg(X_DEFAULT, "No Layout section. Using the %s.\n", + LogMessageVerb(X_DEFAULT, 1, "No Layout section. Using the %s.\n", keyboardMsg); 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" "\tUsing the %s.\n", keyboardMsg); } @@ -1301,15 +1301,15 @@ checkCoreInputDevices(serverLayoutPtr servlayoutp, Bool implicitLayout) #else config_backend = "wscons"; #endif - xf86Msg(X_INFO, "The server relies on %s to provide the list of " - "input devices.\n\tIf no devices become available, " - "reconfigure %s or disable AutoAddDevices.\n", - config_backend, config_backend); + LogMessageVerb(X_INFO, 1, "The server relies on %s to provide the list of " + "input devices.\n\tIf no devices become available, " + "reconfigure %s or disable AutoAddDevices.\n", + config_backend, config_backend); #else - xf86Msg(X_WARNING, "Hotplugging requested but the server was " - "compiled without a config backend. " - "No input devices were configured, the server " - "will start without any input devices.\n"); + LogMessageVerb(X_WARNING, 1, "Hotplugging requested but the server was " + "compiled without a config backend. " + "No input devices were configured, the server " + "will start without any input devices.\n"); #endif } @@ -1406,13 +1406,13 @@ configLayout(serverLayoutPtr servlayoutp, XF86ConfLayoutPtr conf_layout, } if (xf86LayoutName != NULL) { if ((l = xf86findLayout(xf86LayoutName, conf_layout)) == NULL) { - xf86Msg(X_ERROR, "No ServerLayout section called \"%s\"\n", - xf86LayoutName); + LogMessageVerb(X_ERROR, 1, "No ServerLayout section called \"%s\"\n", + xf86LayoutName); return FALSE; } 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; /* @@ -1532,8 +1532,8 @@ configLayout(serverLayoutPtr servlayoutp, XF86ConfLayoutPtr conf_layout, } if (slp[i].where != PosObsolete && slp[i].where != PosAbsolute && !slp[i].refscreen) { - xf86Msg(X_ERROR, "Screen %s doesn't exist: deleting placement\n", - slp[i].refname); + LogMessageVerb(X_ERROR, 1, "Screen %s doesn't exist: deleting placement\n", + slp[i].refname); slp[i].where = PosAbsolute; slp[i].x = 0; slp[i].y = 0; @@ -1613,8 +1613,8 @@ configImpliedLayout(serverLayoutPtr servlayoutp, XF86ConfScreenPtr conf_screen, from = X_CONFIG; if (xf86ScreenName != NULL) { if ((s = xf86findScreen(xf86ScreenName, conf_screen)) == NULL) { - xf86Msg(X_ERROR, "No Screen section called \"%s\"\n", - xf86ScreenName); + LogMessageVerb(X_ERROR, 1, "No Screen section called \"%s\"\n", + xf86ScreenName); return FALSE; } conf_screen = s; @@ -1658,12 +1658,12 @@ configXvAdaptor(confXvAdaptorPtr adaptor, XF86ConfVideoAdaptorPtr conf_adaptor) int count = 0; XF86ConfVideoPortPtr conf_port; - xf86Msg(X_CONFIG, "| |-->VideoAdaptor \"%s\"\n", - conf_adaptor->va_identifier); + LogMessageVerb(X_CONFIG, 1, "| |-->VideoAdaptor \"%s\"\n", + conf_adaptor->va_identifier); adaptor->identifier = conf_adaptor->va_identifier; adaptor->options = conf_adaptor->va_option_lst; 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; } @@ -1704,11 +1704,11 @@ configScreen(confScreenPtr screenp, XF86ConfScreenPtr conf_screen, int scrnum, memset(&local_conf_screen, 0, sizeof(local_conf_screen)); conf_screen = &local_conf_screen; 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, - scrnum); + LogMessageVerb(from, 1, "|-->Screen \"%s\" (%d)\n", conf_screen->scrn_identifier, + scrnum); /* * now we fill in the elements of the screen */ @@ -1738,8 +1738,8 @@ configScreen(confScreenPtr screenp, XF86ConfScreenPtr conf_screen, int scrnum, screenp->device = XNFcallocarray(1, sizeof(GDevRec)); if ((!conf_screen->scrn_device) && (xf86configptr->conf_device_lst)) { FIND_SUITABLE (XF86ConfDevicePtr, xf86configptr->conf_device_lst, conf_screen->scrn_device); - xf86Msg(X_DEFAULT, "No device specified for screen \"%s\".\n" - "\tUsing the first device section listed.\n", screenp->id); + LogMessageVerb(X_DEFAULT, 1, "No device specified for screen \"%s\".\n" + "\tUsing the first device section listed.\n", screenp->id); } if (configDevice(screenp->device, conf_screen->scrn_device, TRUE, FALSE)) { screenp->device->myScreenSection = screenp; @@ -1846,8 +1846,8 @@ configScreen(confScreenPtr screenp, XF86ConfScreenPtr conf_screen, int scrnum, } if (defaultMonitor) { - xf86Msg(X_DEFAULT, "No monitor specified for screen \"%s\".\n" - "\tUsing a default monitor configuration.\n", screenp->id); + LogMessageVerb(X_DEFAULT, 1, "No monitor specified for screen \"%s\".\n" + "\tUsing a default monitor configuration.\n", screenp->id); } return TRUE; } @@ -1878,7 +1878,7 @@ configMonitor(MonPtr monitorp, XF86ConfMonitorPtr conf_monitor) float badgamma = 0.0; 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->vendor = conf_monitor->mon_vendor; monitorp->model = conf_monitor->mon_modelname; @@ -2098,14 +2098,14 @@ configDevice(GDevPtr devicep, XF86ConfDevicePtr conf_device, Bool active, Bool g if (active) { if (gpu) - xf86Msg(X_CONFIG, "| |-->GPUDevice \"%s\"\n", - conf_device->dev_identifier); + LogMessageVerb(X_CONFIG, 1, "| |-->GPUDevice \"%s\"\n", + conf_device->dev_identifier); else - xf86Msg(X_CONFIG, "| |-->Device \"%s\"\n", - conf_device->dev_identifier); + LogMessageVerb(X_CONFIG, 1, "| |-->Device \"%s\"\n", + conf_device->dev_identifier); } else - xf86Msg(X_CONFIG, "|-->Inactive Device \"%s\"\n", - conf_device->dev_identifier); + LogMessageVerb(X_CONFIG, 1, "|-->Inactive Device \"%s\"\n", + conf_device->dev_identifier); devicep->identifier = conf_device->dev_identifier; devicep->vendor = conf_device->dev_vendor; @@ -2199,17 +2199,17 @@ configExtensions(XF86ConfExtensionsPtr conf_ext) enable = !enable; } else { - xf86Msg(X_WARNING, "Ignoring unrecognized value \"%s\"\n", val); + LogMessageVerb(X_WARNING, 1, "Ignoring unrecognized value \"%s\"\n", val); free(n); continue; } 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"); } else { - xf86Msg(X_WARNING, "Ignoring unrecognized extension \"%s\"\n", + LogMessageVerb(X_WARNING, 1, "Ignoring unrecognized extension \"%s\"\n", name); } free(n); @@ -2220,7 +2220,7 @@ configExtensions(XF86ConfExtensionsPtr conf_ext) static Bool 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->driver = conf_input->inp_driver; inputp->options = conf_input->inp_option_lst; @@ -2286,12 +2286,12 @@ checkInput(serverLayoutPtr layout, Bool implicit_layout) InputInfoPtr *current; 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"); warned = TRUE; } - xf86Msg(X_WARNING, "Disabling %s\n", (*dev)->name); + LogMessageVerb(X_WARNING, 1, "Disabling %s\n", (*dev)->name); current = dev; free(*dev); @@ -2352,7 +2352,7 @@ xf86HandleConfigFile(Bool autoconfig) } else { 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); } if (dirname) { @@ -2362,9 +2362,9 @@ xf86HandleConfigFile(Bool autoconfig) } else { if (xf86ConfigDir) - xf86Msg(X_ERROR, - "Unable to locate/open config directory: \"%s\"\n", - xf86ConfigDir); + LogMessageVerb(X_ERROR, 1, + "Unable to locate/open config directory: \"%s\"\n", + xf86ConfigDir); } if (sysdirname) LogMessageVerb(X_DEFAULT, 0, "Using system config directory \"%s\"\n", @@ -2378,7 +2378,7 @@ xf86HandleConfigFile(Bool autoconfig) } 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; } xf86closeConfigFile(); @@ -2400,14 +2400,14 @@ xf86HandleConfigFile(Bool autoconfig) XF86ConfScreenPtr screen; if (xf86ScreenName == NULL) { - xf86Msg(X_DEFAULT, - "No Layout section. Using the first Screen section.\n"); + LogMessageVerb(X_DEFAULT, 1, + "No Layout section. Using the first Screen section.\n"); } FIND_SUITABLE (XF86ConfScreenPtr, xf86configptr->conf_screen_lst, screen); if (!configImpliedLayout(&xf86ConfigLayout, screen, 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; } implicit_layout = TRUE; @@ -2421,13 +2421,13 @@ xf86HandleConfigFile(Bool autoconfig) dfltlayout = xf86SetStrOption(optlist, "defaultserverlayout", NULL); 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; } } else { 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; } } @@ -2445,8 +2445,8 @@ xf86HandleConfigFile(Bool autoconfig) } if (scanptr) { if (strncmp(scanptr, "PCI:", 4) != 0) { - xf86Msg(X_WARNING, "Bus types other than PCI not yet isolable.\n" - "\tIgnoring IsolateDevice option.\n"); + LogMessageVerb(X_WARNING, 1, "Bus types other than PCI not yet isolable.\n" + "\tIgnoring IsolateDevice option.\n"); } else xf86PciIsolateDevice(scanptr); diff --git a/hw/xfree86/common/xf86Configure.c b/hw/xfree86/common/xf86Configure.c index 58b7e2707..33e244ccd 100644 --- a/hw/xfree86/common/xf86Configure.c +++ b/hw/xfree86/common/xf86Configure.c @@ -696,8 +696,8 @@ DoConfigure(void) home, addslash); if (xf86writeConfigFile(filename, xf86config) == 0) { - xf86Msg(X_ERROR, "Unable to write config file: \"%s\": %s\n", - filename, strerror(errno)); + LogMessageVerb(X_ERROR, 1, "Unable to write config file: \"%s\": %s\n", + filename, strerror(errno)); goto bail; } @@ -802,8 +802,8 @@ DoConfigure(void) } if (xf86writeConfigFile(filename, xf86config) == 0) { - xf86Msg(X_ERROR, "Unable to write config file: \"%s\": %s\n", - filename, strerror(errno)); + LogMessageVerb(X_ERROR, 1, "Unable to write config file: \"%s\": %s\n", + filename, strerror(errno)); goto bail; } diff --git a/hw/xfree86/common/xf86Cursor.c b/hw/xfree86/common/xf86Cursor.c index 8a3b5c778..025e175fa 100644 --- a/hw/xfree86/common/xf86Cursor.c +++ b/hw/xfree86/common/xf86Cursor.c @@ -588,9 +588,9 @@ xf86InitOrigins(void) if (screen->refscreen != NULL && screen->refscreen->screennum >= xf86NumScreens) { screensLeft &= ~(1 << i); - xf86Msg(X_WARNING, - "Not including screen \"%s\" in origins calculation.\n", - screen->screen->id); + LogMessageVerb(X_WARNING, 1, + "Not including screen \"%s\" in origins calculation.\n", + screen->screen->id); continue; } diff --git a/hw/xfree86/common/xf86Events.c b/hw/xfree86/common/xf86Events.c index 6d275267d..df22027f4 100644 --- a/hw/xfree86/common/xf86Events.c +++ b/hw/xfree86/common/xf86Events.c @@ -163,7 +163,7 @@ xf86ProcessActionEvent(ActionEvent action, void *arg) switch (action) { case ACTION_TERMINATE: if (!xf86Info.dontZap) { - xf86Msg(X_INFO, "Server zapped. Shutting down.\n"); + LogMessageVerb(X_INFO, 1, "Server zapped. Shutting down.\n"); GiveUp(0); } break; diff --git a/hw/xfree86/common/xf86Helper.c b/hw/xfree86/common/xf86Helper.c index 257760af2..cb4a60f87 100644 --- a/hw/xfree86/common/xf86Helper.c +++ b/hw/xfree86/common/xf86Helper.c @@ -638,7 +638,7 @@ void xf86PrintDepthBpp(ScrnInfoPtr scrp) { 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); } /* @@ -1244,7 +1244,7 @@ xf86PrintChipsets(const char *drvname, const char *drvmsg, SymTabPtr chips) int len, i; 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++) { if (i != 0) { xf86ErrorF(","); diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c index b54854db0..2f85c7941 100644 --- a/hw/xfree86/common/xf86Init.c +++ b/hw/xfree86/common/xf86Init.c @@ -319,7 +319,7 @@ InitOutput(ScreenInfo * pScreenInfo, int argc, char **argv) case CONFIG_OK: break; case CONFIG_PARSE_ERROR: - xf86Msg(X_ERROR, "Error parsing the config file\n"); + LogMessageVerb(X_ERROR, 1, "Error parsing the config file\n"); return; case CONFIG_NOFILE: autoconfig = TRUE; @@ -351,7 +351,7 @@ InitOutput(ScreenInfo * pScreenInfo, int argc, char **argv) if (autoconfig) { if (!xf86AutoConfig()) { - xf86Msg(X_ERROR, "Auto configuration failed\n"); + LogMessageVerb(X_ERROR, 1, "Auto configuration failed\n"); return; } } @@ -374,7 +374,7 @@ InitOutput(ScreenInfo * pScreenInfo, int argc, char **argv) configured_device = xf86ConfigLayout.screens->screen->device; if ((!configured_device) || (!configured_device->driver)) { if (!autoConfigDevice(configured_device)) { - xf86Msg(X_ERROR, "Automatic driver configuration failed\n"); + LogMessageVerb(X_ERROR, 1, "Automatic driver configuration failed\n"); return; } } @@ -404,7 +404,7 @@ InitOutput(ScreenInfo * pScreenInfo, int argc, char **argv) */ if (xf86NumDrivers == 0) { - xf86Msg(X_ERROR, "No drivers available.\n"); + LogMessageVerb(X_ERROR, 1, "No drivers available.\n"); return; } @@ -502,8 +502,8 @@ InitOutput(ScreenInfo * pScreenInfo, int argc, char **argv) */ if (xf86NumScreens == 0) { - xf86Msg(X_ERROR, - "Screen(s) found, but none have a usable configuration.\n"); + LogMessageVerb(X_ERROR, 1, + "Screen(s) found, but none have a usable configuration.\n"); return; } diff --git a/hw/xfree86/common/xf86VGAarbiter.c b/hw/xfree86/common/xf86VGAarbiter.c index 55487b48b..47c561b26 100644 --- a/hw/xfree86/common/xf86VGAarbiter.c +++ b/hw/xfree86/common/xf86VGAarbiter.c @@ -71,8 +71,8 @@ xf86VGAarbiterInit(void) { if (pci_device_vgaarb_init() != 0) { vga_no_arb = 1; - xf86Msg(X_WARNING, - "VGA arbiter: cannot open kernel arbiter, no multi-card support\n"); + LogMessageVerb(X_WARNING, 1, + "VGA arbiter: cannot open kernel arbiter, no multi-card support\n"); } } @@ -167,8 +167,9 @@ xf86VGAarbiterWrapFunctions(void) if (vga_count < 2 || !xf86Screens) return FALSE; - xf86Msg(X_INFO, "Found %d VGA devices: arbiter wrapping enabled\n", - vga_count); + LogMessageVerb(X_INFO, 1, + "Found %d VGA devices: arbiter wrapping enabled\n", + vga_count); for (i = 0; i < xf86NumScreens; i++) { pScreen = xf86Screens[i]->pScreen; diff --git a/hw/xfree86/common/xf86Xinput.c b/hw/xfree86/common/xf86Xinput.c index c2bf01968..5c7ea7c23 100644 --- a/hw/xfree86/common/xf86Xinput.c +++ b/hw/xfree86/common/xf86Xinput.c @@ -110,12 +110,12 @@ #include "xkbsrv.h" /* Valuator verification macro */ -#define XI_VERIFY_VALUATORS(num_valuators) \ - if (num_valuators > MAX_VALUATORS) { \ - xf86Msg(X_ERROR, "%s: num_valuator %d is greater than" \ - " MAX_VALUATORS\n", __FUNCTION__, num_valuators); \ - return; \ - } +#define XI_VERIFY_VALUATORS(num_valuators) \ + if (num_valuators > MAX_VALUATORS) { \ + LogMessageVerb(X_ERROR, 1, "%s: num_valuator %d is greater than MAX_VALUATORS\n", \ + __FUNCTION__, num_valuators); \ + return; \ + } static int xf86InputDevicePostInit(DeviceIntPtr dev); @@ -149,8 +149,8 @@ ProcessVelocityConfiguration(DeviceIntPtr pDev, const char *devname, void *list, /* common settings (available via device properties) */ tempf = xf86SetRealOption(list, "ConstantDeceleration", 1.0); if (tempf != 1.0) { - xf86Msg(X_CONFIG, "%s: (accel) constant deceleration by %.1f\n", - devname, tempf); + LogMessageVerb(X_CONFIG, 1, "%s: (accel) constant deceleration by %.1f\n", + devname, tempf); prop = XIGetKnownProperty(ACCEL_PROP_CONSTANT_DECELERATION); XIChangeDeviceProperty(pDev, prop, float_prop, 32, PropModeReplace, 1, &tempf, FALSE); @@ -158,8 +158,8 @@ ProcessVelocityConfiguration(DeviceIntPtr pDev, const char *devname, void *list, tempf = xf86SetRealOption(list, "AdaptiveDeceleration", 1.0); if (tempf > 1.0) { - xf86Msg(X_CONFIG, "%s: (accel) adaptive deceleration by %.1f\n", - devname, tempf); + LogMessageVerb(X_CONFIG, 1, "%s: (accel) adaptive deceleration by %.1f\n", + devname, tempf); prop = XIGetKnownProperty(ACCEL_PROP_ADAPTIVE_DECELERATION); XIChangeDeviceProperty(pDev, prop, float_prop, 32, PropModeReplace, 1, &tempf, FALSE); @@ -172,12 +172,11 @@ ProcessVelocityConfiguration(DeviceIntPtr pDev, const char *devname, void *list, prop = XIGetKnownProperty(ACCEL_PROP_PROFILE_NUMBER); if (XIChangeDeviceProperty(pDev, prop, XA_INTEGER, 32, PropModeReplace, 1, &tempi, FALSE) == Success) { - xf86Msg(X_CONFIG, "%s: (accel) acceleration profile %i\n", devname, - tempi); + LogMessageVerb(X_CONFIG, 1, "%s: (accel) acceleration profile %i\n", devname, tempi); } else { - xf86Msg(X_CONFIG, "%s: (accel) acceleration profile %i is unknown\n", - devname, tempi); + LogMessageVerb(X_CONFIG, 1, "%s: (accel) acceleration profile %i is unknown\n", + devname, tempi); } /* set scaling */ @@ -205,8 +204,8 @@ ProcessVelocityConfiguration(DeviceIntPtr pDev, const char *devname, void *list, tempf = xf86SetRealOption(list, "VelocityRelDiff", -1); if (tempf >= 0) { - xf86Msg(X_CONFIG, "%s: (accel) max rel. velocity difference: %.1f%%\n", - devname, tempf * 100.0); + LogMessageVerb(X_CONFIG, 1, "%s: (accel) max rel. velocity difference: %.1f%%\n", + devname, tempf * 100.0); s->max_rel_diff = tempf; } @@ -252,18 +251,18 @@ ApplyAccelerationSettings(DeviceIntPtr dev) } if (InitPointerAccelerationScheme(dev, scheme)) { - xf86Msg(X_CONFIG, "%s: (accel) selected scheme %s/%i\n", - pInfo->name, schemeStr, scheme); + LogMessageVerb(X_CONFIG, 1, "%s: (accel) selected scheme %s/%i\n", + pInfo->name, schemeStr, scheme); } else { - xf86Msg(X_CONFIG, "%s: (accel) could not init scheme %s\n", - pInfo->name, schemeStr); + LogMessageVerb(X_CONFIG, 1, "%s: (accel) could not init scheme %s\n", + pInfo->name, schemeStr); scheme = dev->valuator->accelScheme.number; } } else { - xf86Msg(X_CONFIG, "%s: (accel) keeping acceleration scheme %i\n", - pInfo->name, scheme); + LogMessageVerb(X_CONFIG, 1, "%s: (accel) keeping acceleration scheme %i\n", + pInfo->name, scheme); } free(schemeStr); @@ -292,11 +291,11 @@ ApplyAccelerationSettings(DeviceIntPtr dev) if (i >= 0) dev->ptrfeed->ctrl.threshold = i; - xf86Msg(X_CONFIG, "%s: (accel) acceleration factor: %.3f\n", - pInfo->name, ((float) dev->ptrfeed->ctrl.num) / - ((float) dev->ptrfeed->ctrl.den)); - xf86Msg(X_CONFIG, "%s: (accel) acceleration threshold: %i\n", - pInfo->name, dev->ptrfeed->ctrl.threshold); + LogMessageVerb(X_CONFIG, 1, "%s: (accel) acceleration factor: %.3f\n", + pInfo->name, ((float) dev->ptrfeed->ctrl.num) / + ((float) dev->ptrfeed->ctrl.den)); + LogMessageVerb(X_CONFIG, 1, "%s: (accel) acceleration threshold: %i\n", + pInfo->name, dev->ptrfeed->ctrl.threshold); } } @@ -319,9 +318,9 @@ ApplyTransformationMatrix(DeviceIntPtr dev) &matrix[2], &matrix[3], &matrix[4], &matrix[5], &matrix[6], &matrix[7], &matrix[8]); if (rc != 9) { - xf86Msg(X_ERROR, - "%s: invalid format for transformation matrix. Ignoring configuration.\n", - pInfo->name); + LogMessageVerb(X_ERROR,1, + "%s: invalid format for transformation matrix. Ignoring configuration.\n", + pInfo->name); return; } @@ -348,11 +347,11 @@ ApplyAutoRepeat(DeviceIntPtr dev) return; 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; } - 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_interval = 1000 / rate; } @@ -373,11 +372,11 @@ xf86ProcessCommonOptions(InputInfoPtr pInfo, XF86OptionPtr list) !xf86SetBoolOption(list, "SendCoreEvents", 1) || !xf86SetBoolOption(list, "CorePointer", 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 { 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); } } @@ -399,7 +398,7 @@ xf86ActivateDevice(InputInfoPtr pInfo) dev = AddInputDevice(serverClient, pInfo->device_control, TRUE); 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; return NULL; } @@ -416,9 +415,9 @@ xf86ActivateDevice(InputInfoPtr pInfo) dev->config_info = xf86SetStrOption(pInfo->options, "config_info", NULL); if (serverGeneration == 1) - xf86Msg(X_INFO, - "XINPUT: Adding extended input device \"%s\" (type: %s, id %d)\n", - pInfo->name, pInfo->type_name, dev->id); + LogMessageVerb(X_INFO, 1, + "XINPUT: Adding extended input device \"%s\" (type: %s, id %d)\n", + pInfo->name, pInfo->type_name, dev->id); return dev; } @@ -725,16 +724,16 @@ MergeInputClasses(const InputInfoPtr idev, const InputAttributes * attrs) free((void *) idev->driver); idev->driver = Xstrdup(cl->driver); if (!idev->driver) { - xf86Msg(X_ERROR, "Failed to allocate memory while merging " - "InputClass configuration"); + LogMessageVerb(X_ERROR, 1, "Failed to allocate memory while merging " + "InputClass configuration"); return BadAlloc; } classopts = xf86ReplaceStrOption(classopts, "driver", idev->driver); } /* Apply options to device with InputClass settings preferred. */ - xf86Msg(X_CONFIG, "%s: Applying InputClass \"%s\"\n", - idev->name, cl->identifier); + LogMessageVerb(X_CONFIG, 1, "%s: Applying InputClass \"%s\"\n", + idev->name, cl->identifier); idev->options = xf86optionListMerge(idev->options, classopts); } @@ -762,8 +761,8 @@ IgnoreInputClass(const InputInfoPtr idev, const InputAttributes * attrs) } if (ignore) - xf86Msg(X_CONFIG, "%s: Ignoring device from InputClass \"%s\"\n", - idev->name, ignore_class); + LogMessageVerb(X_CONFIG, 1, "%s: Ignoring device from InputClass \"%s\"\n", + idev->name, ignore_class); return ignore; } @@ -915,10 +914,10 @@ xf86NewInputDevice(InputInfoPtr pInfo, DeviceIntPtr *pdev, BOOL enable) drv = xf86LoadInputDriver(pInfo->driver); 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) { - xf86Msg(X_INFO, "Falling back to input driver `%s'\n", + LogMessageVerb(X_INFO, 1, "Falling back to input driver `%s'\n", FALLBACK_INPUT_DRIVER); drv = xf86LoadInputDriver(FALLBACK_INPUT_DRIVER); if (drv) { @@ -932,13 +931,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); if (!drv->PreInit) { - xf86Msg(X_ERROR, - "Input driver `%s' has no PreInit function (ignoring)\n", - drv->driverName); + LogMessageVerb(X_ERROR, 1, + "Input driver `%s' has no PreInit function (ignoring)\n", + drv->driverName); rval = BadImplementation; goto unwind; } @@ -976,7 +975,7 @@ xf86NewInputDevice(InputInfoPtr pInfo, DeviceIntPtr *pdev, BOOL enable) input_unlock(); 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; } @@ -987,14 +986,14 @@ xf86NewInputDevice(InputInfoPtr pInfo, DeviceIntPtr *pdev, BOOL enable) rval = ActivateDevice(dev, TRUE); 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); goto unwind; } rval = xf86InputDevicePostInit(dev); 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); goto unwind; } @@ -1004,7 +1003,7 @@ xf86NewInputDevice(InputInfoPtr pInfo, DeviceIntPtr *pdev, BOOL enable) input_lock(); EnableDevice(dev, TRUE); 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); rval = BadMatch; input_unlock(); @@ -1109,15 +1108,14 @@ NewInputDeviceRequest(InputOption *options, InputAttributes * attrs, } 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; goto unwind; } if (!pInfo->driver) { - xf86Msg(X_INFO, "No input driver specified, ignoring this device.\n"); - xf86Msg(X_INFO, - "This device may have been added with another device file.\n"); + LogMessageVerb(X_INFO, 1, "No input driver specified, ignoring this device.\n"); + LogMessageVerb(X_INFO, 1, "This device may have been added with another device file.\n"); rval = BadRequest; goto unwind; } @@ -1130,7 +1128,7 @@ NewInputDeviceRequest(InputOption *options, InputAttributes * attrs, unwind: 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); return rval; } diff --git a/hw/xfree86/common/xf86pciBus.c b/hw/xfree86/common/xf86pciBus.c index 8605c08b3..35fb8b0a9 100644 --- a/hw/xfree86/common/xf86pciBus.c +++ b/hw/xfree86/common/xf86pciBus.c @@ -133,8 +133,8 @@ xf86PciProbe(void) primaryBus.id.pci = info; } else { - xf86Msg(X_NOTICE, - "More than one possible primary device found\n"); + LogMessageVerb(X_NOTICE, 1, + "More than one possible primary device found\n"); primaryBus.type ^= (BusType) (-1); } } @@ -154,10 +154,10 @@ xf86PciProbe(void) if (xf86IsPrimaryPci(info)) prim = "*"; - xf86Msg(X_PROBED, "PCI:%s(%u@%u:%u:%u) %04x:%04x:%04x:%04x ", prim, - info->bus, info->domain, info->dev, info->func, - info->vendor_id, info->device_id, - info->subvendor_id, info->subdevice_id); + LogMessageVerb(X_PROBED, 1, "PCI:%s(%u@%u:%u:%u) %04x:%04x:%04x:%04x ", prim, + info->bus, info->domain, info->dev, info->func, + info->vendor_id, info->device_id, + info->subvendor_id, info->subdevice_id); xf86ErrorF("rev %d", info->revision); @@ -840,8 +840,7 @@ xf86MatchPciInstances(const char *driverName, int vendorID, * only assign to it to the primary device. */ if (xf86IsPrimaryPci(pPci)) { - xf86Msg(X_PROBED, "Assigning device section with no busID" - " to primary device\n"); + LogMessageVerb(X_PROBED, 1, "Assigning device section with no busID to primary device\n"); if (dev || devBus) LogMessageVerb(X_WARNING, 0, "%s: More than one matching Device section " @@ -901,8 +900,8 @@ xf86MatchPciInstances(const char *driverName, int vendorID, break; } if (id->numChipset >= 0) { - xf86Msg(X_CONFIG, "Chipset override: %s\n", - instances[i].dev->chipset); + LogMessageVerb(X_CONFIG, 1, "Chipset override: %s\n", + instances[i].dev->chipset); from = X_CONFIG; } else { @@ -930,9 +929,8 @@ xf86MatchPciInstances(const char *driverName, int vendorID, } else { instances[i].chip = id->numChipset; - - xf86Msg(X_CONFIG, "ChipID override: 0x%04X\n", - instances[i].dev->chipID); + LogMessageVerb(X_CONFIG, 1, "ChipID override: 0x%04X\n", + instances[i].dev->chipID); from = X_CONFIG; } } @@ -949,7 +947,7 @@ xf86MatchPciInstances(const char *driverName, int vendorID, if (c->token == instances[i].chip) break; } - xf86Msg(from, "Chipset %s found\n", c->name); + LogMessageVerb(from, 1, "Chipset %s found\n", c->name); } } @@ -1310,9 +1308,9 @@ xf86MatchDriverFromFiles(uint16_t match_vendor, uint16_t match_chip, if (!idsdir) return; - xf86Msg(X_INFO, - "Scanning %s directory for additional PCI ID's supported by the drivers\n", - PCI_TXT_IDS_PATH); + LogMessageVerb(X_INFO, 1, + "Scanning %s directory for additional PCI ID's supported by the drivers\n", + PCI_TXT_IDS_PATH); direntry = readdir(idsdir); /* Read the directory */ while (direntry) { @@ -1328,8 +1326,8 @@ xf86MatchDriverFromFiles(uint16_t match_vendor, uint16_t match_chip, PCI_TXT_IDS_PATH, direntry->d_name); fp = fopen(path_name, "r"); if (fp == NULL) { - xf86Msg(X_ERROR, "Could not open %s for reading. Exiting.\n", - path_name); + LogMessageVerb(X_ERROR, 1, "Could not open %s for reading. Exiting.\n", + path_name); goto end; } /* Read the file */ @@ -1363,8 +1361,8 @@ xf86MatchDriverFromFiles(uint16_t match_vendor, uint16_t match_chip, (char *) malloc(sizeof(char) * strlen(direntry->d_name) - 3); if (!tmpMatch) { - xf86Msg(X_ERROR, - "Could not allocate space for the module name. Exiting.\n"); + LogMessageVerb(X_ERROR, 1, + "Could not allocate space for the module name. Exiting.\n"); goto end; } /* hack off the .ids suffix. This should guard @@ -1380,8 +1378,8 @@ xf86MatchDriverFromFiles(uint16_t match_vendor, uint16_t match_chip, } } xf86AddMatchedDriver(md, tmpMatch); - xf86Msg(X_INFO, "Matched %s from file name %s\n", - tmpMatch, direntry->d_name); + LogMessageVerb(X_INFO, 1, "Matched %s from file name %s\n", + tmpMatch, direntry->d_name); free(tmpMatch); } } diff --git a/hw/xfree86/common/xf86platformBus.c b/hw/xfree86/common/xf86platformBus.c index 2962c8b21..dbae465fc 100644 --- a/hw/xfree86/common/xf86platformBus.c +++ b/hw/xfree86/common/xf86platformBus.c @@ -233,9 +233,9 @@ xf86OutputClassDriverList(int index, XF86MatchedDrivers *md) if (OutputClassMatches(cl, &xf86_platform_devices[index])) { char *path = xf86_platform_odev_attributes(index)->path; - xf86Msg(X_INFO, "Applying OutputClass \"%s\" to %s\n", - cl->identifier, path); - xf86Msg(X_NONE, "\tloading driver: %s\n", cl->driver); + LogMessageVerb(X_INFO, 1, "Applying OutputClass \"%s\" to %s\n", + cl->identifier, path); + LogMessageVerb(X_NONE, 1, "\tloading driver: %s\n", cl->driver); xf86AddMatchedDriver(md, cl->driver); } @@ -283,7 +283,7 @@ void xf86PlatformScanPciDev(void) if (!xf86scanpci()) 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++) { char *busid = xf86_platform_odev_attributes(i)->busid; @@ -327,8 +327,8 @@ xf86platformProbe(void) XNFasprintf(&path, "%s,%s", cl->modulepath, path ? path : xf86ModulePath); free(old_path); - xf86Msg(X_CONFIG, "OutputClass \"%s\" ModulePath extended to \"%s\"\n", - cl->identifier, path); + LogMessageVerb(X_CONFIG, 1, "OutputClass \"%s\" ModulePath extended to \"%s\"\n", + cl->identifier, path); LoaderSetPath(path); } } @@ -344,8 +344,8 @@ xf86platformProbe(void) continue; if (xf86CheckBoolOption(cl->option_lst, "PrimaryGPU", FALSE)) { - xf86Msg(X_CONFIG, "OutputClass \"%s\" setting %s as PrimaryGPU\n", - cl->identifier, dev->attribs->path); + LogMessageVerb(X_CONFIG, 1, "OutputClass \"%s\" setting %s as PrimaryGPU\n", + cl->identifier, dev->attribs->path); primaryBus.type = BUS_PLATFORM; primaryBus.id.plat = dev; return 0; @@ -395,8 +395,8 @@ xf86MergeOutputClassOptions(int entityIndex, void **options) } break; default: - xf86Msg(X_DEBUG, "xf86MergeOutputClassOptions unsupported bus type %d\n", - entity->bus.type); + LogMessageVerb(X_DEBUG, 1, "xf86MergeOutputClassOptions unsupported bus type %d\n", + entity->bus.type); } if (!dev) @@ -406,8 +406,8 @@ xf86MergeOutputClassOptions(int entityIndex, void **options) if (!OutputClassMatches(cl, dev) || !cl->option_lst) continue; - xf86Msg(X_INFO, "Applying OutputClass \"%s\" options to %s\n", - cl->identifier, dev->attribs->path); + LogMessageVerb(X_INFO, 1, "Applying OutputClass \"%s\" options to %s\n", + cl->identifier, dev->attribs->path); classopts = xf86optionListDup(cl->option_lst); *options = xf86optionListMerge(*options, classopts); @@ -653,8 +653,8 @@ xf86PlatformFindHotplugDriver(int dev_index) } /* Return the first driver from the match list */ - xf86Msg(X_INFO, "matching hotplug-driver is %s\n", - hp_driver ? hp_driver : "none"); + LogMessageVerb(X_INFO, 1, "matching hotplug-driver is %s\n", + hp_driver ? hp_driver : "none"); return hp_driver; } @@ -811,13 +811,13 @@ void xf86platformPrimary(void) { /* use the first platform device as a fallback */ 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) { primaryBus.id.plat = &xf86_platform_devices[0]; 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); } } } diff --git a/hw/xfree86/common/xf86sbusBus.c b/hw/xfree86/common/xf86sbusBus.c index 22483b28a..3beb17dfc 100644 --- a/hw/xfree86/common/xf86sbusBus.c +++ b/hw/xfree86/common/xf86sbusBus.c @@ -224,7 +224,7 @@ xf86SbusProbe(void) 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); if (promPath) { xf86ErrorF(" at %s", promPath); @@ -232,7 +232,7 @@ xf86SbusProbe(void) } } else - xf86Msg(X_PROBED, "SBUS: %s", psdp->descr); + LogMessageVerb(X_PROBED, 1, "SBUS: %s", psdp->descr); xf86ErrorF("\n"); } if (useProm) @@ -476,13 +476,13 @@ xf86MatchSbusInstances(const char *driverName, int sbusDevId, else { if (!dev && !devBus) { if (promPath) - xf86Msg(X_PROBED, - "Assigning device section with no busID to SBUS:%s\n", - promPath); + LogMessageVerb(X_PROBED, 1, + "Assigning device section with no busID to SBUS:%s\n", + promPath); else - xf86Msg(X_PROBED, - "Assigning device section with no busID to SBUS:fb%d\n", - psdp->fbNum); + LogMessageVerb(X_PROBED, 1, + "Assigning device section with no busID to SBUS:fb%d\n", + psdp->fbNum); dev = devList[j]; } else diff --git a/hw/xfree86/ddc/interpret_edid.c b/hw/xfree86/ddc/interpret_edid.c index 28d7497f1..75dba06fa 100644 --- a/hw/xfree86/ddc/interpret_edid.c +++ b/hw/xfree86/ddc/interpret_edid.c @@ -89,8 +89,8 @@ handle_edid_quirks(xf86MonPtr m) xf86ForEachDetailedBlock(m, find_max_detailed_clock, &clock); if (clock && (ranges->max_clock * 1e6 < clock)) { - xf86Msg(X_WARNING, "EDID timing clock %.2f exceeds claimed max " - "%dMHz, fixing\n", clock / 1.0e6, ranges->max_clock); + LogMessageVerb(X_WARNING, 1, "EDID timing clock %.2f exceeds claimed max " + "%dMHz, fixing\n", clock / 1.0e6, ranges->max_clock); ranges->max_clock = (clock + 999999) / 1e6; } } @@ -159,8 +159,8 @@ encode_aspect_ratio(xf86MonPtr m) m->features.vsize = (p.real_vsize + 5) / 10; } - xf86Msg(X_INFO, "Quirked EDID physical size to %dx%d cm\n", - m->features.hsize, m->features.vsize); + LogMessageVerb(X_INFO, 1, "Quirked EDID physical size to %dx%d cm\n", + m->features.hsize, m->features.vsize); } }