DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
SVR5

devflag(D1)


devflag -- driver flags

Synopsis (Not in current DDI version)

   #include <sys/conf.h>
   #include <sys/ddi.h>

int prefixdevflag = 0;

Description

In DDI versions prior to DDI 8, every driver must define a global integer variable called prefixdevflag. This variable contains a bitmask of flags used to specify the driver's characteristics to the system.

Usage

The valid flags that may be set in prefixdevflag are:

D_MP
The driver is multithreaded (it handles its own locking and serialization).

D_UPF
The multithreaded, multiplexing STREAMS driver has both upper and lower read and write service procedures.

D_DMA
The driver expects all buffers to be usable for 24-bit DMA (Direct Memory Access). Drivers that call buf_breakup(D3) or rdma_filter(D3) must not set this flag.

D_TAPE
The driver controls a tape device (mount read-only; applicable only for block devices).

D_NOBRKUP
The driver understands page lists, that is, the I/O job is not broken up along page boundaries into multiple jobs by the kernel (applicable only for block devices). Any driver that calls buf_breakup(D3) must set this flag.

D_BLKOFF
The driver understands b_blkoff, specifying the byte offset within the block given by the b_blkno member of the buf(D4) structure at the beginning of a transfer. Any driver that calls buf_breakup(D3) must set this flag.

The following flags are valid only for systems on which the Enhanced Security Utilities are installed:


D_NOSPECMACDATA
MAC (Mandatory Access Control) checking is not performed during data transfers to and from the device controlled by the driver, and the access time field in the inode is not updated.

D_INITPUB
The device controlled by the driver is, by default, accessible by non-privileged processes. This setting can be changed using a security system call.

D_RDWEQ
All accesses of the device controlled by the driver (both read and write) require strict equality under the MAC policy.

If no flags are set for the driver, set prefixdevflag to 0.

References

buf_breakup(D3), physiock(D3), rdma_filter(D3)

Notices

Applicable platforms

All

Applicable versions

ddi: 1, 2, 3, 4, 5, 5mp, 6, 6mp, 7, 7mp, 7.1, 7.1mp

Differences between versions

Starting with DDI 8, the D_MP, D_UPF, D_NOSPECMACDATA, D_INITPUB, and D_RDWEQ flags are available through the drv_flags member of the drvinfo(D4) structure; other flags can no longer be explicitly specified, although D_NOBRKUP and D_BLKOFF are considered to be implicitly set.

Some flags are supported only in certain versions. D_MP is not supported (and implicitly false) in DDI versions 1, 2, and 4. D_UPF and D_BLKOFF are not supported (and implicitly false) in DDI versions 1, 2, 3, and 4.


19 June 2005
© 2005 The SCO Group, Inc. All rights reserved.
OpenServer 6 and UnixWare (SVR5) HDK - June 2005