Author: hselasky
Date: Mon Oct 4 22:04:22 2010
New Revision: 213431
URL: http://svn.freebsd.org/changeset/base/213431
Log:
Correct IOCTL return code.
Approved by: thompsa (mentor)
Modified:
head/sys/dev/usb/usb_dev.c
Modified: head/sys/dev/usb/usb_dev.c
==============================================================================
--- head/sys/dev/usb/usb_dev.c Mon Oct 4 21:44:26 2010 (r213430)
+++ head/sys/dev/usb/usb_dev.c Mon Oct 4 22:04:22 2010 (r213431)
@@ -1456,7 +1456,7 @@ usb_static_ioctl(struct cdev *dev, u_lon
struct usb_read_dir *urd;
void* data;
} u;
- int err = ENOTTY;
+ int err;
u.data = data;
switch (cmd) {
@@ -1472,6 +1472,7 @@ usb_static_ioctl(struct cdev *dev, u_lon
break;
case USB_GET_TEMPLATE:
*(int *)data = usb_template;
+ err = 0;
break;
case USB_SET_TEMPLATE:
err = priv_check(curthread, PRIV_DRIVER);
@@ -1479,6 +1480,9 @@ usb_static_ioctl(struct cdev *dev, u_lon
break;
usb_template = *(int *)data;
break;
+ default:
+ err = ENOTTY;
+ break;
}
return (err);
}
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "[email protected]"