Module Name: src
Committed By: mgorny
Date: Sun Mar 8 22:11:48 UTC 2020
Modified Files:
src/external/cddl/osnet/lib/libdtrace: errno.d
Added Files:
src/external/cddl/osnet/lib/libdtrace: make-errno-d.awk
Log Message:
Update dtrace errno.d mapping and add a script for it
Add a new script to autogenerate errno.d from errno.h, and use it
to regenerate the list to match NetBSD errno codes.
To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/cddl/osnet/lib/libdtrace/errno.d
cvs rdiff -u -r0 -r1.1 src/external/cddl/osnet/lib/libdtrace/make-errno-d.awk
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/external/cddl/osnet/lib/libdtrace/errno.d
diff -u src/external/cddl/osnet/lib/libdtrace/errno.d:1.3 src/external/cddl/osnet/lib/libdtrace/errno.d:1.4
--- src/external/cddl/osnet/lib/libdtrace/errno.d:1.3 Mon May 28 21:05:09 2018
+++ src/external/cddl/osnet/lib/libdtrace/errno.d Sun Mar 8 22:11:48 2020
@@ -1,4 +1,10 @@
-/* $NetBSD: errno.d,v 1.3 2018/05/28 21:05:09 chs Exp $ */
+/* $NetBSD: errno.d,v 1.4 2020/03/08 22:11:48 mgorny Exp $ */
+
+/*
+ * This file is autogenerated. Please call:
+ * awk make-errno-d.awk < ../../../../../sys/sys/errno.h
+ * to get new data.
+ */
/*
* CDDL HEADER START
@@ -122,8 +128,6 @@ inline int ESOCKTNOSUPPORT = 44;
#pragma D binding "1.0" ESOCKTNOSUPPORT
inline int EOPNOTSUPP = 45;
#pragma D binding "1.0" EOPNOTSUPP
-inline int ENOTSUP = EOPNOTSUPP;
-#pragma D binding "1.0" ENOTSUP
inline int EPFNOSUPPORT = 46;
#pragma D binding "1.0" EPFNOSUPPORT
inline int EAFNOSUPPORT = 47;
@@ -202,29 +206,43 @@ inline int ENOMSG = 83;
#pragma D binding "1.0" ENOMSG
inline int EOVERFLOW = 84;
#pragma D binding "1.0" EOVERFLOW
-inline int ECANCELED = 85;
-#pragma D binding "1.0" ECANCELED
-inline int EILSEQ = 86;
+inline int EILSEQ = 85;
#pragma D binding "1.0" EILSEQ
-inline int ENOATTR = 87;
-#pragma D binding "1.0" ENOATTR
-inline int EDOOFUS = 88;
-#pragma D binding "1.0" EDOOFUS
-inline int EBADMSG = 89;
+inline int ENOTSUP = 86;
+#pragma D binding "1.0" ENOTSUP
+inline int ECANCELED = 87;
+#pragma D binding "1.0" ECANCELED
+inline int EBADMSG = 88;
#pragma D binding "1.0" EBADMSG
-inline int EMULTIHOP = 90;
+inline int ENODATA = 89;
+#pragma D binding "1.0" ENODATA
+inline int ENOSR = 90;
+#pragma D binding "1.0" ENOSR
+inline int ENOSTR = 91;
+#pragma D binding "1.0" ENOSTR
+inline int ETIME = 92;
+#pragma D binding "1.0" ETIME
+inline int ENOATTR = 93;
+#pragma D binding "1.0" ENOATTR
+inline int EMULTIHOP = 94;
#pragma D binding "1.0" EMULTIHOP
-inline int ENOLINK = 91;
+inline int ENOLINK = 95;
#pragma D binding "1.0" ENOLINK
-inline int EPROTO = 92;
+inline int EPROTO = 96;
#pragma D binding "1.0" EPROTO
-inline int ELAST = 92;
+inline int EOWNERDEAD = 97;
+#pragma D binding "1.0" EOWNERDEAD
+inline int ENOTRECOVERABLE = 98;
+#pragma D binding "1.0" ENOTRECOVERABLE
+inline int ELAST = 98;
#pragma D binding "1.0" ELAST
-inline int ERESTART = -1;
-#pragma D binding "1.0" ERESTART
inline int EJUSTRETURN = -2;
#pragma D binding "1.0" EJUSTRETURN
-inline int ENOIOCTL = -3;
-#pragma D binding "1.0" ENOIOCTL
-inline int EDIRIOCTL = -4;
-#pragma D binding "1.0" EDIRIOCTL
+inline int ERESTART = -3;
+#pragma D binding "1.0" ERESTART
+inline int EPASSTHROUGH = -4;
+#pragma D binding "1.0" EPASSTHROUGH
+inline int EDUPFD = -5;
+#pragma D binding "1.0" EDUPFD
+inline int EMOVEFD = -6;
+#pragma D binding "1.0" EMOVEFD
Added files:
Index: src/external/cddl/osnet/lib/libdtrace/make-errno-d.awk
diff -u /dev/null src/external/cddl/osnet/lib/libdtrace/make-errno-d.awk:1.1
--- /dev/null Sun Mar 8 22:11:48 2020
+++ src/external/cddl/osnet/lib/libdtrace/make-errno-d.awk Sun Mar 8 22:11:48 2020
@@ -0,0 +1,45 @@
+BEGIN {
+ print "/* $NetBSD: make-errno-d.awk,v 1.1 2020/03/08 22:11:48 mgorny Exp $ */"
+ print ""
+ print "/*"
+ print " * This file is autogenerated. Please call:"
+ print " * awk make-errno-d.awk < ../../../../../sys/sys/errno.h"
+ print " * to get new data."
+ print " */"
+ print ""
+ print "/*"
+ print " * CDDL HEADER START"
+ print " *"
+ print " * The contents of this file are subject to the terms of the"
+ print " * Common Development and Distribution License, Version 1.0 only"
+ print " * (the \"License\"). You may not use this file except in compliance"
+ print " * with the License."
+ print " *"
+ print " * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE"
+ print " * or http://www.opensolaris.org/os/licensing."
+ print " * See the License for the specific language governing permissions"
+ print " * and limitations under the License."
+ print " *"
+ print " * When distributing Covered Code, include this CDDL HEADER in each"
+ print " * file and include the License file at usr/src/OPENSOLARIS.LICENSE."
+ print " * If applicable, add the following below this CDDL HEADER, with the"
+ print " * fields enclosed by brackets \"[]\" replaced with your own identifying"
+ print " * information: Portions Copyright [yyyy] [name of copyright owner]"
+ print " *"
+ print " * CDDL HEADER END"
+ print " *"
+ print " * Portions Copyright 2006-2008 John Birrell [email protected]"
+ print " *"
+ print " * $FreeBSD: head/cddl/lib/libdtrace/errno.d 179189 2008-05-22 04:26:42Z jb $"
+ print " */"
+ print "/*"
+ print " * Copyright 2004 Sun Microsystems, Inc. All rights reserved."
+ print " * Use is subject to license terms."
+ print " */"
+ print ""
+}
+
+/^#define\s*E/ {
+ print "inline int " $2 " = " $3 ";"
+ print "#pragma D binding \"1.0\" " $2
+}