diff options
author | Jan Beich <jbeich@FreeBSD.org> | 2019-12-03 04:33:33 +0000 |
---|---|---|
committer | Jan Beich <jbeich@FreeBSD.org> | 2019-12-03 04:33:33 +0000 |
commit | 803b6f8dd35c77973c593cdca8f94f8a3a899ea3 (patch) | |
tree | 76f24c95fc1e5149dbc974eb149915283d82f1e2 /sysutils | |
parent | a185384bd9802516c36f5517a6fdded89a8c9e10 (diff) |
Notes
Diffstat (limited to 'sysutils')
-rw-r--r-- | sysutils/uhidd/files/patch-base-cuse | 104 | ||||
-rw-r--r-- | sysutils/uhidd/files/patch-less-basename | 49 | ||||
-rw-r--r-- | sysutils/uhidd/files/patch-uhidd_Makefile | 12 | ||||
-rw-r--r-- | sysutils/uhidd/files/patch-uhidd_uhidd.8 | 29 | ||||
-rw-r--r-- | sysutils/uhidd/files/patch-uhidd_uhidd__cuse4bsd.c | 41 |
5 files changed, 121 insertions, 114 deletions
diff --git a/sysutils/uhidd/files/patch-base-cuse b/sysutils/uhidd/files/patch-base-cuse new file mode 100644 index 000000000000..4c65d110c8a9 --- /dev/null +++ b/sysutils/uhidd/files/patch-base-cuse @@ -0,0 +1,104 @@ +See also https://github.com/kaiwang27/uhidd/commit/4176a6b6c368 + +--- uhidd/Makefile.orig 2012-10-14 19:53:44 UTC ++++ uhidd/Makefile +@@ -15,7 +15,7 @@ LOCALBASE?= /usr/local + LIBDIR= ${PREFIX}/lib + + DPADD= ${LIBUSB} ${LIBPTHREAD} ${LIBUTIL} +-LDADD= -lcuse4bsd -lusb -lpthread -lutil ++LDADD= -lcuse -lusb -lpthread -lutil + + CFLAGS+= -I. -I${.CURDIR} -I${LOCALBASE}/include -g + LDFLAGS+= -L${LIBDIR} +--- uhidd/uhidd.8.orig 2012-10-14 19:53:44 UTC ++++ uhidd/uhidd.8 +@@ -89,7 +89,7 @@ All other HID application collections that don't + have a specific driver can be attached by the Virtual Generic HID + class driver. The driver creates a virtual USB HID device using + the +-.Xr cuse4bsd 4 ++.Xr cuse 4 + interface, so normal USB HID applications that deal with + .Xr uhid 4 , + e.g. +@@ -114,7 +114,7 @@ foreground. This option is intended for debugging the + .It Fl h + Attach the Virtual Generic HID class driver. + This option requires that +-.Xr cuse4bsd 4 ++.Xr cuse 4 + driver loaded as a kernel module. + .It Fl H + Specify the name of the virtual HID device created by the +@@ -207,7 +207,7 @@ the in-memory multimedia keymap for device ugen.%u.%u + .Sh SEE ALSO + .Xr usbhidaction 1 , + .Xr usbhidctl 1 , +-.Xr cuse4bsd 3 , ++.Xr cuse 3 , + .Xr usb 3 , + .Xr usbhid 3 , + .Xr uhid 4 , +--- uhidd/uhidd_cuse4bsd.c.orig 2012-10-14 19:53:44 UTC ++++ uhidd/uhidd_cuse4bsd.c +@@ -29,7 +29,7 @@ __FBSDID("$FreeBSD$"); + + #include <sys/param.h> + #include <sys/wait.h> +-#include <cuse4bsd.h> ++#include <cuse.h> + #include <stdio.h> + #include <stdlib.h> + #include <pthread.h> +@@ -70,16 +70,16 @@ ucuse_init_again: + } else { + if (verbose) + syslog(LOG_INFO, "Attempt to load kernel" +- " module cuse4bsd.ko..."); +- status = system("kldload cuse4bsd"); ++ " module cuse.ko..."); ++ status = system("kldload cuse"); + if (WEXITSTATUS(status) != 0) { +- syslog(LOG_ERR, "Failed to load cuse4bsd" ++ syslog(LOG_ERR, "Failed to load cuse" + " kernel module"); + return (-1); + } + if (verbose) + syslog(LOG_INFO, "Successfully loaded" +- " cuse4bsd kernel module"); ++ " cuse kernel module"); + cuse4bsd_load = 1; + goto ucuse_init_again; + } +@@ -88,7 +88,7 @@ ucuse_init_again: + cuse4bsd_init = 1; + + if (verbose) +- syslog(LOG_INFO, "cuse4bsd initiailzed."); ++ syslog(LOG_INFO, "cuse initiailzed."); + + return (0); + } +--- uhidd/uhidd_vhid_cuse.c.orig 2012-10-14 19:53:44 UTC ++++ uhidd/uhidd_vhid_cuse.c +@@ -36,15 +36,15 @@ __FBSDID("$FreeBSD$"); + #include <unistd.h> + #include <string.h> + #include <syslog.h> +-#include <cuse4bsd.h> ++#include <cuse.h> + #include "uhidd.h" + + /* +- * General Virtual HID device driver. (cuse4bsd version) ++ * General Virtual HID device driver. (cuse version) + */ + + #if CUSE_VERSION < 0x000118 +-#error uhidd requires cuse4bsd version >= 0.1.24 ++#error uhidd requires cuse version >= 0.1.24 + #endif + + #ifndef CUSE_ID_UHIDD diff --git a/sysutils/uhidd/files/patch-less-basename b/sysutils/uhidd/files/patch-less-basename index ed80c294cb46..ce421a84592e 100644 --- a/sysutils/uhidd/files/patch-less-basename +++ b/sysutils/uhidd/files/patch-less-basename @@ -12,7 +12,7 @@ Date: Sun May 29 16:13:33 2016 +0000 char *basename(char *); ^ ---- uhidd/uhidd.c.orig 2019-11-30 21:46:32 UTC +--- uhidd/uhidd.c.orig 2012-10-14 19:53:44 UTC +++ uhidd/uhidd.c @@ -174,7 +174,7 @@ main(int argc, char **argv) @@ -50,7 +50,7 @@ Date: Sun May 29 16:13:33 2016 +0000 syslog(LOG_ERR, "%s not found", dev); return (-1); } -@@ -405,7 +405,7 @@ open_iface(const char *dev, struct libusb20_device *pd +@@ -405,7 +405,7 @@ open_iface(const char *dev, struct libus e = libusb20_dev_request_sync(pdev, &req, rdesc, &actlen, 0, 0); if (e) { syslog(LOG_ERR, "%s[%d]=> libusb20_dev_request_sync" @@ -59,7 +59,7 @@ Date: Sun May 29 16:13:33 2016 +0000 return; } -@@ -497,7 +497,7 @@ alloc_hid_interface_be(struct hid_interface *hi) +@@ -497,7 +497,7 @@ alloc_hid_interface_be(struct hid_interf assert(hi != NULL); @@ -86,7 +86,7 @@ Date: Sun May 29 16:13:33 2016 +0000 goto parent_end; } -@@ -628,14 +628,14 @@ hid_interrupt_out(void *context, int report_id, char * +@@ -628,14 +628,14 @@ hid_interrupt_out(void *context, int rep xfer = libusb20_tr_get_pointer(hi->pdev, x); if (xfer == NULL) { syslog(LOG_ERR, "%s[%d] libusb20_tr_get_pointer failed\n", @@ -103,7 +103,7 @@ Date: Sun May 29 16:13:33 2016 +0000 return (-1); } -@@ -720,12 +720,12 @@ hid_set_report(void *context, int report_id, char *buf +@@ -720,12 +720,12 @@ hid_set_report(void *context, int report e = libusb20_dev_request_sync(hi->pdev, &req, buf, &actlen, 0, 0); if (e && verbose) syslog(LOG_ERR, "%s[%d] libusb20_dev_request_sync failed", @@ -118,7 +118,7 @@ Date: Sun May 29 16:13:33 2016 +0000 return (-1); } if (verbose) { ---- uhidd/uhidd.h.orig 2019-11-30 21:46:32 UTC +--- uhidd/uhidd.h.orig 2012-10-14 19:53:44 UTC +++ uhidd/uhidd.h @@ -227,7 +227,7 @@ struct hid_interface { do { \ @@ -138,9 +138,9 @@ Date: Sun May 29 16:13:33 2016 +0000 hi->ndx); \ snprintf(pb2, sizeof(pb2), __VA_ARGS__); \ printf("%s-> %s", pb, pb2); \ ---- uhidd/uhidd_cc.c.orig 2019-11-30 21:46:32 UTC +--- uhidd/uhidd_cc.c.orig 2012-10-14 19:53:44 UTC +++ uhidd/uhidd_cc.c -@@ -175,11 +175,11 @@ cc_write_keymap_file(struct hid_interface *hi) +@@ -175,11 +175,11 @@ cc_write_keymap_file(struct hid_interfac int i; snprintf(fpath, sizeof(fpath), "/var/run/uhidd.%s/cc_keymap", @@ -154,7 +154,7 @@ Date: Sun May 29 16:13:33 2016 +0000 return; } fprintf(fp, "0x%04x:0x%04x={\n", hi->vendor_id, hi->product_id); ---- uhidd/uhidd_kbd.c.orig 2019-11-30 21:46:32 UTC +--- uhidd/uhidd_kbd.c.orig 2012-10-14 19:53:44 UTC +++ uhidd/uhidd_kbd.c @@ -582,7 +582,7 @@ kbd_attach(struct hid_appcol *ha) /* Open /dev/vkbdctl. */ @@ -174,7 +174,7 @@ Date: Sun May 29 16:13:33 2016 +0000 return (-1); } PRINT1("kbd device name: %s\n", devname(sb.st_rdev, S_IFCHR)); ---- uhidd/uhidd_mouse.c.orig 2019-11-30 21:46:32 UTC +--- uhidd/uhidd_mouse.c.orig 2012-10-14 19:53:44 UTC +++ uhidd/uhidd_mouse.c @@ -91,7 +91,7 @@ mouse_attach(struct hid_appcol *ha) md->cons_fd = open("/dev/consolectl", O_RDWR); @@ -185,14 +185,14 @@ Date: Sun May 29 16:13:33 2016 +0000 return (-1); } -@@ -212,5 +212,5 @@ mouse_recv(struct hid_appcol *ha, struct hid_report *h +@@ -212,5 +212,5 @@ mouse_recv(struct hid_appcol *ha, struct if (ioctl(md->cons_fd, CONS_MOUSECTL, &mi) < 0) syslog(LOG_ERR, "%s[%d] could not submit mouse data:" - " ioctl failed: %m", basename(hi->dev), hi->ndx); + " ioctl failed: %m", hi->dev, hi->ndx); } ---- uhidd/uhidd_vhid.c.orig 2019-11-30 21:46:32 UTC +--- uhidd/uhidd_vhid.c.orig 2012-10-14 19:53:44 UTC +++ uhidd/uhidd_vhid.c @@ -97,7 +97,7 @@ vhid_attach(struct hid_appcol *ha) */ @@ -246,7 +246,7 @@ Date: Sun May 29 16:13:33 2016 +0000 close(vd->vd_fd); return (-1); } -@@ -189,7 +189,7 @@ vhid_recv_raw(struct hid_appcol *ha, uint8_t *buf, int +@@ -189,7 +189,7 @@ vhid_recv_raw(struct hid_appcol *ha, uin } if (write(vd->vd_fd, buf, len) < 0) @@ -264,27 +264,8 @@ Date: Sun May 29 16:13:33 2016 +0000 hi->ndx); for (i = 0; i < len; i++) printf("%d ", buf[i]); ---- uhidd/uhidd_vhid_cuse.c.orig 2019-11-30 21:46:32 UTC +--- uhidd/uhidd_vhid_cuse.c.orig 2012-10-14 19:53:44 UTC +++ uhidd/uhidd_vhid_cuse.c -@@ -36,15 +36,15 @@ __FBSDID("$FreeBSD$"); - #include <unistd.h> - #include <string.h> - #include <syslog.h> --#include <cuse4bsd.h> -+#include <cuse.h> - #include "uhidd.h" - - /* -- * General Virtual HID device driver. (cuse4bsd version) -+ * General Virtual HID device driver. (cuse version) - */ - - #if CUSE_VERSION < 0x000118 --#error uhidd requires cuse4bsd version >= 0.1.24 -+#error uhidd requires cuse version >= 0.1.24 - #endif - - #ifndef CUSE_ID_UHIDD @@ -192,7 +192,7 @@ vhid_attach(struct hid_appcol *ha) vd->vd_rsz = ha->ha_rsz; } else { @@ -294,7 +275,7 @@ Date: Sun May 29 16:13:33 2016 +0000 return (-1); } -@@ -468,7 +468,7 @@ vhid_write(struct cuse_dev *cdev, int fflags, const vo +@@ -468,7 +468,7 @@ vhid_write(struct cuse_dev *cdev, int ff goto write_done; if (verbose) { diff --git a/sysutils/uhidd/files/patch-uhidd_Makefile b/sysutils/uhidd/files/patch-uhidd_Makefile index 3099c2e4777e..6b3869cfb260 100644 --- a/sysutils/uhidd/files/patch-uhidd_Makefile +++ b/sysutils/uhidd/files/patch-uhidd_Makefile @@ -1,6 +1,6 @@ ---- uhidd/Makefile.orig 2012-10-14 19:53:44 UTC +--- uhidd/Makefile.orig 2012-10-14 00:38:33 UTC +++ uhidd/Makefile -@@ -8,14 +8,14 @@ GENSRCS= usage_in_page.c usage_page.c +@@ -8,7 +8,7 @@ GENSRCS= usage_in_page.c usage_page.c CLEANFILES= ${GENSRCS} MAN= uhidd.conf.5 uhidd.8 @@ -9,11 +9,3 @@ PREFIX?= /usr/local LOCALBASE?= /usr/local - LIBDIR= ${PREFIX}/lib - - DPADD= ${LIBUSB} ${LIBPTHREAD} ${LIBUTIL} --LDADD= -lcuse4bsd -lusb -lpthread -lutil -+LDADD= -lcuse -lusb -lpthread -lutil - - CFLAGS+= -I. -I${.CURDIR} -I${LOCALBASE}/include -g - LDFLAGS+= -L${LIBDIR} diff --git a/sysutils/uhidd/files/patch-uhidd_uhidd.8 b/sysutils/uhidd/files/patch-uhidd_uhidd.8 deleted file mode 100644 index 9532891c6862..000000000000 --- a/sysutils/uhidd/files/patch-uhidd_uhidd.8 +++ /dev/null @@ -1,29 +0,0 @@ ---- uhidd/uhidd.8.orig 2012-10-14 19:53:44 UTC -+++ uhidd/uhidd.8 -@@ -89,7 +89,7 @@ All other HID application collections that don't - have a specific driver can be attached by the Virtual Generic HID - class driver. The driver creates a virtual USB HID device using - the --.Xr cuse4bsd 4 -+.Xr cuse 4 - interface, so normal USB HID applications that deal with - .Xr uhid 4 , - e.g. -@@ -114,7 +114,7 @@ foreground. This option is intended for debugging the - .It Fl h - Attach the Virtual Generic HID class driver. - This option requires that --.Xr cuse4bsd 4 -+.Xr cuse 4 - driver loaded as a kernel module. - .It Fl H - Specify the name of the virtual HID device created by the -@@ -207,7 +207,7 @@ the in-memory multimedia keymap for device ugen.%u.%u - .Sh SEE ALSO - .Xr usbhidaction 1 , - .Xr usbhidctl 1 , --.Xr cuse4bsd 3 , -+.Xr cuse 3 , - .Xr usb 3 , - .Xr usbhid 3 , - .Xr uhid 4 , diff --git a/sysutils/uhidd/files/patch-uhidd_uhidd__cuse4bsd.c b/sysutils/uhidd/files/patch-uhidd_uhidd__cuse4bsd.c deleted file mode 100644 index 7b32f5aa12b5..000000000000 --- a/sysutils/uhidd/files/patch-uhidd_uhidd__cuse4bsd.c +++ /dev/null @@ -1,41 +0,0 @@ ---- uhidd/uhidd_cuse4bsd.c.orig 2012-10-14 19:53:44 UTC -+++ uhidd/uhidd_cuse4bsd.c -@@ -29,7 +29,7 @@ __FBSDID("$FreeBSD$"); - - #include <sys/param.h> - #include <sys/wait.h> --#include <cuse4bsd.h> -+#include <cuse.h> - #include <stdio.h> - #include <stdlib.h> - #include <pthread.h> -@@ -70,16 +70,16 @@ ucuse_init_again: - } else { - if (verbose) - syslog(LOG_INFO, "Attempt to load kernel" -- " module cuse4bsd.ko..."); -- status = system("kldload cuse4bsd"); -+ " module cuse.ko..."); -+ status = system("kldload cuse"); - if (WEXITSTATUS(status) != 0) { -- syslog(LOG_ERR, "Failed to load cuse4bsd" -+ syslog(LOG_ERR, "Failed to load cuse" - " kernel module"); - return (-1); - } - if (verbose) - syslog(LOG_INFO, "Successfully loaded" -- " cuse4bsd kernel module"); -+ " cuse kernel module"); - cuse4bsd_load = 1; - goto ucuse_init_again; - } -@@ -88,7 +88,7 @@ ucuse_init_again: - cuse4bsd_init = 1; - - if (verbose) -- syslog(LOG_INFO, "cuse4bsd initiailzed."); -+ syslog(LOG_INFO, "cuse initiailzed."); - - return (0); - } |