LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 11-05-2009, 04:09 PM   #1
random0
LQ Newbie
 
Registered: Jun 2006
Location: Gainesville, Fl, USA
Distribution: Debian GNU/Linux
Posts: 18

Rep: Reputation: 0
usb_bulk_msg return value -8


I'm writing a USB kernel driver and for some of the bulk transfers, I'm using the following function.

Code:
#include <linux/usb.h>
int usb_bulk_msg (struct usb_device * usb_dev, unsigned int pipe, void * data, int len, int * actual_length, int timeout);
When I call it, it returns -8. The man page states:

Quote:
If successful, it returns 0, otherwise a negative error number. The number of actual bytes transferred will be placed in the actual_timeout parameter.
If by "negative error number" it is referring to a value defined in errno.h, then that return value means "Exec format error". usb_bulk_msg is in the kernel, it shouldn't be calling exec. And if it was, wth?

Any ideas on what this value actually means?
 
Old 11-05-2009, 04:34 PM   #2
ammorais
Member
 
Registered: Nov 2009
Location: Lisbon, Portugal
Distribution: Gentoo, CentOs, Ubuntu, Debian
Posts: 182

Rep: Reputation: 49
I believe you will actually look in to the source code. BTW, why do you think that is returning a value defined in "errno.h"? It just returns an int It can be anything.

Looking in to the source code you have:

Code:
return usb_start_wait_urb(urb,timeout,actual_length);
Fallowing usb_start_wait_urb I discovered:
Code:
ret = usb_internal_control_msg(dev, pipe, dr, data, size, timeout);

I don't think it has anything to do with errno.h
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
dpkg return error :post installation script return an error code (1) grimfold Debian 2 09-10-2009 01:55 PM
Return Value Swapna173 Linux - Newbie 5 08-29-2008 07:10 AM
return value neerajchaudhari Linux - Newbie 1 08-29-2005 01:42 AM
return 0 or return(0) in C? servnov Programming 5 01-08-2005 04:39 PM
return linuxanswer Programming 4 10-25-2003 11:31 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 08:19 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration