vendor/golang.org/x/sys/unix/mkerrors.sh
changeset 260 445e01aede7e
parent 256 6d9efbef00a9
child 265 05c40b36d3b2
equal deleted inserted replaced
259:db4911b0c721 260:445e01aede7e
    52 #define AF_LOCAL AF_UNIX
    52 #define AF_LOCAL AF_UNIX
    53 '
    53 '
    54 
    54 
    55 includes_Darwin='
    55 includes_Darwin='
    56 #define _DARWIN_C_SOURCE
    56 #define _DARWIN_C_SOURCE
    57 #define KERNEL
    57 #define KERNEL 1
    58 #define _DARWIN_USE_64_BIT_INODE
    58 #define _DARWIN_USE_64_BIT_INODE
    59 #define __APPLE_USE_RFC_3542
    59 #define __APPLE_USE_RFC_3542
    60 #include <stdint.h>
    60 #include <stdint.h>
    61 #include <sys/attr.h>
    61 #include <sys/attr.h>
    62 #include <sys/clonefile.h>
    62 #include <sys/clonefile.h>
    73 #include <sys/mman.h>
    73 #include <sys/mman.h>
    74 #include <sys/mount.h>
    74 #include <sys/mount.h>
    75 #include <sys/utsname.h>
    75 #include <sys/utsname.h>
    76 #include <sys/wait.h>
    76 #include <sys/wait.h>
    77 #include <sys/xattr.h>
    77 #include <sys/xattr.h>
       
    78 #include <sys/vsock.h>
    78 #include <net/bpf.h>
    79 #include <net/bpf.h>
    79 #include <net/if.h>
    80 #include <net/if.h>
    80 #include <net/if_types.h>
    81 #include <net/if_types.h>
    81 #include <net/route.h>
    82 #include <net/route.h>
    82 #include <netinet/in.h>
    83 #include <netinet/in.h>
    83 #include <netinet/ip.h>
    84 #include <netinet/ip.h>
    84 #include <termios.h>
    85 #include <termios.h>
       
    86 
       
    87 // for backwards compatibility because moved TIOCREMOTE to Kernel.framework after MacOSX12.0.sdk.
       
    88 #define TIOCREMOTE 0x80047469
    85 '
    89 '
    86 
    90 
    87 includes_DragonFly='
    91 includes_DragonFly='
    88 #include <sys/types.h>
    92 #include <sys/types.h>
    89 #include <sys/event.h>
    93 #include <sys/event.h>
   122 #include <sys/sysctl.h>
   126 #include <sys/sysctl.h>
   123 #include <sys/mman.h>
   127 #include <sys/mman.h>
   124 #include <sys/mount.h>
   128 #include <sys/mount.h>
   125 #include <sys/wait.h>
   129 #include <sys/wait.h>
   126 #include <sys/ioctl.h>
   130 #include <sys/ioctl.h>
       
   131 #include <sys/ptrace.h>
   127 #include <net/bpf.h>
   132 #include <net/bpf.h>
   128 #include <net/if.h>
   133 #include <net/if.h>
   129 #include <net/if_types.h>
   134 #include <net/if_types.h>
   130 #include <net/route.h>
   135 #include <net/route.h>
   131 #include <netinet/in.h>
   136 #include <netinet/in.h>
   196 #include <sys/signalfd.h>
   201 #include <sys/signalfd.h>
   197 #include <sys/socket.h>
   202 #include <sys/socket.h>
   198 #include <sys/timerfd.h>
   203 #include <sys/timerfd.h>
   199 #include <sys/uio.h>
   204 #include <sys/uio.h>
   200 #include <sys/xattr.h>
   205 #include <sys/xattr.h>
       
   206 #include <linux/audit.h>
   201 #include <linux/bpf.h>
   207 #include <linux/bpf.h>
   202 #include <linux/can.h>
   208 #include <linux/can.h>
   203 #include <linux/can/error.h>
   209 #include <linux/can/error.h>
       
   210 #include <linux/can/netlink.h>
   204 #include <linux/can/raw.h>
   211 #include <linux/can/raw.h>
   205 #include <linux/capability.h>
   212 #include <linux/capability.h>
   206 #include <linux/cryptouser.h>
   213 #include <linux/cryptouser.h>
   207 #include <linux/devlink.h>
   214 #include <linux/devlink.h>
   208 #include <linux/dm-ioctl.h>
   215 #include <linux/dm-ioctl.h>
   209 #include <linux/errqueue.h>
   216 #include <linux/errqueue.h>
   210 #include <linux/ethtool_netlink.h>
   217 #include <linux/ethtool_netlink.h>
   211 #include <linux/falloc.h>
   218 #include <linux/falloc.h>
   212 #include <linux/fanotify.h>
   219 #include <linux/fanotify.h>
       
   220 #include <linux/fib_rules.h>
   213 #include <linux/filter.h>
   221 #include <linux/filter.h>
   214 #include <linux/fs.h>
   222 #include <linux/fs.h>
   215 #include <linux/fscrypt.h>
   223 #include <linux/fscrypt.h>
   216 #include <linux/fsverity.h>
   224 #include <linux/fsverity.h>
   217 #include <linux/genetlink.h>
   225 #include <linux/genetlink.h>
   218 #include <linux/hdreg.h>
   226 #include <linux/hdreg.h>
   219 #include <linux/hidraw.h>
   227 #include <linux/hidraw.h>
   220 #include <linux/icmp.h>
       
   221 #include <linux/icmpv6.h>
       
   222 #include <linux/if.h>
   228 #include <linux/if.h>
   223 #include <linux/if_addr.h>
   229 #include <linux/if_addr.h>
   224 #include <linux/if_alg.h>
   230 #include <linux/if_alg.h>
   225 #include <linux/if_arp.h>
   231 #include <linux/if_arp.h>
   226 #include <linux/if_ether.h>
   232 #include <linux/if_ether.h>
   227 #include <linux/if_ppp.h>
   233 #include <linux/if_ppp.h>
   228 #include <linux/if_tun.h>
   234 #include <linux/if_tun.h>
   229 #include <linux/if_packet.h>
   235 #include <linux/if_packet.h>
   230 #include <linux/if_xdp.h>
   236 #include <linux/if_xdp.h>
   231 #include <linux/input.h>
   237 #include <linux/input.h>
       
   238 #include <linux/kcm.h>
   232 #include <linux/kexec.h>
   239 #include <linux/kexec.h>
   233 #include <linux/keyctl.h>
   240 #include <linux/keyctl.h>
       
   241 #include <linux/landlock.h>
   234 #include <linux/loop.h>
   242 #include <linux/loop.h>
   235 #include <linux/lwtunnel.h>
   243 #include <linux/lwtunnel.h>
   236 #include <linux/magic.h>
   244 #include <linux/magic.h>
   237 #include <linux/memfd.h>
   245 #include <linux/memfd.h>
   238 #include <linux/module.h>
   246 #include <linux/module.h>
       
   247 #include <linux/mount.h>
   239 #include <linux/netfilter/nfnetlink.h>
   248 #include <linux/netfilter/nfnetlink.h>
   240 #include <linux/netlink.h>
   249 #include <linux/netlink.h>
   241 #include <linux/net_namespace.h>
   250 #include <linux/net_namespace.h>
   242 #include <linux/nfc.h>
   251 #include <linux/nfc.h>
   243 #include <linux/nsfs.h>
   252 #include <linux/nsfs.h>
   255 #include <linux/taskstats.h>
   264 #include <linux/taskstats.h>
   256 #include <linux/tipc.h>
   265 #include <linux/tipc.h>
   257 #include <linux/vm_sockets.h>
   266 #include <linux/vm_sockets.h>
   258 #include <linux/wait.h>
   267 #include <linux/wait.h>
   259 #include <linux/watchdog.h>
   268 #include <linux/watchdog.h>
       
   269 #include <linux/wireguard.h>
   260 
   270 
   261 #include <mtd/ubi-user.h>
   271 #include <mtd/ubi-user.h>
   262 #include <mtd/mtd-user.h>
   272 #include <mtd/mtd-user.h>
   263 #include <net/route.h>
   273 #include <net/route.h>
   264 
   274 
   283 #define PTRACE_SETREGS	0xd
   293 #define PTRACE_SETREGS	0xd
   284 #endif
   294 #endif
   285 
   295 
   286 #ifndef SOL_NETLINK
   296 #ifndef SOL_NETLINK
   287 #define SOL_NETLINK	270
   297 #define SOL_NETLINK	270
       
   298 #endif
       
   299 
       
   300 #ifndef SOL_SMC
       
   301 #define SOL_SMC 286
   288 #endif
   302 #endif
   289 
   303 
   290 #ifdef SOL_BLUETOOTH
   304 #ifdef SOL_BLUETOOTH
   291 // SPARC includes this in /usr/include/sparc64-linux-gnu/bits/socket.h
   305 // SPARC includes this in /usr/include/sparc64-linux-gnu/bits/socket.h
   292 // but it is already in bluetooth_linux.go
   306 // but it is already in bluetooth_linux.go
   465 		$2 !~ /^ETH_/ &&
   479 		$2 !~ /^ETH_/ &&
   466 		$2 !~ /^EPROC_/ &&
   480 		$2 !~ /^EPROC_/ &&
   467 		$2 !~ /^EQUIV_/ &&
   481 		$2 !~ /^EQUIV_/ &&
   468 		$2 !~ /^EXPR_/ &&
   482 		$2 !~ /^EXPR_/ &&
   469 		$2 !~ /^EVIOC/ &&
   483 		$2 !~ /^EVIOC/ &&
   470 		$2 !~ /^EV_/ &&
       
   471 		$2 ~ /^E[A-Z0-9_]+$/ ||
   484 		$2 ~ /^E[A-Z0-9_]+$/ ||
   472 		$2 ~ /^B[0-9_]+$/ ||
   485 		$2 ~ /^B[0-9_]+$/ ||
   473 		$2 ~ /^(OLD|NEW)DEV$/ ||
   486 		$2 ~ /^(OLD|NEW)DEV$/ ||
   474 		$2 == "BOTHER" ||
   487 		$2 == "BOTHER" ||
   475 		$2 ~ /^CI?BAUD(EX)?$/ ||
   488 		$2 ~ /^CI?BAUD(EX)?$/ ||
   497 		$2 ~ /^(NL|CR|TAB|BS|VT|FF)DLY$/ ||
   510 		$2 ~ /^(NL|CR|TAB|BS|VT|FF)DLY$/ ||
   498 		$2 ~ /^(NL|CR|TAB|BS|VT|FF)[0-9]$/ ||
   511 		$2 ~ /^(NL|CR|TAB|BS|VT|FF)[0-9]$/ ||
   499 		$2 ~ /^O?XTABS$/ ||
   512 		$2 ~ /^O?XTABS$/ ||
   500 		$2 ~ /^TC[IO](ON|OFF)$/ ||
   513 		$2 ~ /^TC[IO](ON|OFF)$/ ||
   501 		$2 ~ /^IN_/ ||
   514 		$2 ~ /^IN_/ ||
       
   515 		$2 ~ /^KCM/ ||
       
   516 		$2 ~ /^LANDLOCK_/ ||
   502 		$2 ~ /^LOCK_(SH|EX|NB|UN)$/ ||
   517 		$2 ~ /^LOCK_(SH|EX|NB|UN)$/ ||
   503 		$2 ~ /^LO_(KEY|NAME)_SIZE$/ ||
   518 		$2 ~ /^LO_(KEY|NAME)_SIZE$/ ||
   504 		$2 ~ /^LOOP_(CLR|CTL|GET|SET)_/ ||
   519 		$2 ~ /^LOOP_(CLR|CTL|GET|SET)_/ ||
   505 		$2 ~ /^(AF|SOCK|SO|SOL|IPPROTO|IP|IPV6|TCP|MCAST|EVFILT|NOTE|SHUT|PROT|MAP|MFD|T?PACKET|MSG|SCM|MCL|DT|MADV|PR|LOCAL)_/ ||
   520 		$2 ~ /^(AF|SOCK|SO|SOL|IPPROTO|IP|IPV6|TCP|MCAST|EVFILT|NOTE|SHUT|PROT|MAP|MFD|T?PACKET|MSG|SCM|MCL|DT|MADV|PR|LOCAL|TCPOPT)_/ ||
   506 		$2 ~ /^NFC_(GENL|PROTO|COMM|RF|SE|DIRECTION|LLCP|SOCKPROTO)_/ ||
   521 		$2 ~ /^NFC_(GENL|PROTO|COMM|RF|SE|DIRECTION|LLCP|SOCKPROTO)_/ ||
   507 		$2 ~ /^NFC_.*_(MAX)?SIZE$/ ||
   522 		$2 ~ /^NFC_.*_(MAX)?SIZE$/ ||
   508 		$2 ~ /^RAW_PAYLOAD_/ ||
   523 		$2 ~ /^RAW_PAYLOAD_/ ||
   509 		$2 ~ /^TP_STATUS_/ ||
   524 		$2 ~ /^TP_STATUS_/ ||
   510 		$2 ~ /^FALLOC_/ ||
   525 		$2 ~ /^FALLOC_/ ||
   515 		$2 ~ /^CTL_(HW|KERN|MAXNAME|NET|QUERY)$/ ||
   530 		$2 ~ /^CTL_(HW|KERN|MAXNAME|NET|QUERY)$/ ||
   516 		$2 ~ /^KERN_(HOSTNAME|OS(RELEASE|TYPE)|VERSION)$/ ||
   531 		$2 ~ /^KERN_(HOSTNAME|OS(RELEASE|TYPE)|VERSION)$/ ||
   517 		$2 ~ /^HW_MACHINE$/ ||
   532 		$2 ~ /^HW_MACHINE$/ ||
   518 		$2 ~ /^SYSCTL_VERS/ ||
   533 		$2 ~ /^SYSCTL_VERS/ ||
   519 		$2 !~ "MNT_BITS" &&
   534 		$2 !~ "MNT_BITS" &&
   520 		$2 ~ /^(MS|MNT|UMOUNT)_/ ||
   535 		$2 ~ /^(MS|MNT|MOUNT|UMOUNT)_/ ||
   521 		$2 ~ /^NS_GET_/ ||
   536 		$2 ~ /^NS_GET_/ ||
   522 		$2 ~ /^TUN(SET|GET|ATTACH|DETACH)/ ||
   537 		$2 ~ /^TUN(SET|GET|ATTACH|DETACH)/ ||
   523 		$2 ~ /^(O|F|[ES]?FD|NAME|S|PTRACE|PT|TFD)_/ ||
   538 		$2 ~ /^(O|F|[ES]?FD|NAME|S|PTRACE|PT|PIOD|TFD)_/ ||
   524 		$2 ~ /^KEXEC_/ ||
   539 		$2 ~ /^KEXEC_/ ||
   525 		$2 ~ /^LINUX_REBOOT_CMD_/ ||
   540 		$2 ~ /^LINUX_REBOOT_CMD_/ ||
   526 		$2 ~ /^LINUX_REBOOT_MAGIC[12]$/ ||
   541 		$2 ~ /^LINUX_REBOOT_MAGIC[12]$/ ||
   527 		$2 ~ /^MODULE_INIT_/ ||
   542 		$2 ~ /^MODULE_INIT_/ ||
   528 		$2 !~ "NLA_TYPE_MASK" &&
   543 		$2 !~ "NLA_TYPE_MASK" &&
   542 		$2 ~ /^RLIMIT_(AS|CORE|CPU|DATA|FSIZE|LOCKS|MEMLOCK|MSGQUEUE|NICE|NOFILE|NPROC|RSS|RTPRIO|RTTIME|SIGPENDING|STACK)|RLIM_INFINITY/ ||
   557 		$2 ~ /^RLIMIT_(AS|CORE|CPU|DATA|FSIZE|LOCKS|MEMLOCK|MSGQUEUE|NICE|NOFILE|NPROC|RSS|RTPRIO|RTTIME|SIGPENDING|STACK)|RLIM_INFINITY/ ||
   543 		$2 ~ /^PRIO_(PROCESS|PGRP|USER)/ ||
   558 		$2 ~ /^PRIO_(PROCESS|PGRP|USER)/ ||
   544 		$2 ~ /^CLONE_[A-Z_]+/ ||
   559 		$2 ~ /^CLONE_[A-Z_]+/ ||
   545 		$2 !~ /^(BPF_TIMEVAL|BPF_FIB_LOOKUP_[A-Z]+)$/ &&
   560 		$2 !~ /^(BPF_TIMEVAL|BPF_FIB_LOOKUP_[A-Z]+)$/ &&
   546 		$2 ~ /^(BPF|DLT)_/ ||
   561 		$2 ~ /^(BPF|DLT)_/ ||
       
   562 		$2 ~ /^AUDIT_/ ||
   547 		$2 ~ /^(CLOCK|TIMER)_/ ||
   563 		$2 ~ /^(CLOCK|TIMER)_/ ||
   548 		$2 ~ /^CAN_/ ||
   564 		$2 ~ /^CAN_/ ||
   549 		$2 ~ /^CAP_/ ||
   565 		$2 ~ /^CAP_/ ||
   550 		$2 ~ /^CP_/ ||
   566 		$2 ~ /^CP_/ ||
   551 		$2 ~ /^CPUSTATES$/ ||
   567 		$2 ~ /^CPUSTATES$/ ||
   564 		$2 ~ /^PERF_/ ||
   580 		$2 ~ /^PERF_/ ||
   565 		$2 ~ /^SECCOMP_MODE_/ ||
   581 		$2 ~ /^SECCOMP_MODE_/ ||
   566 		$2 ~ /^SEEK_/ ||
   582 		$2 ~ /^SEEK_/ ||
   567 		$2 ~ /^SPLICE_/ ||
   583 		$2 ~ /^SPLICE_/ ||
   568 		$2 ~ /^SYNC_FILE_RANGE_/ ||
   584 		$2 ~ /^SYNC_FILE_RANGE_/ ||
   569 		$2 !~ /^AUDIT_RECORD_MAGIC/ &&
       
   570 		$2 !~ /IOC_MAGIC/ &&
   585 		$2 !~ /IOC_MAGIC/ &&
   571 		$2 ~ /^[A-Z][A-Z0-9_]+_MAGIC2?$/ ||
   586 		$2 ~ /^[A-Z][A-Z0-9_]+_MAGIC2?$/ ||
   572 		$2 ~ /^(VM|VMADDR)_/ ||
   587 		$2 ~ /^(VM|VMADDR)_/ ||
   573 		$2 ~ /^IOCTL_VM_SOCKETS_/ ||
   588 		$2 ~ /^IOCTL_VM_SOCKETS_/ ||
   574 		$2 ~ /^(TASKSTATS|TS)_/ ||
   589 		$2 ~ /^(TASKSTATS|TS)_/ ||
   590 		$2 ~ /^TIPC_/ ||
   605 		$2 ~ /^TIPC_/ ||
   591 		$2 !~  "DEVLINK_RELOAD_LIMITS_VALID_MASK" &&
   606 		$2 !~  "DEVLINK_RELOAD_LIMITS_VALID_MASK" &&
   592 		$2 ~ /^DEVLINK_/ ||
   607 		$2 ~ /^DEVLINK_/ ||
   593 		$2 ~ /^ETHTOOL_/ ||
   608 		$2 ~ /^ETHTOOL_/ ||
   594 		$2 ~ /^LWTUNNEL_IP/ ||
   609 		$2 ~ /^LWTUNNEL_IP/ ||
       
   610 		$2 ~ /^ITIMER_/ ||
   595 		$2 !~ "WMESGLEN" &&
   611 		$2 !~ "WMESGLEN" &&
   596 		$2 ~ /^W[A-Z0-9]+$/ ||
   612 		$2 ~ /^W[A-Z0-9]+$/ ||
       
   613 		$2 ~ /^P_/ ||
   597 		$2 ~/^PPPIOC/ ||
   614 		$2 ~/^PPPIOC/ ||
   598 		$2 ~ /^FAN_|FANOTIFY_/ ||
   615 		$2 ~ /^FAN_|FANOTIFY_/ ||
   599 		$2 == "HID_MAX_DESCRIPTOR_SIZE" ||
   616 		$2 == "HID_MAX_DESCRIPTOR_SIZE" ||
   600 		$2 ~ /^_?HIDIOC/ ||
   617 		$2 ~ /^_?HIDIOC/ ||
   601 		$2 ~ /^BUS_(USB|HIL|BLUETOOTH|VIRTUAL)$/ ||
   618 		$2 ~ /^BUS_(USB|HIL|BLUETOOTH|VIRTUAL)$/ ||
   602 		$2 ~ /^MTD/ ||
   619 		$2 ~ /^MTD/ ||
   603 		$2 ~ /^OTP/ ||
   620 		$2 ~ /^OTP/ ||
   604 		$2 ~ /^MEM/ ||
   621 		$2 ~ /^MEM/ ||
       
   622 		$2 ~ /^WG/ ||
       
   623 		$2 ~ /^FIB_RULE_/ ||
   605 		$2 ~ /^BLK[A-Z]*(GET$|SET$|BUF$|PART$|SIZE)/ {printf("\t%s = C.%s\n", $2, $2)}
   624 		$2 ~ /^BLK[A-Z]*(GET$|SET$|BUF$|PART$|SIZE)/ {printf("\t%s = C.%s\n", $2, $2)}
   606 		$2 ~ /^__WCOREFLAG$/ {next}
   625 		$2 ~ /^__WCOREFLAG$/ {next}
   607 		$2 ~ /^__W[A-Z0-9]+$/ {printf("\t%s = C.%s\n", substr($2,3), $2)}
   626 		$2 ~ /^__W[A-Z0-9]+$/ {printf("\t%s = C.%s\n", substr($2,3), $2)}
   608 
   627 
   609 		{next}
   628 		{next}