File manager - Edit - /home/newsbmcs.com/public_html/static/img/logo/beauty.zip
Back
PK �U�Z�|�9 9 mremap_flags.shnu ȯ�� #!/bin/sh # SPDX-License-Identifier: LGPL-2.1 if [ $# -ne 1 ] ; then linux_header_dir=tools/include/uapi/linux else linux_header_dir=$1 fi linux_mman=${linux_header_dir}/mman.h printf "static const char *mremap_flags[] = {\n" regex='^[[:space:]]*#[[:space:]]*define[[:space:]]+MREMAP_([[:alnum:]_]+)[[:space:]]+((0x)?[[:xdigit:]]+)[[:space:]]*.*' egrep -q $regex ${linux_mman} && \ (egrep $regex ${linux_mman} | \ sed -r "s/$regex/\2 \1 \1 \1 \2/g" | \ xargs printf "\t[ilog2(%s) + 1] = \"%s\",\n#ifndef MREMAP_%s\n#define MREMAP_%s %s\n#endif\n") printf "};\n" PK �U�Z�� � fspick.shnu ȯ�� #!/bin/sh # SPDX-License-Identifier: LGPL-2.1 if [ $# -ne 1 ] ; then linux_header_dir=tools/include/uapi/linux else linux_header_dir=$1 fi linux_mount=${linux_header_dir}/mount.h printf "static const char *fspick_flags[] = {\n" regex='^[[:space:]]*#[[:space:]]*define[[:space:]]+FSPICK_([[:alnum:]_]+)[[:space:]]+(0x[[:xdigit:]]+)[[:space:]]*.*' egrep $regex ${linux_mount} | \ sed -r "s/$regex/\2 \1/g" | \ xargs printf "\t[ilog2(%s) + 1] = \"%s\",\n" printf "};\n" PK �U�Z�`�9� � mmap_flags.shnu ȯ�� #!/bin/sh # SPDX-License-Identifier: LGPL-2.1 if [ $# -ne 3 ] ; then [ $# -eq 1 ] && hostarch=$1 || hostarch=`uname -m | sed -e s/i.86/x86/ -e s/x86_64/x86/` linux_header_dir=tools/include/uapi/linux header_dir=tools/include/uapi/asm-generic arch_header_dir=tools/arch/${hostarch}/include/uapi/asm else linux_header_dir=$1 header_dir=$2 arch_header_dir=$3 fi linux_mman=${linux_header_dir}/mman.h arch_mman=${arch_header_dir}/mman.h # those in egrep -vw are flags, we want just the bits printf "static const char *mmap_flags[] = {\n" regex='^[[:space:]]*#[[:space:]]*define[[:space:]]+MAP_([[:alnum:]_]+)[[:space:]]+(0x[[:xdigit:]]+)[[:space:]]*.*' egrep -q $regex ${arch_mman} && \ (egrep $regex ${arch_mman} | \ sed -r "s/$regex/\2 \1 \1 \1 \2/g" | \ xargs printf "\t[ilog2(%s) + 1] = \"%s\",\n#ifndef MAP_%s\n#define MAP_%s %s\n#endif\n") egrep -q $regex ${linux_mman} && \ (egrep $regex ${linux_mman} | \ egrep -vw 'MAP_(UNINITIALIZED|TYPE|SHARED_VALIDATE)' | \ sed -r "s/$regex/\2 \1 \1 \1 \2/g" | \ xargs printf "\t[ilog2(%s) + 1] = \"%s\",\n#ifndef MAP_%s\n#define MAP_%s %s\n#endif\n") ([ ! -f ${arch_mman} ] || egrep -q '#[[:space:]]*include[[:space:]]+.*uapi/asm-generic/mman.*' ${arch_mman}) && (egrep $regex ${header_dir}/mman-common.h | \ egrep -vw 'MAP_(UNINITIALIZED|TYPE|SHARED_VALIDATE)' | \ sed -r "s/$regex/\2 \1 \1 \1 \2/g" | \ xargs printf "\t[ilog2(%s) + 1] = \"%s\",\n#ifndef MAP_%s\n#define MAP_%s %s\n#endif\n") ([ ! -f ${arch_mman} ] || egrep -q '#[[:space:]]*include[[:space:]]+.*uapi/asm-generic/mman.h>.*' ${arch_mman}) && (egrep $regex ${header_dir}/mman.h | \ sed -r "s/$regex/\2 \1 \1 \1 \2/g" | \ xargs printf "\t[ilog2(%s) + 1] = \"%s\",\n#ifndef MAP_%s\n#define MAP_%s %s\n#endif\n") printf "};\n" PK �U�Z�`OPH H rename_flags.shnu ȯ�� #!/bin/sh # Copyright (C) 2018, Red Hat Inc, Arnaldo Carvalho de Melo <acme@redhat.com> # SPDX-License-Identifier: LGPL-2.1 [ $# -eq 1 ] && header_dir=$1 || header_dir=tools/include/uapi/linux/ fs_header=${header_dir}/fs.h printf "static const char *rename_flags[] = {\n" regex='^[[:space:]]*#[[:space:]]*define[[:space:]]+RENAME_([[:alnum:]_]+)[[:space:]]+\(1[[:space:]]*<<[[:space:]]*([[:xdigit:]]+)[[:space:]]*\)[[:space:]]*.*' egrep -q $regex ${fs_header} && \ (egrep $regex ${fs_header} | \ sed -r "s/$regex/\2 \1/g" | \ xargs printf "\t[%d + 1] = \"%s\",\n") printf "};\n" PK �U�Zu��UU U kcmp_type.shnu ȯ�� #!/bin/sh # SPDX-License-Identifier: LGPL-2.1 [ $# -eq 1 ] && header_dir=$1 || header_dir=tools/include/uapi/linux/ printf "static const char *kcmp_types[] = {\n" regex='^[[:space:]]+(KCMP_(\w+)),' egrep $regex ${header_dir}/kcmp.h | grep -v KCMP_TYPES, | \ sed -r "s/$regex/\1 \2/g" | \ xargs printf "\t[%s]\t= \"%s\",\n" printf "};\n" PK �U�Zr9#�; ; fsmount.shnu ȯ�� #!/bin/sh # SPDX-License-Identifier: LGPL-2.1 if [ $# -ne 1 ] ; then linux_header_dir=tools/include/uapi/linux else linux_header_dir=$1 fi linux_mount=${linux_header_dir}/mount.h # Remove MOUNT_ATTR_RELATIME as it is zeros, handle it a special way in the beautifier # Only handle MOUNT_ATTR_ followed by a capital letter/num as __ is special case # for things like MOUNT_ATTR__ATIME that is a mask for the possible ATIME handling # bits. Special case it as well in the beautifier printf "static const char *fsmount_attr_flags[] = {\n" regex='^[[:space:]]*#[[:space:]]*define[[:space:]]+MOUNT_ATTR_([[:alnum:]][[:alnum:]_]+)[[:space:]]+(0x[[:xdigit:]]+)[[:space:]]*.*' egrep $regex ${linux_mount} | grep -v MOUNT_ATTR_RELATIME | \ sed -r "s/$regex/\2 \1/g" | \ xargs printf "\t[ilog2(%s) + 1] = \"%s\",\n" printf "};\n" PK �U�Z����B B fadvise.shnu ȯ�� #!/bin/sh # SPDX-License-Identifier: LGPL-2.1 [ $# -eq 1 ] && header_dir=$1 || header_dir=tools/include/uapi/linux/ printf "static const char *fadvise_advices[] = {\n" regex='^[[:space:]]*#[[:space:]]*define[[:space:]]+POSIX_FADV_(\w+)[[:space:]]+([[:digit:]]+)[[:space:]]+.*' egrep $regex ${header_dir}/fadvise.h | \ sed -r "s/$regex/\2 \1/g" | \ sort | xargs printf "\t[%s] = \"%s\",\n" | \ grep -v "[6].*DONTNEED" | grep -v "[7].*NOREUSE" printf "};\n" # XXX Fix this properly: # The grep 6/7 DONTNEED/NOREUSE are a hack to filter out the s/390 oddity See # tools/include/uapi/linux/fadvise.h for details. # Probably fix this when generating the string tables per arch so that We can # reliably process on arch FOO a perf.data file collected by 'perf trace # record' on arch BAR, e.g. collect on s/390 and process on x86. PK �U�Zz�;p p sndrv_pcm_ioctl.shnu ȯ�� #!/bin/sh # SPDX-License-Identifier: LGPL-2.1 [ $# -eq 1 ] && header_dir=$1 || header_dir=tools/include/uapi/sound/ printf "static const char *sndrv_pcm_ioctl_cmds[] = {\n" grep "^#define[\t ]\+SNDRV_PCM_IOCTL_" $header_dir/asound.h | \ sed -r 's/^#define +SNDRV_PCM_IOCTL_([A-Z0-9_]+)[\t ]+_IO[RW]*\( *.A., *(0x[[:xdigit:]]+),?.*/\t[\2] = \"\1\",/g' printf "};\n" PK �U�Z��� � sync_file_range.shnu ȯ�� #!/bin/sh # SPDX-License-Identifier: LGPL-2.1 if [ $# -ne 1 ] ; then linux_header_dir=tools/include/uapi/linux else linux_header_dir=$1 fi linux_fs=${linux_header_dir}/fs.h printf "static const char *sync_file_range_flags[] = {\n" regex='^[[:space:]]*#[[:space:]]*define[[:space:]]+SYNC_FILE_RANGE_([[:alnum:]_]+)[[:space:]]+([[:xdigit:]]+)[[:space:]]*.*' egrep $regex ${linux_fs} | \ sed -r "s/$regex/\2 \1/g" | \ xargs printf "\t[ilog2(%s) + 1] = \"%s\",\n" printf "};\n" PK �U�Z"i� � prctl_option.shnu ȯ�� #!/bin/sh # SPDX-License-Identifier: LGPL-2.1 [ $# -eq 1 ] && header_dir=$1 || header_dir=tools/include/uapi/linux/ printf "static const char *prctl_options[] = {\n" regex='^#define[[:space:]]+PR_(\w+)[[:space:]]*([[:xdigit:]]+).*' egrep $regex ${header_dir}/prctl.h | grep -v PR_SET_PTRACER | \ sed -r "s/$regex/\2 \1/g" | \ sort -n | xargs printf "\t[%s] = \"%s\",\n" printf "};\n" printf "static const char *prctl_set_mm_options[] = {\n" regex='^#[[:space:]]+define[[:space:]]+PR_SET_MM_(\w+)[[:space:]]*([[:digit:]]+).*' egrep $regex ${header_dir}/prctl.h | \ sed -r "s/$regex/\2 \1/g" | \ sort -n | xargs printf "\t[%s] = \"%s\",\n" printf "};\n" PK �U�Z,� � arch_errno_names.shnu ȯ�� #!/bin/sh # SPDX-License-Identifier: GPL-2.0 # # Generate C file mapping errno codes to errno names. # # Copyright IBM Corp. 2018 # Author(s): Hendrik Brueckner <brueckner@linux.vnet.ibm.com> gcc="$1" toolsdir="$2" include_path="-I$toolsdir/include/uapi" arch_string() { echo "$1" |sed -e 'y/- /__/' |tr '[[:upper:]]' '[[:lower:]]' } asm_errno_file() { local arch="$1" local header header="$toolsdir/arch/$arch/include/uapi/asm/errno.h" if test -r "$header"; then echo "$header" else echo "$toolsdir/include/uapi/asm-generic/errno.h" fi } create_errno_lookup_func() { local arch=$(arch_string "$1") local nr name cat <<EoFuncBegin static const char *errno_to_name__$arch(int err) { switch (err) { EoFuncBegin while read name nr; do printf '\tcase %d: return "%s";\n' $nr $name done cat <<EoFuncEnd default: return "(unknown)"; } } EoFuncEnd } process_arch() { local arch="$1" local asm_errno=$(asm_errno_file "$arch") $gcc $CFLAGS $include_path -E -dM -x c $asm_errno \ |grep -hE '^#define[[:blank:]]+(E[^[:blank:]]+)[[:blank:]]+([[:digit:]]+).*' \ |awk '{ print $2","$3; }' \ |sort -t, -k2 -nu \ |IFS=, create_errno_lookup_func "$arch" } create_arch_errno_table_func() { local archlist="$1" local default="$2" local arch printf 'const char *arch_syscalls__strerrno(const char *arch, int err)\n' printf '{\n' for arch in $archlist; do printf '\tif (!strcmp(arch, "%s"))\n' $(arch_string "$arch") printf '\t\treturn errno_to_name__%s(err);\n' $(arch_string "$arch") done printf '\treturn errno_to_name__%s(err);\n' $(arch_string "$default") printf '}\n' } cat <<EoHEADER /* SPDX-License-Identifier: GPL-2.0 */ #include <string.h> EoHEADER # Create list of architectures that have a specific errno.h. archlist="" for arch in $(find $toolsdir/arch -maxdepth 1 -mindepth 1 -type d -printf "%f\n" | sort -r); do test -f $toolsdir/arch/$arch/include/uapi/asm/errno.h && archlist="$archlist $arch" done for arch in generic $archlist; do process_arch "$arch" done create_arch_errno_table_func "$archlist" "generic" PK �U�ZS)��� � madvise_behavior.shnu ȯ�� #!/bin/sh # SPDX-License-Identifier: LGPL-2.1 [ $# -eq 1 ] && header_dir=$1 || header_dir=tools/include/uapi/asm-generic/ printf "static const char *madvise_advices[] = {\n" regex='^[[:space:]]*#[[:space:]]*define[[:space:]]+MADV_([[:alnum:]_]+)[[:space:]]+([[:digit:]]+)[[:space:]]*.*' egrep $regex ${header_dir}/mman-common.h | \ sed -r "s/$regex/\2 \1/g" | \ sort -n | xargs printf "\t[%s] = \"%s\",\n" printf "};\n" PK �U�Z���H H x86_arch_prctl.shnu ȯ�� #!/bin/sh # Copyright (C) 2018, Red Hat Inc, Arnaldo Carvalho de Melo <acme@redhat.com> # SPDX-License-Identifier: LGPL-2.1 [ $# -eq 1 ] && x86_header_dir=$1 || x86_header_dir=tools/arch/x86/include/uapi/asm/ prctl_arch_header=${x86_header_dir}/prctl.h print_range () { local idx=$1 local prefix=$2 local first_entry=$3 printf "#define x86_arch_prctl_codes_%d_offset %s\n" $idx $first_entry printf "static const char *x86_arch_prctl_codes_%d[] = {\n" $idx regex=`printf '^[[:space:]]*#[[:space:]]*define[[:space:]]+ARCH_([[:alnum:]_]+)[[:space:]]+(%s[[:xdigit:]]+).*' ${prefix}` fmt="\t[%#x - ${first_entry}]= \"%s\",\n" egrep -q $regex ${prctl_arch_header} && \ (egrep $regex ${prctl_arch_header} | \ sed -r "s/$regex/\2 \1/g" | \ xargs printf "$fmt") printf "};\n\n" } print_range 1 0x1 0x1001 print_range 2 0x2 0x2001 PK �U�Z|� � � perf_ioctl.shnu ȯ�� #!/bin/sh # SPDX-License-Identifier: LGPL-2.1 [ $# -eq 1 ] && header_dir=$1 || header_dir=tools/include/uapi/linux/ printf "static const char *perf_ioctl_cmds[] = {\n" regex='^#[[:space:]]*define[[:space:]]+PERF_EVENT_IOC_(\w+)[[:space:]]+_IO[RW]*[[:space:]]*\([[:space:]]*.\$.[[:space:]]*,[[:space:]]*([[:digit:]]+).*' egrep $regex ${header_dir}/perf_event.h | \ sed -r "s/$regex/\2 \1/g" | \ sort | xargs printf "\t[%s] = \"%s\",\n" printf "};\n" PK �U�Z�w vhost_virtio_ioctl.shnu ȯ�� #!/bin/sh # SPDX-License-Identifier: LGPL-2.1 [ $# -eq 1 ] && header_dir=$1 || header_dir=tools/include/uapi/linux/ printf "static const char *vhost_virtio_ioctl_cmds[] = {\n" regex='^#[[:space:]]*define[[:space:]]+VHOST_(\w+)[[:space:]]+_IOW?\([[:space:]]*VHOST_VIRTIO[[:space:]]*,[[:space:]]*(0x[[:xdigit:]]+).*' egrep $regex ${header_dir}/vhost.h | \ sed -r "s/$regex/\2 \1/g" | \ sort | xargs printf "\t[%s] = \"%s\",\n" printf "};\n" printf "static const char *vhost_virtio_ioctl_read_cmds[] = {\n" regex='^#[[:space:]]*define[[:space:]]+VHOST_(\w+)[[:space:]]+_IOW?R\([[:space:]]*VHOST_VIRTIO[[:space:]]*,[[:space:]]*(0x[[:xdigit:]]+).*' egrep $regex ${header_dir}/vhost.h | \ sed -r "s/$regex/\2 \1/g" | \ sort | xargs printf "\t[%s] = \"%s\",\n" printf "};\n" PK �U�Z{� r r socket_ipproto.shnu ȯ�� #!/bin/sh # SPDX-License-Identifier: LGPL-2.1 [ $# -eq 1 ] && header_dir=$1 || header_dir=tools/include/uapi/linux/ printf "static const char *socket_ipproto[] = {\n" regex='^[[:space:]]+IPPROTO_(\w+)[[:space:]]+=[[:space:]]+([[:digit:]]+),.*' egrep $regex ${header_dir}/in.h | \ sed -r "s/$regex/\2 \1/g" | \ sort | xargs printf "\t[%s] = \"%s\",\n" printf "};\n" PK �U�Z��?� � tracepoints/x86_irq_vectors.shnu ȯ�� #!/bin/sh # SPDX-License-Identifier: LGPL-2.1 # (C) 2019, Arnaldo Carvalho de Melo <acme@redhat.com> if [ $# -ne 1 ] ; then arch_x86_header_dir=tools/arch/x86/include/asm/ else arch_x86_header_dir=$1 fi x86_irq_vectors=${arch_x86_header_dir}/irq_vectors.h # FIRST_EXTERNAL_VECTOR is not that useful, find what is its number # and then replace whatever is using it and that is useful, which at # the time of writing of this script was: IRQ_MOVE_CLEANUP_VECTOR. first_external_regex='^#define[[:space:]]+FIRST_EXTERNAL_VECTOR[[:space:]]+(0x[[:xdigit:]]+)$' first_external_vector=$(egrep ${first_external_regex} ${x86_irq_vectors} | sed -r "s/${first_external_regex}/\1/g") printf "static const char *x86_irq_vectors[] = {\n" regex='^#define[[:space:]]+([[:alnum:]_]+)_VECTOR[[:space:]]+(0x[[:xdigit:]]+)$' sed -r "s/FIRST_EXTERNAL_VECTOR/${first_external_vector}/g" ${x86_irq_vectors} | \ egrep ${regex} | \ sed -r "s/${regex}/\2 \1/g" | sort -n | \ xargs printf "\t[%s] = \"%s\",\n" printf "};\n\n" PK �U�ZXi��� � tracepoints/x86_msr.shnu ȯ�� #!/bin/sh # SPDX-License-Identifier: LGPL-2.1 if [ $# -ne 1 ] ; then arch_x86_header_dir=tools/arch/x86/include/asm/ else arch_x86_header_dir=$1 fi x86_msr_index=${arch_x86_header_dir}/msr-index.h # Support all later, with some hash table, for now chop off # Just the ones starting with 0x00000 so as to have a simple # array. printf "static const char *x86_MSRs[] = {\n" regex='^[[:space:]]*#[[:space:]]*define[[:space:]]+MSR_([[:alnum:]][[:alnum:]_]+)[[:space:]]+(0x00000[[:xdigit:]]+)[[:space:]]*.*' egrep $regex ${x86_msr_index} | egrep -v 'MSR_(ATOM|P[46]|IA32_(TSC_DEADLINE|UCODE_REV)|IDT_FCR4)' | \ sed -r "s/$regex/\2 \1/g" | sort -n | \ xargs printf "\t[%s] = \"%s\",\n" printf "};\n\n" # Remove MSR_K6_WHCR, clashes with MSR_LSTAR regex='^[[:space:]]*#[[:space:]]*define[[:space:]]+MSR_([[:alnum:]][[:alnum:]_]+)[[:space:]]+(0xc0000[[:xdigit:]]+)[[:space:]]*.*' printf "#define x86_64_specific_MSRs_offset " egrep $regex ${x86_msr_index} | sed -r "s/$regex/\2/g" | sort -n | head -1 printf "static const char *x86_64_specific_MSRs[] = {\n" egrep $regex ${x86_msr_index} | \ sed -r "s/$regex/\2 \1/g" | egrep -vw 'K6_WHCR' | sort -n | \ xargs printf "\t[%s - x86_64_specific_MSRs_offset] = \"%s\",\n" printf "};\n\n" regex='^[[:space:]]*#[[:space:]]*define[[:space:]]+MSR_([[:alnum:]][[:alnum:]_]+)[[:space:]]+(0xc0010[[:xdigit:]]+)[[:space:]]*.*' printf "#define x86_AMD_V_KVM_MSRs_offset " egrep $regex ${x86_msr_index} | sed -r "s/$regex/\2/g" | sort -n | head -1 printf "static const char *x86_AMD_V_KVM_MSRs[] = {\n" egrep $regex ${x86_msr_index} | \ sed -r "s/$regex/\2 \1/g" | sort -n | \ xargs printf "\t[%s - x86_AMD_V_KVM_MSRs_offset] = \"%s\",\n" printf "};\n" PK �U�Z�D� � mmap_prot.shnu ȯ�� #!/bin/sh # SPDX-License-Identifier: LGPL-2.1 if [ $# -ne 2 ] ; then [ $# -eq 1 ] && hostarch=$1 || hostarch=`uname -m | sed -e s/i.86/x86/ -e s/x86_64/x86/` asm_header_dir=tools/include/uapi/asm-generic arch_header_dir=tools/arch/${hostarch}/include/uapi/asm else asm_header_dir=$1 arch_header_dir=$2 fi common_mman=${asm_header_dir}/mman-common.h arch_mman=${arch_header_dir}/mman.h prefix="PROT" printf "static const char *mmap_prot[] = {\n" regex=`printf '^[[:space:]]*#[[:space:]]*define[[:space:]]+%s_([[:alnum:]_]+)[[:space:]]+(0x[[:xdigit:]]+)[[:space:]]*.*' ${prefix}` ([ ! -f ${arch_mman} ] || egrep -q '#[[:space:]]*include[[:space:]]+.*uapi/asm-generic/mman.*' ${arch_mman}) && (egrep $regex ${common_mman} | \ egrep -vw PROT_NONE | \ sed -r "s/$regex/\2 \1 \1 \1 \2/g" | \ xargs printf "\t[ilog2(%s) + 1] = \"%s\",\n#ifndef ${prefix}_%s\n#define ${prefix}_%s %s\n#endif\n") [ -f ${arch_mman} ] && egrep -q $regex ${arch_mman} && (egrep $regex ${arch_mman} | \ egrep -vw PROT_NONE | \ sed -r "s/$regex/\2 \1 \1 \1 \2/g" | \ xargs printf "\t[ilog2(%s) + 1] = \"%s\",\n#ifndef ${prefix}_%s\n#define ${prefix}_%s %s\n#endif\n") printf "};\n" PK �U�Z��]r r drm_ioctl.shnu ȯ�� #!/bin/sh # SPDX-License-Identifier: LGPL-2.1 [ $# -eq 1 ] && header_dir=$1 || header_dir=tools/include/uapi/drm/ printf "#ifndef DRM_COMMAND_BASE\n" grep "#define DRM_COMMAND_BASE" $header_dir/drm.h printf "#endif\n" printf "static const char *drm_ioctl_cmds[] = {\n" grep "^#define DRM_IOCTL.*DRM_IO" $header_dir/drm.h | \ sed -r 's/^#define +DRM_IOCTL_([A-Z0-9_]+)[ ]+DRM_IO[A-Z]* *\( *(0x[[:xdigit:]]+),*.*/ [\2] = "\1",/g' grep "^#define DRM_I915_[A-Z_0-9]\+[ ]\+0x" $header_dir/i915_drm.h | \ sed -r 's/^#define +DRM_I915_([A-Z0-9_]+)[ ]+(0x[[:xdigit:]]+)/\t[DRM_COMMAND_BASE + \2] = "I915_\1",/g' printf "};\n" PK �U�Z��2� � mount_flags.shnu ȯ�� #!/bin/sh # SPDX-License-Identifier: LGPL-2.1 [ $# -eq 1 ] && header_dir=$1 || header_dir=tools/include/uapi/linux/ printf "static const char *mount_flags[] = {\n" regex='^[[:space:]]*#[[:space:]]*define[[:space:]]+MS_([[:alnum:]_]+)[[:space:]]+([[:digit:]]+)[[:space:]]*.*' egrep $regex ${header_dir}/mount.h | egrep -v '(MSK|VERBOSE|MGC_VAL)\>' | \ sed -r "s/$regex/\2 \2 \1/g" | sort -n | \ xargs printf "\t[%s ? (ilog2(%s) + 1) : 0] = \"%s\",\n" regex='^[[:space:]]*#[[:space:]]*define[[:space:]]+MS_([[:alnum:]_]+)[[:space:]]+\(1<<([[:digit:]]+)\)[[:space:]]*.*' egrep $regex ${header_dir}/mount.h | \ sed -r "s/$regex/\2 \1/g" | \ xargs printf "\t[%s + 1] = \"%s\",\n" printf "};\n" PK �U�Z2�]p p sndrv_ctl_ioctl.shnu ȯ�� #!/bin/sh # SPDX-License-Identifier: LGPL-2.1 [ $# -eq 1 ] && header_dir=$1 || header_dir=tools/include/uapi/sound/ printf "static const char *sndrv_ctl_ioctl_cmds[] = {\n" grep "^#define[\t ]\+SNDRV_CTL_IOCTL_" $header_dir/asound.h | \ sed -r 's/^#define +SNDRV_CTL_IOCTL_([A-Z0-9_]+)[\t ]+_IO[RW]*\( *.U., *(0x[[:xdigit:]]+),?.*/\t[\2] = \"\1\",/g' printf "};\n" PK �U�Zs�� kvm_ioctl.shnu ȯ�� #!/bin/sh # SPDX-License-Identifier: LGPL-2.1 [ $# -eq 1 ] && header_dir=$1 || header_dir=tools/include/uapi/linux/ printf "static const char *kvm_ioctl_cmds[] = {\n" regex='^#[[:space:]]*define[[:space:]]+KVM_(\w+)[[:space:]]+_IO[RW]*\([[:space:]]*KVMIO[[:space:]]*,[[:space:]]*(0x[[:xdigit:]]+).*' egrep $regex ${header_dir}/kvm.h | \ sed -r "s/$regex/\2 \1/g" | \ egrep -v " ((ARM|PPC|S390)_|[GS]ET_(DEBUGREGS|PIT2|XSAVE|TSC_KHZ)|CREATE_SPAPR_TCE_64)" | \ sort | xargs printf "\t[%s] = \"%s\",\n" printf "};\n" PK �U�Z�!!�� � pkey_alloc_access_rights.shnu ȯ�� #!/bin/sh # SPDX-License-Identifier: LGPL-2.1 [ $# -eq 1 ] && header_dir=$1 || header_dir=tools/include/uapi/asm-generic/ printf "static const char *pkey_alloc_access_rights[] = {\n" regex='^[[:space:]]*#[[:space:]]*define[[:space:]]+PKEY_([[:alnum:]_]+)[[:space:]]+(0x[[:xdigit:]]+)[[:space:]]*' egrep $regex ${header_dir}/mman-common.h | \ sed -r "s/$regex/\2 \2 \1/g" | \ sort | xargs printf "\t[%s ? (ilog2(%s) + 1) : 0] = \"%s\",\n" printf "};\n" PK �U�Zц��� � usbdevfs_ioctl.shnu ȯ�� #!/bin/sh # SPDX-License-Identifier: LGPL-2.1 [ $# -eq 1 ] && header_dir=$1 || header_dir=tools/include/uapi/linux/ # also as: # #define USBDEVFS_CONNINFO_EX(len) _IOC(_IOC_READ, 'U', 32, len) printf "static const char *usbdevfs_ioctl_cmds[] = {\n" regex="^#[[:space:]]*define[[:space:]]+USBDEVFS_(\w+)(\(\w+\))?[[:space:]]+_IO[CWR]{0,2}\([[:space:]]*(_IOC_\w+,[[:space:]]*)?'U'[[:space:]]*,[[:space:]]*([[:digit:]]+).*" egrep "$regex" ${header_dir}/usbdevice_fs.h | egrep -v 'USBDEVFS_\w+32[[:space:]]' | \ sed -r "s/$regex/\4 \1/g" | \ sort | xargs printf "\t[%s] = \"%s\",\n" printf "};\n\n" printf "#if 0\n" printf "static const char *usbdevfs_ioctl_32_cmds[] = {\n" regex="^#[[:space:]]*define[[:space:]]+USBDEVFS_(\w+)[[:space:]]+_IO[WR]{0,2}\([[:space:]]*'U'[[:space:]]*,[[:space:]]*([[:digit:]]+).*" egrep $regex ${header_dir}/usbdevice_fs.h | egrep 'USBDEVFS_\w+32[[:space:]]' | \ sed -r "s/$regex/\2 \1/g" | \ sort | xargs printf "\t[%s] = \"%s\",\n" printf "};\n" printf "#endif\n" PK �U�Z"�U�� � move_mount_flags.shnu ȯ�� #!/bin/sh # SPDX-License-Identifier: LGPL-2.1 if [ $# -ne 1 ] ; then linux_header_dir=tools/include/uapi/linux else linux_header_dir=$1 fi linux_mount=${linux_header_dir}/mount.h printf "static const char *move_mount_flags[] = {\n" regex='^[[:space:]]*#[[:space:]]*define[[:space:]]+MOVE_MOUNT_([^_]+_[[:alnum:]_]+)[[:space:]]+(0x[[:xdigit:]]+)[[:space:]]*.*' egrep $regex ${linux_mount} | \ sed -r "s/$regex/\2 \1/g" | \ xargs printf "\t[ilog2(%s) + 1] = \"%s\",\n" printf "};\n" PK �U�Z�d_{ { fsconfig.shnu ȯ�� #!/bin/sh # SPDX-License-Identifier: LGPL-2.1 if [ $# -ne 1 ] ; then linux_header_dir=tools/include/uapi/linux else linux_header_dir=$1 fi linux_mount=${linux_header_dir}/mount.h printf "static const char *fsconfig_cmds[] = {\n" ms='[[:space:]]*' sed -nr "s/^${ms}FSCONFIG_([[:alnum:]_]+)${ms}=${ms}([[:digit:]]+)${ms},.*/\t[\2] = \"\1\",/p" \ ${linux_mount} printf "};\n" PK �U�Z� � socket.shnu ȯ�� #!/bin/sh # SPDX-License-Identifier: LGPL-2.1 # This one uses a copy from the kernel sources headers that is in a # place used just for these tools/perf/beauty/ usage, we shouldn't not # put it in tools/include/linux otherwise they would be used in the # normal compiler building process and would drag needless stuff from the # kernel. # When what these scripts need is already in tools/include/ then use it, # otherwise grab and check the copy from the kernel sources just for these # string table building scripts. [ $# -eq 1 ] && header_dir=$1 || header_dir=tools/perf/trace/beauty/include/linux/ printf "static const char *socket_families[] = {\n" # #define AF_LOCAL 1 /* POSIX name for AF_UNIX */ regex='^#define[[:space:]]+AF_(\w+)[[:space:]]+([[:digit:]]+).*' egrep $regex ${header_dir}/socket.h | \ sed -r "s/$regex/\2 \1/g" | \ xargs printf "\t[%s] = \"%s\",\n" | \ egrep -v "\"(UNIX|MAX)\"" printf "};\n" PK �U�Z�|�9 9 mremap_flags.shnu ȯ�� PK �U�Z�� � x fspick.shnu ȯ�� PK �U�Z�`�9� � � mmap_flags.shnu ȯ�� PK �U�Z�`OPH H � rename_flags.shnu ȯ�� PK �U�Zu��UU U ) kcmp_type.shnu ȯ�� PK �U�Zr9#�; ; � fsmount.shnu ȯ�� PK �U�Z����B B / fadvise.shnu ȯ�� PK �U�Zz�;p p � sndrv_pcm_ioctl.shnu ȯ�� PK �U�Z��� � ] sync_file_range.shnu ȯ�� PK �U�Z"i� � � prctl_option.shnu ȯ�� PK �U�Z,� � R arch_errno_names.shnu ȯ�� PK �U�ZS)��� � �% madvise_behavior.shnu ȯ�� PK �U�Z���H H �'