Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ cfgddev(3x) — AIX PS/2 1.2.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

attributes

master

system

osconfig



CFGDDEV(3x,L)               AIX Technical Reference               CFGDDEV(3x,L)



-------------------------------------------------------------------------------
cfgddev



PURPOSE

Deletes a device.

LIBRARY

Run-time Services Library (librts.a)

SYNTAX

#include <cfg01.h>

int cfgddev (master, system, dstname, vflag, cflag)
char *master, *system, *dstname;
int vflag;
int cflag;

DESCRIPTION

The cfgddev subroutine deletes information about devices and device drivers
from the system configuration.

The master parameter points to the full path name of the master file.  The
system parameter points to the full path name of the system file.  These files
are usually /etc/master and /etc/system, respectively.  The dstname parameter
points to a string containing the name of the stanza in the system file of the
device to be deleted.

The vflag parameter is either 1 (for yes) or 0 (for no).  If the vflag
parameter is 1, then cfgddev executes the osconfig command with the -d dstname
flag.  The osconfig command then processes the named stanza for driver deletion
and produces a shell procedure.  The cfgddev subroutine then runs this shell
procedure to delete the special file (/dev file) for the device.  If the
osconfig command returns an error, then the device is not deleted.

The cflag parameter is either 1 (for no) or 0 (for yes), for osconfig to call
customize helpers when deleting devices.

If the device stanza named by the dstname parameter contains the specproc
keyword, then the program specified by the value of this keyword is executed to
perform any special processing required when deleting this device.  The value
of the specproc keyword must be the full path name of an executable file.  The
following arguments are passed to the program using the argv mechanism
described in "exec:  execl, execv, execle, execve, execlp, execvp." All of them
are passed as character strings.





Processed November 7, 1990       CFGDDEV(3x,L)                                1





CFGDDEV(3x,L)               AIX Technical Reference               CFGDDEV(3x,L)



argv[0]
       The full path name of the special-processing program
argv[1]
       The full path name of the master file
argv[2]
       The full path name of the system file
argv[3]
       The name of the device stanza
argv[4]
       The character string ""d"", indicating deletion.

If the special processing program fails, then the device is still deleted from
the system, but some additional steps may be required to clean up the system.

The device stanza associated with the deleted device is then deleted from the
system file.

RETURN VALUE

Upon successful completion, the value CFG_SUCC is returned.  If the cfgddev
subroutine fails then one of the following values is returned:

CFG_CLSE    An error was detected while trying to close a file.

CFG_DVND    The device could not be deleted from the system file.

CFG_DVNF    The device to be deleted cannot be found in the system file.

CFG_FCOR    The master or system file is set up incorrectly.

CFG_MALF    Memory allocation failed because of insufficient space.

CFG_OPNE    An error was detected while trying to open a file.

CFG_SLPF    Special processing failed.  The device is deleted, but some
            additional steps may be required to clean up the system.

CFG_OCFG    The osconfig command failed.

CFG_REBOOT  AIX must be rebooted by calling the cfgaply routine, although
            cfgddev was successful.  cfgddev will return CFG_REBOOT if the last
            stanza in /etc/system associated with a AIX device driver is
            deleted and the mandatory attribute in the driver's /etc/master
            stanza is set to false.

CFG_RBSLPF  Special processing failed and a AIX reboot must be performed.

RELATED INFORMATION

In this book:  "attributes," "master," and "system."

The osconfig command in AIX Operating System Commands Reference.



Processed November 7, 1990       CFGDDEV(3x,L)                                2



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