[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [MiNT] drive letters (was: Kernal questions)
>Basically, this is the approach I advocate for MiNT:
>1) GEM apps access drive letters (ie: C:\clipbrd\scrap.txt)
>2) CLI only access real UNIX paths (ie: /tmp/screen.copy)
>In other words, drive letters should be absent from / since U:
>is our UNIX / (ie: root), but there should still be a way
>for GEM to access paths in the traditional DOS way.
>Likewise, CLI should access /floppy while GEM wants A:\ drive.
>You get the idea? ;-)
May I make a suggestion...
Why not, in the kernel, automatically mount disks as and when necessary by
reading an fstab type file. The file could tell the system how to mount it,
ie. whether it's a removable device, what ownership to give it, etc. Similar
to Solaris' volume manager and automounter combined. If it tries to mount a
removable device with no media in the drive it could either give an error or
merely offer an empty, read-only directory.
Say you have an fstab such as:-
/ /dev/tosd minix defaults 1 1
/usr /dev/tose minix defaults 1 2
/tosc /dev/tosc tos defaults 0 0
/floppy /dev/fd0 tos user,removable 0 0
This means that if you start out at / and your cd to /usr and /usr isn't
already mounted, then it gets mounted then and there for you.
If you ls /floppy, the system will attempt to mount the floppy disk on /floppy
and make the disk seem to be owned by the user who asked for it to be looked
at. Having told the system that the drive is removable, every time a new
access is made, a check to see if the disk has been removed or changed would
have to be made. How often this takes place is up to the community to decide
what the balance between safety and usability is.
In this way, (a) you don't need an extra mount command, and (b) it's totally
transparent to novice users while decreasing the security aspects to the
minimum. It would be nice if Unix went in this direction, IMHO.
To give legacy applications their drive letters you could have a separate
file, such as /etc/drivemap, for example, which maps directories within the
filesystem to TOS drive letters.
I'll give an example of what I mean:-
/etc/drivemap would contain some sort of database, I'll assume it's two
columns, drive letter and root-directory:-
If the kernel gets given an old TOS path, such as:-
It does the path translation on the fly to:-
In this way, everything is transparent to the application, which is how it
Steve (still lurking on the list)
Computer Systems Administrator, E-Mail:-email@example.com
Department of Earth Sciences, Tel:- +44 (0)1865 282110
University of Oxford, Parks Road, Oxford, UK. Fax:- +44 (0)1865 272000