[compiler-rt] r345572 - Drop now hidden ioctl(2) operations for NetBSD

Kamil Rytarowski via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 30 01:32:47 PDT 2018


Author: kamil
Date: Tue Oct 30 01:32:47 2018
New Revision: 345572

URL: http://llvm.org/viewvc/llvm-project?rev=345572&view=rev
Log:
Drop now hidden ioctl(2) operations for NetBSD

POWER_IOC_GET_TYPE_WITH_LOSSAGE is no longer accessible from userland.

Modified:
    compiler-rt/trunk/utils/generate_netbsd_ioctls.awk

Modified: compiler-rt/trunk/utils/generate_netbsd_ioctls.awk
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/utils/generate_netbsd_ioctls.awk?rev=345572&r1=345571&r2=345572&view=diff
==============================================================================
--- compiler-rt/trunk/utils/generate_netbsd_ioctls.awk (original)
+++ compiler-rt/trunk/utils/generate_netbsd_ioctls.awk Tue Oct 30 01:32:47 2018
@@ -314,6 +314,7 @@ FNR == 1 {
       $0 ~ /PRIQ_IF_DETACH/ ||
       $0 ~ /PRIQ_ENABLE/ ||
       $0 ~ /WFQ_IF_ATTACH/ ||
+      $0 ~ /POWER_IOC_GET_TYPE_WITH_LOSSAGE/ ||
       $0 ~ /HFSC_DEL_FILTER/) {
     # There are entries with duplicate codes.. disable the less used ones
     next
@@ -345,17 +346,12 @@ FNR == 1 {
 
   # This !NONE check allows to skip some unparsable entries
   if (ioctl_mode[ioctl_table_max] != "NONE") {
-    # special cases first
-    if ($0 ~ /POWER_IOC_GET_TYPE_WITH_LOSSAGE/) {
-      ioctl_type[ioctl_table_max] = "sizeof(uptr)"
-    } else {
-      n = split($0, a, ",")
-      if (n == 3) {
-        gsub(/^[ ]+/, "", a[3])
-        match(a[3], /[a-zA-Z0-9_* ]+/)
-        type = get_type(substr(a[3], 0, RLENGTH))
-        ioctl_type[ioctl_table_max] = type
-      }
+    n = split($0, a, ",")
+    if (n == 3) {
+      gsub(/^[ ]+/, "", a[3])
+      match(a[3], /[a-zA-Z0-9_* ]+/)
+      type = get_type(substr(a[3], 0, RLENGTH))
+      ioctl_type[ioctl_table_max] = type
     }
   }
 




More information about the llvm-commits mailing list