Releases the minor or major number, or both, for a device instance.
#include <cf.h> #include <sys/cfgodm.h> #include <sys/cfgdb.h> int reldevno ( device_instance_name, release) char *device_instance_name; int release;
Item | Description |
---|---|
device_instance_name | Points to the character string containing the device instance name. |
release | Specifies whether the major number should be released. A value of True releases the major number; a value of False does not. |
The reldevno device configuration subroutine is one of the designated access routines to the Customized Device Driver (CuDvDr) object class. This object class is locked exclusively by this routine until its completion. All minor numbers associated with the device instance name are deleted from the CuDvDr object class. That is, each object is deleted from the class. This releases the minor numbers for reuse.
The major number is released for reuse if the following two conditions exist:
If you prefer to release the major number yourself, then the relmajor device configuration subroutine can be called. In this case, you should also set the release parameter to False. All special files, including symbolically linked special files, corresponding to the deleted objects are deleted from the file system.
Item | Description |
---|---|
0 | Indicates successful completion. |
-1 | Indicates a failure to release the minor number or major number, or both. |
Item | Description |
---|---|
/usr/lib/libcfg.a | Archive of device configuration subroutines. |