diff options
author | Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> | 2012-12-26 17:23:35 +0100 |
---|---|---|
committer | Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> | 2012-12-26 17:23:35 +0100 |
commit | 661354e6cf4e19c9ca7210fbf49ce293e53418d1 (patch) | |
tree | 03f1f4922053760985982d9e7c7a685637dc9e3f | |
parent | 9dd0afc3d201f39bdf927d0378cc984f487eb44e (diff) | |
download | vdr-plugin-inputdev-661354e6cf4e19c9ca7210fbf49ce293e53418d1.tar.gz vdr-plugin-inputdev-661354e6cf4e19c9ca7210fbf49ce293e53418d1.tar.bz2 |
use dev_t for comparing devices
-rw-r--r-- | inputdev.c | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -57,6 +57,10 @@ public: return this->dev_t_ - b.dev_t_; } + virtual int Compare(dev_t b) const { + return this->dev_t_ - b; + } + void handle(void); bool open(void); bool start(int efd); @@ -532,8 +536,12 @@ void cInputDeviceController::Action(void) void cInputDeviceController::remove_device(char const *dev_path) { class cInputDevice *dev = NULL; + struct stat st; - { + if (stat(dev_path, &st) < 0) { + esyslog("%s: fstat(%s) failed: %s\n", plugin_name(), + dev_path, strerror(errno)); + } else { cMutexLock lock(&dev_mutex_); cInputDevice *i; |