ryantimwilson / rpms / systemd

Forked from rpms/systemd 2 months ago
Clone
8d86bd
From f20ccc0d505eccd59bb3814f59a63ea036be5bd5 Mon Sep 17 00:00:00 2001
8d86bd
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
8d86bd
Date: Tue, 18 Aug 2020 16:27:20 +0200
8d86bd
Subject: [PATCH] meson: add syscall-names-update target
8d86bd
8d86bd
The calls to find_program("tools/*") are moved earlier so they can be used
8d86bd
in libshared/ (and it doesn't make sense to split them).
8d86bd
8d86bd
(cherry picked from commit 47354b440e90626c320d8f142cb742ff569e3a40)
8d86bd
8d86bd
Related: #2040247
8d86bd
---
8d86bd
 meson.build                   |  13 +-
8d86bd
 src/shared/meson.build        |   6 +
8d86bd
 src/shared/syscall-names.text | 597 ++++++++++++++++++++++++++++++++++
8d86bd
 tools/syscall-names-update.sh |   6 +
8d86bd
 4 files changed, 617 insertions(+), 5 deletions(-)
8d86bd
 create mode 100644 src/shared/syscall-names.text
8d86bd
 create mode 100755 tools/syscall-names-update.sh
8d86bd
8d86bd
diff --git a/meson.build b/meson.build
8d86bd
index 57de947367..6729a9ea5e 100644
8d86bd
--- a/meson.build
8d86bd
+++ b/meson.build
8d86bd
@@ -1417,6 +1417,14 @@ install_libsystemd_static = static_library(
8d86bd
 
8d86bd
 ############################################################
8d86bd
 
8d86bd
+hwdb_update_sh = find_program('tools/meson-hwdb-update.sh')
8d86bd
+make_directive_index_py = find_program('tools/make-directive-index.py')
8d86bd
+make_man_index_py = find_program('tools/make-man-index.py')
8d86bd
+syscall_names_update_sh = find_program('tools/syscall-names-update.sh')
8d86bd
+xml_helper_py = find_program('tools/xml_helper.py')
8d86bd
+
8d86bd
+############################################################
8d86bd
+
8d86bd
 # binaries that have --help and are intended for use by humans,
8d86bd
 # usually, but not always, installed in /bin.
8d86bd
 public_programs = []
8d86bd
@@ -2721,11 +2729,6 @@ run_target('fuzzers',
8d86bd
 
8d86bd
 ############################################################
8d86bd
 
8d86bd
-make_directive_index_py = find_program('tools/make-directive-index.py')
8d86bd
-make_man_index_py = find_program('tools/make-man-index.py')
8d86bd
-xml_helper_py = find_program('tools/xml_helper.py')
8d86bd
-hwdb_update_sh = find_program('tools/meson-hwdb-update.sh')
8d86bd
-
8d86bd
 subdir('units')
8d86bd
 subdir('sysctl.d')
8d86bd
 subdir('sysusers.d')
8d86bd
diff --git a/src/shared/meson.build b/src/shared/meson.build
8d86bd
index d0a1bba4c6..c9dd0a3a4e 100644
8d86bd
--- a/src/shared/meson.build
8d86bd
+++ b/src/shared/meson.build
8d86bd
@@ -165,3 +165,9 @@ libshared = shared_library(
8d86bd
         dependencies : libshared_deps,
8d86bd
         install : true,
8d86bd
         install_dir : rootlibexecdir)
8d86bd
+
8d86bd
+############################################################
8d86bd
+
8d86bd
+run_target(
8d86bd
+        'syscall-names-update',
8d86bd
+        command : [syscall_names_update_sh, meson.current_source_dir()])
8d86bd
diff --git a/src/shared/syscall-names.text b/src/shared/syscall-names.text
8d86bd
new file mode 100644
8d86bd
index 0000000000..40d18a8894
8d86bd
--- /dev/null
8d86bd
+++ b/src/shared/syscall-names.text
8d86bd
@@ -0,0 +1,597 @@
8d86bd
+_llseek
8d86bd
+_newselect
8d86bd
+_sysctl
8d86bd
+accept
8d86bd
+accept4
8d86bd
+access
8d86bd
+acct
8d86bd
+add_key
8d86bd
+adjtimex
8d86bd
+alarm
8d86bd
+arc_gettls
8d86bd
+arc_settls
8d86bd
+arc_usr_cmpxchg
8d86bd
+arch_prctl
8d86bd
+arm_fadvise64_64
8d86bd
+arm_sync_file_range
8d86bd
+atomic_barrier
8d86bd
+atomic_cmpxchg_32
8d86bd
+bdflush
8d86bd
+bfin_spinlock
8d86bd
+bind
8d86bd
+bpf
8d86bd
+brk
8d86bd
+cache_sync
8d86bd
+cachectl
8d86bd
+cacheflush
8d86bd
+capget
8d86bd
+capset
8d86bd
+chdir
8d86bd
+chmod
8d86bd
+chown
8d86bd
+chown32
8d86bd
+chroot
8d86bd
+clock_adjtime
8d86bd
+clock_adjtime64
8d86bd
+clock_getres
8d86bd
+clock_getres_time64
8d86bd
+clock_gettime
8d86bd
+clock_gettime64
8d86bd
+clock_nanosleep
8d86bd
+clock_nanosleep_time64
8d86bd
+clock_settime
8d86bd
+clock_settime64
8d86bd
+clone
8d86bd
+clone2
8d86bd
+clone3
8d86bd
+close
8d86bd
+close_range
8d86bd
+connect
8d86bd
+copy_file_range
8d86bd
+creat
8d86bd
+create_module
8d86bd
+delete_module
8d86bd
+dipc
8d86bd
+dup
8d86bd
+dup2
8d86bd
+dup3
8d86bd
+epoll_create
8d86bd
+epoll_create1
8d86bd
+epoll_ctl
8d86bd
+epoll_ctl_old
8d86bd
+epoll_pwait
8d86bd
+epoll_wait
8d86bd
+epoll_wait_old
8d86bd
+eventfd
8d86bd
+eventfd2
8d86bd
+exec_with_loader
8d86bd
+execv
8d86bd
+execve
8d86bd
+execveat
8d86bd
+exit
8d86bd
+exit_group
8d86bd
+faccessat
8d86bd
+faccessat2
8d86bd
+fadvise64
8d86bd
+fadvise64_64
8d86bd
+fallocate
8d86bd
+fanotify_init
8d86bd
+fanotify_mark
8d86bd
+fchdir
8d86bd
+fchmod
8d86bd
+fchmodat
8d86bd
+fchown
8d86bd
+fchown32
8d86bd
+fchownat
8d86bd
+fcntl
8d86bd
+fcntl64
8d86bd
+fdatasync
8d86bd
+fgetxattr
8d86bd
+finit_module
8d86bd
+flistxattr
8d86bd
+flock
8d86bd
+fork
8d86bd
+fp_udfiex_crtl
8d86bd
+fremovexattr
8d86bd
+fsconfig
8d86bd
+fsetxattr
8d86bd
+fsmount
8d86bd
+fsopen
8d86bd
+fspick
8d86bd
+fstat
8d86bd
+fstat64
8d86bd
+fstatat64
8d86bd
+fstatfs
8d86bd
+fstatfs64
8d86bd
+fsync
8d86bd
+ftruncate
8d86bd
+ftruncate64
8d86bd
+futex
8d86bd
+futex_time64
8d86bd
+futimesat
8d86bd
+get_kernel_syms
8d86bd
+get_mempolicy
8d86bd
+get_robust_list
8d86bd
+get_thread_area
8d86bd
+getcpu
8d86bd
+getcwd
8d86bd
+getdents
8d86bd
+getdents64
8d86bd
+getdomainname
8d86bd
+getdtablesize
8d86bd
+getegid
8d86bd
+getegid32
8d86bd
+geteuid
8d86bd
+geteuid32
8d86bd
+getgid
8d86bd
+getgid32
8d86bd
+getgroups
8d86bd
+getgroups32
8d86bd
+gethostname
8d86bd
+getitimer
8d86bd
+getpagesize
8d86bd
+getpeername
8d86bd
+getpgid
8d86bd
+getpgrp
8d86bd
+getpid
8d86bd
+getpmsg
8d86bd
+getppid
8d86bd
+getpriority
8d86bd
+getrandom
8d86bd
+getresgid
8d86bd
+getresgid32
8d86bd
+getresuid
8d86bd
+getresuid32
8d86bd
+getrlimit
8d86bd
+getrusage
8d86bd
+getsid
8d86bd
+getsockname
8d86bd
+getsockopt
8d86bd
+gettid
8d86bd
+gettimeofday
8d86bd
+getuid
8d86bd
+getuid32
8d86bd
+getunwind
8d86bd
+getxattr
8d86bd
+getxgid
8d86bd
+getxpid
8d86bd
+getxuid
8d86bd
+idle
8d86bd
+init_module
8d86bd
+inotify_add_watch
8d86bd
+inotify_init
8d86bd
+inotify_init1
8d86bd
+inotify_rm_watch
8d86bd
+io_cancel
8d86bd
+io_destroy
8d86bd
+io_getevents
8d86bd
+io_pgetevents
8d86bd
+io_pgetevents_time64
8d86bd
+io_setup
8d86bd
+io_submit
8d86bd
+io_uring_enter
8d86bd
+io_uring_register
8d86bd
+io_uring_setup
8d86bd
+ioctl
8d86bd
+ioperm
8d86bd
+iopl
8d86bd
+ioprio_get
8d86bd
+ioprio_set
8d86bd
+ipc
8d86bd
+kcmp
8d86bd
+kern_features
8d86bd
+kexec_file_load
8d86bd
+kexec_load
8d86bd
+keyctl
8d86bd
+kill
8d86bd
+lchown
8d86bd
+lchown32
8d86bd
+lgetxattr
8d86bd
+link
8d86bd
+linkat
8d86bd
+listen
8d86bd
+listxattr
8d86bd
+llistxattr
8d86bd
+lookup_dcookie
8d86bd
+lremovexattr
8d86bd
+lseek
8d86bd
+lsetxattr
8d86bd
+lstat
8d86bd
+lstat64
8d86bd
+madvise
8d86bd
+mbind
8d86bd
+membarrier
8d86bd
+memfd_create
8d86bd
+memory_ordering
8d86bd
+migrate_pages
8d86bd
+mincore
8d86bd
+mkdir
8d86bd
+mkdirat
8d86bd
+mknod
8d86bd
+mknodat
8d86bd
+mlock
8d86bd
+mlock2
8d86bd
+mlockall
8d86bd
+mmap
8d86bd
+mmap2
8d86bd
+modify_ldt
8d86bd
+mount
8d86bd
+move_mount
8d86bd
+move_pages
8d86bd
+mprotect
8d86bd
+mq_getsetattr
8d86bd
+mq_notify
8d86bd
+mq_open
8d86bd
+mq_timedreceive
8d86bd
+mq_timedreceive_time64
8d86bd
+mq_timedsend
8d86bd
+mq_timedsend_time64
8d86bd
+mq_unlink
8d86bd
+mremap
8d86bd
+msgctl
8d86bd
+msgget
8d86bd
+msgrcv
8d86bd
+msgsnd
8d86bd
+msync
8d86bd
+multiplexer
8d86bd
+munlock
8d86bd
+munlockall
8d86bd
+munmap
8d86bd
+name_to_handle_at
8d86bd
+nanosleep
8d86bd
+newfstatat
8d86bd
+nfsservctl
8d86bd
+ni_syscall
8d86bd
+nice
8d86bd
+old_adjtimex
8d86bd
+old_getpagesize
8d86bd
+oldfstat
8d86bd
+oldlstat
8d86bd
+oldolduname
8d86bd
+oldstat
8d86bd
+oldumount
8d86bd
+olduname
8d86bd
+open
8d86bd
+open_by_handle_at
8d86bd
+open_tree
8d86bd
+openat
8d86bd
+openat2
8d86bd
+or1k_atomic
8d86bd
+osf_adjtime
8d86bd
+osf_afs_syscall
8d86bd
+osf_alt_plock
8d86bd
+osf_alt_setsid
8d86bd
+osf_alt_sigpending
8d86bd
+osf_asynch_daemon
8d86bd
+osf_audcntl
8d86bd
+osf_audgen
8d86bd
+osf_chflags
8d86bd
+osf_execve
8d86bd
+osf_exportfs
8d86bd
+osf_fchflags
8d86bd
+osf_fdatasync
8d86bd
+osf_fpathconf
8d86bd
+osf_fstat
8d86bd
+osf_fstatfs
8d86bd
+osf_fstatfs64
8d86bd
+osf_fuser
8d86bd
+osf_getaddressconf
8d86bd
+osf_getdirentries
8d86bd
+osf_getdomainname
8d86bd
+osf_getfh
8d86bd
+osf_getfsstat
8d86bd
+osf_gethostid
8d86bd
+osf_getitimer
8d86bd
+osf_getlogin
8d86bd
+osf_getmnt
8d86bd
+osf_getrusage
8d86bd
+osf_getsysinfo
8d86bd
+osf_gettimeofday
8d86bd
+osf_kloadcall
8d86bd
+osf_kmodcall
8d86bd
+osf_lstat
8d86bd
+osf_memcntl
8d86bd
+osf_mincore
8d86bd
+osf_mount
8d86bd
+osf_mremap
8d86bd
+osf_msfs_syscall
8d86bd
+osf_msleep
8d86bd
+osf_mvalid
8d86bd
+osf_mwakeup
8d86bd
+osf_naccept
8d86bd
+osf_nfssvc
8d86bd
+osf_ngetpeername
8d86bd
+osf_ngetsockname
8d86bd
+osf_nrecvfrom
8d86bd
+osf_nrecvmsg
8d86bd
+osf_nsendmsg
8d86bd
+osf_ntp_adjtime
8d86bd
+osf_ntp_gettime
8d86bd
+osf_old_creat
8d86bd
+osf_old_fstat
8d86bd
+osf_old_getpgrp
8d86bd
+osf_old_killpg
8d86bd
+osf_old_lstat
8d86bd
+osf_old_open
8d86bd
+osf_old_sigaction
8d86bd
+osf_old_sigblock
8d86bd
+osf_old_sigreturn
8d86bd
+osf_old_sigsetmask
8d86bd
+osf_old_sigvec
8d86bd
+osf_old_stat
8d86bd
+osf_old_vadvise
8d86bd
+osf_old_vtrace
8d86bd
+osf_old_wait
8d86bd
+osf_oldquota
8d86bd
+osf_pathconf
8d86bd
+osf_pid_block
8d86bd
+osf_pid_unblock
8d86bd
+osf_plock
8d86bd
+osf_priocntlset
8d86bd
+osf_profil
8d86bd
+osf_proplist_syscall
8d86bd
+osf_reboot
8d86bd
+osf_revoke
8d86bd
+osf_sbrk
8d86bd
+osf_security
8d86bd
+osf_select
8d86bd
+osf_set_program_attributes
8d86bd
+osf_set_speculative
8d86bd
+osf_sethostid
8d86bd
+osf_setitimer
8d86bd
+osf_setlogin
8d86bd
+osf_setsysinfo
8d86bd
+osf_settimeofday
8d86bd
+osf_shmat
8d86bd
+osf_signal
8d86bd
+osf_sigprocmask
8d86bd
+osf_sigsendset
8d86bd
+osf_sigstack
8d86bd
+osf_sigwaitprim
8d86bd
+osf_sstk
8d86bd
+osf_stat
8d86bd
+osf_statfs
8d86bd
+osf_statfs64
8d86bd
+osf_subsys_info
8d86bd
+osf_swapctl
8d86bd
+osf_swapon
8d86bd
+osf_syscall
8d86bd
+osf_sysinfo
8d86bd
+osf_table
8d86bd
+osf_uadmin
8d86bd
+osf_usleep_thread
8d86bd
+osf_uswitch
8d86bd
+osf_utc_adjtime
8d86bd
+osf_utc_gettime
8d86bd
+osf_utimes
8d86bd
+osf_utsname
8d86bd
+osf_wait4
8d86bd
+osf_waitid
8d86bd
+pause
8d86bd
+pciconfig_iobase
8d86bd
+pciconfig_read
8d86bd
+pciconfig_write
8d86bd
+perf_event_open
8d86bd
+perfctr
8d86bd
+perfmonctl
8d86bd
+personality
8d86bd
+pidfd_getfd
8d86bd
+pidfd_open
8d86bd
+pidfd_send_signal
8d86bd
+pipe
8d86bd
+pipe2
8d86bd
+pivot_root
8d86bd
+pkey_alloc
8d86bd
+pkey_free
8d86bd
+pkey_mprotect
8d86bd
+poll
8d86bd
+ppoll
8d86bd
+ppoll_time64
8d86bd
+prctl
8d86bd
+pread64
8d86bd
+preadv
8d86bd
+preadv2
8d86bd
+prlimit64
8d86bd
+process_vm_readv
8d86bd
+process_vm_writev
8d86bd
+pselect6
8d86bd
+pselect6_time64
8d86bd
+ptrace
8d86bd
+pwrite64
8d86bd
+pwritev
8d86bd
+pwritev2
8d86bd
+query_module
8d86bd
+quotactl
8d86bd
+read
8d86bd
+readahead
8d86bd
+readdir
8d86bd
+readlink
8d86bd
+readlinkat
8d86bd
+readv
8d86bd
+reboot
8d86bd
+recv
8d86bd
+recvfrom
8d86bd
+recvmmsg
8d86bd
+recvmmsg_time64
8d86bd
+recvmsg
8d86bd
+remap_file_pages
8d86bd
+removexattr
8d86bd
+rename
8d86bd
+renameat
8d86bd
+renameat2
8d86bd
+request_key
8d86bd
+restart_syscall
8d86bd
+riscv_flush_icache
8d86bd
+rmdir
8d86bd
+rseq
8d86bd
+rt_sigaction
8d86bd
+rt_sigpending
8d86bd
+rt_sigprocmask
8d86bd
+rt_sigqueueinfo
8d86bd
+rt_sigreturn
8d86bd
+rt_sigsuspend
8d86bd
+rt_sigtimedwait
8d86bd
+rt_sigtimedwait_time64
8d86bd
+rt_tgsigqueueinfo
8d86bd
+rtas
8d86bd
+s390_guarded_storage
8d86bd
+s390_pci_mmio_read
8d86bd
+s390_pci_mmio_write
8d86bd
+s390_runtime_instr
8d86bd
+s390_sthyi
8d86bd
+sched_get_affinity
8d86bd
+sched_get_priority_max
8d86bd
+sched_get_priority_min
8d86bd
+sched_getaffinity
8d86bd
+sched_getattr
8d86bd
+sched_getparam
8d86bd
+sched_getscheduler
8d86bd
+sched_rr_get_interval
8d86bd
+sched_rr_get_interval_time64
8d86bd
+sched_set_affinity
8d86bd
+sched_setaffinity
8d86bd
+sched_setattr
8d86bd
+sched_setparam
8d86bd
+sched_setscheduler
8d86bd
+sched_yield
8d86bd
+seccomp
8d86bd
+select
8d86bd
+semctl
8d86bd
+semget
8d86bd
+semop
8d86bd
+semtimedop
8d86bd
+semtimedop_time64
8d86bd
+send
8d86bd
+sendfile
8d86bd
+sendfile64
8d86bd
+sendmmsg
8d86bd
+sendmsg
8d86bd
+sendto
8d86bd
+set_mempolicy
8d86bd
+set_robust_list
8d86bd
+set_thread_area
8d86bd
+set_tid_address
8d86bd
+setdomainname
8d86bd
+setfsgid
8d86bd
+setfsgid32
8d86bd
+setfsuid
8d86bd
+setfsuid32
8d86bd
+setgid
8d86bd
+setgid32
8d86bd
+setgroups
8d86bd
+setgroups32
8d86bd
+sethae
8d86bd
+sethostname
8d86bd
+setitimer
8d86bd
+setns
8d86bd
+setpgid
8d86bd
+setpgrp
8d86bd
+setpriority
8d86bd
+setregid
8d86bd
+setregid32
8d86bd
+setresgid
8d86bd
+setresgid32
8d86bd
+setresuid
8d86bd
+setresuid32
8d86bd
+setreuid
8d86bd
+setreuid32
8d86bd
+setrlimit
8d86bd
+setsid
8d86bd
+setsockopt
8d86bd
+settimeofday
8d86bd
+setuid
8d86bd
+setuid32
8d86bd
+setxattr
8d86bd
+sgetmask
8d86bd
+shmat
8d86bd
+shmctl
8d86bd
+shmdt
8d86bd
+shmget
8d86bd
+shutdown
8d86bd
+sigaction
8d86bd
+sigaltstack
8d86bd
+signal
8d86bd
+signalfd
8d86bd
+signalfd4
8d86bd
+sigpending
8d86bd
+sigprocmask
8d86bd
+sigreturn
8d86bd
+sigsuspend
8d86bd
+socket
8d86bd
+socketcall
8d86bd
+socketpair
8d86bd
+splice
8d86bd
+spu_create
8d86bd
+spu_run
8d86bd
+ssetmask
8d86bd
+stat
8d86bd
+stat64
8d86bd
+statfs
8d86bd
+statfs64
8d86bd
+statx
8d86bd
+stime
8d86bd
+subpage_prot
8d86bd
+swapcontext
8d86bd
+swapoff
8d86bd
+swapon
8d86bd
+switch_endian
8d86bd
+symlink
8d86bd
+symlinkat
8d86bd
+sync
8d86bd
+sync_file_range
8d86bd
+sync_file_range2
8d86bd
+syncfs
8d86bd
+sys_debug_setcontext
8d86bd
+syscall
8d86bd
+sysfs
8d86bd
+sysinfo
8d86bd
+syslog
8d86bd
+sysmips
8d86bd
+tee
8d86bd
+tgkill
8d86bd
+time
8d86bd
+timer_create
8d86bd
+timer_delete
8d86bd
+timer_getoverrun
8d86bd
+timer_gettime
8d86bd
+timer_gettime64
8d86bd
+timer_settime
8d86bd
+timer_settime64
8d86bd
+timerfd
8d86bd
+timerfd_create
8d86bd
+timerfd_gettime
8d86bd
+timerfd_gettime64
8d86bd
+timerfd_settime
8d86bd
+timerfd_settime64
8d86bd
+times
8d86bd
+tkill
8d86bd
+truncate
8d86bd
+truncate64
8d86bd
+udftrap
8d86bd
+ugetrlimit
8d86bd
+umask
8d86bd
+umount
8d86bd
+umount2
8d86bd
+uname
8d86bd
+unlink
8d86bd
+unlinkat
8d86bd
+unshare
8d86bd
+uselib
8d86bd
+userfaultfd
8d86bd
+ustat
8d86bd
+utime
8d86bd
+utimensat
8d86bd
+utimensat_time64
8d86bd
+utimes
8d86bd
+utimesat
8d86bd
+utrap_install
8d86bd
+vfork
8d86bd
+vhangup
8d86bd
+vm86
8d86bd
+vm86old
8d86bd
+vmsplice
8d86bd
+wait4
8d86bd
+waitid
8d86bd
+waitpid
8d86bd
+write
8d86bd
+writev
8d86bd
diff --git a/tools/syscall-names-update.sh b/tools/syscall-names-update.sh
8d86bd
new file mode 100755
8d86bd
index 0000000000..c884b93cda
8d86bd
--- /dev/null
8d86bd
+++ b/tools/syscall-names-update.sh
8d86bd
@@ -0,0 +1,6 @@
8d86bd
+#!/bin/sh
8d86bd
+set -eu
8d86bd
+
8d86bd
+cd "$1"
8d86bd
+
8d86bd
+curl -L -o syscall-names.text 'https://raw.githubusercontent.com/hrw/syscalls-table/master/syscall-names.text'