Since I failed to reply all when I sent the original copy of this message a minute ago, and since our trusty list is back in action, I'm reposting it here. Sorry to Ingo for getting two copies... :-) ---------------------------------------------------------------------- On 2003-07-08 at 10:28:25 [-0700], Ingo Weinhold wrote: [...determining BDiskDevice::IsReadOnly()...] > Mmh, our > DriveSetup would have no way of checking whether it can work on the > device (i.e. initialize partitions or the device itself) -- other than > opening the device manually and do a B_GET_DEVICE_GEOMETRY ioctl, of > course. Couldn't it just try to open the device read-write? On 2003-07-08 at 10:28:25 [-0700], Ingo Weinhold wrote: > I would at least add a BDiskDevice::DeviceFlags() (we already > have BPartition::Flags()), which would comprise this and other flags. Which other flags? On 2003-07-08 at 14:35:43 [-0700], Ingo Weinhold wrote: > On Tue, 08 Jul 2003 22:31:07 +0200 CEST "Axel Dörfler" <axeld@pinc- > software.de> wrote: > > "Ingo Weinhold" <bonefish@xxxxxxxxxxxxxxx> wrote: > > [...] > > > > > > > name?)? Then IsReadOnly() for any partition would be the > > > > > > > logical OR of BDiskDevice::IsReadOnlyMedia() and the > > > > > > > non-write capability of the disk system. > > > > > > Hm, I don't know if the user might be interested in the > > > > > > general > > > > > > write capabilities of a given disk device. > > > > > Well, at least it doesn't harm, and for the kernelland > > > > > structures > > > > > I > > > > > will definitely discriminate between the two semantically > > > > > different > > > > > `read-only's or risk confusion. :-) > > > > I think that sounds like a good idea, and yes, I think that's > > > > what > > > > IsReadOnly() was really intended to convey. Do we need a > > > > BDiskSystem::IsReadOnly() then, though? > > > You mean what I named BDiskSystem::IsReadOnlyMedia()? Mmh, our > > > DriveSetup would have no way of checking whether it can work on > > > the > > > device (i.e. initialize partitions or the device itself) -- other > > > than > > > opening the device manually and do a B_GET_DEVICE_GEOMETRY ioctl, > > > of > > > course. I would at least add a BDiskDevice::DeviceFlags() (we > > > already > > > have BPartition::Flags()), which would comprise this and other > > > flags. > > > > BTW my question originally aimed at the "OR" part of the first > > quoted > > paragraph. If it's interesting for the user if the disk system has > > write capabilities or not, it should not be ORed with > > IsReadOnlyMedia() > > but be separately accessible. > > Mmh, I guess, I find it more convenient, if BPartition::IsReadOnly() > does the OR. The information the caller is interested in, is probably > whether they can modify the partition's contents. The info whether the > disk system in general does support writing or not is perhaps better > provided via something like BDiskSystem::IsReadOnly(). That's why I suggested it 4 replies ago. :-) :-P At any rate, I like the OR-semantics for BPartition::ReadOnly() as well. -Tyler