Sophie

Sophie

distrib > * > 2008.0 > x86_64 > by-pkgid > da95e7e5c21cf72a778ff56c7941399c > files > 17

vdr-1.6.0-4mdv2008.0.src.rpm

Index: vdr-1.6.0-modid/vdr.c
===================================================================
--- vdr-1.6.0-modid/vdr.c
+++ vdr-1.6.0-modid/vdr.c	2008-05-06 02:39:19.000000000 +0300
@@ -182,6 +182,7 @@
 #define DEFAULTCONFDIR CONFDIR
 #define DEFAULTPLUGINDIR PLUGINDIR
 #define DEFAULTEPGDATAFILENAME "epg.data"
+#define DEFAULTLOGIDENT "vdr"
 
   bool StartedAsRoot = false;
   const char *VdrUser = NULL;
@@ -198,6 +199,7 @@
   int WatchdogTimeout = DEFAULTWATCHDOG;
   const char *Terminal = NULL;
   const char *LocaleDir = NULL;
+  const char *LogIdent = DEFAULTLOGIDENT;
 
   bool UseKbd = true;
   const char *LircDevice = NULL;
@@ -231,6 +233,7 @@
       { "lirc",     optional_argument, NULL, 'l' | 0x100 },
       { "localedir",required_argument, NULL, 'l' | 0x200 },
       { "log",      required_argument, NULL, 'l' },
+      { "log-ident",required_argument, NULL, 'l' | 0x300 },
       { "mute",     no_argument,       NULL, 'm' },
       { "no-kbd",   no_argument,       NULL, 'n' | 0x100 },
       { "plugin",   required_argument, NULL, 'P' },
@@ -316,6 +319,9 @@
                        return 2;
                        }
                     break;
+          case 'l' | 0x300:
+                    LogIdent = optarg;
+                    break;
           case 'm': MuteAudio = true;
                     break;
           case 'n' | 0x100:
@@ -417,6 +423,8 @@
                "                           2 = errors and info, 3 = errors, info and debug\n"
                "                           if logging should be done to LOG_LOCALn instead of\n"
                "                           LOG_USER, add '.n' to LEVEL, as in 3.7 (n=0..7)\n"
+               "            --log-ident=ID use the specified identifier in the syslog\n"
+               "                           (default: vdr)\n"
                "  -L DIR,   --lib=DIR      search for plugins in DIR (default is %s)\n"
                "            --lirc[=PATH]  use a LIRC remote control device, attached to PATH\n"
                "                           (default: %s)\n"
@@ -478,7 +486,7 @@
   // Log file:
 
   if (SysLogLevel > 0)
-     openlog("vdr", LOG_CONS, SysLogTarget); // LOG_PID doesn't work as expected under NPTL
+     openlog(LogIdent, LOG_CONS, SysLogTarget); // LOG_PID doesn't work as expected under NPTL
 
   // Check the video directory: