Generates the next available major number for a device driver instance.
#include <cf.h> #include <sys/cfgodm.h> #include <sys/cfgdb.h>
long genmajor (device_driver_instance_name) char *device_driver_instance_name;
|device_driver_instance_name||Points to a character string containing the device driver instance name.|
The genmajor device configuration subroutine is one of the routines designated for accessing the Customized Device Driver (CuDvDr) object class. If a major number already exists for the given device driver instance, it is returned. Otherwise, a new major number is generated.
The genmajor subroutine creates an entry (object) in the CuDvDr object class for the major number information. The lowest available major number or the major number that has already been allocated is returned. The CuDvDr object class is locked exclusively by this routine until its completion.
If the genmajor subroutine executes successfully, a major number is returned. This major number is either the lowest available major number or the major number that has already been allocated to the device instance.
A value of -1 is returned if the genmajor subroutine fails.
|/usr/lib/libcfg.a||Archive of device configuration subroutines.|
The reldevno device configuration subroutine, relmajor device configuration subroutine.
List of ODM Commands and Subroutines in AIX General Programming Concepts: Writing and Debugging Programs.
Customized Device Driver (CuDvDr) object class.
List of Device Configuration Subroutines.