mirror of
git://slackware.nl/current.git
synced 2024-12-28 09:59:53 +01:00
821601d7cb
a/openssl-solibs-3.0.8-x86_64-2.txz: Rebuilt. ap/dc3dd-7.3.0-x86_64-1.txz: Upgraded. ap/mariadb-10.11.2-x86_64-1.txz: Upgraded. d/cmake-3.25.3-x86_64-1.txz: Upgraded. l/imagemagick-7.1.1_1-x86_64-1.txz: Upgraded. l/libieee1284-0.2.11-x86_64-7.txz: Rebuilt. Rebuilt for python3. Thanks to Heinz Wiesinger. l/libplist-2.2.0-x86_64-4.txz: Rebuilt. Rebuilt for python3. Thanks to Heinz Wiesinger. l/pipewire-0.3.67-x86_64-1.txz: Upgraded. n/ModemManager-1.20.6-x86_64-1.txz: Upgraded. n/NetworkManager-1.42.4-x86_64-1.txz: Upgraded. n/openssl-3.0.8-x86_64-2.txz: Rebuilt. Fixed man pages. Thanks to marav. Add example for enabling the legacy algorithms to /etc/ssl/openssl.cnf. Thanks to ctrlaltca. n/openvpn-2.6.1-x86_64-1.txz: Upgraded. x/ibus-libpinyin-1.15.2-x86_64-1.txz: Upgraded. x/mesa-22.3.7-x86_64-1.txz: Upgraded.
62 lines
1.7 KiB
Diff
62 lines
1.7 KiB
Diff
From b4d63327dfef8dbf12aabf4bba0f6818a3519995 Mon Sep 17 00:00:00 2001
|
|
From: Tim Waugh <twaugh@redhat.com>
|
|
Date: Tue, 8 Mar 2011 15:07:04 +0000
|
|
Subject: [PATCH] 2011-03-08 Tim Waugh <twaugh@redhat.com>
|
|
|
|
* src/ieee1284module.c: Added bindings for get_irq_fd and
|
|
clear_irq. Patch by Sergey Temerkhanov.
|
|
---
|
|
src/ieee1284module.c | 33 +++++++++++++++++++++++++++++++++
|
|
2 files changed, 38 insertions(+)
|
|
|
|
diff --git a/src/ieee1284module.c b/src/ieee1284module.c
|
|
index 0093d6f..23c1f29 100644
|
|
--- a/src/ieee1284module.c
|
|
+++ b/src/ieee1284module.c
|
|
@@ -189,6 +189,33 @@ Parport_open (ParportObject *self, PyObject *args)
|
|
return PyInt_FromLong (capabilities);
|
|
}
|
|
|
|
+static PyObject *
|
|
+Parport_get_irq_fd (ParportObject *self)
|
|
+{
|
|
+ int fd = ieee1284_get_irq_fd (self->port);
|
|
+ if (fd < 0) {
|
|
+ handle_error (fd);
|
|
+ return NULL;
|
|
+ }
|
|
+
|
|
+ return PyInt_FromLong (fd);
|
|
+}
|
|
+
|
|
+static PyObject *
|
|
+Parport_clear_irq (ParportObject *self)
|
|
+{
|
|
+ int portcount = 0;
|
|
+ int r;
|
|
+
|
|
+ int fd = ieee1284_clear_irq (self->port, &portcount);
|
|
+ if (r < 0) {
|
|
+ handle_error (r);
|
|
+ return NULL;
|
|
+ }
|
|
+
|
|
+ return PyInt_FromLong (portcount);
|
|
+}
|
|
+
|
|
static PyObject *
|
|
Parport_close (ParportObject *self)
|
|
{
|
|
@@ -484,6 +511,12 @@ PyMethodDef Parport_methods[] = {
|
|
{ "close", (PyCFunction) Parport_close, METH_NOARGS,
|
|
"close() -> None\n"
|
|
"Closes a port." },
|
|
+ { "get_irq_fd", (PyCFunction) Parport_get_irq_fd, METH_VARARGS,
|
|
+ "get_irq_fd() -> int\n"
|
|
+ "Returns a pollable IRQ file descriptor." },
|
|
+ { "clear_irq", (PyCFunction) Parport_clear_irq, METH_NOARGS,
|
|
+ "clear_irq(portcount) -> int\n"
|
|
+ "Clears IRQ and returns number of IRQs raised." },
|
|
{ "claim", (PyCFunction) Parport_claim, METH_NOARGS,
|
|
"claim() -> None\n"
|
|
"Claims a port." },
|