[Pommed-commits] r509 - trunk/pommed

jblache at alioth.debian.org jblache at alioth.debian.org
Mon Jul 28 17:57:39 UTC 2008


Author: jblache
Date: 2008-07-28 17:57:38 +0000 (Mon, 28 Jul 2008)
New Revision: 509

Modified:
   trunk/pommed/pommed.c
Log:
Report OS version in debug mode.


Modified: trunk/pommed/pommed.c
===================================================================
--- trunk/pommed/pommed.c	2008-07-22 09:55:58 UTC (rev 508)
+++ trunk/pommed/pommed.c	2008-07-28 17:57:38 UTC (rev 509)
@@ -30,6 +30,8 @@
 #include <string.h>
 #include <signal.h>
 
+#include <sys/utsname.h>
+
 #include <syslog.h>
 #include <stdarg.h>
 
@@ -692,6 +694,7 @@
   int c;
 
   FILE *pidfile;
+  struct utsname sysinfo;
 
   machine_type machine;
 
@@ -785,6 +788,16 @@
       exit(1);
     }
 
+  if (debug)
+    {
+      ret = uname(&sysinfo);
+
+      if (ret < 0)
+	logmsg(LOG_ERR, "uname() failed: %s", strerror(errno));
+      else
+	logdebug("System: %s %s %s", sysinfo.sysname, sysinfo.release, sysinfo.machine);
+    }
+
   ret = evloop_init();
   if (ret < 0)
     {




More information about the Pommed-commits mailing list