summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Minarik <minarik11@student.fiit.stuba.sk>2012-06-11 00:57:39 +0200
committerKristian Høgsberg <krh@bitplanet.net>2012-06-11 09:42:08 -0400
commitf12c2879c6950ff912d3849f9e0d701ca9a02753 (patch)
tree50bc376dcf416ba847571cc4d36a418199cc82e7
parentb9e513c6780fc07e80f6627cf8087afdef02f56a (diff)
compositor: Print uname information to log
It is useful to have relevant information about the host system. Example: [..] OS: Linux, 3.0.0-13-generic, #22-Ubuntu SMP Wed Nov 2 13:25:36 UTC 2011, i686
-rw-r--r--src/compositor.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/compositor.c b/src/compositor.c
index 67a750f..96eb15b 100644
--- a/src/compositor.c
+++ b/src/compositor.c
@@ -38,6 +38,7 @@
#include <sys/mman.h>
#include <sys/wait.h>
#include <sys/socket.h>
+#include <sys/utsname.h>
#include <unistd.h>
#include <math.h>
#include <linux/input.h>
@@ -2884,6 +2885,17 @@ compositor_bind(struct wl_client *client,
}
static void
+log_uname(void)
+{
+ struct utsname usys;
+
+ uname(&usys);
+
+ weston_log("OS: %s, %s, %s, %s\n", usys.sysname, usys.release,
+ usys.version, usys.machine);
+}
+
+static void
log_extensions(const char *name, const char *extensions)
{
const char *p, *end;
@@ -2943,6 +2955,8 @@ weston_compositor_init(struct weston_compositor *ec,
wl_display_init_shm(display);
+ log_uname();
+
weston_log("egl vendor: %s\n",
eglQueryString(ec->display, EGL_VENDOR));
log_extensions("egl extensions",