Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ hd(4) — AIX PS/2 1.2.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

ioctlx, ioctl, gtty, stty

lseek

fs



HD(4,F)                     AIX Technical Reference                     HD(4,F)



-------------------------------------------------------------------------------
hd



PURPOSE

Supports the fixed-disk device driver.

SYNOPSIS

#include <sys/devinfo.h>

DESCRIPTION

The fixed-disk device driver provides block and character (raw) access to
minidisks on the fixed-disk drives.  The hd special file is unique to AIX PS/2.
The system determines the association of the minor device number to the
minidisk.  Normally, the special files /dev/hdn and /dev/rhdn are given the
minor device number n.

In raw I/O, the buffer must always begin on a 512 byte boundary, and counts
must be a multiple of 512 bytes (a physical disk block).  Likewise, lseek
system calls must specify a multiple of 512 bytes.  However, for the most
efficient raw I/O, the buffer should be on a 4096 byte boundary and counts
should be a multiple of 4096 (the page size).

ioctl Operations

The IOCTYPE type ioctl call returns the value DD_DISK, defined in
sys/devinfo.h.

The IOCINFO type ioctl call returns the following structure, defined in
sys/devinfo.h:

      struct devinfo {
         char devtype;
         char flags;
         union {
            struct {        /* for disks */
            short bytpsec;  /* bytes per sector */
            short secptrk;  /* sectors per track */
            short trkpcyl;  /* tracks per cylinder */
            long numblks;   /* blocks this mini-disk */
           } dk;
             ...                     /* for other devices */
        } un;
      };

     /*flags */
     #define DF_FIXED 01  /* non-removable */
     #define DF_RAND  02  /* random access possible */



Processed November 7, 1990          HD(4,F)                                   1





HD(4,F)                     AIX Technical Reference                     HD(4,F)



     #define DF_FAST  04  /* a relative term */

FILES

/dev/hd0, /dev/hd1,...
/dev/rhd0, /dev/rhd1,...

RELATED INFORMATION

In this book:  "ioctlx, ioctl, gtty, stty,"  "lseek," and "fs."













































Processed November 7, 1990          HD(4,F)                                   2



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