parent
187afb728b
commit
9cf54adcb1
@ -0,0 +1,38 @@
|
||||
From 14685b280fde85a6e801f7fb7d5e579b2ddb3581 Mon Sep 17 00:00:00 2001
|
||||
From: Ayke van Laethem <aykevanlaethem@gmail.com>
|
||||
Date: Fri, 28 Jul 2017 18:07:50 +0200
|
||||
Subject: [PATCH 3/6] plugins: devinput: fix glob "no match" error
|
||||
|
||||
See 63e041cc5 and LIRC issue #285 (Debian: #860551)
|
||||
---
|
||||
plugins/devinput.c | 10 +++++-----
|
||||
1 file changed, 5 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/plugins/devinput.c b/plugins/devinput.c
|
||||
index 846a0b70..d4d733a0 100644
|
||||
--- a/plugins/devinput.c
|
||||
+++ b/plugins/devinput.c
|
||||
@@ -247,15 +247,15 @@ static int locate_default_device(char* errmsg, size_t size)
|
||||
|
||||
r = glob("/sys/class/rc/rc0/input[0-9]*/event[0-9]*",
|
||||
0, NULL, &matches);
|
||||
- if (r != 0) {
|
||||
- log_perror_warn("Cannot run glob %s", DEV_PATTERN);
|
||||
+ if (r == GLOB_NOMATCH) {
|
||||
+ strncpy(errmsg, "No /sys/class/rc/ devices found", size - 1);
|
||||
log_notice("No input device available for devinput driver."
|
||||
" Consider stopping lircd.socket or reconfigure lirc");
|
||||
- snprintf(errmsg, size, "Cannot glob %s", DEV_PATTERN);
|
||||
return 0;
|
||||
}
|
||||
- if (matches.gl_pathc == 0) {
|
||||
- strncpy(errmsg, "No /sys/class/rc/ devices found", size - 1);
|
||||
+ if (r != 0) {
|
||||
+ log_perror_warn("Cannot run glob %s", DEV_PATTERN);
|
||||
+ snprintf(errmsg, size, "Cannot glob %s", DEV_PATTERN);
|
||||
return 0;
|
||||
}
|
||||
if (matches.gl_pathc > 1) {
|
||||
--
|
||||
2.20.1
|
||||
|
@ -0,0 +1,25 @@
|
||||
From aa2b06cff01b52666e44aae59ee56fc9092cad93 Mon Sep 17 00:00:00 2001
|
||||
From: Alec Leamas <leamas.alec@gmail.com>
|
||||
Date: Sun, 3 Sep 2017 04:21:57 +0200
|
||||
Subject: [PATCH 5/6] mode2: Fix inconsistent loglevel/debug option (#307).
|
||||
|
||||
---
|
||||
tools/mode2.cpp | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/tools/mode2.cpp b/tools/mode2.cpp
|
||||
index fe578f89..e962610d 100644
|
||||
--- a/tools/mode2.cpp
|
||||
+++ b/tools/mode2.cpp
|
||||
@@ -74,7 +74,7 @@ static const char* const help =
|
||||
|
||||
static const struct option options[] = {
|
||||
{"help", no_argument, NULL, 'h'},
|
||||
- {"debug", required_argument, NULL, 'D'},
|
||||
+ {"loglevel", required_argument, NULL, 'D'},
|
||||
{"version", no_argument, NULL, 'v'},
|
||||
{"device", required_argument, NULL, 'd'},
|
||||
{"driver", required_argument, NULL, 'H'},
|
||||
--
|
||||
2.20.1
|
||||
|
@ -0,0 +1,30 @@
|
||||
From 9d2e0a40294408764710657e78929c83f2fc0f31 Mon Sep 17 00:00:00 2001
|
||||
From: Alec Leamas <leamas.alec@gmail.com>
|
||||
Date: Wed, 21 Aug 2019 21:48:25 +0200
|
||||
Subject: [PATCH 6/6] python-pkg: Don't use deprecated time.clock() (RHBZ
|
||||
#1718285)
|
||||
|
||||
---
|
||||
python-pkg/lirc/client.py | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/python-pkg/lirc/client.py b/python-pkg/lirc/client.py
|
||||
index 7e069a55..482913cf 100644
|
||||
--- a/python-pkg/lirc/client.py
|
||||
+++ b/python-pkg/lirc/client.py
|
||||
@@ -219,10 +219,10 @@ class RawConnection(AbstractConnection):
|
||||
def readline(self, timeout: float = None) -> str:
|
||||
''' Implements AbstractConnection.readline(). '''
|
||||
if timeout:
|
||||
- start = time.clock()
|
||||
+ start = time.perf_counter()
|
||||
while b'\n' not in self._buffer:
|
||||
ready = self._select.select(
|
||||
- start + timeout - time.clock() if timeout else timeout)
|
||||
+ start + timeout - time.perf_counter() if timeout else timeout)
|
||||
if ready == []:
|
||||
if timeout:
|
||||
raise TimeoutException(
|
||||
--
|
||||
2.20.1
|
||||
|
Loading…
Reference in new issue