aboutsummaryrefslogtreecommitdiff
path: root/lib/libsysdecode/flags.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libsysdecode/flags.c')
-rw-r--r--lib/libsysdecode/flags.c22
1 files changed, 15 insertions, 7 deletions
diff --git a/lib/libsysdecode/flags.c b/lib/libsysdecode/flags.c
index 32829d35dbe0..f8e26e6a9dae 100644
--- a/lib/libsysdecode/flags.c
+++ b/lib/libsysdecode/flags.c
@@ -23,7 +23,6 @@
* SUCH DAMAGE.
*/
-#include <sys/cdefs.h>
#define L2CAP_SOCKET_CHECKED
#include <sys/types.h>
@@ -31,6 +30,7 @@
#include <sys/capsicum.h>
#include <sys/event.h>
#include <sys/extattr.h>
+#include <sys/inotify.h>
#include <sys/linker.h>
#include <sys/mman.h>
#include <sys/mount.h>
@@ -196,7 +196,7 @@ sysdecode_vmprot(FILE *fp, int type, int *rem)
}
static struct name_table sockflags[] = {
- X(SOCK_CLOEXEC) X(SOCK_NONBLOCK) XEND
+ X(SOCK_CLOEXEC) X(SOCK_CLOFORK) X(SOCK_NONBLOCK) XEND
};
bool
@@ -206,16 +206,17 @@ sysdecode_socket_type(FILE *fp, int type, int *rem)
uintmax_t val;
bool printed;
- str = lookup_value(socktype, type & ~(SOCK_CLOEXEC | SOCK_NONBLOCK));
+ str = lookup_value(socktype,
+ type & ~(SOCK_CLOEXEC | SOCK_CLOFORK | SOCK_NONBLOCK));
if (str != NULL) {
fputs(str, fp);
*rem = 0;
printed = true;
} else {
- *rem = type & ~(SOCK_CLOEXEC | SOCK_NONBLOCK);
+ *rem = type & ~(SOCK_CLOEXEC | SOCK_CLOFORK | SOCK_NONBLOCK);
printed = false;
}
- val = type & (SOCK_CLOEXEC | SOCK_NONBLOCK);
+ val = type & (SOCK_CLOEXEC | SOCK_CLOFORK | SOCK_NONBLOCK);
print_mask_part(fp, sockflags, &val, &printed);
return (printed);
}
@@ -351,6 +352,13 @@ sysdecode_getrusage_who(int who)
return (lookup_value(rusage, who));
}
+bool
+sysdecode_inotifyflags(FILE *fp, int flag, int *rem)
+{
+
+ return (print_mask_int(fp, inotifyflags, flag, rem));
+}
+
static struct name_table kevent_user_ffctrl[] = {
X(NOTE_FFNOP) X(NOTE_FFAND) X(NOTE_FFOR) X(NOTE_FFCOPY)
XEND
@@ -556,7 +564,7 @@ sysdecode_nfssvc_flags(int flags)
}
static struct name_table pipe2flags[] = {
- X(O_CLOEXEC) X(O_NONBLOCK) XEND
+ X(O_CLOEXEC) X(O_CLOFORK) X(O_NONBLOCK) XEND
};
bool
@@ -866,7 +874,7 @@ sysdecode_fcntl_cmd(int cmd)
}
static struct name_table fcntl_fd_arg[] = {
- X(FD_CLOEXEC) X(0) XEND
+ X(FD_CLOEXEC) X(FD_CLOFORK) X(0) XEND
};
bool