]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
* grub-core/genmoddep.awk: Remove explicit getline < /dev/stdin.
authorVladimir Serbinenko <phcoder@gmail.com>
Mon, 16 Dec 2013 12:02:19 +0000 (13:02 +0100)
committerVladimir Serbinenko <phcoder@gmail.com>
Mon, 16 Dec 2013 12:02:19 +0000 (13:02 +0100)
ChangeLog
grub-core/genmoddep.awk

index bc6d68ba30a662d16bbdddeae83afbaed093fab9..f30bb9dec04f372c1657bfd337de954075111fe0 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2013-12-16  Vladimir Serbinenko  <phcoder@gmail.com>
+
+       * grub-core/genmoddep.awk: Remove explicit getline < /dev/stdin.
+
 2013-12-15  Ian Campbell  <ijc@hellion.org.uk>
 
        * grub-core/kern/uboot/init.c: Fix units of uboot timer.
index 2e6af05a7ce46ef55fcaea78c662c8c180d937fd..2f32465c4094f82f10bd3829d38a649469f303df 100644 (file)
 # Read symbols' info from stdin.
 BEGIN {
   error = 0
-  lineno = 0;
-  while (getline <"/dev/stdin") {
-    lineno++;
-    if ($1 == "defined") {
-      symtab[$3] = $2;
-      modtab[$2] = "" modtab[$2]
-    } else if ($1 == "undefined") {
-      if ($3 in symtab)
-       modtab[$2] = modtab[$2] " " symtab[$3];
-      else if ($3 != "__gnu_local_gp" && $3 != "_gp_disp") {
-       printf "%s in %s is not defined\n", $3, $2 >"/dev/stderr";
-       error++;
-      }
-    }
-    else {
-      printf "error: %u: unrecognized input format\n", lineno;
+}
+
+{
+  if ($1 == "defined") {
+    symtab[$3] = $2;
+    modtab[$2] = "" modtab[$2]
+  } else if ($1 == "undefined") {
+    if ($3 in symtab)
+      modtab[$2] = modtab[$2] " " symtab[$3];
+    else if ($3 != "__gnu_local_gp" && $3 != "_gp_disp") {
+      printf "%s in %s is not defined\n", $3, $2 >"/dev/stderr";
       error++;
-      break;
     }
   }
+  else {
+    printf "error: %u: unrecognized input format\n", NR;
+    error++;
+  }
 }
 
 # Output the result.