Mailing List archive

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

[vdr] Re: How can i tell if dvb drivers are properly loaded ?



Martin Hoffmann wrote:
> 
> "- or how does VDR tell if drivers are properly loaded ?"
> 
> Hi,
> 
> last time i was on vacation my VDR machine should do some recording for me -
> unfortunately the driver got stuck and (i guess) couldn't be loaded
> successfully anymore - VDR reported "no video device found ..." and restarted
> itself over and over again (see log for details).
> 
> Tomorrow i'm again on vacation and VDR should also make some recordings !
> 
> This time i want to change the runvdr script to check if drivers are properly
> loaded (after the make rmmod; make insmod) and if NOT simply reboot the whole
> machine !
> But how can the runvdr script tell if drivers are up and running ?
> I could simply use if [ $LSMOD -eq 0 ] as the runvdr script does - but i'd
> like to use the same way that vdr uses to be able to detect the problem ...
> Otherwise the runvdr might fail to detect it and then vdr still does not run
> :-(
> So can anyone tell me how *exactly* vdr does detect this ?

Look at VDR/dvbapi.c, functions cDvbApi::Init() and cDvbApi::Probe().

In case of such an error, VDR returns an exit value of 2.
You could use that to trigger the reboot.

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