CVS commit: src/external/lgpl3/gmp
Module Name:src Committed By: mrg Date: Mon Jul 15 08:59:47 UTC 2013 Modified Files: src/external/lgpl3/gmp: README Log Message: note that Makefile.netbsd-gmp can help with the running of configure. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/external/lgpl3/gmp/README Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/lgpl3/gmp/README diff -u src/external/lgpl3/gmp/README:1.3 src/external/lgpl3/gmp/README:1.4 --- src/external/lgpl3/gmp/README:1.3 Tue Mar 20 08:21:38 2012 +++ src/external/lgpl3/gmp/README Mon Jul 15 08:59:47 2013 @@ -1,4 +1,4 @@ -$NetBSD: README,v 1.3 2012/03/20 08:21:38 mrg Exp $ +$NetBSD: README,v 1.4 2013/07/15 08:59:47 mrg Exp $ GMP in NetBSD. We need GMP for GCC >= 4.2. @@ -12,7 +12,9 @@ final product. All of these issues need There are a few steps to this: - - run ./configure, save the output + - run ./configure, save the output. you can use the makefile + "Makefile.netbsd-gmp" in this directory to run this with the + right options, etc. run it with nbmake-$MACHINE. - create src/external/gpl3/gmp/lib/libgmp/arch/${MACHINE_ARCH} dir, and copy these files into it:
CVS commit: src/sys/net
Module Name:src Committed By: kefren Date: Mon Jul 15 12:10:34 UTC 2013 Modified Files: src/sys/net: if_mpls.c Log Message: stop abusing kmem during softint context To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/sys/net/if_mpls.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/net/if_mpls.c diff -u src/sys/net/if_mpls.c:1.8 src/sys/net/if_mpls.c:1.9 --- src/sys/net/if_mpls.c:1.8 Sun Jul 3 18:46:12 2011 +++ src/sys/net/if_mpls.c Mon Jul 15 12:10:34 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: if_mpls.c,v 1.8 2011/07/03 18:46:12 kefren Exp $ */ +/* $NetBSD: if_mpls.c,v 1.9 2013/07/15 12:10:34 kefren Exp $ */ /* * Copyright (c) 2010 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_mpls.c,v 1.8 2011/07/03 18:46:12 kefren Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_mpls.c,v 1.9 2013/07/15 12:10:34 kefren Exp $"); #include "opt_inet.h" #include "opt_mpls.h" @@ -38,7 +38,6 @@ __KERNEL_RCSID(0, "$NetBSD: if_mpls.c,v #include #include -#include #include #include #include @@ -518,25 +517,21 @@ mpls_unlabel_inet(struct mbuf *m) static struct mbuf * mpls_label_inet(struct mbuf *m, union mpls_shim *ms, uint offset) { - struct ip *iphdr; + struct ip iphdr; if (mpls_mapttl_inet || mpls_mapprec_inet) { if ((m->m_len < sizeof(struct ip)) && (m = m_pullup(m, offset + sizeof(struct ip))) == 0) return NULL; /* XXX */ - iphdr = kmem_alloc(sizeof(struct ip), KM_NOSLEEP); - if (iphdr == NULL) - return NULL; - m_copydata(m, offset, sizeof(struct ip), iphdr); + m_copydata(m, offset, sizeof(struct ip), &iphdr); /* Map TTL */ if (mpls_mapttl_inet) - ms->shim.ttl = iphdr->ip_ttl; + ms->shim.ttl = iphdr.ip_ttl; /* Copy IP precedence to EXP */ if (mpls_mapprec_inet) - ms->shim.exp = ((u_int8_t)iphdr->ip_tos) >> 5; - kmem_free (iphdr, sizeof(struct ip)); + ms->shim.exp = ((u_int8_t)iphdr.ip_tos) >> 5; } if ((m = mpls_prepend_shim(m, ms)) == NULL) @@ -592,23 +587,19 @@ mpls_unlabel_inet6(struct mbuf *m) static struct mbuf * mpls_label_inet6(struct mbuf *m, union mpls_shim *ms, uint offset) { - struct ip6_hdr *ip6h; + struct ip6_hdr ip6h; if (mpls_mapttl_inet6 || mpls_mapclass_inet6) { if (m->m_len < sizeof(struct ip6_hdr) && (m = m_pullup(m, offset + sizeof(struct ip6_hdr))) == 0) return NULL; - ip6h = kmem_alloc(sizeof(struct ip6_hdr), KM_NOSLEEP); - if (ip6h == NULL) - return NULL; - m_copydata(m, offset, sizeof(struct ip6_hdr), ip6h); + m_copydata(m, offset, sizeof(struct ip6_hdr), &ip6h); if (mpls_mapttl_inet6) - ms->shim.ttl = ip6h->ip6_hlim; + ms->shim.ttl = ip6h.ip6_hlim; if (mpls_mapclass_inet6) - ms->shim.exp = ip6h->ip6_vfc << 1 >> 5; - kmem_free(ip6h, sizeof(struct ip6_hdr)); + ms->shim.exp = ip6h.ip6_vfc << 1 >> 5; } if ((m = mpls_prepend_shim(m, ms)) == NULL)
CVS commit: src/sys/fs/udf
Module Name:src Committed By: reinoud Date: Mon Jul 15 14:40:21 UTC 2013 Modified Files: src/sys/fs/udf: udf_rename.c Log Message: First step in rewriting the genealogy case To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/sys/fs/udf/udf_rename.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/fs/udf/udf_rename.c diff -u src/sys/fs/udf/udf_rename.c:1.8 src/sys/fs/udf/udf_rename.c:1.9 --- src/sys/fs/udf/udf_rename.c:1.8 Sat Jul 13 19:42:26 2013 +++ src/sys/fs/udf/udf_rename.c Mon Jul 15 14:40:21 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: udf_rename.c,v 1.8 2013/07/13 19:42:26 reinoud Exp $ */ +/* $NetBSD: udf_rename.c,v 1.9 2013/07/15 14:40:21 reinoud Exp $ */ /* * Copyright (c) 2013 Reinoud Zandijk @@ -28,7 +28,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: udf_rename.c,v 1.8 2013/07/13 19:42:26 reinoud Exp $"); +__KERNEL_RCSID(0, "$NetBSD: udf_rename.c,v 1.9 2013/07/15 14:40:21 reinoud Exp $"); #include #include @@ -586,24 +586,36 @@ udf_gro_genealogy(struct mount *mp, kaut return 0; } + /* + * Unlock vp so that we can lock the parent, but keep child vp + * referenced until after we have found the parent, so that + * dotdot_ino will not be recycled. + * + * XXX This guarantees that vp's inode number will not be + * recycled, but why can't dotdot_ino be recycled? + */ DPRINTF(NODE, ("\tgetting the parent node\n")); + VOP_UNLOCK(child_node->vnode); error = udf_get_node(ump, &parent_loc, &parent_node); - if (error) { - vput(child_node->vnode); + vrele(child_node->vnode); + if (error) return error; + + /* sanity check */ + if (parent_node->vnode->v_type != VDIR) { + /* + * Odd, but can happen if we loose the race and the + * '..' node has been recycled. + */ + vput(child_node->vnode); + return ENOTDIR; } if (udf_rmdired_p(parent_node->vnode)) { - vput(child_node->vnode); vput(parent_node->vnode); return ENOENT; } - /* - * Push our intermediate node, we're done with it, but do - * remember our parent location - */ - vput(child_node->vnode); child_node = parent_node; } }
CVS commit: src/usr.bin/mklocale
Module Name:src Committed By: joerg Date: Mon Jul 15 18:46:47 UTC 2013 Modified Files: src/usr.bin/mklocale: mklocale.1 Log Message: Fix description of hex encoding. To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/usr.bin/mklocale/mklocale.1 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/mklocale/mklocale.1 diff -u src/usr.bin/mklocale/mklocale.1:1.15 src/usr.bin/mklocale/mklocale.1:1.16 --- src/usr.bin/mklocale/mklocale.1:1.15 Fri May 14 17:23:13 2010 +++ src/usr.bin/mklocale/mklocale.1 Mon Jul 15 18:46:47 2013 @@ -1,4 +1,4 @@ -.\" $NetBSD: mklocale.1,v 1.15 2010/05/14 17:23:13 joerg Exp $ +.\" $NetBSD: mklocale.1,v 1.16 2013/07/15 18:46:47 joerg Exp $ .\" FreeBSD: src/usr.bin/mklocale/mklocale.1,v 1.6 1999/09/20 09:15:21 phantom Exp .\" .\" Copyright (c) 1993, 1994 @@ -33,7 +33,7 @@ .\" .\" @(#)mklocale.1 8.2 (Berkeley) 4/18/94 .\" -.Dd January 2, 2009 +.Dd July 15, 2013 .Dt MKLOCALE 1 .Os .Sh NAME @@ -90,7 +90,7 @@ the following are valid tokens in A .Dv RUNE may be any of the following: -.Bl -tag -width 0x[0-9a-z]* +.Bl -tag -width 0x[0-9a-f]+ .It Ar 'x' The ASCII character .Ar x . @@ -108,7 +108,7 @@ is one of .Dv \et , or .Dv \ev . -.It Ar 0x[0-9a-z]* +.It Ar 0x[0-9a-f]+ A hexadecimal number representing a rune code. .It Ar 0[0-7]* An octal number representing a rune code.
CVS commit: src/usr.bin/make
Module Name:src Committed By: christos Date: Mon Jul 15 20:33:11 UTC 2013 Modified Files: src/usr.bin/make: main.c var.c Log Message: Make this work again like gmake. sjg: see the test program. To generate a diff of this commit: cvs rdiff -u -r1.218 -r1.219 src/usr.bin/make/main.c cvs rdiff -u -r1.180 -r1.181 src/usr.bin/make/var.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/make/main.c diff -u src/usr.bin/make/main.c:1.218 src/usr.bin/make/main.c:1.219 --- src/usr.bin/make/main.c:1.218 Tue Jul 9 14:44:41 2013 +++ src/usr.bin/make/main.c Mon Jul 15 16:33:11 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: main.c,v 1.218 2013/07/09 18:44:41 sjg Exp $ */ +/* $NetBSD: main.c,v 1.219 2013/07/15 20:33:11 christos Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -69,7 +69,7 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: main.c,v 1.218 2013/07/09 18:44:41 sjg Exp $"; +static char rcsid[] = "$NetBSD: main.c,v 1.219 2013/07/15 20:33:11 christos Exp $"; #else #include #ifndef lint @@ -81,7 +81,7 @@ __COPYRIGHT("@(#) Copyright (c) 1988, 19 #if 0 static char sccsid[] = "@(#)main.c 8.3 (Berkeley) 3/19/94"; #else -__RCSID("$NetBSD: main.c,v 1.218 2013/07/09 18:44:41 sjg Exp $"); +__RCSID("$NetBSD: main.c,v 1.219 2013/07/15 20:33:11 christos Exp $"); #endif #endif /* not lint */ #endif @@ -942,7 +942,7 @@ main(int argc, char **argv) char tmp[64], *ep; snprintf(tmp, sizeof(tmp), "%d", - ((ep = getenv(MAKE_LEVEL_ENV)) && *ep) ? atoi(ep) : 0); + ((ep = getenv(MAKE_LEVEL_ENV)) && *ep) ? atoi(ep) + 1 : 0); Var_Set(MAKE_LEVEL, tmp, VAR_GLOBAL, 0); snprintf(tmp, sizeof(tmp), "%u", myPid); Var_Set(".MAKE.PID", tmp, VAR_GLOBAL, 0); Index: src/usr.bin/make/var.c diff -u src/usr.bin/make/var.c:1.180 src/usr.bin/make/var.c:1.181 --- src/usr.bin/make/var.c:1.180 Sat Jul 6 14:19:17 2013 +++ src/usr.bin/make/var.c Mon Jul 15 16:33:11 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: var.c,v 1.180 2013/07/06 18:19:17 sjg Exp $ */ +/* $NetBSD: var.c,v 1.181 2013/07/15 20:33:11 christos Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -69,14 +69,14 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: var.c,v 1.180 2013/07/06 18:19:17 sjg Exp $"; +static char rcsid[] = "$NetBSD: var.c,v 1.181 2013/07/15 20:33:11 christos Exp $"; #else #include #ifndef lint #if 0 static char sccsid[] = "@(#)var.c 8.3 (Berkeley) 3/19/94"; #else -__RCSID("$NetBSD: var.c,v 1.180 2013/07/06 18:19:17 sjg Exp $"); +__RCSID("$NetBSD: var.c,v 1.181 2013/07/15 20:33:11 christos Exp $"); #endif #endif /* not lint */ #endif @@ -960,14 +960,8 @@ Var_Set(const char *name, const char *va * We allow the makefiles to update .MAKE.LEVEL and ensure * children see a correctly incremented value. */ -if (ctxt == VAR_GLOBAL && strcmp(MAKE_LEVEL, name) == 0) { - char tmp[64]; - int level; - - level = atoi(val); - snprintf(tmp, sizeof(tmp), "%u", level + 1); - setenv(MAKE_LEVEL_ENV, tmp, 1); -} +if (ctxt == VAR_GLOBAL && strcmp(MAKE_LEVEL, name) == 0) + setenv(MAKE_LEVEL_ENV, val, 1); out: if (expanded_name != NULL)
CVS commit: src/distrib/i386
Module Name:src Committed By: khorben Date: Tue Jul 16 02:10:43 UTC 2013 Modified Files: src/distrib/i386: Makefile src/distrib/i386/ramdisks: Makefile Added Files: src/distrib/i386/kmod-cgdroot: Makefile src/distrib/i386/ramdisks/ramdisk-cgdroot: Makefile list Log Message: This is the i386 version of the support for full-disk encryption; this commit allows building the ramdisk required as well as the associated kernel module (to be loaded in the kernel by the bootloader). This was tested on my Lenovo ThinkPad X301 just like for the amd64 port. XXX implement support for full-disk encryption installs in sysinst To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/distrib/i386/Makefile cvs rdiff -u -r0 -r1.1 src/distrib/i386/kmod-cgdroot/Makefile cvs rdiff -u -r1.3 -r1.4 src/distrib/i386/ramdisks/Makefile cvs rdiff -u -r0 -r1.1 src/distrib/i386/ramdisks/ramdisk-cgdroot/Makefile \ src/distrib/i386/ramdisks/ramdisk-cgdroot/list Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/i386/Makefile diff -u src/distrib/i386/Makefile:1.9 src/distrib/i386/Makefile:1.10 --- src/distrib/i386/Makefile:1.9 Sun Jan 22 03:53:32 2012 +++ src/distrib/i386/Makefile Tue Jul 16 02:10:43 2013 @@ -1,10 +1,11 @@ -# $NetBSD: Makefile,v 1.9 2012/01/22 03:53:32 tsutsui Exp $ +# $NetBSD: Makefile,v 1.10 2013/07/16 02:10:43 khorben Exp $ SUBDIR= SUBDIR+= ramdisks SUBDIR+= .WAIT SUBDIR+= instkernel SUBDIR+= kmod +SUBDIR+= kmod-cgdroot SUBDIR+= .WAIT SUBDIR+= cdroms SUBDIR+= floppies Index: src/distrib/i386/ramdisks/Makefile diff -u src/distrib/i386/ramdisks/Makefile:1.3 src/distrib/i386/ramdisks/Makefile:1.4 --- src/distrib/i386/ramdisks/Makefile:1.3 Fri May 2 23:13:06 2008 +++ src/distrib/i386/ramdisks/Makefile Tue Jul 16 02:10:43 2013 @@ -1,7 +1,8 @@ -# $NetBSD: Makefile,v 1.3 2008/05/02 23:13:06 ad Exp $ +# $NetBSD: Makefile,v 1.4 2013/07/16 02:10:43 khorben Exp $ SUBDIR= SUBDIR+= ramdisk-big +SUBDIR+= ramdisk-cgdroot TARGETS+= release Added files: Index: src/distrib/i386/kmod-cgdroot/Makefile diff -u /dev/null src/distrib/i386/kmod-cgdroot/Makefile:1.1 --- /dev/null Tue Jul 16 02:10:43 2013 +++ src/distrib/i386/kmod-cgdroot/Makefile Tue Jul 16 02:10:43 2013 @@ -0,0 +1,6 @@ +# $NetBSD: Makefile,v 1.1 2013/07/16 02:10:43 khorben Exp $ + +MINIROOT= cgdroot +RAMDISK= ramdisk-cgdroot + +.include "../../common/Makefile.minirootkmod" Index: src/distrib/i386/ramdisks/ramdisk-cgdroot/Makefile diff -u /dev/null src/distrib/i386/ramdisks/ramdisk-cgdroot/Makefile:1.1 --- /dev/null Tue Jul 16 02:10:43 2013 +++ src/distrib/i386/ramdisks/ramdisk-cgdroot/Makefile Tue Jul 16 02:10:43 2013 @@ -0,0 +1,19 @@ +# $NetBSD: Makefile,v 1.1 2013/07/16 02:10:43 khorben Exp $ + +BOOTMODEL= big +IMAGE= ramdisk-cgdroot.fs +IMAGESIZE= 5000k +IMAGEDEPENDS= +CRUNCHENV= INIT_CHROOT=1 +SMALLPROG_INET6=1 + +.include "${.CURDIR}/../common/Makefile.ramdisk" + +LISTS+= ${DISTRIBDIR}/common/list.cgdroot +MTREECONF+= ${DISTRIBDIR}/common/mtree.cgdroot + +.if ${USE_INET6} != "no" +LISTS+= ${DISTRIBDIR}/common/list.inet6 +.endif + +MAKEFS_FLAGS+= -f 20 Index: src/distrib/i386/ramdisks/ramdisk-cgdroot/list diff -u /dev/null src/distrib/i386/ramdisks/ramdisk-cgdroot/list:1.1 --- /dev/null Tue Jul 16 02:10:43 2013 +++ src/distrib/i386/ramdisks/ramdisk-cgdroot/list Tue Jul 16 02:10:43 2013 @@ -0,0 +1,32 @@ +# $NetBSD: list,v 1.1 2013/07/16 02:10:43 khorben Exp $ + +PROG bin/chio +PROG bin/dd +PROG bin/df +PROG bin/ed +PROG bin/mt +PROG bin/rcmd +PROG bin/sync + +PROG libexec/lfs_cleanerd + +PROG sbin/dkctl +PROG sbin/fdisk +PROG sbin/mbrlabel +PROG sbin/mount_ext2fs +PROG sbin/mount_lfs +PROG sbin/mount_ntfs +PROG sbin/newfs_lfs +PROG sbin/raidctl +PROG sbin/restore sbin/rrestore +PROG sbin/scsictl +PROG sbin/shutdown +PROG sbin/slattach +PROG sbin/sysctl + +PROG usr/bin/less usr/bin/more +PROG usr/bin/tip + +PROG usr/sbin/installboot + +PROG usr/sbin/wiconfig
CVS commit: src/usr.sbin/ldpd
Module Name:src Committed By: kefren Date: Tue Jul 16 02:54:33 UTC 2013 Modified Files: src/usr.sbin/ldpd: label.c ldp_command.c ldp_errors.c mpls_routes.c mpls_routes.h Log Message: retire union_ntoa, replace it with satos check for valid sizes on PF_ROUTE socket minor comment update To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/usr.sbin/ldpd/label.c cvs rdiff -u -r1.10 -r1.11 src/usr.sbin/ldpd/ldp_command.c cvs rdiff -u -r1.3 -r1.4 src/usr.sbin/ldpd/ldp_errors.c cvs rdiff -u -r1.14 -r1.15 src/usr.sbin/ldpd/mpls_routes.c cvs rdiff -u -r1.4 -r1.5 src/usr.sbin/ldpd/mpls_routes.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/ldpd/label.c diff -u src/usr.sbin/ldpd/label.c:1.6 src/usr.sbin/ldpd/label.c:1.7 --- src/usr.sbin/ldpd/label.c:1.6 Thu Jul 11 10:46:19 2013 +++ src/usr.sbin/ldpd/label.c Tue Jul 16 02:54:32 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: label.c,v 1.6 2013/07/11 10:46:19 kefren Exp $ */ +/* $NetBSD: label.c,v 1.7 2013/07/16 02:54:32 kefren Exp $ */ /*- * Copyright (c) 2010 The NetBSD Foundation, Inc. @@ -85,9 +85,9 @@ label_add(const union sockunion * so_des SLIST_INSERT_HEAD(&label_head, l, labels); - strlcpy(spreftmp, union_ntoa(so_pref), INET_ADDRSTRLEN); + strlcpy(spreftmp, satos(&so_pref->sa), INET_ADDRSTRLEN); warnp("[label_add] added binding %d for %s/%s\n", l->binding, - union_ntoa(so_dest), spreftmp); + satos(&so_dest->sa), spreftmp); send_label_tlv_to_all(&(so_dest->sa), from_union_to_cidr(so_pref), l->binding); @@ -99,7 +99,7 @@ void label_del(struct label * l) { warnp("[label_del] deleted binding %d for %s\n", l->binding, - union_ntoa(&l->so_dest)); + satos(&l->so_dest.sa)); SLIST_REMOVE(&label_head, l, label, labels); free(l); } Index: src/usr.sbin/ldpd/ldp_command.c diff -u src/usr.sbin/ldpd/ldp_command.c:1.10 src/usr.sbin/ldpd/ldp_command.c:1.11 --- src/usr.sbin/ldpd/ldp_command.c:1.10 Mon Jan 28 21:08:14 2013 +++ src/usr.sbin/ldpd/ldp_command.c Tue Jul 16 02:54:32 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: ldp_command.c,v 1.10 2013/01/28 21:08:14 kefren Exp $ */ +/* $NetBSD: ldp_command.c,v 1.11 2013/07/16 02:54:32 kefren Exp $ */ /*- * Copyright (c) 2010 The NetBSD Foundation, Inc. @@ -513,9 +513,9 @@ show_bindings(int s, char *recvspace) writestr(s, sendspace); SLIST_FOREACH (l, &label_head, labels) { snprintf(sendspace, MAXSEND, "%d\t\t%s/", l->binding, - union_ntoa(&l->so_dest)); + satos(&l->so_dest.sa)); writestr(s, sendspace); - snprintf(sendspace, MAXSEND, "%s", union_ntoa(&l->so_pref)); + snprintf(sendspace, MAXSEND, "%s", satos(&l->so_pref.sa)); writestr(s, sendspace); if (l->p) snprintf(sendspace, MAXSEND, "\t%s:%d\n", Index: src/usr.sbin/ldpd/ldp_errors.c diff -u src/usr.sbin/ldpd/ldp_errors.c:1.3 src/usr.sbin/ldpd/ldp_errors.c:1.4 --- src/usr.sbin/ldpd/ldp_errors.c:1.3 Sat Jan 26 17:29:55 2013 +++ src/usr.sbin/ldpd/ldp_errors.c Tue Jul 16 02:54:32 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: ldp_errors.c,v 1.3 2013/01/26 17:29:55 kefren Exp $ */ +/* $NetBSD: ldp_errors.c,v 1.4 2013/07/16 02:54:32 kefren Exp $ */ /* * Copyright (c) 2010 The NetBSD Foundation, Inc. @@ -30,10 +30,12 @@ */ #include +#include #include #include #include #include +#include #include #include @@ -45,6 +47,7 @@ int debug_f = 0, warn_f = 0, syslog_f = static void do_syslog(int, const char*, va_list) __printflike(2, 0); static char satos_str[INET6_ADDRSTRLEN > INET_ADDRSTRLEN ? INET6_ADDRSTRLEN : INET_ADDRSTRLEN]; +static char *mpls_ntoa(const struct sockaddr_mpls *smpls); void debugp(const char *fmt, ...) @@ -134,8 +137,33 @@ satos(const struct sockaddr *sa) return "INET6 ERROR"; break; } + case AF_LINK: + { + strlcpy(satos_str, + link_ntoa((const struct sockaddr_dl *)sa), + sizeof(satos_str)); + break; + } + case AF_MPLS: + { + strlcpy(satos_str, + mpls_ntoa((const struct sockaddr_mpls *)sa), + sizeof(satos_str)); + break; + } default: return "UNKNOWN AF"; } return satos_str; } + +static char * +mpls_ntoa(const struct sockaddr_mpls *smpls) +{ + static char ret[10]; + union mpls_shim ms2; + + ms2.s_addr = ntohl(smpls->smpls_addr.s_addr); + snprintf(ret, sizeof(ret), "%d", ms2.shim.label); + return ret; +} Index: src/usr.sbin/ldpd/mpls_routes.c diff -u src/usr.sbin/ldpd/mpls_routes.c:1.14 src/usr.sbin/ldpd/mpls_routes.c:1.15 --- src/usr.sbin/ldpd/mpls_routes.c:1.14 Fri Jul 12 08:55:52 2013 +++ src/usr.sbin/ldpd/mpls_routes.c Tue Jul 16 02:54:32 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: mpls_routes.c,v 1.14 2013/07/12 08:55:52 kefren Exp $ */ +/* $NetBSD: mpls_routes.c,v 1.15 2013/07/16 02:54:32 kefren Exp $ */ /*- * Copyright (c) 2010 The NetBSD Foundation, Inc. @@ -68,7 +68,6 @@ int replay_index = 0; static int read_route_socket(char *, int); void mask_addr(union sock
CVS commit: src/share/mk
Module Name:src Committed By: matt Date: Tue Jul 16 02:58:19 UTC 2013 Modified Files: src/share/mk: bsd.lib.mk Log Message: When linking shared libraries, produce a map file. To generate a diff of this commit: cvs rdiff -u -r1.335 -r1.336 src/share/mk/bsd.lib.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/mk/bsd.lib.mk diff -u src/share/mk/bsd.lib.mk:1.335 src/share/mk/bsd.lib.mk:1.336 --- src/share/mk/bsd.lib.mk:1.335 Mon Apr 22 22:16:14 2013 +++ src/share/mk/bsd.lib.mk Tue Jul 16 02:58:19 2013 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.lib.mk,v 1.335 2013/04/22 22:16:14 riastradh Exp $ +# $NetBSD: bsd.lib.mk,v 1.336 2013/07/16 02:58:19 matt Exp $ # @(#)bsd.lib.mk 8.3 (Berkeley) 4/22/94 .include @@ -207,6 +207,8 @@ CFLAGS+= -g SHLIB_SOVERSION= ${SHLIB_MAJOR} SHLIB_SHFLAGS= -Wl,-soname,${_LIB}.so.${SHLIB_SOVERSION} SHLIB_SHFLAGS+= -Wl,--warn-shared-textrel +SHLIB_SHFLAGS+= -Wl,-Map=${_LIB}.so.${SHLIB_SOVERSION}.map +CLEANFILES+= ${_LIB}.so.${SHLIB_SOVERSION}.map SHLIB_LDSTARTFILE?= ${_GCC_CRTI} ${_GCC_CRTBEGINS} SHLIB_LDENDFILE?= ${_GCC_CRTENDS} ${_GCC_CRTN}