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_mounts.scr < prev    next >
Encoding:
Text File  |  2006-11-29  |  1.3 KB  |  62 lines

  1. /**
  2.  * File:
  3.  *   proc_cmdline.scr
  4.  * Summary:
  5.  *   SCR Agent for reading /proc/mounts
  6.  * Access:
  7.  *   read-only
  8.  * Authors:
  9.  *   Unknown <yast2-hacker@suse.de>
  10.  * See:
  11.  *   anyagent
  12.  *   libscr
  13.  *   man mount
  14.  * Example:
  15.  *   Read(.proc.mounts)
  16.  *   ([$["file":"/", 
  17.  *       "freq":0, 
  18.  *       "mntops":"rw", 
  19.  *       "passno":0, 
  20.  *       "spec":"/dev/root", 
  21.  *       "vfstype":"reiserfs"], 
  22.  *     $["file":"/proc", 
  23.  *       "freq":0, 
  24.  *       "mntops":"rw", 
  25.  *       "passno":0, 
  26.  *       "spec":"proc", 
  27.  *       "vfstype":"proc"], 
  28.  *     ...
  29.  *    ])
  30.  * 
  31.  * $Id: proc_mounts.scr 13018 2003-12-11 12:52:53Z jhumpol $
  32.  *
  33.  * Returns a <b>list of maps</b>. Each map (list-entry) corresponds to i
  34.  * one mount.
  35.  * Keys for the maps are: "spec", "file", "vfstype", "mntops", "freq", "passno"
  36.  */
  37. .proc.mounts
  38.  
  39. `ag_anyagent(
  40.   `Description (
  41.     (`File("/proc/mounts")),     // real file name
  42.     "#\n",                    // Comment
  43.     false,                    // read-only
  44.     (`List (
  45.         `Tuple (
  46.         `spec (`String("^\t ")),
  47.         `Separator ("\t "),
  48.         `file (`String("^\t ")),
  49.         `Separator ("\t "),
  50.         `vfstype (`String("^\t ")),
  51.         `Separator ("\t "),
  52.         `mntops (`String("^ \t\n")),
  53.         `Optional(`Whitespace()),
  54.         `Optional(`freq (`Number())),
  55.         `Optional(`Whitespace()),
  56.         `Optional(`passno (`Number()))
  57.         ),
  58.         "\n"
  59.         ))
  60.     )
  61. )
  62.