xfree86: spam output but with verbose level checked instead
Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Acked-by: Rami Ylimaki <ext-rami.ylimaki@nokia.com> Signed-off-by: Keith Packard <keithp@keithp.com>
This commit is contained in:
parent
77221c9155
commit
f57240a0a8
|
@ -133,7 +133,7 @@ static void
|
||||||
xf86PrintBanner(void)
|
xf86PrintBanner(void)
|
||||||
{
|
{
|
||||||
#if PRE_RELEASE
|
#if PRE_RELEASE
|
||||||
ErrorF("\n"
|
xf86ErrorFVerb(0, "\n"
|
||||||
"This is a pre-release version of the X server from " XVENDORNAME ".\n"
|
"This is a pre-release version of the X server from " XVENDORNAME ".\n"
|
||||||
"It is not supported in any way.\n"
|
"It is not supported in any way.\n"
|
||||||
"Bugs may be filed in the bugzilla at http://bugs.freedesktop.org/.\n"
|
"Bugs may be filed in the bugzilla at http://bugs.freedesktop.org/.\n"
|
||||||
|
@ -142,12 +142,12 @@ xf86PrintBanner(void)
|
||||||
"latest version in the X.Org Foundation git repository.\n"
|
"latest version in the X.Org Foundation git repository.\n"
|
||||||
"See http://wiki.x.org/wiki/GitPage for git access instructions.\n");
|
"See http://wiki.x.org/wiki/GitPage for git access instructions.\n");
|
||||||
#endif
|
#endif
|
||||||
ErrorF("\nX.Org X Server %d.%d.%d",
|
xf86ErrorFVerb(0, "\nX.Org X Server %d.%d.%d",
|
||||||
XORG_VERSION_MAJOR,
|
XORG_VERSION_MAJOR,
|
||||||
XORG_VERSION_MINOR,
|
XORG_VERSION_MINOR,
|
||||||
XORG_VERSION_PATCH);
|
XORG_VERSION_PATCH);
|
||||||
#if XORG_VERSION_SNAP > 0
|
#if XORG_VERSION_SNAP > 0
|
||||||
ErrorF(".%d", XORG_VERSION_SNAP);
|
xf86ErrorFVerb(0, ".%d", XORG_VERSION_SNAP);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if XORG_VERSION_SNAP >= 900
|
#if XORG_VERSION_SNAP >= 900
|
||||||
|
@ -159,26 +159,28 @@ xf86PrintBanner(void)
|
||||||
* candidate for the next point release. (X.Y.Z)
|
* candidate for the next point release. (X.Y.Z)
|
||||||
*/
|
*/
|
||||||
#if XORG_VERSION_MINOR >= 99
|
#if XORG_VERSION_MINOR >= 99
|
||||||
ErrorF(" (%d.0.0 RC %d)", XORG_VERSION_MAJOR+1, XORG_VERSION_SNAP - 900);
|
xf86ErrorFVerb(0, " (%d.0.0 RC %d)", XORG_VERSION_MAJOR+1,
|
||||||
|
XORG_VERSION_SNAP - 900);
|
||||||
#elif XORG_VERSION_PATCH == 99
|
#elif XORG_VERSION_PATCH == 99
|
||||||
ErrorF(" (%d.%d.0 RC %d)", XORG_VERSION_MAJOR, XORG_VERSION_MINOR + 1,
|
xf86ErrorFVerb(0, " (%d.%d.0 RC %d)", XORG_VERSION_MAJOR,
|
||||||
XORG_VERSION_SNAP - 900);
|
XORG_VERSION_MINOR + 1, XORG_VERSION_SNAP - 900);
|
||||||
#else
|
#else
|
||||||
ErrorF(" (%d.%d.%d RC %d)", XORG_VERSION_MAJOR, XORG_VERSION_MINOR,
|
xf86ErrorFVerb(0, " (%d.%d.%d RC %d)", XORG_VERSION_MAJOR,
|
||||||
XORG_VERSION_PATCH + 1, XORG_VERSION_SNAP - 900);
|
XORG_VERSION_MINOR, XORG_VERSION_PATCH + 1,
|
||||||
|
XORG_VERSION_SNAP - 900);
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef XORG_CUSTOM_VERSION
|
#ifdef XORG_CUSTOM_VERSION
|
||||||
ErrorF(" (%s)", XORG_CUSTOM_VERSION);
|
xf86ErrorFVerb(0, " (%s)", XORG_CUSTOM_VERSION);
|
||||||
#endif
|
#endif
|
||||||
#ifndef XORG_DATE
|
#ifndef XORG_DATE
|
||||||
# define XORG_DATE "Unknown"
|
# define XORG_DATE "Unknown"
|
||||||
#endif
|
#endif
|
||||||
ErrorF("\nRelease Date: %s\n", XORG_DATE);
|
xf86ErrorFVerb(0, "\nRelease Date: %s\n", XORG_DATE);
|
||||||
ErrorF("X Protocol Version %d, Revision %d\n",
|
xf86ErrorFVerb(0, "X Protocol Version %d, Revision %d\n",
|
||||||
X_PROTOCOL, X_PROTOCOL_REVISION);
|
X_PROTOCOL, X_PROTOCOL_REVISION);
|
||||||
ErrorF("Build Operating System: %s %s\n", OSNAME, OSVENDOR);
|
xf86ErrorFVerb(0, "Build Operating System: %s %s\n", OSNAME, OSVENDOR);
|
||||||
#ifdef HAS_UTSNAME
|
#ifdef HAS_UTSNAME
|
||||||
{
|
{
|
||||||
struct utsname name;
|
struct utsname name;
|
||||||
|
@ -188,17 +190,17 @@ xf86PrintBanner(void)
|
||||||
All agree that failure is represented by a negative number.
|
All agree that failure is represented by a negative number.
|
||||||
*/
|
*/
|
||||||
if (uname(&name) >= 0) {
|
if (uname(&name) >= 0) {
|
||||||
ErrorF("Current Operating System: %s %s %s %s %s\n",
|
xf86ErrorFVerb(0, "Current Operating System: %s %s %s %s %s\n",
|
||||||
name.sysname, name.nodename, name.release, name.version, name.machine);
|
name.sysname, name.nodename, name.release, name.version, name.machine);
|
||||||
#ifdef linux
|
#ifdef linux
|
||||||
do {
|
do {
|
||||||
char buf[80];
|
char buf[80];
|
||||||
int fd = open("/proc/cmdline", O_RDONLY);
|
int fd = open("/proc/cmdline", O_RDONLY);
|
||||||
if (fd != -1) {
|
if (fd != -1) {
|
||||||
ErrorF("Kernel command line: ");
|
xf86ErrorFVerb(0, "Kernel command line: ");
|
||||||
memset(buf, 0, 80);
|
memset(buf, 0, 80);
|
||||||
while (read(fd, buf, 80) > 0) {
|
while (read(fd, buf, 80) > 0) {
|
||||||
ErrorF("%.80s", buf);
|
xf86ErrorFVerb(0, "%.80s", buf);
|
||||||
memset(buf, 0, 80);
|
memset(buf, 0, 80);
|
||||||
}
|
}
|
||||||
close(fd);
|
close(fd);
|
||||||
|
@ -223,19 +225,21 @@ xf86PrintBanner(void)
|
||||||
t.tm_min = (BUILD_TIME / 100) % 100;
|
t.tm_min = (BUILD_TIME / 100) % 100;
|
||||||
t.tm_hour = (BUILD_TIME / 10000) % 100;
|
t.tm_hour = (BUILD_TIME / 10000) % 100;
|
||||||
if (strftime(buf, sizeof(buf), "%d %B %Y %I:%M:%S%p", &t))
|
if (strftime(buf, sizeof(buf), "%d %B %Y %I:%M:%S%p", &t))
|
||||||
ErrorF("Build Date: %s\n", buf);
|
xf86ErrorFVerb(0, "Build Date: %s\n", buf);
|
||||||
#else
|
#else
|
||||||
if (strftime(buf, sizeof(buf), "%d %B %Y", &t))
|
if (strftime(buf, sizeof(buf), "%d %B %Y", &t))
|
||||||
ErrorF("Build Date: %s\n", buf);
|
xf86ErrorFVerb(0, "Build Date: %s\n", buf);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#if defined(BUILDERSTRING)
|
#if defined(BUILDERSTRING)
|
||||||
ErrorF("%s \n",BUILDERSTRING);
|
xf86ErrorFVerb(0, "%s \n", BUILDERSTRING);
|
||||||
#endif
|
#endif
|
||||||
ErrorF("Current version of pixman: %s\n", pixman_version_string());
|
xf86ErrorFVerb(0, "Current version of pixman: %s\n",
|
||||||
ErrorF("\tBefore reporting problems, check "__VENDORDWEBSUPPORT__"\n"
|
pixman_version_string());
|
||||||
"\tto make sure that you have the latest version.\n");
|
xf86ErrorFVerb(0, "\tBefore reporting problems, check "
|
||||||
|
""__VENDORDWEBSUPPORT__"\n"
|
||||||
|
"\tto make sure that you have the latest version.\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
Loading…
Reference in New Issue