/**
 * $Id: dasddev.scr 13018 2003-12-11 12:52:53Z jhumpol $
 *
 * File:
 *   dasddev.scr
 * Summary:
 *   SCR Agent for reading dasd device information
 * Access:
 *   read-only
 * Authors:
 *   Thomas Fehr <fehr@suse.de>
 * See:
 *   anyagent
 *   libscr
 *   cat /proc/dasd/devices on S390
 * Example:
 *   Read(.proc.dasddev)
 *   ([$["address":"0150", 
 *       "major": 94, 
 *       "minor": 0, 
 *       "name": "dasda", 
 *       "state": "active", 
 *       "blocksize": 4096, 
 *       "blocks": 600660], 
 *    ...
 *   ])
 **
 *
 */
.proc.dasddev

`ag_anyagent(
  `Description (
      (`File("/proc/dasd/devices")),	// real file name
      "#\n",			// Comment
      true,			// read-only
      (`List (
    	`Tuple (
	  `Optional(`Whitespace()),
    	  `address (`String("^( ")),
	  `String("^\t "),
	  `Whitespace(),
	  "at (",
	  `Optional(`Whitespace()),
	  `major( `Number() ),
	  `Optional(`Whitespace()),
	  ":",
	  `Optional(`Whitespace()),
	  `minor( `Number() ),
	  `Optional(`Whitespace()),
	  ")",
	  `Optional(`Whitespace()),
	  "is",
	  `Optional(`Whitespace()),
	  `name(`String("^:( ")),
	  `Optional(`Whitespace()),
	  `Optional("("),
	  `Optional(`option(`String("^): "))),
	  `Optional(")"),
	  `Optional(`Whitespace()),
	  ":",
	  `Optional(`Whitespace()),
	  `state(`String("^ \n")),
	  `Optional(`Whitespace()),
	  `Optional("at"),
	  `Optional(`Whitespace()),
	  `Optional("blocksize:"),
	  `Optional(`Whitespace()),
    	  `Optional(`blocksize( `Number() )),
	  `Optional(`Whitespace()),
	  `Optional(","),
	  `Optional(`Whitespace()),
    	  `Optional(`blocks( `Number() )),
    	  `Optional(`String("^\n"))
    	),
    	"\n"
      ))
    )
)
