Generates a unique sequence number for creating a device's logical name.
#include <cf.h>
#include <sys/cfgodm.h>
#include <sys/cfgdb.h>
int genseq (prefix)
char *prefix;
Item | Description |
---|---|
prefix | Points to the character string containing the prefix name of the device. |
The genseq device configuration subroutine generates a unique sequence number to be concatenated with the device's prefix name. The device name in the Customized Devices (CuDv) object class is the concatenation of the prefix name and the sequence number. The rules for generating sequence numbers are as follows:
It is up to the application to convert this sequence number to character format so that it can be concatenated to the prefix to form the device name.
If the genseq subroutine succeeds, it returns the generated sequence number in integer format. If the subroutine fails, it returns a value of -1.
Item | Description |
---|---|
/usr/lib/libcfg.a | Archive of device configuration subroutines. |