xorg-server: Changes to 'ubuntu'
debian/changelog | 8 ++++++
debian/patches/160_log_timestamping.patch | 38 ++++++++++++++++++++++++++++++
debian/patches/series | 1
3 files changed, 47 insertions(+)
New commits:
commit 77dce66a9730381cb4218c24ff72917c1aaac9d0
Author: Bryce Harrington <bryce@bryceharrington.org>
Date: Fri Feb 6 06:36:29 2009 -0800
Add timestamping to the Xorg log file
diff --git a/debian/changelog b/debian/changelog
index ff2d3ce..9a34d10 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+xorg-server (2:1.5.99.902-0ubuntu3) jaunty; urgency=low
+
+ * Add 160_log_timestamping.patch: Show timestamps in Xorg.*.log
+ files.
+ (LP: #285787)
+
+ -- Bryce Harrington <bryce@ubuntu.com> Fri, 06 Feb 2009 06:28:48 -0800
+
xorg-server (2:1.5.99.902-0ubuntu2) jaunty; urgency=low
[Bryce Harrington]
diff --git a/debian/patches/160_log_timestamping.patch b/debian/patches/160_log_timestamping.patch
new file mode 100644
index 0000000..efc85a4
--- /dev/null
+++ b/debian/patches/160_log_timestamping.patch
@@ -0,0 +1,38 @@
+diff --git a/os/log.c b/os/log.c
+index 0860847..2c46f1a 100644
+--- a/os/log.c
++++ b/os/log.c
+@@ -255,6 +255,33 @@ LogVWrite(int verb, const char *f, va_list args)
+ static char tmpBuffer[1024];
+ int len = 0;
+
++ struct timeval time;
++ time_t tv_sec;
++ suseconds_t tv_usec;
++ static Bool first = 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;
++ }
++ sprintf(tmpBuffer, "[%d sec: %06d usec]", diff_sec , diff_usec);
++ 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
diff --git a/debian/patches/series b/debian/patches/series
index 50c14ce..49f6b9f 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -16,3 +16,4 @@
157_check_null_modes.patch
158_raise_maxclients.patch
159_xinerama_focus.patch
+160_log_timestamping.patch
Reply to: