Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ dsk(7) — DG/UX 4.00

Media Vault

Software Library

Restoration Projects

Artifacts Sought



                                                                   dsk(7)



        _________________________________________________________________
        dsk                                                  Special File
        block special disk interface
        _________________________________________________________________


        DESCRIPTION

        This block special device provides direct access to a logical  or
        physical  disk.   With  respect to the I/O system calls, the disk
        may be considered to be the same as an ordinary disk file of size
        N*512  bytes,  when  N  is the number of blocks in the disk.  The
        size is, however, only an  attribute  of  the  device;  the  file
        system considers all block-special devices to have size zero.

        The open  system  call  performs  device-specific  operations  to
        initialize  the  disk.   Except  for  errors that may be reported
        because  of   controller   or   unit   failures,   user   visible
        functionality is the same as for an ordinary disk file.

        User visible functionality for the close system call is the  same
        as for an ordinary disk file.

        The read system call may read any portion of the disk on any byte
        boundary  for  any number of bytes, without regard for disk block
        boundaries.  The file pointer associated with the descriptor used
        in  the read system call is used to determine the location of the
        data to be read; hence the lseek system call works  the  same  as
        for  an  ordinary  disk  file.  Reading data that has "never been
        written" returns whatever happens to be there, in contrast to  an
        ordinary  disk  file  which  returns  zeros.  A read request that
        extends past the end of the disk returns the error ENXIO  and  an
        implementation-specific amount of data.

        The write system call works in the  same  way  as  read,  without
        regard  for  block boundaries.  Note that as for an ordinary disk
        file, the physical I/O to the physical disk is not guaranteed  to
        have  been  completed when the write system call completes unless
        the O_SYNC flag has been set on the  file  descriptor.   A  write
        request  that  extends past the end of the disk returns the error
        ENXIO and writes an implementation-specific amount of data.

        The  only  disk  specific  ioctl   is  DSKIOCGET,  which  returns
        information about the characteristics of a disk.  The command and
        structure for this ioctl is defined in <sys/dskio.h>.

        A pointer to the structure dskget is the parameter that is passed
        on the system call.

        struct    dskget
             {



        DG/UX 4.00                                                 Page 1
               Licensed material--property of copyright holder(s)





                                                                   dsk(7)



             unsigned long  total_sectors;
             unsigned short controller_id;
             };

        The  total_sectors  field  is  the  number  of  512  byte  blocks
        available  on  the  disk.    The  blocks have addresses 0 through
        "total_sectors" - 1.  This value does not include blocks that are
        normally  inaccessible  because  they  are  used  for  controller
        remapping, for diagnostic tracks,  or  for  controller  firmware.
        Some  of  the  blocks  may not be useable because of media flaws.
        The  controller_id  field  is  a   controller-unique   identifier
        reported  by  the  disk  controller.    A  returned  value  of  0
        indicates that the controller does not report an id.

        Select always returns READY for both read and write operations.


        FILES

        /dev/dsk/*               Logical  disk  device  names  for  block
                                 special access

        /dev/pdsk/*              Physical disk  device  names  for  block
                                 special access

        /usr/include/sys/dskio.h Ioctl definitions


        SEE ALSO

        dpf(7), dpj(7), intro(7).























        DG/UX 4.00                                                 Page 2
               Licensed material--property of copyright holder(s)



Typewritten Software • bear@typewritten.org • Edmonds, WA 98026