Hi there,
I'm getting into some operating system development, and it would make my
life a lot easier right now if I could use the Linux device drivers for
the time being to format my disks and such.
My question then becomes, how can I use /dev/fd0 directly? I realise
I'd have to be root, that's no problem. My understanding would be that
I can just open /dev/fd0 as a file and read and write to it. I tried
this, but had some troubles. I think I was reading correctly, but not
writting.
I know a "cat /dev/fd0" will give me the contents of the disk, so it
obviously acts as if it's a file, but it's actually a block device.
Does this mean that "fseek(file, 10, SEEK_SET)" will get me to the 10th
byte, or the 10th block? If block, how do I find out the size (I'm
assuming it'd be 512 bytes, for a regular disk) of the block?
Any information on this topic would be helpfull.
Thanks,
Jeff
PS: Please respond via email if possible.
--------------------------------------------
- Code X Software -
Programming to a Higher Power
web: http://www.codex.nu/
--------------------------------------------