[Simh] Raw access to disk/cdrom devices
Tim Shoppa
tshoppa at wmata.com
Fri Mar 26 11:02:49 EST 2004
> I already tried to use /dev/sda as the target device and found out that it
> didn't work...that's part of what started me thinking about how to make it
> work. :)
The last time I looked at this under linux I came to the conclusion
that the stat(2) call on the raw devices didn't necessarily return
the values I would naively expect. In particular the device
size is hard to get at portably in this naive way. Put
a couple #ifdef's for various systems and maybe it's not so
bad... but I haven't tried to write this portably. I've
got access to linux and VMS readily, and BSD and Windows not so
readily.
I think that the stat(2) call on BSD did return what I expected
for raw device size (at least up to 4 Gbytes).
I think raw native tape access would be nice someday too.
Approaching this with a "SCSI mindset" might work but may not
be the most portable way.
Tim.
More information about the Simh
mailing list