[openbeos] Newsletter -- device filesystem article.

I liked the article. There is definitely something wrong with the current fixed pre-coded way it is often done. Even more with the way it is done under most traditional unixes: user-made device nodes. But i don't really agree with michaels vision. So here comes mine ...

I do like the idea of devices being in /dev! but in a different way than is common now. The / filesystem should completely be a virtual filesystem, only meant to mount other (virtual) filesystems in. so one could mount a harddisk, a virtual device driver filesystem, a device, or the famous /proc. So the / would only be the root directory, in which hardware or virtual devices could be mounted in a directory. This provides an easy way to find things, and visualise them in a file manager. so maybe in /smb the computers on your lan with their samba shares could be mounted? or in /pop a directory with mailserver and the mails on it.

Now to the device filesystem idea: I like organising them in groups of what they return. so in /dev we make it happen:

some 5 hard disks:
/dev/mass_storage/harddisk/0
/dev/mass_storage/harddisk/...
/dev/mass_storage/harddisk/4

the mouse, drawing-tablet, scanner and digital camera:
/dev/graphics_input/scanner/0
/dev/graphics_input/camera/0
/dev/graphics_input/pointers/0
/dev/graphics_input/pointers/1

and so on.

Of course this is created dynamically. so a devices publishes itself as a graphical input device of type scanner or camera, maybe even that it can output this or that format. Then the number of this device of that type is automatically assigned. I already see open-tracker browse through my devices: on icon with a scanner, on with a camera, one with a harddisk...

Now with this layout you don't have to ask anyone which devices give you what output; you can have a device in any catgory you need it. so you could put the camera in /dev/output_format/jpeg/0 and your (open)BFS filesystem is in /dev/output_format/bfs/0 :)

What you proposed, having the / only for your harddrive leaves me with one major question: where do you put the second hard-drive? i hate the idea of virtually mounting a drive to a directory which on a physical drive.

Eike.


Other related posts: