Date: Mon, 4 Oct 2010 22:04:23 +0000 (UTC) From: Hans Petter Selasky <hselasky@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r213431 - head/sys/dev/usb Message-ID: <201010042204.o94M4ND7028900@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201010042204.o94M4ND7028900>