Re: Of removable devices

From: David Balazic (david.balazic@uni-mb.si)
Date: Thu Feb 17 2000 - 11:51:01 EST


Riley Williams wrote :

> >> Ahem... OK, does anyone else see something strange in words "OS
> >> popped up a dialog"?
>
> > No.
>
> > On a real operating system, the OS would simply notify userland,
> > which would do whatever it wanted to do.
>
> Fair enough so far. It's from here on that things go wrong.
>
> > A sensible userland might then spit out a dialog telling the
> > user...
>
>
> Which user's screen should that dialogue appear on? Remember, the
> process most likely to access floppies is the one that flushes dirty
> buffers to disk - `updated` if my memory's correct - and it's unlikely
> it will have any clue here.
>
>
> Remember: On a multi-user system like Linux, the user that removed the
> floppy could easily NOT be the user that was writing to it.

Answer : The owner of the floppy ( more precisely the owner of /dev/fd0
).
The owner of this file is usually set to the user who is logged in on
the console ( it makes no sense to bug some remote user to insert a
floppy ).

So when the situation arises :

If the user is logged on via X11 , display a dialog.
If on console , just write some msg to /dev/console.

This should be done by some daemon , off-course.

And the man who said 'Think about kerneld/kmod/whatever it is this week'
probably mean't "use an userland demon, in concept similar to the kmod
stuff",
and not use kerneld-V2.0.1 .

--
David Balazic

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Wed Feb 23 2000 - 21:00:18 EST