summaryrefslogtreecommitdiffstats
path: root/usr.bin
diff options
context:
space:
mode:
authorjilles <jilles@FreeBSD.org>2013-08-26 17:22:51 +0000
committerjilles <jilles@FreeBSD.org>2013-08-26 17:22:51 +0000
commit24cd181d1ef27d697bb5b3d57f36804c4c492e26 (patch)
tree25b6db1b7ce62e8ee7ff9cf79eeeb26a1f7b289d /usr.bin
parentf0d4afc2d22c312538db585fbb156564f99cc991 (diff)
downloadFreeBSD-src-24cd181d1ef27d697bb5b3d57f36804c4c492e26.zip
FreeBSD-src-24cd181d1ef27d697bb5b3d57f36804c4c492e26.tar.gz
kdump: Decode SOCK_CLOEXEC and SOCK_NONBLOCK in socket() and socketpair().
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/kdump/kdump.c4
-rw-r--r--usr.bin/kdump/mksubr13
2 files changed, 15 insertions, 2 deletions
diff --git a/usr.bin/kdump/kdump.c b/usr.bin/kdump/kdump.c
index b941ae2..06be0c0 100644
--- a/usr.bin/kdump/kdump.c
+++ b/usr.bin/kdump/kdump.c
@@ -830,7 +830,7 @@ ktrsyscall(struct ktr_syscall *ktr, u_int flags)
ip++;
narg--;
putchar(',');
- socktypename(*ip);
+ socktypenamewithflags(*ip);
ip++;
narg--;
if (sockdomain == PF_INET ||
@@ -908,7 +908,7 @@ ktrsyscall(struct ktr_syscall *ktr, u_int flags)
ip++;
narg--;
putchar(',');
- socktypename(*ip);
+ socktypenamewithflags(*ip);
ip++;
narg--;
c = ',';
diff --git a/usr.bin/kdump/mksubr b/usr.bin/kdump/mksubr
index 5c82f30..b10af94 100644
--- a/usr.bin/kdump/mksubr
+++ b/usr.bin/kdump/mksubr
@@ -368,6 +368,19 @@ vmprotname (int type)
if_print_or(type, VM_PROT_EXECUTE, or);
if_print_or(type, VM_PROT_COPY, or);
}
+
+/*
+ * MANUAL
+ */
+void
+socktypenamewithflags(int type)
+{
+ if (type & SOCK_CLOEXEC)
+ printf("SOCK_CLOEXEC|"), type &= ~SOCK_CLOEXEC;
+ if (type & SOCK_NONBLOCK)
+ printf("SOCK_NONBLOCK|"), type &= ~SOCK_NONBLOCK;
+ socktypename(type);
+}
_EOF_
auto_or_type "accessmodename" "[A-Z]_OK[[:space:]]+0?x?[0-9A-Fa-f]+" "sys/unistd.h"
OpenPOWER on IntegriCloud