home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / boot / i386 / root / usr / share / YaST2 / scrconf / proc_modules.scr < prev    next >
Encoding:
Text File  |  2006-11-29  |  956 b   |  48 lines

  1. /**
  2.  * File:
  3.  *   proc_modules.scr
  4.  * Summary:
  5.  *   SCR Agent for reading /proc/modules
  6.  * Access:
  7.  *   read-only
  8.  * Authors:
  9.  *   Unknown <yast2-hacker@suse.de>
  10.  * See:
  11.  *   anyagent
  12.  *   libscr
  13.  * Example:
  14.  *   Read(.proc.modules)
  15.  *   ($["aic7xxx":$["size":129600, "used":"3"], 
  16.  *      "autofs4":$["size":9344, "used":"4"], 
  17.  *      "de4x5":$["size":40320, "used":"1"], 
  18.  *      ...
  19.  *   ])
  20.  * 
  21.  * $Id: proc_modules.scr 13018 2003-12-11 12:52:53Z jhumpol $
  22.  *
  23.  * Returns a <b>map</b>i. Keys are the module names, values are maps. 
  24.  * Keys of those maps are: "size", "used"
  25.  */
  26. .proc.modules
  27.  
  28. `ag_anyagent(
  29.   `Description (
  30.   (`File("/proc/modules")),    // real file name
  31.   "#\n",            // Comment
  32.   true,                // read-only
  33.   (`Tuple (
  34.       `Name(`String("^ \t")),
  35.       `Whitespace (),
  36.       `Value (
  37.     `Tuple (
  38.       `size (`Number()),
  39.       `Whitespace(),
  40.       `used (`String("^ \n")),
  41.       `Optional (`String ("^\n"))
  42.     )
  43.       ),
  44.       `Continue ("\n")
  45.     ) )
  46.   )
  47. )
  48.