Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ dg_devctl(2) — DG/UX 5.4R3.00

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

admpdisk(1M)

admvdisk(1M)



dg_devctl(2)                   DG/UX 5.4R3.00                   dg_devctl(2)


NAME
       dgdevctl - perform device-control functions

SYNOPSIS
       #include <sys/dgdevctl.h>

       int      dgdevctl (cmd, arg)
       unsigned int cmd;
       void     * arg;

   where:
       cmd    One of the following command names:
              DG_DEVCTL_CONFIGURE_DEVICE, DG_DEVCTL_DECONFIGURE_DEVICE,
              DG_DEVCTL_NAME_TO_DEVICE, DG_DEVCTL_DEVICE_TO_NAME

       arg    Pointer to a packet of information used and/or filled in by
              the command

DESCRIPTION
       Dgdevctl(2) can be used to perform a variety of device-related tasks
       on the system.  The specific task to be executed is indicated by the
       cmd parameter, and the address of an information packet used to store
       information for that command is passed in the arg parameter.  The
       various command values, and the types of their accompanying argument
       packets, are defined and described in <sys/dgdevctl.h>.

       The DG_DEVCTL_CONFIGURE_DEVICE command is used to configure a device
       into the system, given only its name in DG/UX common device
       specification format.

       The DG_DEVCTL_DECONFIGURE_DEVICE command is used to deconfigure a
       device out of the system, given only its name in DG/UX common device
       specification format.

       The DG_DEVCTL_NAME_TO_DEVICE command is used to find out the device
       number of a device, given only its name in DG/UX common device
       specification format.

       The DG_DEVCTL_DEVICE_TO_NAME command is used to find out the
       canonical DG/UX common device specification format name of a device,
       given only its device number.

ACCESS CONTROL
       Any user may execute the DG_DEVCTL_NAME_TO_DEVICE and
       DG_DEVCTL_DEVICE_TO_NAME commands.

       Only the superuser may execute the DG_DEVCTL_CONFIGURE_DEVICE and
       DG_DEVCTL_DECONFIGURE_DEVICE commands.

RETURN VALUE
       0      The dgdevctl operation was successful.

       -1     An error occurred.  errno is set to indicate the error.




Licensed material--property of copyright holder(s)                         1




dg_devctl(2)                   DG/UX 5.4R3.00                   dg_devctl(2)


DIAGNOSTICS
       Errno may be set to one of the following error codes:

       EPERM     A process called dgdevctl() without having an effective
                 user ID of 0.

       EINVAL    cmd is not one of the valid commands described above.

       EFAULT    arg points to an invalid address.

       ENXIO     An attempt was made to configure a device that was already
                 configured.

       EBUSY     An attempt was made to deconfigure a busy or
                 undeconfigurable device.

       ENXIO     An attempt was made to deconfigure, get the name, or get
                 the device number of a device that is not configured.

       ENXIO     An attempt to configure or deconfigure a device failed for
                 an unknown reason.

       EINVAL    An attempt was made to get the name of a device, but not
                 enough string storage was allocated to receive the name.

SEE ALSO
       admpdisk(1M), admvdisk(1M), dgsysctl(2).

NOTE
       This system call exists only for backwards compatibility with prior
       versions of DG/UX.  It will be removed in a future revision.  Use the
       dgsysctl(2) system call instead.

























Licensed material--property of copyright holder(s)                         2


Typewritten Software • bear@typewritten.org • Edmonds, WA 98026