003 File Manager
Current Path:
/usr/src/lib/libsysdecode
usr
/
src
/
lib
/
libsysdecode
/
📁
..
📄
Makefile
(4.93 KB)
📄
Makefile.depend
(2.65 KB)
📄
errno.c
(5.58 KB)
📄
flags.c
(26.04 KB)
📄
mkioctls
(2.38 KB)
📄
mktables
(10.16 KB)
📄
signal.c
(4.25 KB)
📄
syscallnames.c
(3.28 KB)
📄
sysdecode.3
(2.95 KB)
📄
sysdecode.h
(6.59 KB)
📄
sysdecode_abi_to_freebsd_errno.3
(2.76 KB)
📄
sysdecode_cap_rights.3
(1.81 KB)
📄
sysdecode_cmsg_type.3
(1.9 KB)
📄
sysdecode_enum.3
(8.39 KB)
📄
sysdecode_fcntl_arg.3
(3.06 KB)
📄
sysdecode_ioctlname.3
(2.1 KB)
📄
sysdecode_kevent.3
(3.26 KB)
📄
sysdecode_mask.3
(7.81 KB)
📄
sysdecode_quotactl_cmd.3
(2.75 KB)
📄
sysdecode_sctp_sinfo_flags.3
(2.01 KB)
📄
sysdecode_sigcode.3
(2.49 KB)
📄
sysdecode_socket_protocol.3
(1.9 KB)
📄
sysdecode_sockopt_name.3
(2.14 KB)
📄
sysdecode_syscallnames.3
(2.13 KB)
📄
sysdecode_utrace.3
(2.38 KB)
📄
utrace.c
(5.78 KB)
Editing: mkioctls
#!/bin/sh # # $FreeBSD$ set -e if [ $# -ne 1 ]; then echo "usage: sh $0 include-dir" exit 1 fi includedir="$1" LC_ALL=C; export LC_ALL # Build a list of headers that have ioctls in them. # XXX should we use an ANSI cpp? ioctl_includes=$( cd $includedir set -e # if /bin/sh is bash this will avoid further errors due to missing commands if set -o | grep -q pipefail; then set -o pipefail fi filter='tee' if [ "${MK_PF}" = "no" ]; then filter='egrep -v (net/pfvar|net/if_pfsync)\.h' fi # find -s would avoid the need to invoke sort but it is non-portable find -L ./* -type f -name '*.h' | \ LC_ALL=C sort | \ $filter | \ xargs egrep -l \ '^#[ ]*define[ ]+[A-Za-z_][A-Za-z0-9_]*[ ]+_IO[^a-z0-9_]' | awk '{printf("#include <%s>\\n", $1)}' ) if [ -z "$ioctl_includes" ]; then echo "Failed to build list of ioctl headers" exit 1 fi awk -v x="$ioctl_includes" 'BEGIN {print x}' | $CPP -nostdinc -I$includedir -dM -DCOMPAT_43TTY - | awk -v ioctl_includes="$ioctl_includes" ' BEGIN { print "/* XXX obnoxious prerequisites. */" print "#define COMPAT_43" print "#define COMPAT_43TTY" print "#include <sys/param.h>" print "#include <sys/devicestat.h>" print "#include <sys/disklabel.h>" print "#include <sys/mman.h>" print "#include <sys/socket.h>" print "#include <sys/time.h>" print "#include <sys/tty.h>" print "#include <bsm/audit.h>" print "#include <net/ethernet.h>" print "#include <net/if.h>" print "#ifdef PF" print "#include <net/pfvar.h>" print "#include <net/if_pfsync.h>" print "#endif" print "#include <net/route.h>" print "#include <netinet/in.h>" print "#include <netinet/ip_mroute.h>" print "#include <netinet6/in6_var.h>" print "#include <netinet6/nd6.h>" print "#include <netinet6/ip6_mroute.h>" print "#include <stdio.h>" print "#include <cam/cam.h>" print "#include <stdbool.h>" print "#include <stddef.h>" print "#include <stdint.h>" print "#include <sysdecode.h>" print "" print ioctl_includes print "" print "const char *" print "sysdecode_ioctlname(unsigned long val)" print "{" print "\tconst char *str = NULL;" print "" } /^#[ ]*define[ ]+[A-Za-z_][A-Za-z0-9_]*[ ]+_IO/ { # find where the name starts for (i = 1; i <= NF; i++) if ($i ~ /define/) break; ++i; # printf("\t"); if (n++ > 0) printf("else "); printf("if (val == %s)\n", $i); printf("\t\tstr = \"%s\";\n", $i); } END { print "" print "\treturn (str);" print "}" } '
Upload File
Create Folder