Am 27.05.2018 um 14:52 schrieb Thomas Schmitt:

Is there documentation about what a raw partition can do which the others
cannot ?

I don't know, sorry. I'm not a NetBSD developer. Just ported fre:ac to the BSDs back then and most of my knowledge is from trying it out and/or reading the source code.

libburn tries with 'c' and 'd' :

   fd = open(path, O_RDWR | O_NDELAY);
   ...
   ret = ioctl(fd, SCIOCIDENTIFY, &addr);

and wants to see after successful ioctl():

   addr.type == TYPE_SCSI
From then on, the drive is regarded as usable for SCSI transactions
via ioctl(SCIOCCOMMAND).

Is this too daring ?

I *think* this should work, but it would probably be better to use 'a' + RAW_PART. Two reasons:

1. Future architectures might define RAW_PART to 4 or something else, so you'd suddenly get devices like /dev/rcd0e on such systems. 2. Not sure if it's actually possible, but on architectures with RAW_PART == 3 there might still be a /dev/rcd0c device in some cases, but with a different meaning. Treating it like a raw disc device could possibly cause bad things to happen.

----
Robert Kausch
[email protected]


Reply via email to