diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index 23fcc3dc4aff..449e59378d32 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -38,6 +38,8 @@ # xargs -n1 | sort | uniq -d; # done +# 20170102: sysdecode_getfsstat_flags() renamed to sysdecode_getfsstat_mode() +OLD_FILES+=usr/share/man/man3/sysdecode_getfsstat_flags.3.gz # 20161230: libarchive ACL pax test renamed to test_acl_pax_posix1e.tar.uu OLD_FILES+=usr/tests/lib/libarchive/test_acl_pax.tar.uu # 20161229: Three files from gnop tests consolidated into one diff --git a/lib/libsysdecode/Makefile b/lib/libsysdecode/Makefile index b84ef4e615b8..47ba9af97cb1 100644 --- a/lib/libsysdecode/Makefile +++ b/lib/libsysdecode/Makefile @@ -30,6 +30,7 @@ MLINKS+=sysdecode_enum.3 sysdecode_acltype.3 \ sysdecode_enum.3 sysdecode_extattrnamespace.3 \ sysdecode_enum.3 sysdecode_fadvice.3 \ sysdecode_enum.3 sysdecode_fcntl_cmd.3 \ + sysdecode_enum.3 sysdecode_getfsstat_mode.3 \ sysdecode_enum.3 sysdecode_idtype.3 \ sysdecode_enum.3 sysdecode_ipproto.3 \ sysdecode_enum.3 sysdecode_kldsym_cmd.3 \ @@ -70,7 +71,6 @@ MLINKS+=sysdecode_mask.3 sysdecode_accessmode.3 \ sysdecode_mask.3 sysdecode_fileflags.3 \ sysdecode_mask.3 sysdecode_filemode.3 \ sysdecode_mask.3 sysdecode_flock_operation.3 \ - sysdecode_mask.3 sysdecode_getfsstat_flags.3 \ sysdecode_mask.3 sysdecode_mlockall_flags.3 \ sysdecode_mask.3 sysdecode_mmap_flags.3 \ sysdecode_mask.3 sysdecode_mmap_prot.3 \ diff --git a/lib/libsysdecode/flags.c b/lib/libsysdecode/flags.c index 653b522b3c08..bb8aa5892213 100644 --- a/lib/libsysdecode/flags.c +++ b/lib/libsysdecode/flags.c @@ -472,11 +472,15 @@ sysdecode_flock_operation(FILE *fp, int operation, int *rem) return (print_mask_int(fp, flockops, operation, rem)); } -bool -sysdecode_getfsstat_flags(FILE *fp, int flags, int *rem) +static struct name_table getfsstatmode[] = { + X(MNT_WAIT) X(MNT_NOWAIT) XEND +}; + +const char * +sysdecode_getfsstat_mode(int mode) { - return (print_mask_int(fp, getfsstatflags, flags, rem)); + return (lookup_value(getfsstatmode, mode)); } const char * diff --git a/lib/libsysdecode/mktables b/lib/libsysdecode/mktables index e51ffe366022..563bd187b1a9 100644 --- a/lib/libsysdecode/mktables +++ b/lib/libsysdecode/mktables @@ -94,7 +94,6 @@ gen_table "extattrns" "EXTATTR_NAMESPACE_[A-Z]+[[:space:]]+0x[0-9]+" "sys/ gen_table "fadvisebehav" "POSIX_FADV_[A-Z]+[[:space:]]+[0-9]+" "sys/fcntl.h" gen_table "openflags" "O_[A-Z]+[[:space:]]+0x[0-9A-Fa-f]+" "sys/fcntl.h" "O_RDONLY|O_RDWR|O_WRONLY" gen_table "flockops" "LOCK_[A-Z]+[[:space:]]+0x[0-9]+" "sys/fcntl.h" -gen_table "getfsstatflags" "MNT_[A-Z]+[[:space:]]+[1-9][0-9]*" "sys/mount.h" gen_table "kldsymcmd" "KLDSYM_[A-Z]+[[:space:]]+[0-9]+" "sys/linker.h" gen_table "kldunloadfflags" "LINKER_UNLOAD_[A-Z]+[[:space:]]+[0-9]+" "sys/linker.h" gen_table "lio_listiomodes" "LIO_(NO)?WAIT[[:space:]]+[0-9]+" "aio.h" diff --git a/lib/libsysdecode/sysdecode.h b/lib/libsysdecode/sysdecode.h index 5bdb30a45741..f8d05be37cb3 100644 --- a/lib/libsysdecode/sysdecode.h +++ b/lib/libsysdecode/sysdecode.h @@ -54,7 +54,7 @@ bool sysdecode_fileflags(FILE *_fp, fflags_t _flags, fflags_t *_rem); bool sysdecode_filemode(FILE *_fp, int _mode, int *_rem); bool sysdecode_flock_operation(FILE *_fp, int _operation, int *_rem); int sysdecode_freebsd_to_abi_errno(enum sysdecode_abi _abi, int _error); -bool sysdecode_getfsstat_flags(FILE *_fp, int _flags, int *_rem); +const char *sysdecode_getfsstat_mode(int _mode); const char *sysdecode_idtype(int _idtype); const char *sysdecode_ioctlname(unsigned long _val); const char *sysdecode_ipproto(int _protocol); diff --git a/lib/libsysdecode/sysdecode_enum.3 b/lib/libsysdecode/sysdecode_enum.3 index f0fce4d04c07..3e2f3902d82f 100644 --- a/lib/libsysdecode/sysdecode_enum.3 +++ b/lib/libsysdecode/sysdecode_enum.3 @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 17, 2016 +.Dd January 2, 2017 .Dt sysdecode_enum 3 .Os .Sh NAME @@ -35,6 +35,7 @@ .Nm sysdecode_extattrnamespace , .Nm sysdecode_fadvice , .Nm sysdecode_fcntl_cmd , +.Nm sysdecode_getfsstat_mode , .Nm sysdecode_idtype , .Nm sysdecode_ipproto , .Nm sysdecode_kldsym_cmd , @@ -86,6 +87,8 @@ .Ft const char * .Fn sysdecode_fcntl_cmd "int cmd" .Ft const char * +.Fn sysdecode_getfsstat_mode "int mode" +.Ft const char * .Fn sysdecode_idtype "int idtype" .Ft const char * .Fn sysdecode_ipproto "int protocol" @@ -168,6 +171,7 @@ Most of these functions decode an argument passed to a system call: .It Fn sysdecode_extattrnamespace Ta Xr extattr_get_fd 2 Ta Fa attrnamespace .It Fn sysdecode_fadvice Ta Xr posix_fadvise 2 Ta Fa advice .It Fn sysdecode_fcntl_cmd Ta Xr fcntl 2 Ta Fa cmd +.It Fn sysdecode_getfsstat_mode Ta Xr getfsstat 2 Ta Fa mode .It Fn sysdecode_idtype Ta .Xr procctl 2 , .Xr waitid 2 diff --git a/lib/libsysdecode/sysdecode_mask.3 b/lib/libsysdecode/sysdecode_mask.3 index 5810fc8d3597..5ab007b1568a 100644 --- a/lib/libsysdecode/sysdecode_mask.3 +++ b/lib/libsysdecode/sysdecode_mask.3 @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 17, 2016 +.Dd January 2, 2017 .Dt sysdecode_mask 3 .Os .Sh NAME @@ -36,7 +36,6 @@ .Nm sysdecode_fileflags , .Nm sysdecode_filemode , .Nm sysdecode_flock_operation , -.Nm sysdecode_getfsstat_flags , .Nm sysdecode_mlockall_flags , .Nm sysdecode_mmap_flags , .Nm sysdecode_mmap_prot , @@ -153,7 +152,6 @@ Most of these functions decode an argument passed to a system call: .It Fn sysdecode_fileflags Ta Xr chflags 2 Ta Fa flags .It Fn sysdecode_filemode Ta Xr chmod 2 , Xr open 2 Ta mode .It Fn sysdecode_flock_operation Ta Xr flock 2 Ta Fa operation -.It Fn sysdecode_getfsstat_flags Ta Xr getfsstatflags 2 Ta Fa flags .It Fn sysdecode_mlockall_flags Ta Xr mlockall 2 Ta Fa flags .It Fn sysdecode_mmap_flags Ta Xr mmap 2 Ta Fa flags .It Fn sysdecode_mmap_prot Ta Xr mmap 2 Ta Fa prot diff --git a/usr.bin/kdump/kdump.c b/usr.bin/kdump/kdump.c index f39cad41c63c..21ee976c19ec 100644 --- a/usr.bin/kdump/kdump.c +++ b/usr.bin/kdump/kdump.c @@ -943,7 +943,7 @@ ktrsyscall(struct ktr_syscall *ktr, u_int sv_flags) print_number(ip, narg, c); print_number(ip, narg, c); putchar(','); - print_mask_arg(sysdecode_getfsstat_flags, *ip); + print_integer_arg(sysdecode_getfsstat_mode, *ip); ip++; narg--; break;