mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-29 13:46:49 +00:00
xorg-server:
- readd boottime patch
This commit is contained in:
parent
b2934b653a
commit
0cec674f6f
@ -0,0 +1,48 @@
|
|||||||
|
diff -Nurb xorg-server-1.7.3.orig/os/log.c xorg-server-1.7.3/os/log.c
|
||||||
|
--- xorg-server-1.7.3.orig/os/log.c 2009-10-27 23:56:24.000000000 -0700
|
||||||
|
+++ xorg-server-1.7.3/os/log.c 2010-01-26 11:26:25.683679988 -0800
|
||||||
|
@@ -259,6 +259,36 @@
|
||||||
|
static char tmpBuffer[1024];
|
||||||
|
int len = 0;
|
||||||
|
|
||||||
|
+ struct timeval time;
|
||||||
|
+ time_t tv_sec;
|
||||||
|
+ suseconds_t tv_usec;
|
||||||
|
+ static Bool first = TRUE;
|
||||||
|
+ static Bool newline = TRUE;
|
||||||
|
+ static time_t start_tv_sec;
|
||||||
|
+ static suseconds_t start_usec;
|
||||||
|
+ int diff_sec, diff_usec;
|
||||||
|
+
|
||||||
|
+ gettimeofday(&time, NULL);
|
||||||
|
+ tv_sec = time.tv_sec;
|
||||||
|
+ tv_usec = time.tv_usec;
|
||||||
|
+ if (first == TRUE) {
|
||||||
|
+ start_tv_sec = tv_sec;
|
||||||
|
+ start_usec = tv_usec;
|
||||||
|
+ first = FALSE;
|
||||||
|
+ }
|
||||||
|
+ diff_sec = (int)difftime(tv_sec, start_tv_sec);
|
||||||
|
+ diff_usec = (tv_usec - start_usec);
|
||||||
|
+ if (diff_usec < 0) {
|
||||||
|
+ diff_sec--;
|
||||||
|
+ diff_usec += 1000000;
|
||||||
|
+ }
|
||||||
|
+ if (newline) {
|
||||||
|
+ sprintf(tmpBuffer, "[%d.%03d] ", diff_sec , diff_usec / 1000);
|
||||||
|
+ len = strlen(tmpBuffer);
|
||||||
|
+ if (logFile)
|
||||||
|
+ fwrite(tmpBuffer, len, 1, logFile);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
/*
|
||||||
|
* Since a va_list can only be processed once, write the string to a
|
||||||
|
* buffer, and then write the buffer out to the appropriate output
|
||||||
|
@@ -268,6 +298,7 @@
|
||||||
|
vsnprintf(tmpBuffer, sizeof(tmpBuffer), f, args);
|
||||||
|
len = strlen(tmpBuffer);
|
||||||
|
}
|
||||||
|
+ newline = (tmpBuffer[len-1] == '\n');
|
||||||
|
if ((verb < 0 || logVerbosity >= verb) && len > 0)
|
||||||
|
fwrite(tmpBuffer, len, 1, stderr);
|
||||||
|
if ((verb < 0 || logFileVerbosity >= verb) && len > 0) {
|
Loading…
x
Reference in New Issue
Block a user