lkml.org 
[lkml]   [2000]   [Feb]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: Of removable devices
Date
Riley Williams wrote:
>
> Hi David.
>
> >>>>> it would mount as another logical volume. Now when there was a
> >>>>> need to access the first floppy, the OS popped up a dialog ( a
> >>>>> requester, in amiga terminology :-) saying "Insert volume
> >>>>> Linux_help_disk into any drive". When the user
>
> >>>> Ahem... OK, does anyone else see something strange in words "OS
> >>>> popped up a dialog"?
>
> >>> 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?
>
> > Who cares?
>
> {Shrug} If you don't care about kernel issues, you shouldn't be here.

It's not a kernel issue. Why should the lkml care about
reinventing userspace things? Just off the top of my head I can
think of an implementation of a userspace disk-change notifier that
doesn't require anything more than some sort of {SEYMOUR FEED ME}
callback, and I'm sure that the people who do it for a living can
think of a whole bunch of other ways to do it.


> > It's a >>USERLAND PROBLEM<< and once the notify gets out of
> > kernelspace it's not a lkml problem anymore.

> Personally, I can't see any point in writing a single line of kernel
> code to address this issue

You're planning on writing the kernel glue, and are waiting for a
userland interface? Qool. Give me a procfs or devfs pipe that
I can hang a daemon off to pick up {FEED ME, SEYMOUR!} requests,
a mount option that lets me specify the socket name (I suggest
``notifier=filename'' -- the path to it can be fixed), and tweak
the driver code so that iff there's a notifier pipe and the media
isn't there, it spits a one-byte message up the pipe, otherwise
it fails in the normal way.

It won't be hard to tweak mount so that if there's a notifier=
option on a mount and the mount command is run from a tty, it
will launch a notifier daemon. The notifier daemon will be
attached to the users tty, so if they hang up, it will die and
unmount the offending filesystem, otherwise it will simply
spit "feed me!" messages as appropriate.

____
david parsons \bi/ It's an ugly interface, but what do you expect for
\/ 20 seconds of thought?

-
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/

\
 
 \ /
  Last update: 2005-03-22 13:56    [W:0.133 / U:0.088 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site