dgdevctl(2) DG/UX 4.30 dgdevctl(2)
NAME
dg_devctl - Perform device-control functions.
SYNOPSIS
#include <sys/dg_devctl.h>
int dg_devctl (cmd, arg)
unsigned int cmd;
void * arg;
PARAMETERS
cmd The task to be performed.
arg Pointer to a packet of information used
and/or filled in by the task.
DESCRIPTION
Dg_devctl() 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/dg_devctl.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
Only the superuser may execute this system call.
RETURN VALUE
0 The dg_devctl operation was successful.
-1 An error occurred. Errno is set to indicate
the error.
Licensed material--property of copyright holder(s) Page 1
dgdevctl(2) DG/UX 4.30 dgdevctl(2)
EXCEPTIONS
Errno may be set to one of the following error codes:
EPERM A process called dg_devctl() 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
The related manual sections: diskman(1M).
Licensed material--property of copyright holder(s) Page 2