diff options
| author | Andreas Monzner <andreas.monzner@multimedia-labs.de> | 2008-02-01 23:15:24 +0000 |
|---|---|---|
| committer | Andreas Monzner <andreas.monzner@multimedia-labs.de> | 2008-02-01 23:15:24 +0000 |
| commit | d89be097be4a9ac52166c5f47cc189c5522d3441 (patch) | |
| tree | 7da4329e4fa22017a7312da52bfe7b1df8a16a02 /lib/driver/misc_options.cpp | |
| parent | ec200e0207d0a5ddb91c9c6c4ab8ae1c8f33ecea (diff) | |
| download | enigma2-d89be097be4a9ac52166c5f47cc189c5522d3441.tar.gz enigma2-d89be097be4a9ac52166c5f47cc189c5522d3441.zip | |
add possibilty to hide menu entries when needed hardware is not available
Diffstat (limited to 'lib/driver/misc_options.cpp')
| -rw-r--r-- | lib/driver/misc_options.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/driver/misc_options.cpp b/lib/driver/misc_options.cpp index ecb7bdb1..c567878c 100644 --- a/lib/driver/misc_options.cpp +++ b/lib/driver/misc_options.cpp @@ -39,6 +39,18 @@ int Misc_Options::set_12V_output(int state) return 0; } +bool Misc_Options::detected_12V_output() +{ + int fd = open("/proc/stb/misc/12V_output", O_WRONLY); + if (fd < 0) + { + eDebug("couldn't open /proc/stb/misc/12V_output"); + return false; + } + close(fd); + return true; +} + Misc_Options *Misc_Options::getInstance() { return instance; |
