1: /*
   2:  * Copyright (c) 1986 Regents of the University of California.
   3:  * All rights reserved.  The Berkeley software License Agreement
   4:  * specifies the terms and conditions for redistribution.
   5:  *
   6:  *	@(#)saio.h	2.2 (2.11BSD GTE) 1996/3/8
   7:  */
   8: 
   9: /*
  10:  * This must be done so that the standalone I/O system uses the same
  11:  * size for the inode structure as the utilities (restor, mkfs, etc).
  12:  * See the comments in mkfs.c for more information.
  13: */
  14: #undef  EXTERNALITIMES
  15: 
  16: #include <sys/fs.h>
  17: #include <sys/inode.h>
  18: #include <sys/disklabel.h>
  19: 
  20: /*
  21:  * io block: includes an
  22:  * inode, cells for the use of seek, etc, a buffer
  23:  * and a disklabel.
  24:  */
  25: struct  iob {
  26:     char    i_flgs;
  27:     char    i_ctlr;
  28:     struct  inode   i_ino;
  29:     short   i_unit;
  30:     short   i_part;
  31:     daddr_t i_boff;
  32:     off_t   i_offset;
  33:     daddr_t i_bn;
  34:     char    *i_ma;
  35:     int i_cc;
  36:     char    i_buf[DEV_BSIZE];
  37:     struct  disklabel i_label;
  38: };
  39: 
  40: #define F_READ  01
  41: #define F_WRITE 02
  42: #define F_ALLOC 04
  43: #define F_FILE  010
  44: #define F_TAPE  020
  45: #define READ    F_READ
  46: #define WRITE   F_WRITE
  47: 
  48: #define READLABEL   0x1
  49: #define WRITELABEL  0x2
  50: #define DEFAULTLABEL    0x3
  51: 
  52: /*
  53:  * device switch
  54:  */
  55: struct  devsw {
  56:     char    *dv_name;
  57:     int (*dv_strategy)();
  58:     int (*dv_open)();
  59:     int (*dv_close)();
  60:     caddr_t **dv_csr;
  61:     int (*dv_label)();
  62:     int (*dv_seek)();
  63: };
  64: 
  65: /*
  66:  * Set to inhibit 'disklabel missing or corrupt' error messages.  This
  67:  * is normally left off and only set by the standalone disklabeling utility
  68:  * when it expects to be reading an unlabeled disk.
  69: */
  70: int Nolabelerr;
  71: 
  72: extern  char    *itoa();
  73: extern  char    *devname();

Defined variables

Nolabelerr defined in line 70; used 1 times

Defined struct's

devsw defined in line 55; used 12 times
iob defined in line 25; used 142 times

Defined macros

F_ALLOC defined in line 42; used 6 times
F_FILE defined in line 43; used 5 times
F_READ defined in line 40; used 2 times
WRITELABEL defined in line 49; used 1 times

Usage of this include

Last modified: 1996-03-09
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 668
Valid CSS Valid XHTML 1.0 Strict