Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/cddl/osnet/lib/libdtrace Update dtrace errno.d mapp...



details:   https://anonhg.NetBSD.org/src/rev/0542d34f3925
branches:  trunk
changeset: 970013:0542d34f3925
user:      mgorny <mgorny%NetBSD.org@localhost>
date:      Sun Mar 08 22:11:48 2020 +0000

description:
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.

diffstat:

 external/cddl/osnet/lib/libdtrace/errno.d          |  60 ++++++++++++++-------
 external/cddl/osnet/lib/libdtrace/make-errno-d.awk |  45 ++++++++++++++++
 2 files changed, 84 insertions(+), 21 deletions(-)

diffs (135 lines):

diff -r 974b0105dec4 -r 0542d34f3925 external/cddl/osnet/lib/libdtrace/errno.d
--- a/external/cddl/osnet/lib/libdtrace/errno.d Sun Mar 08 22:10:56 2020 +0000
+++ b/external/cddl/osnet/lib/libdtrace/errno.d Sun Mar 08 22:11:48 2020 +0000
@@ -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 @@
 #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 @@
 #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
diff -r 974b0105dec4 -r 0542d34f3925 external/cddl/osnet/lib/libdtrace/make-errno-d.awk
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/external/cddl/osnet/lib/libdtrace/make-errno-d.awk        Sun Mar 08 22:11:48 2020 +0000
@@ -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 jb%freebsd.org@localhost"
+       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
+}



Home | Main Index | Thread Index | Old Index