From: Dmitry V. Levin Date: Wed, 5 Feb 2014 02:20:51 +0000 (+0000) Subject: Use XLAT_END macro X-Git-Tag: v4.9~133 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=594527353359d9a6aad516992e09c393e11f3bd2;p=strace Use XLAT_END macro Automatically update all xlat structures using the following sed regexp: s/^[[:space:]]*{[[:space:]]*0[[:space:]]*,[[:space:]]*NULL[[:space:]]*,\?[[:space:]]*}[[:space:]]*,\?[[:space:]]*/\tXLAT_END/ --- diff --git a/bjm.c b/bjm.c index 366eefce..6f1ee57a 100644 --- a/bjm.c +++ b/bjm.c @@ -76,7 +76,7 @@ static const struct xlat which[] = { XLAT(QM_REFS), XLAT(QM_SYMBOLS), XLAT(QM_INFO), - { 0, NULL }, + XLAT_END }; static const struct xlat modflags[] = { @@ -87,7 +87,7 @@ static const struct xlat modflags[] = { XLAT(MOD_VISITED), XLAT(MOD_USED_ONCE), XLAT(MOD_JUST_FREED), - { 0, NULL }, + XLAT_END }; int diff --git a/block.c b/block.c index f40b75c6..58f42158 100644 --- a/block.c +++ b/block.c @@ -82,7 +82,7 @@ struct blk_user_trace_setup { static const struct xlat blkpg_ops[] = { XLAT(BLKPG_ADD_PARTITION), XLAT(BLKPG_DEL_PARTITION), - { 0, NULL }, + XLAT_END }; static void diff --git a/desc.c b/desc.c index 124a066c..b2eabc21 100644 --- a/desc.c +++ b/desc.c @@ -145,14 +145,14 @@ static const struct xlat fcntlcmds[] = { #ifdef F_DUPFD_CLOEXEC XLAT(F_DUPFD_CLOEXEC), #endif - { 0, NULL }, + XLAT_END }; static const struct xlat fdflags[] = { #ifdef FD_CLOEXEC XLAT(FD_CLOEXEC), #endif - { 0, NULL }, + XLAT_END }; #ifdef LOCK_SH @@ -162,7 +162,7 @@ static const struct xlat flockcmds[] = { XLAT(LOCK_EX), XLAT(LOCK_NB), XLAT(LOCK_UN), - { 0, NULL }, + XLAT_END }; #endif /* LOCK_SH */ @@ -177,7 +177,7 @@ static const struct xlat lockfcmds[] = { #ifdef F_SHLCK XLAT(F_SHLCK), #endif - { 0, NULL }, + XLAT_END }; #ifdef F_NOTIFY @@ -203,7 +203,7 @@ static const struct xlat notifyflags[] = { #ifdef DN_MULTISHOT XLAT(DN_MULTISHOT), #endif - { 0, NULL }, + XLAT_END }; #endif @@ -217,7 +217,7 @@ static const struct xlat perf_event_open_flags[] = { #ifdef PERF_FLAG_PID_CGROUP XLAT(PERF_FLAG_PID_CGROUP), #endif - { 0, NULL }, + XLAT_END }; #if defined(F_SETLK64) && F_SETLK64 + 0 != F_SETLK @@ -663,7 +663,7 @@ static const struct xlat epollctls[] = { #ifdef EPOLL_CTL_DEL XLAT(EPOLL_CTL_DEL), #endif - { 0, NULL } + XLAT_END }; static const struct xlat epollevents[] = { @@ -706,7 +706,7 @@ static const struct xlat epollevents[] = { #ifdef EPOLLET XLAT(EPOLLET), #endif - { 0, NULL } + XLAT_END }; /* Not aliased to printargs_ld: we want it to have a distinct address */ @@ -723,7 +723,7 @@ static const struct xlat epollflags[] = { #ifdef EPOLL_NONBLOCK XLAT(EPOLL_NONBLOCK), #endif - { 0, NULL } + XLAT_END }; int diff --git a/file.c b/file.c index afb1951d..47594953 100644 --- a/file.c +++ b/file.c @@ -218,7 +218,7 @@ const struct xlat open_access_modes[] = { #ifdef O_ACCMODE XLAT(O_ACCMODE), #endif - { 0, NULL }, + XLAT_END }; const struct xlat open_mode_flags[] = { @@ -322,7 +322,7 @@ const struct xlat open_mode_flags[] = { #ifdef O_EXLOCK XLAT(O_EXLOCK), #endif - { 0, NULL }, + XLAT_END }; #ifndef AT_FDCWD @@ -436,7 +436,7 @@ static const struct xlat openmodessol[] = { { 0x8000, "O_RSYNC" }, { 4, "O_NDELAY" }, { 0x1000, "O_PRIV" }, - { 0, NULL }, + XLAT_END }; int @@ -478,7 +478,7 @@ static const struct xlat access_flags[] = { #ifdef EX_OK XLAT(EX_OK), #endif - { 0, NULL }, + XLAT_END }; static int @@ -525,7 +525,7 @@ const struct xlat whence_codes[] = { #ifdef SEEK_HOLE XLAT(SEEK_HOLE), #endif - { 0, NULL }, + XLAT_END }; /* Linux kernel has exactly one version of lseek: @@ -675,7 +675,7 @@ static const struct xlat modetypes[] = { XLAT(S_IFDIR), XLAT(S_IFBLK), XLAT(S_IFCHR), - { 0, NULL }, + XLAT_END }; static const char * @@ -908,7 +908,7 @@ printstat_powerpc32(struct tcb *tcp, long addr) #endif /* POWERPC64 */ static const struct xlat fileflags[] = { - { 0, NULL }, + XLAT_END }; static void @@ -1328,7 +1328,7 @@ static const struct xlat at_flags[] = { XLAT(AT_SYMLINK_FOLLOW), XLAT(AT_NO_AUTOMOUNT), XLAT(AT_EMPTY_PATH), - { 0, NULL } + XLAT_END }; int @@ -1514,7 +1514,7 @@ static const struct xlat aclcmds[] = { # ifdef ACL_CNT XLAT(ACL_CNT), # endif - { 0, NULL }, + XLAT_END }; int @@ -1566,7 +1566,7 @@ static const struct xlat aclipc[] = { # ifdef IPC_MSG XLAT(IPC_MSG), # endif - { 0, NULL }, + XLAT_END }; int @@ -1623,7 +1623,7 @@ static const struct xlat fsmagic[] = { { 0x012ff7b4, "XENIX_SUPER_MAGIC" }, { 0x012fd16d, "XIAFS_SUPER_MAGIC" }, { 0x62656572, "SYSFS_MAGIC" }, - { 0, NULL }, + XLAT_END }; static const char * @@ -2249,7 +2249,7 @@ static const struct xlat direnttypes[] = { XLAT(DT_LNK), XLAT(DT_SOCK), XLAT(DT_WHT), - { 0, NULL }, + XLAT_END }; int @@ -2467,7 +2467,7 @@ static const struct xlat xattrflags[] = { XLAT(XATTR_CREATE), XLAT(XATTR_REPLACE), #endif - { 0, NULL } + XLAT_END }; static void @@ -2638,7 +2638,7 @@ static const struct xlat advise[] = { XLAT(POSIX_FADV_WILLNEED), XLAT(POSIX_FADV_DONTNEED), XLAT(POSIX_FADV_NOREUSE), - { 0, NULL } + XLAT_END }; int @@ -2675,7 +2675,7 @@ static const struct xlat sync_file_range_flags[] = { XLAT(SYNC_FILE_RANGE_WAIT_BEFORE), XLAT(SYNC_FILE_RANGE_WRITE), XLAT(SYNC_FILE_RANGE_WAIT_AFTER), - { 0, NULL } + XLAT_END }; int @@ -2727,13 +2727,13 @@ static const struct xlat inotify_modes[] = { { 0x20000000, "IN_MASK_ADD" }, { 0x40000000, "IN_ISDIR" }, { 0x80000000, "IN_ONESHOT" }, - { 0, NULL } + XLAT_END }; static const struct xlat inotify_init_flags[] = { { 0x00000800, "IN_NONBLOCK" }, { 0x00080000, "IN_CLOEXEC" }, - { 0, NULL } + XLAT_END }; int @@ -2789,7 +2789,7 @@ sys_fallocate(struct tcb *tcp) static const struct xlat swap_flags[] = { XLAT(SWAP_FLAG_PREFER), XLAT(SWAP_FLAG_DISCARD), - { 0, NULL } + XLAT_END }; int diff --git a/io.c b/io.c index 2ed7fa50..fac56158 100644 --- a/io.c +++ b/io.c @@ -330,7 +330,7 @@ static const struct xlat splice_flags[] = { #ifdef SPLICE_F_GIFT XLAT(SPLICE_F_GIFT), #endif - { 0, NULL }, + XLAT_END }; int diff --git a/ipc.c b/ipc.c index 7f81cd34..144c52bb 100644 --- a/ipc.c +++ b/ipc.c @@ -70,7 +70,7 @@ static const struct xlat msgctl_flags[] = { XLAT(IPC_INFO), XLAT(MSG_STAT), XLAT(MSG_INFO), - { 0, NULL }, + XLAT_END }; static const struct xlat semctl_flags[] = { @@ -87,7 +87,7 @@ static const struct xlat semctl_flags[] = { XLAT(GETZCNT), XLAT(SETVAL), XLAT(SETALL), - { 0, NULL }, + XLAT_END }; static const struct xlat shmctl_flags[] = { @@ -103,14 +103,14 @@ static const struct xlat shmctl_flags[] = { #ifdef SHM_UNLOCK XLAT(SHM_UNLOCK), #endif - { 0, NULL }, + XLAT_END }; static const struct xlat resource_flags[] = { XLAT(IPC_CREAT), XLAT(IPC_EXCL), XLAT(IPC_NOWAIT), - { 0, NULL }, + XLAT_END }; static const struct xlat shm_resource_flags[] = { @@ -119,27 +119,27 @@ static const struct xlat shm_resource_flags[] = { #ifdef SHM_HUGETLB XLAT(SHM_HUGETLB), #endif - { 0, NULL }, + XLAT_END }; static const struct xlat shm_flags[] = { XLAT(SHM_REMAP), XLAT(SHM_RDONLY), XLAT(SHM_RND), - { 0, NULL }, + XLAT_END }; static const struct xlat msg_flags[] = { XLAT(MSG_NOERROR), XLAT(MSG_EXCEPT), XLAT(IPC_NOWAIT), - { 0, NULL }, + XLAT_END }; static const struct xlat semop_flags[] = { XLAT(SEM_UNDO), XLAT(IPC_NOWAIT), - { 0, NULL }, + XLAT_END }; int sys_msgget(struct tcb *tcp) diff --git a/loop.c b/loop.c index a94e13b3..495e3e2b 100644 --- a/loop.c +++ b/loop.c @@ -39,7 +39,7 @@ static const struct xlat loop_flags_options[] = { #if HAVE_DECL_LO_FLAGS_PARTSCAN XLAT(LO_FLAGS_PARTSCAN), #endif - { 0, NULL }, + XLAT_END }; static const struct xlat loop_crypt_type_options[] = { @@ -53,7 +53,7 @@ static const struct xlat loop_crypt_type_options[] = { XLAT(LO_CRYPT_DUMMY), XLAT(LO_CRYPT_SKIPJACK), XLAT(LO_CRYPT_CRYPTOAPI), - { 0, NULL }, + XLAT_END }; int loop_ioctl(struct tcb *tcp, long code, long arg) diff --git a/mem.c b/mem.c index 6d2145cd..267773cc 100644 --- a/mem.c +++ b/mem.c @@ -76,7 +76,7 @@ static const struct xlat mmap_prot[] = { #ifdef PROT_SAO XLAT(PROT_SAO), #endif - { 0, NULL }, + XLAT_END }; static const struct xlat mmap_flags[] = { @@ -171,7 +171,7 @@ static const struct xlat mmap_flags[] = { #ifdef MAP_NOCORE XLAT(MAP_NOCORE), #endif - { 0, NULL }, + XLAT_END }; static int @@ -326,7 +326,7 @@ static const struct xlat mremap_flags[] = { #ifdef MREMAP_FIXED XLAT(MREMAP_FIXED), #endif - { 0, NULL } + XLAT_END }; int @@ -394,7 +394,7 @@ static const struct xlat madvise_cmds[] = { #ifdef MADV_DODUMP XLAT(MADV_DODUMP), #endif - { 0, NULL }, + XLAT_END }; int @@ -414,7 +414,7 @@ static const struct xlat mlockall_flags[] = { #ifdef MCL_FUTURE XLAT(MCL_FUTURE), #endif - { 0, NULL} + XLAT_END }; int @@ -434,7 +434,7 @@ static const struct xlat mctl_sync[] = { #endif XLAT(MS_ASYNC), XLAT(MS_INVALIDATE), - { 0, NULL }, + XLAT_END }; int @@ -461,13 +461,13 @@ static const struct xlat mctl_funcs[] = { XLAT(MC_SYNC), XLAT(MC_UNLOCK), XLAT(MC_UNLOCKAS), - { 0, NULL }, + XLAT_END }; static const struct xlat mctl_lockas[] = { XLAT(MCL_CURRENT), XLAT(MCL_FUTURE), - { 0, NULL }, + XLAT_END }; int @@ -688,26 +688,26 @@ static const struct xlat policies[] = { XLAT(MPOL_PREFERRED), XLAT(MPOL_BIND), XLAT(MPOL_INTERLEAVE), - { 0, NULL } + XLAT_END }; static const struct xlat mbindflags[] = { XLAT(MPOL_MF_STRICT), XLAT(MPOL_MF_MOVE), XLAT(MPOL_MF_MOVE_ALL), - { 0, NULL } + XLAT_END }; static const struct xlat mempolicyflags[] = { XLAT(MPOL_F_NODE), XLAT(MPOL_F_ADDR), - { 0, NULL } + XLAT_END }; static const struct xlat move_pages_flags[] = { XLAT(MPOL_MF_MOVE), XLAT(MPOL_MF_MOVE_ALL), - { 0, NULL } + XLAT_END }; static void diff --git a/mtd.c b/mtd.c index 219f6766..9f8cae18 100644 --- a/mtd.c +++ b/mtd.c @@ -45,7 +45,7 @@ static const struct xlat mtd_mode_options[] = { XLAT(MTD_OPS_PLACE_OOB), XLAT(MTD_OPS_AUTO_OOB), XLAT(MTD_OPS_RAW), - { 0, NULL }, + XLAT_END }; static const struct xlat mtd_type_options[] = { @@ -57,7 +57,7 @@ static const struct xlat mtd_type_options[] = { XLAT(MTD_DATAFLASH), XLAT(MTD_UBIVOLUME), XLAT(MTD_MLCNANDFLASH), - { 0, NULL }, + XLAT_END }; static const struct xlat mtd_flags_options[] = { @@ -65,14 +65,14 @@ static const struct xlat mtd_flags_options[] = { XLAT(MTD_BIT_WRITEABLE), XLAT(MTD_NO_ERASE), XLAT(MTD_POWERUP_LOCK), - { 0, NULL }, + XLAT_END }; static const struct xlat mtd_otp_options[] = { XLAT(MTD_OTP_OFF), XLAT(MTD_OTP_FACTORY), XLAT(MTD_OTP_USER), - { 0, NULL }, + XLAT_END }; static const struct xlat mtd_nandecc_options[] = { @@ -81,7 +81,7 @@ static const struct xlat mtd_nandecc_options[] = { XLAT(MTD_NANDECC_AUTOPLACE), XLAT(MTD_NANDECC_PLACEONLY), XLAT(MTD_NANDECC_AUTOPL_USR), - { 0, NULL }, + XLAT_END }; int mtd_ioctl(struct tcb *tcp, long code, long arg) @@ -289,12 +289,12 @@ int mtd_ioctl(struct tcb *tcp, long code, long arg) static const struct xlat ubi_volume_types[] = { XLAT(UBI_DYNAMIC_VOLUME), XLAT(UBI_STATIC_VOLUME), - { 0, NULL }, + XLAT_END }; static const struct xlat ubi_volume_props[] = { XLAT(UBI_VOL_PROP_DIRECT_WRITE), - { 0, NULL }, + XLAT_END }; int ubi_ioctl(struct tcb *tcp, long code, long arg) diff --git a/net.c b/net.c index cb328be2..f09d1dd6 100644 --- a/net.c +++ b/net.c @@ -218,7 +218,7 @@ static const struct xlat domains[] = { #ifdef PF_VSOCK XLAT(PF_VSOCK), #endif - { 0, NULL }, + XLAT_END }; const struct xlat addrfams[] = { #ifdef AF_UNSPEC @@ -344,7 +344,7 @@ const struct xlat addrfams[] = { #ifdef AF_VSOCK XLAT(AF_VSOCK), #endif - { 0, NULL }, + XLAT_END }; static const struct xlat socktypes[] = { XLAT(SOCK_STREAM), @@ -364,7 +364,7 @@ static const struct xlat socktypes[] = { #ifdef SOCK_PACKET XLAT(SOCK_PACKET), #endif - { 0, NULL }, + XLAT_END }; static const struct xlat sock_type_flags[] = { #ifdef SOCK_CLOEXEC @@ -373,7 +373,7 @@ static const struct xlat sock_type_flags[] = { #ifdef SOCK_NONBLOCK XLAT(SOCK_NONBLOCK), #endif - { 0, NULL }, + XLAT_END }; #ifndef SOCK_TYPE_MASK # define SOCK_TYPE_MASK 0xf @@ -569,7 +569,7 @@ static const struct xlat protocols[] = { #ifdef IPPROTO_MAX XLAT(IPPROTO_MAX), #endif - { 0, NULL }, + XLAT_END }; static const struct xlat msg_flags[] = { XLAT(MSG_OOB), @@ -630,7 +630,7 @@ static const struct xlat msg_flags[] = { #ifdef MSG_CMSG_CLOEXEC XLAT(MSG_CMSG_CLOEXEC), #endif - { 0, NULL }, + XLAT_END }; static const struct xlat sockoptions[] = { @@ -760,7 +760,7 @@ static const struct xlat sockoptions[] = { #ifdef SO_USELOOPBACK XLAT(SO_USELOOPBACK), #endif - { 0, NULL }, + XLAT_END }; #if !defined(SOL_IP) && defined(IPPROTO_IP) @@ -910,7 +910,7 @@ static const struct xlat sockipoptions[] = { #ifdef IP_UNICAST_IF XLAT(IP_UNICAST_IF), #endif - { 0, NULL }, + XLAT_END }; #endif /* SOL_IP */ @@ -979,14 +979,14 @@ static const struct xlat sockipv6options[] = { #ifdef IPV6_ROUTER_ALERT XLAT(IPV6_ROUTER_ALERT), #endif - { 0, NULL }, + XLAT_END }; #endif /* SOL_IPV6 */ #ifdef SOL_IPX static const struct xlat sockipxoptions[] = { XLAT(IPX_TYPE), - { 0, NULL }, + XLAT_END }; #endif /* SOL_IPX */ @@ -995,7 +995,7 @@ static const struct xlat sockrawoptions[] = { #if defined(ICMP_FILTER) XLAT(ICMP_FILTER), #endif - { 0, NULL }, + XLAT_END }; #endif /* SOL_RAW */ @@ -1040,7 +1040,7 @@ static const struct xlat sockpacketoptions[] = { #if defined(PACKET_LOSS) XLAT(PACKET_LOSS), #endif - { 0, NULL }, + XLAT_END }; #endif /* SOL_PACKET */ @@ -1166,7 +1166,7 @@ static const struct xlat socksctpoptions[] = { XLAT(SCTP_GET_LOCAL_ADDRS), #endif - { 0, NULL }, + XLAT_END }; #endif @@ -1244,7 +1244,7 @@ static const struct xlat socktcpoptions[] = { #ifdef TCP_TIMESTAMP XLAT(TCP_TIMESTAMP), #endif - { 0, NULL }, + XLAT_END }; #endif /* SOL_TCP */ @@ -1289,7 +1289,7 @@ static const struct xlat icmpfilterflags[] = { #if defined(ICMP_ADDRESSREPLY) { (1< static const struct xlat bootflags1[] = { XLAT(LINUX_REBOOT_MAGIC1), - { 0, NULL }, + XLAT_END }; static const struct xlat bootflags2[] = { XLAT(LINUX_REBOOT_MAGIC2), XLAT(LINUX_REBOOT_MAGIC2A), XLAT(LINUX_REBOOT_MAGIC2B), - { 0, NULL }, + XLAT_END }; static const struct xlat bootflags3[] = { @@ -295,7 +295,7 @@ static const struct xlat bootflags3[] = { XLAT(LINUX_REBOOT_CMD_CAD_ON), XLAT(LINUX_REBOOT_CMD_POWER_OFF), XLAT(LINUX_REBOOT_CMD_RESTART2), - { 0, NULL }, + XLAT_END }; int @@ -326,7 +326,7 @@ static const struct xlat cacheflush_scope[] = { #ifdef FLUSH_SCOPE_ALL XLAT(FLUSH_SCOPE_ALL), #endif - { 0, NULL }, + XLAT_END }; static const struct xlat cacheflush_flags[] = { @@ -339,7 +339,7 @@ static const struct xlat cacheflush_flags[] = { #ifdef FLUSH_CACHE_INSN XLAT(FLUSH_CACHE_INSN), #endif - { 0, NULL }, + XLAT_END }; int @@ -370,7 +370,7 @@ static const struct xlat sram_alloc_flags[] = { XLAT(L1_DATA_B_SRAM), XLAT(L1_DATA_SRAM), XLAT(L2_SRAM), - { 0, NULL }, + XLAT_END }; int @@ -391,7 +391,7 @@ static const struct xlat cacheflush_flags[] = { XLAT(ICACHE), XLAT(DCACHE), XLAT(BCACHE), - { 0, NULL }, + XLAT_END }; int @@ -424,7 +424,7 @@ static const struct xlat cacheflush_flags[] = { #ifdef CACHEFLUSH_I XLAT(CACHEFLUSH_I), #endif - { 0, NULL }, + XLAT_END }; int @@ -487,7 +487,7 @@ static const struct xlat capabilities[] = { #ifdef CAP_SETFCAP { 1< 1 @@ -640,7 +640,7 @@ sys_adjtimex(struct tcb *tcp) static const struct xlat clockflags[] = { XLAT(TIMER_ABSTIME), - { 0, NULL } + XLAT_END }; static const struct xlat clocknames[] = { @@ -665,7 +665,7 @@ static const struct xlat clocknames[] = { #ifdef CLOCK_MONOTONIC_COARSE XLAT(CLOCK_MONOTONIC_COARSE), #endif - { 0, NULL } + XLAT_END }; #ifdef CLOCKID_TO_FD @@ -673,7 +673,7 @@ static const struct xlat cpuclocknames[] = { XLAT(CPUCLOCK_PROF), XLAT(CPUCLOCK_VIRT), XLAT(CPUCLOCK_SCHED), - { 0, NULL } + XLAT_END }; #endif @@ -761,7 +761,7 @@ static const struct xlat sigev_value[] = { XLAT(SIGEV_NONE), XLAT(SIGEV_THREAD), XLAT(SIGEV_THREAD_ID), - { 0, NULL } + XLAT_END }; #if SUPPORTED_PERSONALITIES > 1 @@ -989,7 +989,7 @@ rtc_ioctl(struct tcb *tcp, long code, long arg) static const struct xlat timerfdflags[] = { XLAT(TFD_TIMER_ABSTIME), - { 0, NULL } + XLAT_END }; int