The manpage promises not to touch the device on USB_GET_DEVICEINFO.

Make it so.
This commit is contained in:
drochner 2007-02-26 13:28:56 +00:00
parent 8fd98300b1
commit ff825e3a80
2 changed files with 8 additions and 8 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: ugen.c,v 1.90 2007/02/21 15:42:07 wiz Exp $ */
/* $NetBSD: ugen.c,v 1.91 2007/02/26 13:28:56 drochner Exp $ */
/*
* Copyright (c) 1998, 2004 The NetBSD Foundation, Inc.
@ -44,7 +44,7 @@
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: ugen.c,v 1.90 2007/02/21 15:42:07 wiz Exp $");
__KERNEL_RCSID(0, "$NetBSD: ugen.c,v 1.91 2007/02/26 13:28:56 drochner Exp $");
#include "opt_ugen_bulk_ra_wb.h"
#include "opt_compat_netbsd.h"
@ -1804,12 +1804,12 @@ ugen_do_ioctl(struct ugen_softc *sc, int endpt, u_long cmd,
}
case USB_GET_DEVICEINFO:
usbd_fill_deviceinfo(sc->sc_udev,
(struct usb_device_info *)addr, 1);
(struct usb_device_info *)addr, 0);
break;
#ifdef COMPAT_30
case USB_GET_DEVICEINFO_OLD:
usbd_fill_deviceinfo_old(sc->sc_udev,
(struct usb_device_info_old *)addr, 1);
(struct usb_device_info_old *)addr, 0);
break;
#endif

View File

@ -1,4 +1,4 @@
/* $NetBSD: uhid.c,v 1.74 2007/02/09 21:55:29 ad Exp $ */
/* $NetBSD: uhid.c,v 1.75 2007/02/26 13:28:56 drochner Exp $ */
/*
* Copyright (c) 1998, 2004 The NetBSD Foundation, Inc.
@ -42,7 +42,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: uhid.c,v 1.74 2007/02/09 21:55:29 ad Exp $");
__KERNEL_RCSID(0, "$NetBSD: uhid.c,v 1.75 2007/02/26 13:28:56 drochner Exp $");
#include "opt_compat_netbsd.h"
@ -539,12 +539,12 @@ uhid_do_ioctl(struct uhid_softc *sc, u_long cmd, caddr_t addr,
case USB_GET_DEVICEINFO:
usbd_fill_deviceinfo(sc->sc_hdev.sc_parent->sc_udev,
(struct usb_device_info *)addr, 1);
(struct usb_device_info *)addr, 0);
break;
#ifdef COMPAT_30
case USB_GET_DEVICEINFO_OLD:
usbd_fill_deviceinfo_old(sc->sc_hdev.sc_parent->sc_udev,
(struct usb_device_info_old *)addr, 1);
(struct usb_device_info_old *)addr, 0);
break;
#endif