Subject: Re: #ifdef __i386 in usr.bin/eject
To: None <current-users@NetBSD.ORG>
From: Ty Sarna <tsarna@endicor.com>
List: current-users
Date: 10/23/1995 23:54:36
In article <199510231848.LAA11079@lestat.nas.nasa.gov>,
Jason Thorpe  <thorpej@nas.nasa.gov> wrote:
> On Mon, 23 Oct 1995 09:48:09 -0400 (EDT) 
>  Rob Leland <leland@freetocreate.cais.com> wrote:
> 
>  > Why is there a #ifdef __i386 in
>  > src/usr.bin/eject/eject.c ?
>  > There doesn't seem to be any architecture specific code in
>  > the rest of the user command tree.
> 
> Because i386 floppy drives have an eject button, and aren't motorized.

Same for Amiga floppies, and other platforms too.  I'm sure there are
platforms where both types can be present.  Shoudln't the be the
responsibility of the driver to figure out what the hardware is capable
of, and not hard-coded user-space programs?

On the whole the eject program is nice, though. One good addition would
be to allow it to accept a mount point as an argument, so one could say
"eject /mnt" and have it eject the floppy or disk or whaveter was
mounted there.