The first argument to socket/socketpair is an address family, not a protocol
authorguenther <guenther@openbsd.org>
Fri, 17 Apr 2015 06:14:36 +0000 (06:14 +0000)
committerguenther <guenther@openbsd.org>
Fri, 17 Apr 2015 06:14:36 +0000 (06:14 +0000)
family.  (sysctl(3) is practically the only place where PF_* is correct)

usr.bin/kdump/kdump.c
usr.bin/kdump/mksubr

index dacd82b..a926f36 100644 (file)
@@ -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 },
index 7dcc42c..57680a0 100644 (file)
@@ -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 <dpk@dpk.net>
 #
@@ -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"