Hi all,
OK, I just thought a followup on my own mail would be nice here to see
what I suggested before (see end of mail for the old text).
But now that I'm in the process of heavily rewriting CD-ROM labels and serials
and drive stuff, I thought "why not add this part, too ?".
I think a very easy way to do this kind of stuff is using a new "BIOS" boolean
flag.
And as we all know that floppies have BIOS (i.e. int 0x13) IDs of 0, 1, 2, ...
and HDDs have IDs of 0x80, 0x81, ..., the assignment is no problem at all.
And other wine.conf device types aren't available for BIOS IDs anyway.
I.e.
[Drive A]
Path=/dosa
Type=floppy
Label=FloppyA
Serial=87654321
Device=/dev/fd0
Filesystem=win95
BIOS=1
[Drive B]
Path=/dosb
Type=floppy
Label=FloppyB
Device=/dev/fd1
Filesystem=win95
[Drive C]
;Path=/dosc
;Path=/smb/roland/c
Path=/wine
Type=hd
Label=MS-DOS
Filesystem=win95
BIOS=1
[Drive D]
Path=/dosd
Type=hd
Label=WINDOWS
Filesystem=win95
[Drive E]
Path=/dose
Type=hd
Label=LINUX-PORT
Filesystem=win95
BIOS=1
would give us the following IDs for the drives:
A 0 (first floppy with a "BIOS" flag)
B --
C 0x80 (we know it's "Type=hd")
D --
E 0x81 ( "" )
So A would be the first "physical" BIOS floppy, whereas B wouldn't be
configured as a BIOS device; ok, it is a floppy, but it does NOT have a BIOS
flag.
I don't think directly assigning BIOS IDs instead of just telling Wine to
assign BIOS IDs would be better.
OK, that way you could assign ID 0 to floppy B and ID 1 to floppy A (reversed),
but that could horribly break some programs and IMHO you don't have any
useful advantage.
And of course you confuse newbies even more ;-)
OK, so much for this stuff.
Now about the dangers of raw block writing:
I think we should assume that as soon as a [Drive X] has a "Device=" entry,
it can be used for DOS int 0x25/0x26 raw sector reads (given the accessability
of the device file, of course. Wine won't give a warning if it's not, BTW).
And as soon as a drive has a "BIOS=" entry, it can be used for BIOS int 0x13
raw block device reads, too.
And now I suggest adding a "RawWrite=1" flag that tells Wine that writing
to the device via either DOS or BIOS access is allowed.
In case RawWrite is set to 1, I'd emit a BIG FAT WARNING upon EVERY Wine
startup telling that this could cause data loss.
That's it.
The only thing I need to know now is:
1. Is this viable ? Please think of any problem you might see with that
assignment ! Think of many very different test cases.
2. Do my new [Drive X] entries have good names or should that be changed ?
3. Maybe it's not to have the DOS and BIOS writing configuration option
combined. Just tell me your opinion here.
My old suggestions:
On Wed, Jun 28, 2000 at 10:51:58AM +0200, Andreas Mohr wrote:
> Iīve been wasting many thoughts on this and I still donīt know
> how to implement this wine.conf-wise.
> Technically, itīs no problem at all to implement it; the only real
> problem is how to solve the BIOS drive assignment
> (i.e. how to indicate that such-and-such drive can be safely
> written to/read from).
> Perhaps we should just introduce an additional parameter called
> BiosID=XXX for every [Drive X] that says 0x0 and 0x1
> for the floppies and 0x80, ... for the HDDs ?
> Of course the Dev= entry has to be existing for these [Drive X]
> entries in this case...
>
> I guess thatīs the way to go.
> Of course that means that itīs each individual userīs own problem if
> he dares to assign a BiosID= for a Drive entry...
> After all it can destroy file systems that way (which often is
> exactly what you want when using int 0x13 functions).
>
> Again, implementing that should be NO problem at all...
> (a matter of few hours, definitely not days)
>
> I guess we could even go as far as print a warning on EVERY
> Wine startup that says something like:
> "Warning ! Wine detected at least one BiosID= entry in your
> config file. This might lead to formatted file systems.
> However, this warning is non-critical; we just want to inform you
> of the implications this setting has."
Andreas Mohr