summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEnrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>2012-12-26 17:23:35 +0100
committerEnrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>2012-12-26 17:23:35 +0100
commit661354e6cf4e19c9ca7210fbf49ce293e53418d1 (patch)
tree03f1f4922053760985982d9e7c7a685637dc9e3f
parent9dd0afc3d201f39bdf927d0378cc984f487eb44e (diff)
downloadvdr-plugin-inputdev-661354e6cf4e19c9ca7210fbf49ce293e53418d1.tar.gz
vdr-plugin-inputdev-661354e6cf4e19c9ca7210fbf49ce293e53418d1.tar.bz2
use dev_t for comparing devices
-rw-r--r--inputdev.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/inputdev.c b/inputdev.c
index f800425..4802305 100644
--- a/inputdev.c
+++ b/inputdev.c
@@ -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;