From: guenther Date: Fri, 17 Apr 2015 06:14:36 +0000 (+0000) Subject: The first argument to socket/socketpair is an address family, not a protocol X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=6bbfbb88d7bf4bf52c2f9098828dba9bbb29b259;p=openbsd The first argument to socket/socketpair is an address family, not a protocol family. (sysctl(3) is practically the only place where PF_* is correct) --- diff --git a/usr.bin/kdump/kdump.c b/usr.bin/kdump/kdump.c index dacd82b8e98..a926f366be7 100644 --- a/usr.bin/kdump/kdump.c +++ b/usr.bin/kdump/kdump.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kdump.c,v 1.98 2015/01/26 04:38:23 guenther Exp $ */ +/* $OpenBSD: kdump.c,v 1.99 2015/04/17 06:14:36 guenther Exp $ */ /*- * Copyright (c) 1988, 1993 @@ -550,7 +550,6 @@ static void (*formatters[])(int) = { rebootoptname, flockname, sockoptname, - sockdomainname, sockipprotoname, socktypename, sockflagsname, @@ -633,7 +632,6 @@ enum { Rebootoptname, Flockname, Sockoptname, - Sockdomainname, Sockipprotoname, Socktypename, Sockflagsname, @@ -773,7 +771,7 @@ static const formatter scargs[][8] = { [SYS___thrsleep] = { Pptr, Clockname, Pptr, Pptr, Pptr }, [SYS_fsync] = { Pfd }, [SYS_setpriority] = { Prioname, Ppid_t, Pdecint }, - [SYS_socket] = { Sockdomainname, Socktypename, Sockprotoname }, + [SYS_socket] = { Sockfamilyname, Socktypename, Sockprotoname }, [SYS_connect] = { Pfd, Pptr, Pucount }, [SYS_getdents] = { Pfd, Pptr, Pbigsize }, [SYS_getpriority] = { Prioname, Ppid_t }, @@ -799,7 +797,7 @@ static const formatter scargs[][8] = { [SYS_mkfifo] = { Ppath, Modename }, [SYS_sendto] = { Pfd, Pptr, Pbigsize, Sendrecvflagsname }, [SYS_shutdown] = { Pfd, Shutdownhowname }, - [SYS_socketpair] = { Sockdomainname, Socktypename, Sockprotoname, Pptr }, + [SYS_socketpair] = { Sockfamilyname, Socktypename, Sockprotoname, Pptr }, [SYS_mkdir] = { Ppath, Modename }, [SYS_rmdir] = { Ppath }, [SYS_adjtime] = { Pptr, Pptr }, diff --git a/usr.bin/kdump/mksubr b/usr.bin/kdump/mksubr index 7dcc42cf215..57680a03753 100644 --- a/usr.bin/kdump/mksubr +++ b/usr.bin/kdump/mksubr @@ -1,5 +1,5 @@ #!/bin/sh -# $OpenBSD: mksubr,v 1.26 2015/01/18 20:05:20 guenther Exp $ +# $OpenBSD: mksubr,v 1.27 2015/04/17 06:14:36 guenther Exp $ # # Copyright (c) 2006 David Kirchner # @@ -348,7 +348,7 @@ auto_switch_type "sigchld_name" "CLD_[A-Z]+[[:space:]]+[0-9]+" "sys/siginfo.h" #auto_switch_type "lio_listioname" "LIO_(NO)?WAIT[[:space:]]+[0-9]+" "aio.h" auto_switch_type "minheritname" "MAP_INHERIT_[A-Z]+[[:space:]]+[0-9]+" "sys/mman.h" auto_switch_type "quotactlname" "Q_[A-Z]+[[:space:]]+0x[0-9]+" "ufs/ufs/quota.h" -auto_if_type "sockdomainname" "PF_[[:alnum:]]+[[:space:]]+" "sys/socket.h" +#auto_if_type "sockdomainname" "PF_[[:alnum:]]+[[:space:]]+" "sys/socket.h" auto_if_type "sockfamilyname" "AF_[[:alnum:]]+[[:space:]]+" "sys/socket.h" auto_if_type "sockipprotoname" "IPPROTO_[[:alnum:]]+[[:space:]]+" "netinet/in.h" auto_switch_type "sockoptname" "SO_[A-Z]+[[:space:]]+0x[0-9]+" "sys/socket.h"