Re: reading a file in the kernel
Re: reading a file in the kernel
- Subject: Re: reading a file in the kernel
- From: Michael George <email@hidden>
- Date: Fri, 13 Dec 2002 15:35:33 -0500
On Thursday, December 12, 2002, at 04:57 PM, Amanda Walker wrote:
On 12/12/02 4:06 PM, Michael George <email@hidden> wrote:
This is what I was thinking of doing as a fallback. However, using
"IOConnectMethod*()" I can pass scalars and structures. However, the
data I want to pass in will be of arbitrary length, so I can't define
that length in the getTargetAndMethodForIndex() data table.
Set the length to 0xffffffff in the table. IOConnectMethod() can
handle
variable length buffers just fine.
I don't think this is the case anymore. I tried it and I got some
wild-high IOReturn value. I did some other tests and it seems that:
If the size of the struct as defined in getTargetAndMethodForIndex() is
too large (somewhere between 1Kb (which succeeded) and 512Kb (which
failed)) I get 0xfffffecd as the result. It doesn't matter what size I
really pass when I make the IOConnectMethod*() call. Needless to say,
0xffffffff is much bigger than .5Mb...
It also seems that if the size for a structure I send in the
IOConnectMethod*() calls isn't the same as the size declared in
getTargetAndMethodForIndex(), then I get 0xe00002c2 (bad argument) back.
Together, it seems that there is no way to pass arbitrary buffers
through IOConnectMethod*() calls...
Can anyone else confirm or correct this?
-Michael
_______________________________________________
darwin-kernel mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/darwin-kernel
Do not post admin requests to the list. They will be ignored.