CVS commit: src/sys/kern
Module Name:src Committed By: riastradh Date: Fri Oct 12 02:37:21 UTC 2012 Modified Files: src/sys/kern: vfs_syscalls.c Log Message: Disentangle do_sys_rename. Elide the fs-wide rename lock for single-directory renames. This required changing the order of lookups, so that we know what the directories are before we lock the nodes. Clean up error branches, explain why various nonsense happens and what it does and doesn't do, and note some of what needs to change. To generate a diff of this commit: cvs rdiff -u -r1.457 -r1.458 src/sys/kern/vfs_syscalls.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/kern/vfs_syscalls.c diff -u src/sys/kern/vfs_syscalls.c:1.457 src/sys/kern/vfs_syscalls.c:1.458 --- src/sys/kern/vfs_syscalls.c:1.457 Wed Jun 27 12:28:28 2012 +++ src/sys/kern/vfs_syscalls.c Fri Oct 12 02:37:20 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: vfs_syscalls.c,v 1.457 2012/06/27 12:28:28 cheusov Exp $ */ +/* $NetBSD: vfs_syscalls.c,v 1.458 2012/10/12 02:37:20 riastradh Exp $ */ /*- * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc. @@ -70,7 +70,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: vfs_syscalls.c,v 1.457 2012/06/27 12:28:28 cheusov Exp $"); +__KERNEL_RCSID(0, "$NetBSD: vfs_syscalls.c,v 1.458 2012/10/12 02:37:20 riastradh Exp $"); #ifdef _KERNEL_OPT #include "opt_fileassoc.h" @@ -3871,176 +3871,340 @@ sys___posix_rename(struct lwp *l, const * (retain == 0) deleted unless `from' and `to' refer to the same * object in the file system's name space (BSD). * (retain == 1) always retained (POSIX). + * + * XXX Synchronize with nfsrv_rename in nfs_serv.c. */ int do_sys_rename(const char *from, const char *to, enum uio_seg seg, int retain) { - struct vnode *tvp, *fvp, *tdvp; - struct pathbuf *frompb, *topb; - struct nameidata fromnd, tond; - struct mount *fs; + struct pathbuf *fpb, *tpb; + struct nameidata fnd, tnd; + struct vnode *fdvp, *fvp; + struct vnode *tdvp, *tvp; + struct mount *mp, *tmp; int error; - error = pathbuf_maybe_copyin(from, seg, &frompb); - if (error) { - return error; - } - error = pathbuf_maybe_copyin(to, seg, &topb); - if (error) { - pathbuf_destroy(frompb); - return error; - } + KASSERT(from != NULL); + KASSERT(to != NULL); - NDINIT(&fromnd, DELETE, LOCKPARENT | TRYEMULROOT | INRENAME, - frompb); - if ((error = namei(&fromnd)) != 0) { - pathbuf_destroy(frompb); - pathbuf_destroy(topb); - return (error); - } - if (fromnd.ni_dvp != fromnd.ni_vp) - VOP_UNLOCK(fromnd.ni_dvp); - fvp = fromnd.ni_vp; - - fs = fvp->v_mount; - error = VFS_RENAMELOCK_ENTER(fs); - if (error) { - VOP_ABORTOP(fromnd.ni_dvp, &fromnd.ni_cnd); - vrele(fromnd.ni_dvp); - vrele(fvp); + error = pathbuf_maybe_copyin(from, seg, &fpb); + if (error) + goto out0; + KASSERT(fpb != NULL); + + error = pathbuf_maybe_copyin(to, seg, &tpb); + if (error) goto out1; + KASSERT(tpb != NULL); + + /* + * Lookup from. + * + * XXX LOCKPARENT is wrong because we don't actually want it + * locked yet, but (a) namei is insane, and (b) VOP_RENAME is + * insane, so for the time being we need to leave it like this. + */ + NDINIT(&fnd, DELETE, (LOCKPARENT | TRYEMULROOT | INRENAME), fpb); + if ((error = namei(&fnd)) != 0) + goto out2; + + /* + * Pull out the important results of the lookup, fdvp and fvp. + * Of course, fvp is bogus because we're about to unlock fdvp. + */ + fdvp = fnd.ni_dvp; + fvp = fnd.ni_vp; + KASSERT(fdvp != NULL); + KASSERT(fvp != NULL); + KASSERT((fdvp == fvp) || (VOP_ISLOCKED(fdvp) == LK_EXCLUSIVE)); + + /* + * Make sure neither fdvp nor fvp is locked. + */ + if (fdvp != fvp) + VOP_UNLOCK(fdvp); + /* XXX KASSERT(VOP_ISLOCKED(fdvp) != LK_EXCLUSIVE); */ + /* XXX KASSERT(VOP_ISLOCKED(fvp) != LK_EXCLUSIVE); */ + + /* + * Reject renaming `.' and `..'. Can't do this until after + * namei because we need namei's parsing to find the final + * component name. (namei should just leave us with the final + * component name and not look it up itself, but anyway...) + * + * This was here before because we used to relookup from + * instead of to and relookup requires the caller to check + * this, but now file systems may depend on this check, so we + * must retain it until the file systems are all rototilled. + */ + if (((fnd.ni_cnd.cn_namelen == 1) && + (fnd.ni_cnd.cn_nameptr[0] == '.')) || + ((fnd.ni_cnd.cn_namelen == 2) && + (fnd.ni_cnd.cn_nameptr[0] == '.') && + (fnd.ni_cnd.cn_nameptr[1] == '.'))) { + error = EINVAL; /* XXX EISDIR? */ + goto abort0; } /* - * close, partially, yet another race - ideally we should only - * go as far as getting fromnd.ni_dvp before getting the per-fs - * lock, and then continue to get fromnd.ni_vp, but we can't do - * that with namei as it stands. + * Lookup to. * - * This still won't prevent rmdir from nuking fromnd.ni_vp - * under us. The real fix is to get the locks in the rig
CVS commit: src/sys
Module Name:src Committed By: christos Date: Thu Oct 11 20:05:50 UTC 2012 Modified Files: src/sys/net: if_atmsubr.c if_ethersubr.c if_fddisubr.c if_ppp.c src/sys/netinet6: in6_var.h ip6_flow.c Log Message: PR/47058: Antti Kantee: If the ipv6 flow code modifies the mbuf, pass the change up to the caller. To generate a diff of this commit: cvs rdiff -u -r1.49 -r1.50 src/sys/net/if_atmsubr.c cvs rdiff -u -r1.191 -r1.192 src/sys/net/if_ethersubr.c cvs rdiff -u -r1.81 -r1.82 src/sys/net/if_fddisubr.c cvs rdiff -u -r1.136 -r1.137 src/sys/net/if_ppp.c cvs rdiff -u -r1.65 -r1.66 src/sys/netinet6/in6_var.h cvs rdiff -u -r1.19 -r1.20 src/sys/netinet6/ip6_flow.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_atmsubr.c diff -u src/sys/net/if_atmsubr.c:1.49 src/sys/net/if_atmsubr.c:1.50 --- src/sys/net/if_atmsubr.c:1.49 Tue Feb 1 14:46:28 2011 +++ src/sys/net/if_atmsubr.c Thu Oct 11 16:05:50 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: if_atmsubr.c,v 1.49 2011/02/01 19:46:28 chuck Exp $ */ +/* $NetBSD: if_atmsubr.c,v 1.50 2012/10/11 20:05:50 christos Exp $ */ /* * Copyright (c) 1996 Charles D. Cranor and Washington University. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_atmsubr.c,v 1.49 2011/02/01 19:46:28 chuck Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_atmsubr.c,v 1.50 2012/10/11 20:05:50 christos Exp $"); #include "opt_inet.h" #include "opt_gateway.h" @@ -288,7 +288,7 @@ atm_input(struct ifnet *ifp, struct atm_ #ifdef INET6 case ETHERTYPE_IPV6: #ifdef GATEWAY - if (ip6flow_fastforward(m)) + if (ip6flow_fastforward(&m)) return; #endif schednetisr(NETISR_IPV6); Index: src/sys/net/if_ethersubr.c diff -u src/sys/net/if_ethersubr.c:1.191 src/sys/net/if_ethersubr.c:1.192 --- src/sys/net/if_ethersubr.c:1.191 Fri Oct 5 00:26:06 2012 +++ src/sys/net/if_ethersubr.c Thu Oct 11 16:05:50 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: if_ethersubr.c,v 1.191 2012/10/05 04:26:06 matt Exp $ */ +/* $NetBSD: if_ethersubr.c,v 1.192 2012/10/11 20:05:50 christos Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -61,7 +61,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_ethersubr.c,v 1.191 2012/10/05 04:26:06 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_ethersubr.c,v 1.192 2012/10/11 20:05:50 christos Exp $"); #include "opt_inet.h" #include "opt_atalk.h" @@ -915,7 +915,7 @@ ether_input(struct ifnet *ifp, struct mb #ifdef INET6 case ETHERTYPE_IPV6: #ifdef GATEWAY - if (ip6flow_fastforward(m)) + if (ip6flow_fastforward(&m)) return; #endif schednetisr(NETISR_IPV6); Index: src/sys/net/if_fddisubr.c diff -u src/sys/net/if_fddisubr.c:1.81 src/sys/net/if_fddisubr.c:1.82 --- src/sys/net/if_fddisubr.c:1.81 Mon Apr 5 03:22:23 2010 +++ src/sys/net/if_fddisubr.c Thu Oct 11 16:05:50 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: if_fddisubr.c,v 1.81 2010/04/05 07:22:23 joerg Exp $ */ +/* $NetBSD: if_fddisubr.c,v 1.82 2012/10/11 20:05:50 christos Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -96,7 +96,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_fddisubr.c,v 1.81 2010/04/05 07:22:23 joerg Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_fddisubr.c,v 1.82 2012/10/11 20:05:50 christos Exp $"); #include "opt_gateway.h" #include "opt_inet.h" @@ -648,7 +648,7 @@ fddi_input(struct ifnet *ifp, struct mbu #ifdef INET6 case ETHERTYPE_IPV6: #ifdef GATEWAY - if (ip6flow_fastforward(m)) + if (ip6flow_fastforward(&m)) return; #endif schednetisr(NETISR_IPV6); Index: src/sys/net/if_ppp.c diff -u src/sys/net/if_ppp.c:1.136 src/sys/net/if_ppp.c:1.137 --- src/sys/net/if_ppp.c:1.136 Fri Oct 28 18:08:14 2011 +++ src/sys/net/if_ppp.c Thu Oct 11 16:05:50 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: if_ppp.c,v 1.136 2011/10/28 22:08:14 dyoung Exp $ */ +/* $NetBSD: if_ppp.c,v 1.137 2012/10/11 20:05:50 christos Exp $ */ /* Id: if_ppp.c,v 1.6 1997/03/04 03:33:00 paulus Exp */ /* @@ -102,7 +102,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_ppp.c,v 1.136 2011/10/28 22:08:14 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_ppp.c,v 1.137 2012/10/11 20:05:50 christos Exp $"); #include "ppp.h" @@ -1645,7 +1645,7 @@ ppp_inproc(struct ppp_softc *sc, struct m->m_data += PPP_HDRLEN; m->m_len -= PPP_HDRLEN; #ifdef GATEWAY - if (ip6flow_fastforward(m)) + if (ip6flow_fastforward(&m)) return; #endif schednetisr(NETISR_IPV6); Index: src/sys/netinet6/in6_var.h diff -u src/sys/netinet6/in6_var.h:1.65 src/sys/netinet6/in6_var.h:1.66 --- src/sys/netinet6/in6_var.h:1.65 Fri Jun 22 23:14:03 2012 +++ src/sys/netinet6/in6_var.h Thu Oct 11 16:05:50 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: in6_var.h,v 1.65 2012/06/23 03:14:03 christos Exp $ */ +/* $NetBSD: in6_var.h,v 1.66 2012/10/11 20:05:50 christos Exp $ */ /* $KAME: in6_var.h,v 1.81 2002/06/08 11:16:51 itojun Exp $ */ /* @@ -703,7 +703
CVS commit: src/doc
Module Name:src Committed By: tsutsui Date: Thu Oct 11 18:05:41 UTC 2012 Modified Files: src/doc: CHANGES Log Message: Note recent BCM57762 support to bge(4). To generate a diff of this commit: cvs rdiff -u -r1.1746 -r1.1747 src/doc/CHANGES Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES diff -u src/doc/CHANGES:1.1746 src/doc/CHANGES:1.1747 --- src/doc/CHANGES:1.1746 Mon Oct 8 00:12:57 2012 +++ src/doc/CHANGES Thu Oct 11 18:05:40 2012 @@ -1,4 +1,4 @@ -# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.1746 $> +# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.1747 $> # # # [Note: This file does not mention every change made to the NetBSD source tree. @@ -116,6 +116,8 @@ Changes from NetBSD 6.0 to NetBSD 7.0: support for Freescale i.MX6. Add new common boot/kvminit code. [matt 20120831] dhcpcd(8): Import dhcpcd-5.6.2 [roy 20120903] + bge(4): Add support for BCM57762, found in Apple's Thunderbolt to + Gigabit Ethernet Adapter. PR/46961 [tsutsui 20120917] mfi(4): add a command pass-through ioctl, and associated COMPAT_LINUX support. This allows to use the LSI MegaCLI linux binary on a NetBSD host. [bouyer 20120919]
CVS commit: src/share/misc
Module Name:src Committed By: ginsbach Date: Thu Oct 11 18:00:25 UTC 2012 Modified Files: src/share/misc: acronyms.comp Log Message: A few natty acronyms. To generate a diff of this commit: cvs rdiff -u -r1.129 -r1.130 src/share/misc/acronyms.comp Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/misc/acronyms.comp diff -u src/share/misc/acronyms.comp:1.129 src/share/misc/acronyms.comp:1.130 --- src/share/misc/acronyms.comp:1.129 Fri Sep 21 14:10:14 2012 +++ src/share/misc/acronyms.comp Thu Oct 11 18:00:25 2012 @@ -1,4 +1,4 @@ -$NetBSD: acronyms.comp,v 1.129 2012/09/21 14:10:14 ginsbach Exp $ +$NetBSD: acronyms.comp,v 1.130 2012/10/11 18:00:25 ginsbach Exp $ 3WHS three-way handshake 8VSB 8-state vestigial side band modulation @@ -182,6 +182,7 @@ CFG control-flow graph CG control gate CGA color graphics {array,adapter} CGI common gateway interface +CGN carrier grade NAT CHAP challenge-handshake authentication protocol CHS cylinder/head/sector CI {common, component} interface @@ -646,6 +647,7 @@ LSB least significant bit [or: byte] LSB Linux standards base LSI large scale integration LSL load segment limit +LSN large scale NAT LSR label switch router LTCC low temperature co-fired ceramic LTR left to right @@ -739,6 +741,7 @@ MWE module width encoding MX mail exchange NACK negative acknowledgement NAN not a number +NAPT network address [and] port translation NAS network attached storage NAT network address translation NAV network allocation vector @@ -975,6 +978,7 @@ RR round robin RR random replacement RS relay station RSA Rivest, Shamir and Adleman +RSIP realm specific Internet Protocol RSS really simple syndication RSS residual sum of squares RT real time
CVS commit: src/distrib/utils/libhack
Module Name:src Committed By: christos Date: Thu Oct 11 17:11:16 UTC 2012 Modified Files: src/distrib/utils/libhack: Makefile Makefile.inc syslog.c Log Message: make libhack's syslog.c produce exactly the same symbols as libc's syslog.c, so that in the future we can keep them synced. Avoid strong_alias since it does not play well with symbol renaming. To generate a diff of this commit: cvs rdiff -u -r1.22 -r1.23 src/distrib/utils/libhack/Makefile cvs rdiff -u -r1.23 -r1.24 src/distrib/utils/libhack/Makefile.inc cvs rdiff -u -r1.7 -r1.8 src/distrib/utils/libhack/syslog.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/utils/libhack/Makefile diff -u src/distrib/utils/libhack/Makefile:1.22 src/distrib/utils/libhack/Makefile:1.23 --- src/distrib/utils/libhack/Makefile:1.22 Thu Jan 1 19:20:18 2009 +++ src/distrib/utils/libhack/Makefile Thu Oct 11 13:11:16 2012 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.22 2009/01/02 00:20:18 tnozaki Exp $ +# $NetBSD: Makefile,v 1.23 2012/10/11 17:11:16 christos Exp $ # # Stubs to kill off some things from libc: # This save space on a boot system. @@ -6,9 +6,13 @@ .PATH.c: ${.CURDIR}/../../../lib/libc/gen ${.CURDIR}/../../../lib/libc/locale +HACKSRC?=${.CURDIR} +HACKOBJ?=${.OBJDIR} + CPPFLAGS+= -DSMALL CPPFLAGS.runetable.c+= -I${HACKSRC}/../../../lib/libc/citrus \ -DALL_80_TO_FF_SW1 +CPPFLAGS.syslog.c+= -I${HACKSRC}/../../../lib/libc/include LIB= hack SRCS= getcap.c getgrent.c getnet.c getnetgr.c getpwent.c \ Index: src/distrib/utils/libhack/Makefile.inc diff -u src/distrib/utils/libhack/Makefile.inc:1.23 src/distrib/utils/libhack/Makefile.inc:1.24 --- src/distrib/utils/libhack/Makefile.inc:1.23 Thu Jan 1 19:20:18 2009 +++ src/distrib/utils/libhack/Makefile.inc Thu Oct 11 13:11:16 2012 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.23 2009/01/02 00:20:18 tnozaki Exp $ +# $NetBSD: Makefile.inc,v 1.24 2012/10/11 17:11:16 christos Exp $ # # Include this fragment to build libhack.o # It is .o and not .a to make sure these are the @@ -24,6 +24,8 @@ HACKOBJS+= getcap.o getgrent.o getnet.o CPPFLAGS.runetable.c+= -I${HACKSRC}/../../../lib/libc/citrus \ -DALL_80_TO_FF_SW1 +CPPFLAGS.syslog.c+= -I${HACKSRC}/../../../lib/libc/include + libhack.o: ${HACKOBJS} ${LD} -r -o $@ ${HACKOBJS} Index: src/distrib/utils/libhack/syslog.c diff -u src/distrib/utils/libhack/syslog.c:1.7 src/distrib/utils/libhack/syslog.c:1.8 --- src/distrib/utils/libhack/syslog.c:1.7 Sat Jul 14 16:32:39 2012 +++ src/distrib/utils/libhack/syslog.c Thu Oct 11 13:11:16 2012 @@ -1,9 +1,21 @@ +#include "namespace.h" #include #include #include #include #include #include +#include "extern.h" + +#ifdef __weak_alias +__weak_alias(closelog,_closelog) +__weak_alias(openlog,_openlog) +__weak_alias(setlogmask,_setlogmask) +__weak_alias(syslog,_syslog) +__weak_alias(vsyslog,_vsyslog) +__weak_alias(syslogp,_syslogp) +__weak_alias(vsyslogp,_vsyslogp) +#endif void openlog(const char *path, int opt, int fac) @@ -21,7 +33,6 @@ setlogmask(int mask) return 0xff; } -__strong_alias(_syslog, syslog) void syslog(int fac, const char *fmt, ...) { @@ -31,7 +42,6 @@ syslog(int fac, const char *fmt, ...) va_end(ap); } -__strong_alias(_vsyslog, vsyslog) void vsyslog(int fac, const char *fmt, va_list ap) { @@ -43,8 +53,6 @@ vsyslog(int fac, const char *fmt, va_lis fflush(stderr); } -void syslog_ss(int, struct syslog_data *, const char *, ...); -__strong_alias(_syslog_ss, syslog_ss) void syslog_ss(int priority, struct syslog_data *data, const char *fmt, ...) { @@ -54,15 +62,12 @@ syslog_ss(int priority, struct syslog_da va_end(ap); } -void vsyslog_ss(int, struct syslog_data *, const char *, va_list); -__strong_alias(_vsyslog_ss, vsyslog_ss) void vsyslog_ss(int priority, struct syslog_data *data, const char *fmt, va_list ap) { vsyslog(priority, fmt, ap); } -__strong_alias(_syslog_r, syslog_r) void syslog_r(int priority, struct syslog_data *data, const char *fmt, ...) { @@ -72,28 +77,75 @@ syslog_r(int priority, struct syslog_dat va_end(ap); } -__strong_alias(_vsyslog_r, vsyslog_r) void vsyslog_r(int priority, struct syslog_data *data, const char *fmt, va_list ap) { vsyslog(priority, fmt, ap); } -__strong_alias(_closelog_r, closelog_r) void closelog_r(struct syslog_data *data) { } -__strong_alias(_setlogmask_r, setlogmask_r) int setlogmask_r(int maskpri, struct syslog_data *data) { return 0xff; } -__strong_alias(_openlog_r, openlog_r) void openlog_r(const char *id, int logopt, int facility, struct syslog_data *data) { } + +void +syslogp_r(int priority, struct syslog_data *data, const char *msgid, +const char *sdfmt, const char *fmt, ...) +{ + va_list ap; + va_start(ap, fmt); + vsyslog(priority, fmt, ap); + va_end(ap); +} + +void +vsyslogp_r(int priority, struct syslog_data *data, const char *msgid, +c
CVS commit: src/lib/libc
Module Name:src Committed By: christos Date: Thu Oct 11 17:09:56 UTC 2012 Modified Files: src/lib/libc/compat/gen: compat_syslog.c src/lib/libc/gen: syslog.c src/lib/libc/include: extern.h Log Message: take care of the signal safe syslog calls which are not exposed. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/lib/libc/compat/gen/compat_syslog.c cvs rdiff -u -r1.52 -r1.53 src/lib/libc/gen/syslog.c cvs rdiff -u -r1.20 -r1.21 src/lib/libc/include/extern.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/compat/gen/compat_syslog.c diff -u src/lib/libc/compat/gen/compat_syslog.c:1.1 src/lib/libc/compat/gen/compat_syslog.c:1.2 --- src/lib/libc/compat/gen/compat_syslog.c:1.1 Wed Oct 10 18:52:26 2012 +++ src/lib/libc/compat/gen/compat_syslog.c Thu Oct 11 13:09:55 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: compat_syslog.c,v 1.1 2012/10/10 22:52:26 christos Exp $ */ +/* $NetBSD: compat_syslog.c,v 1.2 2012/10/11 17:09:55 christos Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. @@ -39,6 +39,15 @@ #include #include +void syslog_ss(int, struct syslog_data60 *, const char *, ...) +__printflike(3, 4); +voidvsyslog_ss(int, struct syslog_data60 *, const char *, va_list) +__printflike(3, 0); +void syslogp_ss(int, struct syslog_data60 *, const char *, const char *, +const char *, ...) __printflike(5, 0); +void vsyslogp_ss(int, struct syslog_data60 *, const char *, const char *, +const char *, va_list) __printflike(5, 0); + #ifdef __weak_alias __weak_alias(closelog_r,_closelog_r) __weak_alias(openlog_r,_openlog_r) @@ -47,6 +56,11 @@ __weak_alias(syslog_r,_syslog_r) __weak_alias(vsyslog_r,_vsyslog_r) __weak_alias(syslogp_r,_syslogp_r) __weak_alias(vsyslogp_r,_vsyslogp_r) + +__weak_alias(syslog_ss,_syslog_ss) +__weak_alias(vsyslog_ss,_vsyslog_ss) +__weak_alias(syslogp_ss,_syslogp_ss) +__weak_alias(vsyslogp_ss,_vsyslogp_ss) #endif /* __weak_alias */ __warn_references(closelog_r, @@ -127,6 +141,7 @@ vsyslog_r(int pri, struct syslog_data60 syslog_data_convert(&data, data60); __vsyslog_r60(pri, &data, fmt, ap); } + void syslogp_r(int pri, struct syslog_data60 *data60, const char *msgid, const char *sdfmt, const char *msgfmt, ...) @@ -149,3 +164,42 @@ vsyslogp_r(int pri, struct syslog_data60 __vsyslogp_r60(pri, &data, msgid, sdfmt, msgfmt, ap); } + +/* + * These are semi-private + */ +#define LOG_SIGNAL_SAFE (int)0x8000 + +void +syslog_ss(int pri, struct syslog_data60 *data, const char *fmt, ...) +{ + va_list ap; + + va_start(ap, fmt); + vsyslog_r(pri | LOG_SIGNAL_SAFE, data, fmt, ap); + va_end(ap); +} + +void +syslogp_ss(int pri, struct syslog_data60 *data, const char *msgid, +const char *sdfmt, const char *msgfmt, ...) +{ + va_list ap; + + va_start(ap, msgfmt); + vsyslogp_r(pri | LOG_SIGNAL_SAFE, data, msgid, sdfmt, msgfmt, ap); + va_end(ap); +} + +void +vsyslog_ss(int pri, struct syslog_data60 *data, const char *fmt, va_list ap) +{ + vsyslog_r(pri | LOG_SIGNAL_SAFE, data, fmt, ap); +} + +void +vsyslogp_ss(int pri, struct syslog_data60 *data, const char *msgid, +const char *sdfmt, const char *msgfmt, va_list ap) +{ + vsyslogp_r(pri | LOG_SIGNAL_SAFE, data, msgid, sdfmt, msgfmt, ap); +} Index: src/lib/libc/gen/syslog.c diff -u src/lib/libc/gen/syslog.c:1.52 src/lib/libc/gen/syslog.c:1.53 --- src/lib/libc/gen/syslog.c:1.52 Wed Oct 10 19:53:43 2012 +++ src/lib/libc/gen/syslog.c Thu Oct 11 13:09:55 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: syslog.c,v 1.52 2012/10/10 23:53:43 christos Exp $ */ +/* $NetBSD: syslog.c,v 1.53 2012/10/11 17:09:55 christos Exp $ */ /* * Copyright (c) 1983, 1988, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)syslog.c 8.5 (Berkeley) 4/29/95"; #else -__RCSID("$NetBSD: syslog.c,v 1.52 2012/10/10 23:53:43 christos Exp $"); +__RCSID("$NetBSD: syslog.c,v 1.53 2012/10/11 17:09:55 christos Exp $"); #endif #endif /* LIBC_SCCS and not lint */ @@ -67,11 +67,6 @@ __weak_alias(syslog,_syslog) __weak_alias(vsyslog,_vsyslog) __weak_alias(syslogp,_syslogp) __weak_alias(vsyslogp,_vsyslogp) - -__weak_alias(syslog_ss,_syslog_ss) -__weak_alias(vsyslog_ss,_vsyslog_ss) -__weak_alias(syslogp_ss,_syslogp_ss) -__weak_alias(vsyslogp_ss,_vsyslogp_ss) #endif static struct syslog_data sdata = SYSLOG_DATA_INIT; Index: src/lib/libc/include/extern.h diff -u src/lib/libc/include/extern.h:1.20 src/lib/libc/include/extern.h:1.21 --- src/lib/libc/include/extern.h:1.20 Tue Sep 11 22:00:53 2012 +++ src/lib/libc/include/extern.h Thu Oct 11 13:09:56 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: extern.h,v 1.20 2012/09/12 02:00:53 manu Exp $ */ +/* $NetBSD: extern.h,v 1.21 2012/10/11 17:09:56 christos Exp $ */ /* * Copyright (c) 1997 Christos Zoulas. All rights reserved. @@ -49,21 +49,22 @@ char *__hldtoa(long double, const char * char *__ldtoa(long double *, int, int, int *, int *, char **)
CVS commit: src/sys/arch/x86/include
Module Name:src Committed By: apb Date: Thu Oct 11 11:12:22 UTC 2012 Modified Files: src/sys/arch/x86/include: lock.h Log Message: Change "=r" to "=qQ" in a register constraint in an asm statement for a register that is used with the "xchgb" instruction in the definition of __cpu_simple_lock_try(). This fixes PR 45673, or at least works around the gcc bug that might be behind PR 45673. The output from "objdump -d" before and after this change is identical, for the amd64 GENERIC kernel, the i386 GENERIC kernel, and the i386 MONOLITHIC kernel. To generate a diff of this commit: cvs rdiff -u -r1.25 -r1.26 src/sys/arch/x86/include/lock.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/x86/include/lock.h diff -u src/sys/arch/x86/include/lock.h:1.25 src/sys/arch/x86/include/lock.h:1.26 --- src/sys/arch/x86/include/lock.h:1.25 Thu Jan 15 01:20:31 2009 +++ src/sys/arch/x86/include/lock.h Thu Oct 11 11:12:21 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: lock.h,v 1.25 2009/01/15 01:20:31 pooka Exp $ */ +/* $NetBSD: lock.h,v 1.26 2012/10/11 11:12:21 apb Exp $ */ /*- * Copyright (c) 2000, 2006 The NetBSD Foundation, Inc. @@ -106,7 +106,7 @@ __cpu_simple_lock_try(__cpu_simple_lock_ val = __SIMPLELOCK_LOCKED; __asm volatile ("xchgb %0,(%2)" : - "=r" (val) + "=qQ" (val) :"0" (val), "r" (lockp)); __insn_barrier(); return val == __SIMPLELOCK_UNLOCKED;
CVS commit: src/sys/rump/net/lib/libshmif
Module Name:src Committed By: pooka Date: Thu Oct 11 10:50:46 UTC 2012 Modified Files: src/sys/rump/net/lib/libshmif: if_shmem.c Log Message: Pass up all multicast addresses, not just broadcast. Among other things, makes IPv6 work over this interface. To generate a diff of this commit: cvs rdiff -u -r1.45 -r1.46 src/sys/rump/net/lib/libshmif/if_shmem.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/rump/net/lib/libshmif/if_shmem.c diff -u src/sys/rump/net/lib/libshmif/if_shmem.c:1.45 src/sys/rump/net/lib/libshmif/if_shmem.c:1.46 --- src/sys/rump/net/lib/libshmif/if_shmem.c:1.45 Fri Sep 14 16:29:22 2012 +++ src/sys/rump/net/lib/libshmif/if_shmem.c Thu Oct 11 10:50:45 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: if_shmem.c,v 1.45 2012/09/14 16:29:22 pooka Exp $ */ +/* $NetBSD: if_shmem.c,v 1.46 2012/10/11 10:50:45 pooka Exp $ */ /* * Copyright (c) 2009, 2010 Antti Kantee. All Rights Reserved. @@ -28,7 +28,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_shmem.c,v 1.45 2012/09/14 16:29:22 pooka Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_shmem.c,v 1.46 2012/10/11 10:50:45 pooka Exp $"); #include #include @@ -722,8 +722,7 @@ shmif_rcv(void *arg) if (memcmp(eth->ether_dhost, CLLADDR(ifp->if_sadl), ETHER_ADDR_LEN) == 0) { passup = true; - } else if (memcmp(eth->ether_dhost, etherbroadcastaddr, - ETHER_ADDR_LEN) == 0) { + } else if (ETHER_IS_MULTICAST(eth->ether_dhost)) { passup = true; } else if (ifp->if_flags & IFF_PROMISC) { m->m_flags |= M_PROMISC;
CVS commit: src/sys/arch/arm/footbridge/isa
Module Name:src Committed By: skrll Date: Thu Oct 11 08:53:27 UTC 2012 Modified Files: src/sys/arch/arm/footbridge/isa: dsrtc.c Log Message: Complete the device_t/softc split I attempted previously. >From chuq. To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/sys/arch/arm/footbridge/isa/dsrtc.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/arch/arm/footbridge/isa/dsrtc.c diff -u src/sys/arch/arm/footbridge/isa/dsrtc.c:1.11 src/sys/arch/arm/footbridge/isa/dsrtc.c:1.12 --- src/sys/arch/arm/footbridge/isa/dsrtc.c:1.11 Tue Jul 21 07:35:55 2009 +++ src/sys/arch/arm/footbridge/isa/dsrtc.c Thu Oct 11 08:53:27 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: dsrtc.c,v 1.11 2009/07/21 07:35:55 skrll Exp $ */ +/* $NetBSD: dsrtc.c,v 1.12 2012/10/11 08:53:27 skrll Exp $ */ /* * Copyright (c) 1998 Mark Brinicombe. @@ -37,7 +37,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: dsrtc.c,v 1.11 2009/07/21 07:35:55 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: dsrtc.c,v 1.12 2012/10/11 08:53:27 skrll Exp $"); #include #include @@ -53,14 +53,13 @@ __KERNEL_RCSID(0, "$NetBSD: dsrtc.c,v 1. #define NRTC_PORTS 2 struct dsrtc_softc { - struct device sc_dev; bus_space_tag_t sc_iot; bus_space_handle_t sc_ioh; struct todr_chip_handle sc_todr; }; -void dsrtcattach(struct device *parent, struct device *self, void *aux); -int dsrtcmatch(struct device *parent, struct cfdata *cf, void *aux); +void dsrtcattach(device_t parent, device_t self, void *aux); +int dsrtcmatch(device_t parent, cfdata_t cf, void *aux); int ds1687_read(struct dsrtc_softc *sc, int addr); void ds1687_write(struct dsrtc_softc *sc, int addr, int data); #if 0
CVS commit: src/sys/arch/arm/footbridge
Module Name:src Committed By: skrll Date: Thu Oct 11 08:47:45 UTC 2012 Removed Files: src/sys/arch/arm/footbridge: todclock.c todclockvar.h Log Message: Remove files not used since Sep 2006 To generate a diff of this commit: cvs rdiff -u -r1.14 -r0 src/sys/arch/arm/footbridge/todclock.c cvs rdiff -u -r1.2 -r0 src/sys/arch/arm/footbridge/todclockvar.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: othersrc/usr.sbin/pkg_setup
Module Name:othersrc Committed By: cheusov Date: Thu Oct 11 08:02:10 UTC 2012 Modified Files: othersrc/usr.sbin/pkg_setup: pkg_setup Log Message: Clean-ups in usage message To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 othersrc/usr.sbin/pkg_setup/pkg_setup Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: othersrc/usr.sbin/pkg_setup/pkg_setup diff -u othersrc/usr.sbin/pkg_setup/pkg_setup:1.5 othersrc/usr.sbin/pkg_setup/pkg_setup:1.6 --- othersrc/usr.sbin/pkg_setup/pkg_setup:1.5 Thu Oct 11 07:59:02 2012 +++ othersrc/usr.sbin/pkg_setup/pkg_setup Thu Oct 11 08:02:10 2012 @@ -1,6 +1,6 @@ #!/bin/sh -# $NetBSD: pkg_setup,v 1.5 2012/10/11 07:59:02 cheusov Exp $ +# $NetBSD: pkg_setup,v 1.6 2012/10/11 08:02:10 cheusov Exp $ # # Copyright (c) 2011 Aleksey Cheusov # @@ -53,7 +53,7 @@ Examples: pkg_setup -v -d http://example.org/pkgsrc/linux/repo -p nih - env FTP_CMD='ftp -4V' ./pkg_setup -v \ + env FTP_CMD='ftp -4V' ./pkg_setup -v \ -d http://ftp.netbsd.org/pub/pkgsrc/packages/NetBSD/amd64/5.0 -- -P /tmp EOF }
CVS commit: src/external/cddl/osnet/sys/kern
Module Name:src Committed By: njoly Date: Thu Oct 11 08:01:23 UTC 2012 Modified Files: src/external/cddl/osnet/sys/kern: kobj.c Log Message: No need to include files more than once. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/external/cddl/osnet/sys/kern/kobj.c 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/sys/kern/kobj.c diff -u src/external/cddl/osnet/sys/kern/kobj.c:1.3 src/external/cddl/osnet/sys/kern/kobj.c:1.4 --- src/external/cddl/osnet/sys/kern/kobj.c:1.3 Thu Apr 26 23:34:09 2012 +++ src/external/cddl/osnet/sys/kern/kobj.c Thu Oct 11 08:01:23 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: kobj.c,v 1.3 2012/04/26 23:34:09 christos Exp $ */ +/* $NetBSD: kobj.c,v 1.4 2012/10/11 08:01:23 njoly Exp $ */ /*- * Copyright (c) 2009 The NetBSD Foundation, Inc. @@ -57,19 +57,17 @@ #include /* __FBSDID("$FreeBSD: src/sys/compat/opensolaris/kern/opensolaris_kobj.c,v 1.4 2007/05/31 11:51:49 kib Exp $"); */ -__KERNEL_RCSID(0, "$NetBSD: kobj.c,v 1.3 2012/04/26 23:34:09 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kobj.c,v 1.4 2012/10/11 08:01:23 njoly Exp $"); #include #include #include -#include #include #include #include #include #include #include -#include void kobj_free(void *address, size_t size)
CVS commit: othersrc/usr.sbin/pkg_setup
Module Name:othersrc Committed By: cheusov Date: Thu Oct 11 07:59:02 UTC 2012 Modified Files: othersrc/usr.sbin/pkg_setup: pkg_setup Log Message: Fix in OSVER initialization To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 othersrc/usr.sbin/pkg_setup/pkg_setup Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: othersrc/usr.sbin/pkg_setup/pkg_setup diff -u othersrc/usr.sbin/pkg_setup/pkg_setup:1.4 othersrc/usr.sbin/pkg_setup/pkg_setup:1.5 --- othersrc/usr.sbin/pkg_setup/pkg_setup:1.4 Thu Sep 13 20:09:03 2012 +++ othersrc/usr.sbin/pkg_setup/pkg_setup Thu Oct 11 07:59:02 2012 @@ -1,6 +1,6 @@ #!/bin/sh -# $NetBSD: pkg_setup,v 1.4 2012/09/13 20:09:03 cheusov Exp $ +# $NetBSD: pkg_setup,v 1.5 2012/10/11 07:59:02 cheusov Exp $ # # Copyright (c) 2011 Aleksey Cheusov # @@ -27,7 +27,7 @@ # Variables changable by user : ${OPSYS:=`uname -s`} -: ${OSVER:=`uname -r | sed 's/[_-]*$//'`} +: ${OSVER:=`uname -r | sed 's/[_-].*$//'`} : ${ARCH:=`uname -m`} : ${MIRROR:='http://ftp.NetBSD.org'} : ${URL:="$MIRROR/pub/pkgsrc/packages/$OPSYS/$ARCH/$OSVER"}