Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[vdr] Re: 'cause' parameter for shutdown



Rainer Zocholl wrote:
> 
> Klaus.Schmidinger@cadsoft.de(Klaus Schmidinger)  28.10.01 17:38
> 
> Once upon a time Klaus Schmidinger shaped the electrons to say...
> 
> >Rainer Zocholl wrote:
> >>
> >> ...
> >> Another minor:
> 
> >You really should post ONE item per message...
> 
> I'll try to.. :-)
> 
> but that's point was not so important.
> 
> >> Could it be paossible to add a "cause" parameter to the
> >> shutdown call?
> >> So the shutdown can decide if the user pressed the poweroff key,
> >> or it's an idle shutdown. (Don't know which cases are ther possible)
> 
> >Is there a specific application for such a parameter?
> 
> On "idle" i have a long delay (grace) in the shutdown to stop it:
> The CPU has to wait, and can wait, it's only stupid silicon.
> 
> On "user request" this delay is annyoing, because the
> user has to wait, and is -of cause- not willing to,
> he just explicit said: "Turn off" and a machine has to do
> what the user said.
> 
> Imagine you want to leave home, press "off" (why wait
> for the "user time out" that will occure in one or 2h when one
> knows that there will nobody watching anymore the next 4h?)
> 
> Imagine you want to unplug the box.
> 
> In both cases the additionally "grace" wait time makes no sense.

vdr.c:

#define SHUTDOWNWAIT   300 // seconds to wait in user prompt before automatic shutdown
...
  if (Interface->Confirm(tr("Press any key to cancel shutdown"), LastActivity == 1 ? 5 : SHUTDOWNWAIT, true)) {

'LastActivity' is set to 1 in case of a user initiated shutdown, so VDR waits
only 5 seconds in that case. Isn't that short enough?

Klaus
-- 
_______________________________________________________________

Klaus Schmidinger                       Phone: +49-8635-6989-10
CadSoft Computer GmbH                   Fax:   +49-8635-6989-40
Hofmark 2                               Email:   kls@cadsoft.de
D-84568 Pleiskirchen, Germany           URL:     www.cadsoft.de
_______________________________________________________________



Home | Main Index | Thread Index