Mass storage driver write buffer and output of dd command
Mass storage driver write buffer and output of dd command
- Subject: Mass storage driver write buffer and output of dd command
- From: Yogesh P <email@hidden>
- Date: 27 Oct 2005 20:19:29 +0530
Hi Folks,
I have implemented a Mass storage driver which successfully gets loaded
by matching "content Hint" property and exposes matched IOMedia objects.
When I load my driver, the default write() routine of the driver gets
called which is as follows:
void com_My_driver::write(IOService* provider, UInt64 byteStart,
IOMemoryDescriptor* buffer,
IOStorageCompletion completion)
{
IOLog("Driver Call:: write\n");
byteStart = 0; // explicitly specify to write at zero bytestart
char* MyBuff = new char[kBufSize]; // kBufSize = 512
IOByteCount RWBuffSize = buffer->getLength();
IOByteCount readBufBytes = 0;
readBufBytes = buffer->readBytes(0, MyBuff, kBufSize);
IOLog("\n buffer inside write call::%s\n", MyBuff);
delete[] MyBuff;
getProvider()->write(this, byteStart, buffer, completion);
}
My driver exposes volume as /Volumes/Org.When I write some data on this
partition, the buffer I had printed inside write call shows the data as
H+,JNLx^R4Vx and the data which I had written on the partition.
Is the data H+ and JNLx^R4Vx is a metadata for the partition???
To verify that whatever data I had written on the volume is actually
gets on the disk or not I use "dd" command, but the output of the "dd"
command shows only H+, JNLx^R4Vx data on the disk and does not show the
data which I had written on the disk.
Is the data coming for the write() routine write in binary mode on the
disk????
Please help me to understand this mechanism of Mass storage driver.
Thanks in advance.
Thanks & Regards,
Yogesh Pahilwan
_______________________________________________
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