DEVMENU(1)

NAME
devmenu - present a menu of available devices

SYNOPSIS
devmenu [-c class] [-f outfile] [-h helpfile] [-s state] [-t title] [-nid] [name ...]

DESCRIPTION
The devmenu program uses the dialog(3) library to present a menu of available devices meeting some set of criteria. The list of devices is obtained using the sysctl(3) device configuration database (“devconf”), and intersected with the list of names if one was specified on the command line. The following command-line flags are supported:

-c class
    specifies a class of devices to further restrict the available choices. Multiple -c options can be specified, in which case the union of the specified classes is used. The following classes are currently supported:

    cpu a processor
    bus a system bus, or a peripheral bus
    disk
        a read-write disk drive
    rodisk
        a read-only disk drive (e.g., CD-ROM)
    display
        a display device (usually there is only one)
    serial
        a serial port or multiport controller
    parallel
        a parallel printer port
    netif
        a network interface
    misc
        everything else

-s state
    specifies a required state or set of states to further restrict the list of devices. States are specified using the following letters:

    ! or ~
        at the beginning of a string requests the complement of the specified states.
    ?   requests devices with state DC_UNKNOWN.
    u   requests devices with state DC_UNCONFIGURED.
    i   requests devices with state DC_IDLE.
    b   requests devices with state DC_BUSY.

    Multiple -s options can be specified, in which case the union of all the requested states is taken.

-f outfile
    specifies the name a file where the name of the selected device is written. If no file is specified, the name is written on the standard output.

-h helpfile
    can be used to specify the name of a file to be displayed when the user presses the `?' key.

-t title
    specifies the title of the window passed to the dialog(3) library when creating the menu.

In addition, there are three flags to request special menus with unique prompt text and possibly pseudo-devices (but this is not yet implemented). These are:

-n  requests a menu of network interfaces

-i  requests a menu of possible installation media (i.e., disks, CD-ROMs, and tapes)

-d  requests a menu of disks

SEE ALSO
sysctl(3), lsdev(8)

AUTHOR
The devmenu program was written by Garrett A. Wollman at the MIT Laboratory for Computer Science.

HISTORY
A devmenu command first appeared in FreeBSD 2.1.