Re: [BUGI] IOCTL :Facing problems while acccessing data from kernel space
From: n0g0013 (ttw_at_cobbled.net)
Date: 09/29/05
- Previous message: Rob Watt: "Re: freebsd-5.4-stable panics"
- In reply to: rashmi ns: "IOCTL :Facing problems while acccessing data from kernel space"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 28 Sep 2005 23:13:22 +0100 To: rashmi ns <nsrashmi@gmail.com>
On 28.09-13:40, rashmi ns wrote:
[ ... ]
> I was trying to add a new ioctl command like
> > #define HDLCMODE _IOR('6',0xF,int)
> > when i trying to uprintf the data which was sent from the user-space in
> > the device-driver-ioctl-routine i'll get a different value than which was
> > passed. Can anybody please tell me why this is happening . I pass the
> > address of an integer where data is stored from the user space as third arg
> > to the ioctl call .
i would guess that it's a simple typo and your pointer conversions
are off somewhere.
i.e.
uprintf( "%d", (int*)data ) ;
instead of
uprintf( "%d", *(int*)data ) ;
otherwise, use a debugger or post the code.
--
t
t
w
_______________________________________________
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"
- Previous message: Rob Watt: "Re: freebsd-5.4-stable panics"
- In reply to: rashmi ns: "IOCTL :Facing problems while acccessing data from kernel space"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|