On 1/3/19 10:48 AM, Matthias Apitz wrote:
Is there a way log log any init call to libusb.so to see which process
is doing something with libusb.so after devd(8) started pcscd?

Hi,

You can add a print in the kernel sys/dev/usb/usb_generic.c in the function:

static int
ugen_open(struct usb_fifo *f, int fflags)


printf("USB opened by PID %d %s\n", curthread->td_proc->p_pid, curthread->td_proc->p_comm);


Index: sys/dev/usb/usb_generic.c
===================================================================
--- sys/dev/usb/usb_generic.c   (revision 342455)
+++ sys/dev/usb/usb_generic.c   (working copy)
@@ -185,6 +185,8 @@
DPRINTFN(6, "flag=0x%x\n", fflags); + printf("USB opened by PID %d %s\n", curthread->td_proc->p_pid, curthread->td_proc->p_comm);
+
        mtx_lock(f->priv_mtx);
        switch (usbd_get_speed(f->udev)) {
        case USB_SPEED_LOW:


--HPS
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to "[email protected]"

Reply via email to