The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/dev/raid/vinum/makestatetext

Version: -  FREEBSD  -  FREEBSD-13-STABLE  -  FREEBSD-13-0  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  l41  -  OPENBSD  -  linux-2.6  -  MK84  -  PLAN9  -  xnu-8792 
SearchContext: -  none  -  3  -  10 

    1 #!/bin/sh
    2 # Make statetexts.h from vinumstate.h
    3 # $FreeBSD: src/sys/dev/vinum/makestatetext,v 1.6 2000/02/29 06:07:01 grog Exp $
    4 # $DragonFly: src/sys/dev/raid/vinum/makestatetext,v 1.2 2003/06/17 04:28:33 dillon Exp $
    5 # $Id: makestatetext,v 1.7 1999/12/29 07:24:54 grog Exp grog $
    6 infile=vinumstate.h
    7 ofile=statetexts.h
    8 echo >$ofile "/* Created by $0 on" `date`.  "Do not edit */"
    9 echo >>$ofile
   10 cat >> $ofile <<FOO
   11 /*-
   12  * Copyright (c) 1997, 1998
   13  *      Nan Yang Computer Services Limited.  All rights reserved.
   14  *
   15  *  This software is distributed under the so-called \`\`Berkeley
   16  *  License'':
   17  *
   18  * Redistribution and use in source and binary forms, with or without
   19  * modification, are permitted provided that the following conditions
   20  * are met:
   21  * 1. Redistributions of source code must retain the above copyright
   22  *    notice, this list of conditions and the following disclaimer.
   23  * 2. Redistributions in binary form must reproduce the above copyright
   24  *    notice, this list of conditions and the following disclaimer in the
   25  *    documentation and/or other materials provided with the distribution.
   26  * 3. All advertising materials mentioning features or use of this software
   27  *    must display the following acknowledgement:
   28  *      This product includes software developed by Nan Yang Computer
   29  *      Services Limited.
   30  * 4. Neither the name of the Company nor the names of its contributors
   31  *    may be used to endorse or promote products derived from this software
   32  *    without specific prior written permission.
   33  *  
   34  * This software is provided \`\`as is'', and any express or implied
   35  * warranties, including, but not limited to, the implied warranties of
   36  * merchantability and fitness for a particular purpose are disclaimed.
   37  * In no event shall the company or contributors be liable for any
   38  * direct, indirect, incidental, special, exemplary, or consequential
   39  * damages (including, but not limited to, procurement of substitute
   40  * goods or services; loss of use, data, or profits; or business
   41  * interruption) however caused and on any theory of liability, whether
   42  * in contract, strict liability, or tort (including negligence or
   43  * otherwise) arising in any way out of the use of this software, even if
   44  * advised of the possibility of such damage.
   45  */
   46 
   47 FOO
   48 
   49 echo >>$ofile "/* Drive state texts */"
   50 echo >>$ofile "char *drivestatetext [] = 
   51   { "
   52 egrep  -e 'drive_[A-z0-9]*,'  <$infile | grep -v = | sed 's: *drive_\([^,]*\).*:  \"\1\",:' >>$ofile
   53 cat <<FOO >> $ofile
   54   };
   55 
   56 /* Subdisk state texts */
   57 char *sdstatetext [] =
   58   { 
   59 FOO
   60 egrep  -e 'sd_[A-z0-9]*,' $infile | grep -v = | sed 's: *sd_\([^,]*\).*:  \"\1\",:' >>$ofile
   61 cat <<FOO >> $ofile
   62   };
   63 
   64 /* Plex state texts */
   65 char *plexstatetext [] =
   66   { 
   67 FOO
   68 egrep  -e 'plex_[A-z0-9]*,' $infile | grep -v = | sed 's: *plex_\([^,]*\).*:  \"\1\",:' >>$ofile
   69 cat <<FOO >> $ofile
   70   };
   71 
   72 /* Volume state texts */
   73 char *volstatetext [] =
   74   { 
   75 FOO
   76 egrep  -e 'volume_[A-z0-9]*,' $infile | grep -v = | sed 's: *volume_\([^,]*\).*:  \"\1\",:' >>$ofile
   77 cat <<FOO >> $ofile
   78   };
   79 FOO

Cache object: c1abd178eb01f90a95a95075fb8e63fa


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.