~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/scripts/ver_linux

Version: ~ [ linux-6.12-rc7 ] ~ [ linux-6.11.7 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.60 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.116 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.171 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.229 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.285 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.323 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.12 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

Diff markup

Differences between /scripts/ver_linux (Version linux-6.12-rc7) and /scripts/ver_linux (Version linux-4.17.19)


  1 #!/usr/bin/awk -f                                   1 #!/usr/bin/awk -f
  2 # SPDX-License-Identifier: GPL-2.0                  2 # SPDX-License-Identifier: GPL-2.0
  3 # Before running this script please ensure tha      3 # Before running this script please ensure that your PATH is
  4 # typical as you use for compilation/installat      4 # typical as you use for compilation/installation. I use
  5 # /bin /sbin /usr/bin /usr/sbin /usr/local/bin      5 # /bin /sbin /usr/bin /usr/sbin /usr/local/bin, but it may
  6 # differ on your system.                            6 # differ on your system.
  7                                                     7 
  8 BEGIN {                                             8 BEGIN {
  9         usage = "If some fields are empty or l      9         usage = "If some fields are empty or look unusual you may have an old version.\n"
 10         usage = usage "Compare to the current      10         usage = usage "Compare to the current minimal requirements in Documentation/Changes.\n"
 11         print usage                                11         print usage
 12                                                    12 
 13         system("uname -a")                         13         system("uname -a")
 14         printf("\n")                               14         printf("\n")
 15                                                    15 
 16         vernum = "[0-9]+([.]?[0-9]+)+"         !!  16         printversion("GNU C", version("gcc -dumpversion 2>&1"))
 17         libc = "libc[.]so[.][0-9]+$"           !!  17         printversion("GNU Make", version("make --version 2>&1"))
 18         libcpp = "(libg|stdc)[+]+[.]so([.][0-9 !!  18         printversion("Binutils", version("ld -v 2>&1"))
 19                                                !!  19         printversion("Util-linux", version("mount --version 2>&1"))
 20         printversion("GNU C", version("gcc -du !!  20         printversion("Mount", version("mount --version 2>&1"))
 21         printversion("GNU Make", version("make !!  21         printversion("Module-init-tools", version("depmod -V  2>&1"))
 22         printversion("Binutils", version("ld - !!  22         printversion("E2fsprogs", version("tune2fs 2>&1"))
 23         printversion("Util-linux", version("mo !!  23         printversion("Jfsutils", version("fsck.jfs -V 2>&1"))
 24         printversion("Mount", version("mount - !!  24         printversion("Reiserfsprogs", version("reiserfsck -V 2>&1"))
 25         printversion("Module-init-tools", vers !!  25         printversion("Reiser4fsprogs", version("fsck.reiser4 -V 2>&1"))
 26         printversion("E2fsprogs", version("tun !!  26         printversion("Xfsprogs", version("xfs_db -V 2>&1"))
 27         printversion("Jfsutils", version("fsck !!  27         printversion("Pcmciautils", version("pccardctl -V 2>&1"))
 28         printversion("Reiserfsprogs", version( !!  28         printversion("Pcmcia-cs", version("cardmgr -V 2>&1"))
 29         printversion("Reiser4fsprogs", version !!  29         printversion("Quota-tools", version("quota -V 2>&1"))
 30         printversion("Xfsprogs", version("xfs_ !!  30         printversion("PPP", version("pppd --version 2>&1"))
 31         printversion("Pcmciautils", version("p !!  31         printversion("Isdn4k-utils", version("isdnctrl 2>&1"))
 32         printversion("Pcmcia-cs", version("car !!  32         printversion("Nfs-utils", version("showmount --version 2>&1"))
 33         printversion("Quota-tools", version("q !!  33 
 34         printversion("PPP", version("pppd --ve !!  34         if (system("test -r /proc/self/maps") == 0) {
 35         printversion("Isdn4k-utils", version(" !!  35                 while (getline <"/proc/self/maps" > 0) {
 36         printversion("Nfs-utils", version("sho !!  36                         n = split($0, procmaps, "/")
 37         printversion("Bison", version("bison - !!  37                         if (/libc.*so$/ && match(procmaps[n], /[0-9]+([.]?[0-9]+)+/)) {
 38         printversion("Flex", version("flex --v !!  38                                 ver = substr(procmaps[n], RSTART, RLENGTH)
 39                                                !!  39                                 printversion("Linux C Library", ver)
 40         while ("ldconfig -p 2>/dev/null" | get !!  40                                 break
 41                 if ($NF ~ libc || $NF ~ libcpp !!  41                         }
 42                         if (!seen[ver = versio !!  42                 }
 43                                 printversion(" !!  43         }
 44                                                !!  44 
 45         printversion("Dynamic linker (ldd)", v !!  45         printversion("Dynamic linker (ldd)", version("ldd --version 2>&1"))
 46         printversion("Procps", version("ps --v !!  46 
 47         printversion("Net-tools", version("ifc !!  47         while ("ldconfig -p 2>/dev/null" | getline > 0) {
 48         printversion("Kbd", version("loadkeys  !!  48                 if (/(libg|stdc)[+]+\.so/) {
 49         printversion("Console-tools", version( !!  49                         libcpp = $NF
 50         printversion("Sh-utils", version("expr !!  50                         break
 51         printversion("Udev", version("udevadm  !!  51                 }
 52         printversion("Wireless-tools", version !!  52         }
 53                                                !!  53         if (system("test -r " libcpp) == 0)
 54         while ("sort /proc/modules" | getline  !!  54                 printversion("Linux C++ Library", version("readlink " libcpp))
 55                 mods = mods sep $1             !!  55 
 56                 sep = " "                      !!  56         printversion("Procps", version("ps --version 2>&1"))
                                                   >>  57         printversion("Net-tools", version("ifconfig --version 2>&1"))
                                                   >>  58         printversion("Kbd", version("loadkeys -V 2>&1"))
                                                   >>  59         printversion("Console-tools", version("loadkeys -V 2>&1"))
                                                   >>  60         printversion("Oprofile", version("oprofiled --version 2>&1"))
                                                   >>  61         printversion("Sh-utils", version("expr --v 2>&1"))
                                                   >>  62         printversion("Udev", version("udevadm --version 2>&1"))
                                                   >>  63         printversion("Wireless-tools", version("iwconfig --version 2>&1"))
                                                   >>  64 
                                                   >>  65         if (system("test -r /proc/modules") == 0) {
                                                   >>  66                 while ("sort /proc/modules" | getline > 0) {
                                                   >>  67                         mods = mods sep $1
                                                   >>  68                         sep = " "
                                                   >>  69                 }
                                                   >>  70                 printversion("Modules Loaded", mods)
 57         }                                          71         }
 58         printversion("Modules Loaded", mods)   << 
 59 }                                                  72 }
 60                                                    73 
 61 function version(cmd,    ver) {                    74 function version(cmd,    ver) {
 62         cmd = cmd " 2>&1"                      << 
 63         while (cmd | getline > 0) {                75         while (cmd | getline > 0) {
 64                 if (match($0, vernum)) {       !!  76                 if (!/ver_linux/ && match($0, /[0-9]+([.]?[0-9]+)+/)) {
 65                         ver = substr($0, RSTAR     77                         ver = substr($0, RSTART, RLENGTH)
 66                         break                      78                         break
 67                 }                                  79                 }
 68         }                                          80         }
 69         close(cmd)                                 81         close(cmd)
 70         return ver                                 82         return ver
 71 }                                                  83 }
 72                                                    84 
 73 function printversion(name, value,  ofmt) {        85 function printversion(name, value,  ofmt) {
 74         if (value != "") {                         86         if (value != "") {
 75                 ofmt = "%-20s\t%s\n"               87                 ofmt = "%-20s\t%s\n"
 76                 printf(ofmt, name, value)          88                 printf(ofmt, name, value)
 77         }                                          89         }
 78 }                                                  90 }
                                                      

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php