FreeBSD Bugzilla – Attachment 255223 Details for
Bug 282790
hidraw(4) - Regression in documented behavior of HIDRAW_GET_REPORT.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch to uhid.c correcting the defect.
uhid.patch (text/plain), 1.53 KB, created by
Matthew.Nygard.Dodd
on 2024-11-16 19:36:55 UTC
(
hide
)
Description:
Patch to uhid.c correcting the defect.
Filename:
MIME Type:
Creator:
Matthew.Nygard.Dodd
Created:
2024-11-16 19:36:55 UTC
Size:
1.53 KB
patch
obsolete
>diff --git a/sys/dev/usb/input/uhid.c b/sys/dev/usb/input/uhid.c >index 863e04f4e52b..4e707b4aec60 100644 >--- a/sys/dev/usb/input/uhid.c >+++ b/sys/dev/usb/input/uhid.c >@@ -611,60 +611,61 @@ uhid_ioctl(struct usb_fifo *fifo, u_long cmd, void *addr, > mtx_unlock(&sc->sc_mtx); > } > break; > > case USB_GET_REPORT: > if (!(fflags & FREAD)) { > error = EPERM; > break; > } > switch (ugd->ugd_report_type) { > case UHID_INPUT_REPORT: > size = sc->sc_isize; > id = sc->sc_iid; > break; > case UHID_OUTPUT_REPORT: > size = sc->sc_osize; > id = sc->sc_oid; > break; > case UHID_FEATURE_REPORT: > size = sc->sc_fsize; > id = sc->sc_fid; > break; > default: > return (EINVAL); > } > if (id != 0) > error = copyin(ugd->ugd_data, &id, 1); > if (error == 0) > error = uhid_get_report(sc, ugd->ugd_report_type, id, > NULL, ugd->ugd_data, imin(ugd->ugd_maxlen, size)); >+ ugd->ugd_actlen = size; > break; > > case USB_SET_REPORT: > if (!(fflags & FWRITE)) { > error = EPERM; > break; > } > switch (ugd->ugd_report_type) { > case UHID_INPUT_REPORT: > size = sc->sc_isize; > id = sc->sc_iid; > break; > case UHID_OUTPUT_REPORT: > size = sc->sc_osize; > id = sc->sc_oid; > break; > case UHID_FEATURE_REPORT: > size = sc->sc_fsize; > id = sc->sc_fid; > break; > default: > return (EINVAL); > } > if (id != 0) > error = copyin(ugd->ugd_data, &id, 1); > if (error == 0) > error = uhid_set_report(sc, ugd->ugd_report_type, id, > NULL, ugd->ugd_data, imin(ugd->ugd_maxlen, size)); > break; >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 282790
:
255207
|
255223
|
255239