|
|
#include <sys/types.h> #include <sys/stream.h> #include <sys/stropt.h> #include <sys/mdi.h> #include <sys/ddi.h>static char _ndversion[]="<your_driver_version>";
The _ndversion variable must be defined as a static or ndcfg will not allow the driver to be configured into the system. The text is free form. Driver writers should use a string that uniquely and succinctly identifies the driver's version to the user when multiple drivers that support the hardware are installed on the system and this string should be reasonably short. The word ``version'' must not be used in the text of the _ndversion value even in an abbreviated form.
Each revision of the driver should change the value of the _ndversion variable so that users can easily determine the release of the driver.
The _ndversion variable must point to a null terminated string.
If you use SCCS as a source control system, you can use the following syntax:
static char _ndversion[]="%I%";This will automatically update the text displayed to the user when the file is updated. See get for more information about keyword expansion.
While similar, the following syntax does not work:
static char *_ndversion="%I%";The code will compile successfully but the version text will not appear in netcfg.
If the _ndversion string is used in your driver, you should use it when calling the mdi_printcfg(D3mdi) function.
static char const * const _ndversion="<some text>";However, the SVR5 version of ndcfg does not support the const keyword and so is unable to read the version string in the Driver.o file from this definition. This will be fixed in a future release.