summaryrefslogtreecommitdiff
path: root/vdr.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2001-11-03 12:23:45 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2001-11-03 12:23:45 +0100
commit78d1fe10a449fa080f515216b9016b6d8e00fa1b (patch)
treed6fb78f7f2dcf21c81cfd5b73b84c0fe5d5d7e72 /vdr.c
parent62c452561e183ee6257aa14943e9c008650430df (diff)
downloadvdr-78d1fe10a449fa080f515216b9016b6d8e00fa1b.tar.gz
vdr-78d1fe10a449fa080f515216b9016b6d8e00fa1b.tar.bz2
Added a fifth parameter to the 'shutdown' call that indicates the reason for this shutdown request
Diffstat (limited to 'vdr.c')
-rw-r--r--vdr.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/vdr.c b/vdr.c
index c62a2856..886b0917 100644
--- a/vdr.c
+++ b/vdr.c
@@ -22,7 +22,7 @@
*
* The project's page is at http://www.cadsoft.de/people/kls/vdr
*
- * $Id: vdr.c 1.88 2001/11/03 11:48:21 kls Exp $
+ * $Id: vdr.c 1.89 2001/11/03 12:23:45 kls Exp $
*/
#include <getopt.h>
@@ -503,11 +503,12 @@ int main(int argc, char *argv[])
dsyslog(LOG_INFO, "next timer event at %s", ctime(&Next));
if (WatchdogTimeout > 0)
signal(SIGALRM, SIG_IGN);
- if (Interface->Confirm(tr("Press any key to cancel shutdown"), LastActivity == 1 ? 5 : SHUTDOWNWAIT, true)) {
+ bool UserShutdown = key == kPower;
+ if (Interface->Confirm(tr("Press any key to cancel shutdown"), UserShutdown ? 5 : SHUTDOWNWAIT, true)) {
int Channel = timer ? timer->channel : 0;
const char *File = timer ? timer->file : "";
char *cmd;
- asprintf(&cmd, "%s %ld %ld %d '%s'", Shutdown, Next, Delta, Channel, File);
+ asprintf(&cmd, "%s %ld %ld %d '%s' %d", Shutdown, Next, Delta, Channel, File, UserShutdown);
isyslog(LOG_INFO, "executing '%s'", cmd);
SystemExec(cmd);
delete cmd;