Re: Read through Filter Scheme Driver
Re: Read through Filter Scheme Driver
- Subject: Re: Read through Filter Scheme Driver
- From: Michael Cashwell <email@hidden>
- Date: Tue, 10 May 2005 16:02:07 -0400
On May 10, 2005, at 9:48 AM, Imran Kazi wrote: We are facing problem with read operation on disk through filter scheme driver. We have successfully done write on disk from User space application to Userclient and then to disk through driver. Now we are trying to read the data on disk following the same path. But even after trying hard we are unsuccessful. Can any one tell us in brief that do we need to create pointer to IOMemoryDescriptor in driver and the do vm_allocate that buffer followed by prepare() and map(). If we do prepare to IOMemoryDescriptor’s pointer then it crashes the system while calling prepare() and if we do not prepare the memory and pass it to driver it does not read anything from the disk. We are using the standard API of IOStorage class to read from disk read(IOService*, IOByteCount, IOMemoryDescriptor*, IOCompletion ); Greetings,
I haven't worked with filter drivers, but you need to be clear about the IOMemoryDescriptor. It's a pointer to an instance if that class (or a subclass). It's not the raw memory itself. So you cannot "prepare" that pointer.
The actions you are trying to do are methods you invoke on the instance. You need to call ->map() and ->prepare() as methods and allow the class to do the work for you.
If that makes no sense can you post the relevant code?
Best regards, Mike
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden