From: martin f krafft <madduck@madduck.net>
To: linux kernel mailing list <linux-kernel@vger.kernel.org>,
linux-usb-users@lists.sourceforge.net
Subject: [solved] failing to force-claim USB interface
Date: Mon, 19 Jan 2004 18:58:42 +0100 [thread overview]
Message-ID: <20040119175842.GA8346@piper.madduck.net> (raw)
In-Reply-To: <20040119164627.GA29146@piper.madduck.net> <20040119154633.GA3797@piper.madduck.net>
[-- Attachment #1: Type: text/plain, Size: 1457 bytes --]
also sprach Martin F Krafft <krafft@ailab.ch> [2004.01.19.1646 +0100]:
> struct usb_device *dev;
> [...]
> sprintf(path, "/proc/bus/usb/%s/%s", dev->bus->dirname, dev->filename);
> int fd = open(path);
> struct usbdevfs_ioctl command = { 0, USBDEVFS_DISCONNECT, 0 };
> ioctl (fd, USBDEVFS_IOCTL, &command) < 0
I was using the wrong fd. The following works:
struct usb_device *dev;
[...]
struct usb_device_handle udev = usb_open(dev);
struct usbdevfs_ioctl command = { 0, USBDEVFS_DISCONNECT, 0 };
ioctl(udev->fd, USBDEVFS_IOCTL, &command)
Now the only thing left to figure out is how the libusb library
expects us to do this, because struct usb_device_handle; is not
implemented in the exported interface.
I guess the solution is to implement the above functionality in
libusb itself.
--
martin; (greetings from the heart of the sun.)
\____ echo mailto: !#^."<*>"|tr "<*> mailto:" net@madduck
invalid/expired pgp subkeys? use subkeys.pgp.net as keyserver!
there are 3 types of guys -- the ones who hate nerds (all nerds, that
is; girls aren't let off the hook); the ones who are scared off by
girls who are slightly more intelligent than average; and the guys who
are also somewhat more intelligent than average, but are so shy that
they can't put 2 words together when they're within 20 feet of a girl.
-- vikki roemer on debian-curiosa
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
prev parent reply other threads:[~2004-01-19 17:59 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20040119164627.GA29146@piper.madduck.net>
2004-01-19 15:46 ` failing to force-claim USB interface Martin F Krafft
2004-01-19 17:58 ` martin f krafft [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20040119175842.GA8346@piper.madduck.net \
--to=madduck@madduck.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb-users@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox