[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: problem with ioctl call



Schachner Thomas wrote:
> 
> this line in the code causes an segmentation fault on the axis board , 
> but on
> the host system all is ok!!
> 
> ret = ioctl(dev->fd,IOCTL_USB_CLAIMINTF, &interface);
> 
> It seems that the ioctl System call is causing this problem on the axis 
> board
> 
> What can i do now ?

I'm guessing that the ioctl call goes to the onewire/libusb.so file, so 
I would suggest adding printouts to that function to try and narrow down 
exactly which line in the code causes the segmentation fault.  If that 
particular line accesses a pointer, for example, I would trace back to 
where and how it was declared and allocated.  I've seen stuff before in 
some USB drivers where static structs were declared __devinitdata (which 
means it's thrown away by the kernel) and later used, which didn't work 
properly.

-- 
Orjan Friberg
Axis Communications