STREAMS/UX for the HP 9000 Reference Manual

66
Differences Between STREAMS/UX and System V Release 4 STREAMS
HP-UX Changes to Cloning
Drivers using the second cloning method must indicate this in their install
functions or master file entries. See Chapter 5 for more information about
configuring STREAMS/UX drivers. Install functions must set the
C_CLONESMAJOR flag. For example:
INSTALL FUNCTION CONFIGURATION
static drv_info_t example_drv_info = { /*driver information*/
“example”, /* name */
“pseudo”, /* class */
DRV_CHAR | DRV_PSEUDO, /* flags */
-1, /* block major number */
-1, /* dynamically assigned
character major number */
NULL, NULL, NULL, /* cdio, gio_private,and
cdio_private structures */
}
static drv_ops_t example_drv_ops = { /* driver entry points */
NULL, /* open */
NULL, /* close */
NULL, /* strategy */
NULL, /* dump */
NULL, /* psize */
NULL, /* mount */
NULL, /* read */
NULL, /* write */
NULL, /* ioctl */
NULL, /* select */
NULL, /* option1 */
NULL, NULL, NULL, NULL, /* reserved entry points */
C_CLONESMAJOR, /* ****NOTE****C_CLONESMAJOR
flag set */
}
static streams_info_t example_str_info = { /* streams information */
example, /* name */
-1, /* dynamically assigned major
number */
{ &examplerinit, &examplewinit,
NULL,NULL }, /* streamtab */
STR_IS_DEVICE, /* flags */
0, /* synchronization level */
““, /* elsewhere sync name */
}
int
example_install()
{
int retval;