%APPENDIX TO THE HELIOS FILE SERVER: INSTALLATION INFORMATION, NOVEMBER 1990.
%$Id: HEL91020.tex,v 1.1 1992/01/27 16:42:07 doc Exp $
\chapter*{Appendix: The devinfo.src file}

\section*{A1: Compiling devinfo.src}

For the information in {\tt devinfo.src} to be made available to devices and
servers, it must be compiled into a binary form. This is done by the
program {\tt gdi} (Generate Device Info), which runs as follows.
\begin{verbatim}
gdi /helios/etc/devinfo.src /helios/etc/devinfo
\end{verbatim}

\section*{A2: Syntax}

The syntax of the {\tt devinfo} file is as follows.
\small
\begin{verbatim}
<devinfo>       ::=<entry>{<entry>}
<entry>         ::=<entrykey> <name> <description>
<entrykey>      ::=fileserver | discdevice | serialserver | eventserver
<description>   ::={ {keyvalue} }
<keyvalue>      ::=<keyword> <value>
<value>         ::=<number> | <name> | <filename> | <description>
<number>        ::=[-][<base>]<digit>{<digit>}
<base>          ::=0[x|X]
<digit>         ::=0|1|2|3|4|5|6|7|8|9|A|B|C|D|E|F|a|b|c|d|e|f
<name>          ::=<alpha>{<alpha>|<digit>|<period>}
<alpha>         ::=(A-Z)|(a-z)
<period>        ::=.
<filename>      ::=[/]<name>{/<name>}

\end{verbatim}
\normalsize

\section*{A3: Example devinfo file}

The following is an annotated example of a {\tt devinfo} file.
\small
\begin{verbatim}
  filesrver fs
  {
      device          m212  # discdevice to use
      cachesize       100   # approx cache size in k
      syncop          1     # synchronous operations

      volume {              # define a volume
        name         fs1    # volume name
        partition    0      # maps to partition 0 of disc device
      } 
  volume {
     name            fs2
     partition       1      # multi partition volume
     partition       2
  }
}

fileserver raw                 # Rawdisc based file system
{ 
        device     raw
        cachesize  100
#       syncop     1
        volume
        {
               name        raw
               partition   0
        }
        volume
        {
               name        tape
               partition   1
               type        raw
        }
}

discdevice m212
{
     name            m212.dev # device name in /helios/lib
     controller      3        # through link 3
     addressing      1        # addresses are in bytes
     mode            0x11     # MULTI buffered read and write        

# partitions...
partition {                 # partition 0
   drive             0      # partition is on drive 0
   start             2      # starts at cylinder 2
                            # ends at last cylinder of drive
}
partition {                 # partition 1
   drive             1      # occupies whole drive
}
partition {                 # partition 2
   drive             2      # occupies whole drive
}

# disc drives...
drive {                     # define a physical disc drive
   id                1      # id within controller
   type              1      # type in controller
   sectorsize        512    # size of sectors in bytes
   sectors           17     # sectors per track
   tracks            4      # tracks per cylinder
   cylinders         612    # cylinders
}
 drive {                    # drive 1
    id               2

    type             1
    sectorsize       512
    sectors          17
    tracks           6
    cylinders        1034
  } 

  drive {                     # drive 2
     id                2
     type              1
     sectorsize        512
     sectors           17
     tracks            6
     cylinders         1034
  }
}

serialserver link
{
   name      links       # server name
   device    link.dev    # device

   line {                # line 0
      name   link1       # addressed by /links/link1
      offset 1           # offset = link number
   }

   line {                # line 1
      name   link2   
      offset 2
   }
}
\end{verbatim}
\normalsize

\noindent This shows a file server which contains two volumes. {\bf fs1} occupies just
one partition and {\bf fs2} occupies two partitions. Within the
discdevice the partitions are mapped into the physical discs. The other
entry is a serialserver which presents a serial stream interface to a
transputer's links.


