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/port/mkdevlist

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/rc
    2 
    3 awk -v 'objtype='$objtype '
    4 BEGIN{
    5         if(ARGC < 2)
    6                 exit;
    7         collect = isdev = 0;
    8 }
    9 
   10 /^[ \t]*$/{
   11         next;
   12 }
   13 /^#/{
   14         next;
   15 }
   16 collect && /^[^ \t]/{
   17         collect = isdev = 0;
   18 }
   19 collect && $0 ~ /[^ \t]+/{
   20         if(isdev)
   21                 obj["dev" $1 "'.$O'"]++;
   22         else
   23                 obj[$1 "'.$O'"]++;
   24         for(i = 2; i <= NF; i++){
   25                 if($i !~ "[+=-].*")
   26                         obj[$i "'.$O'"]++;
   27         }
   28 }
   29 $0 ~ /^[^ \t]/{
   30         if($1 ~ "dev"){
   31                 isdev = 1;
   32                 collect = 1;
   33         }
   34         else if($1 ~ "misc" || $1 ~ "link" || $1 ~ "ip")
   35                 collect = 1;
   36         next;
   37 }
   38 
   39 END{
   40         x = ""
   41         for(i in obj)
   42                 x = x i "\n";
   43         if(objtype ~ "386" && obj["pci" "'.$O'"])
   44                 x = x "bios32'.$O' \n";
   45         printf x;
   46 }' $*

Cache object: addb12d15b453764d0033a0db8f2a177


[ 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.