1. accessing /dev/fd0 directly for sector reads/writes
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/
--------------------------------------------
2. font strangeness from xterm and emacs
3. kernel panic; /dev/fd0
4. HELP w Compile Defines
5. Sockets: write() writes OK, yet read() reads garbage...?
6. WANTED: Source code for rlogin
7. exabyte 8200 Tape drive Linux 1.1.59 system Panics on read or write
8. emacs 19.xx and ispell
9. Kernel Panics Unable to write inode
10. Help : Kernel panic unable to write inode
11. kernel panic while cd writing
12. Kernel Panic w/ write-protected floppy
13. Kernel panic with write