diff options
| author | Adam Jackson <ajax@redhat.com> | 2009-08-20 15:45:57 -0400 |
|---|---|---|
| committer | Adam Jackson <ajax@redhat.com> | 2009-08-20 15:45:57 -0400 |
| commit | ae68708ebe24c4cdf8c5265e206f6913d9298f37 (patch) | |
| tree | 324d375a12e17f5f17f4d80d10b25cec2bd23581 | |
| parent | 0b131a5cd91cea54240777c66a9cd385029e8cb2 (diff) | |
xfree86: dump /proc/cmdline in the log on Linux
| -rw-r--r-- | hw/xfree86/common/xf86Init.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c index 44eed4dc9..30f085eee 100644 --- a/hw/xfree86/common/xf86Init.c +++ b/hw/xfree86/common/xf86Init.c @@ -188,6 +188,21 @@ xf86PrintBanner(void) if (uname(&name) >= 0) { ErrorF("Current Operating System: %s %s %s %s %s\n", name.sysname, name.nodename, name.release, name.version, name.machine); +#ifdef linux + do { + char buf[80]; + int fd = open("/proc/cmdline", O_RDONLY); + if (fd != -1) { + ErrorF("Kernel command line: "); + memset(buf, 0, 80); + while (read(fd, buf, 80) > 0) { + ErrorF("%.80s", buf); + memset(buf, 0, 80); + } + close(fd); + } + } while (0); +#endif } } #endif |
