cpyrt(7) —
NAME
cpyrt − OEM copyright driver
DESCRIPTION
The kernel cpyrt driver is used to print OEM and VAR copyright messages on the console at system initialization. The “driver” consists of only a start routine, which is called after all the other device drivers have run their initialization routines. A driver that needs to display an OEM copyright notice on boot up should put a pointer to the message string in the first empty entry in the global array during its initialization routine. The cpyrt driver will then write out the strings using printf ("%s\n\n"). If there is more than one driver from a given OEM, the initialization code should check the filled slots and compare the copyright strings, so that a given message only appears once. It is imperative that no driver write past the end of the array. The following code fragment shows how a driver might use this capability:
extern intmax_copyrights;
extern char*oem_copyrights[];
int index;
char *msgptr = "YOUR MESSAGE HERE";
for (index = 0; index < max_copyrights; index++) {
if ( !oem_copyrights[index] ) {
/∗ empty slot found, put your pointer here ∗/
oem_copyrights[index] = msgptr;
break;
}
if ( !strcmp(msgptr, oem_copyrights[index]) )
break; /∗ msg already there ∗/
}
The default number of entries in the array is 10. This number is defined in the space.c file, and may be increased if desired. The array is initialized to all zeros (NULL).
FILES
/etc/conf/pack.d/cpyrt/Driver.o
/etc/conf/pack.d/cpyrt/space.c
/etc/conf/sdevice.d/cpyrt
ADDED VALUE
This entry, supplied by INTERACTIVE Systems Corporation, is an extension of UNIX System V.
\*U — Version 1.0