From 24cd181d1ef27d697bb5b3d57f36804c4c492e26 Mon Sep 17 00:00:00 2001 From: jilles Date: Mon, 26 Aug 2013 17:22:51 +0000 Subject: kdump: Decode SOCK_CLOEXEC and SOCK_NONBLOCK in socket() and socketpair(). --- usr.bin/kdump/mksubr | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'usr.bin/kdump/mksubr') 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" -- cgit v1.1