CVS commit: src/share/man/man7
Module Name:src Committed By: wiz Date: Fri Jan 28 09:24:46 UTC 2011 Modified Files: src/share/man/man7: hier.7 Log Message: Bump for emips. To generate a diff of this commit: cvs rdiff -u -r1.95 -r1.96 src/share/man/man7/hier.7 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man7/hier.7 diff -u src/share/man/man7/hier.7:1.95 src/share/man/man7/hier.7:1.96 --- src/share/man/man7/hier.7:1.95 Thu Jan 27 19:09:07 2011 +++ src/share/man/man7/hier.7 Fri Jan 28 09:24:46 2011 @@ -1,4 +1,4 @@ -.\" $NetBSD: hier.7,v 1.95 2011/01/27 19:09:07 pooka Exp $ +.\" $NetBSD: hier.7,v 1.96 2011/01/28 09:24:46 wiz Exp $ .\" .\" Copyright (c) 1990, 1993, 1994 .\" The Regents of the University of California. All rights reserved. @@ -29,7 +29,7 @@ .\" .\" @(#)hier.7 8.5 (Berkeley) 6/1/94 .\" -.Dd January 20, 2011 +.Dd January 27, 2011 .Dt HIER 7 .Os .Sh NAME
CVS commit: src/sys/arch/sgimips/sgimips
Module Name:src Committed By: tsutsui Date: Fri Jan 28 10:20:28 UTC 2011 Modified Files: src/sys/arch/sgimips/sgimips: cpu.c mainbus.c Log Message: Use CFATTACH_DECL_NEW() (no softc). To generate a diff of this commit: cvs rdiff -u -r1.24 -r1.25 src/sys/arch/sgimips/sgimips/cpu.c cvs rdiff -u -r1.18 -r1.19 src/sys/arch/sgimips/sgimips/mainbus.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/sgimips/sgimips/cpu.c diff -u src/sys/arch/sgimips/sgimips/cpu.c:1.24 src/sys/arch/sgimips/sgimips/cpu.c:1.25 --- src/sys/arch/sgimips/sgimips/cpu.c:1.24 Mon Dec 20 00:25:42 2010 +++ src/sys/arch/sgimips/sgimips/cpu.c Fri Jan 28 10:20:28 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: cpu.c,v 1.24 2010/12/20 00:25:42 matt Exp $ */ +/* $NetBSD: cpu.c,v 1.25 2011/01/28 10:20:28 tsutsui Exp $ */ /* * Copyright (c) 2000 Soren S. Jorvang @@ -35,7 +35,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.24 2010/12/20 00:25:42 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.25 2011/01/28 10:20:28 tsutsui Exp $"); #include #include @@ -53,8 +53,8 @@ #include #include -static int cpu_match(struct device *, struct cfdata *, void *); -static void cpu_attach(struct device *, struct device *, void *); +static int cpu_match(device_t, cfdata_t, void *); +static void cpu_attach(device_t, device_t, void *); void cpu_intr(uint32_t, uint32_t, vaddr_t, uint32_t); void *cpu_intr_establish(int, int, int (*func)(void *), void *); void mips1_fpu_intr(u_int32_t, u_int32_t, u_int32_t, u_int32_t); @@ -82,17 +82,17 @@ static struct evcnt mips_spurint_evcnt = EVCNT_INITIALIZER(EVCNT_TYPE_INTR, NULL, "mips", "spurious interrupts"); -CFATTACH_DECL(cpu, sizeof(struct device), +CFATTACH_DECL_NEW(cpu, 0, cpu_match, cpu_attach, NULL, NULL); static int -cpu_match(struct device *parent, struct cfdata *match, void *aux) +cpu_match(device_t parent, cfdata_t cf, void *aux) { return 1; } static void -cpu_attach(struct device *parent, struct device *self, void *aux) +cpu_attach(device_t parent, device_t self, void *aux) { printf(": "); cpu_identify(); Index: src/sys/arch/sgimips/sgimips/mainbus.c diff -u src/sys/arch/sgimips/sgimips/mainbus.c:1.18 src/sys/arch/sgimips/sgimips/mainbus.c:1.19 --- src/sys/arch/sgimips/sgimips/mainbus.c:1.18 Sun Dec 11 12:18:58 2005 +++ src/sys/arch/sgimips/sgimips/mainbus.c Fri Jan 28 10:20:28 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: mainbus.c,v 1.18 2005/12/11 12:18:58 christos Exp $ */ +/* $NetBSD: mainbus.c,v 1.19 2011/01/28 10:20:28 tsutsui Exp $ */ /* * Copyright (c) 2000 Soren S. Jorvang @@ -33,7 +33,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.18 2005/12/11 12:18:58 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.19 2011/01/28 10:20:28 tsutsui Exp $"); #include #include @@ -49,23 +49,22 @@ #include "locators.h" -static int mainbus_match(struct device *, struct cfdata *, void *); -static void mainbus_attach(struct device *, struct device *, void *); -static int mainbus_search(struct device *, struct cfdata *, - const int *, void *); +static int mainbus_match(device_t, cfdata_t, void *); +static void mainbus_attach(device_t, device_t, void *); +static int mainbus_search(device_t, cfdata_t, const int *, void *); int mainbus_print(void *, const char *); -CFATTACH_DECL(mainbus, sizeof(struct device), +CFATTACH_DECL_NEW(mainbus, 0, mainbus_match, mainbus_attach, NULL, NULL); static int -mainbus_match(struct device *parent, struct cfdata *match, void *aux) +mainbus_match(device_t parent, cfdata_t cf, void *aux) { return 1; } static void -mainbus_attach(struct device *parent, struct device *self, void *aux) +mainbus_attach(device_t parent, device_t self, void *aux) { struct mainbus_attach_args ma; @@ -79,8 +78,7 @@ } static int -mainbus_search(struct device *parent, struct cfdata *cf, - const int *ldesc, void *aux) +mainbus_search(device_t parent, cfdata_t cf, const int *ldesc, void *aux) { struct mainbus_attach_args *ma = aux;
CVS commit: src/sys/arch/pmax/stand
Module Name:src Committed By: tsutsui Date: Fri Jan 28 11:58:39 UTC 2011 Modified Files: src/sys/arch/pmax/stand: Makefile.booters Log Message: typo To generate a diff of this commit: cvs rdiff -u -r1.54 -r1.55 src/sys/arch/pmax/stand/Makefile.booters 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/pmax/stand/Makefile.booters diff -u src/sys/arch/pmax/stand/Makefile.booters:1.54 src/sys/arch/pmax/stand/Makefile.booters:1.55 --- src/sys/arch/pmax/stand/Makefile.booters:1.54 Sun Jan 23 13:18:57 2011 +++ src/sys/arch/pmax/stand/Makefile.booters Fri Jan 28 11:58:38 2011 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.booters,v 1.54 2011/01/23 13:18:57 joerg Exp $ +# $NetBSD: Makefile.booters,v 1.55 2011/01/28 11:58:38 tsutsui Exp $ NOMAN= # defined @@ -99,7 +99,7 @@ LIBS= ${LIBSA} ${LIBZ} ${LIBSA} ${LIBKERN} vers.c: ${.CURDIR}/version - ${HOST_SH} ${S}/conf/newvers_stand.sh ${${MKREPRO} == "yes" :?:-Do} \ + ${HOST_SH} ${S}/conf/newvers_stand.sh ${${MKREPRO} == "yes" :?:-D} \ -N ${.CURDIR}/version "pmax" ${PROG}: ${OBJS} ${LIBS}
CVS commit: src/crypto/dist/ipsec-tools/src/racoon
Module Name:src Committed By: tteras Date: Fri Jan 28 12:51:40 UTC 2011 Modified Files: src/crypto/dist/ipsec-tools/src/racoon: plog.c Log Message: >From Roman Hoog Antink : Log remote IP address if available (slightly modified by tteras) To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/crypto/dist/ipsec-tools/src/racoon/plog.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/crypto/dist/ipsec-tools/src/racoon/plog.c diff -u src/crypto/dist/ipsec-tools/src/racoon/plog.c:1.6 src/crypto/dist/ipsec-tools/src/racoon/plog.c:1.7 --- src/crypto/dist/ipsec-tools/src/racoon/plog.c:1.6 Mon Apr 20 13:23:55 2009 +++ src/crypto/dist/ipsec-tools/src/racoon/plog.c Fri Jan 28 12:51:40 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: plog.c,v 1.6 2009/04/20 13:23:55 tteras Exp $ */ +/* $NetBSD: plog.c,v 1.7 2011/01/28 12:51:40 tteras Exp $ */ /* Id: plog.c,v 1.11 2006/06/20 09:57:31 vanhu Exp */ @@ -36,6 +36,7 @@ #include #include +#include #include #include #include @@ -78,7 +79,7 @@ static struct log *logp = NULL; static char *logfile = NULL; -static char *plog_common __P((int, const char *, const char *)); +static char *plog_common __P((int, const char *, const char *, struct sockaddr *)); static struct plogtags { char *name; @@ -94,11 +95,13 @@ }; static char * -plog_common(pri, fmt, func) +plog_common(pri, fmt, func, sa) int pri; const char *fmt, *func; + struct sockaddr *sa; { static char buf[800]; /* XXX shoule be allocated every time ? */ + void *addr; char *p; int reslen, len; @@ -116,19 +119,43 @@ reslen -= len; } + if (sa && reslen > 3) { + addr = NULL; + switch (sa->sa_family) { + case AF_INET: + addr = &((struct sockaddr_in*)sa)->sin_addr; + break; + case AF_INET6: + addr = &((struct sockaddr_in6*)sa)->sin6_addr; + break; + } + if (inet_ntop(sa->sa_family, addr, p + 1, reslen - 3) != NULL) { + *p++ = '['; + len = strlen(p); + p += len; + *p++ = ']'; + *p++ = ' '; + reslen -= len + 3; + } + } + if (pri < ARRAYLEN(ptab)) { len = snprintf(p, reslen, "%s: ", ptab[pri].name); - if (len >= 0 && len < reslen) { - p += len; - reslen -= len; - } else - *p = '\0'; + p += len; + reslen -= len; } if (print_location) - snprintf(p, reslen, "%s: %s", func, fmt); + len = snprintf(p, reslen, "%s: %s", func, fmt); else - snprintf(p, reslen, "%s", fmt); + len = snprintf(p, reslen, "%s", fmt); + p += len; + reslen -= len; + + /* Force nul termination */ + if (reslen == 0) + p[-1] = 0; + #ifdef BROKEN_PRINTF while ((p = strstr(buf,"%z")) != NULL) p[1] = 'l'; @@ -157,7 +184,7 @@ if (pri > loglevel) return; - newfmt = plog_common(pri, fmt, func); + newfmt = plog_common(pri, fmt, func, sa); VA_COPY(ap_bak, ap);
CVS commit: src/crypto/dist/ipsec-tools/src/racoon
Module Name:src Committed By: tteras Date: Fri Jan 28 13:00:14 UTC 2011 Modified Files: src/crypto/dist/ipsec-tools/src/racoon: remoteconf.c remoteconf.h session.c Log Message: >From Roman Hoog Antink : Clean up rmconf reloading: rename the functions, and remove unneeded global variable. To generate a diff of this commit: cvs rdiff -u -r1.21 -r1.22 \ src/crypto/dist/ipsec-tools/src/racoon/remoteconf.c cvs rdiff -u -r1.12 -r1.13 \ src/crypto/dist/ipsec-tools/src/racoon/remoteconf.h cvs rdiff -u -r1.28 -r1.29 src/crypto/dist/ipsec-tools/src/racoon/session.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/crypto/dist/ipsec-tools/src/racoon/remoteconf.c diff -u src/crypto/dist/ipsec-tools/src/racoon/remoteconf.c:1.21 src/crypto/dist/ipsec-tools/src/racoon/remoteconf.c:1.22 --- src/crypto/dist/ipsec-tools/src/racoon/remoteconf.c:1.21 Wed Sep 8 12:18:35 2010 +++ src/crypto/dist/ipsec-tools/src/racoon/remoteconf.c Fri Jan 28 13:00:14 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: remoteconf.c,v 1.21 2010/09/08 12:18:35 vanhu Exp $ */ +/* $NetBSD: remoteconf.c,v 1.22 2011/01/28 13:00:14 tteras Exp $ */ /* Id: remoteconf.c,v 1.38 2006/05/06 15:52:44 manubsd Exp */ @@ -79,7 +79,8 @@ #include "handler.h" #include "genlist.h" -static TAILQ_HEAD(_rmtree, remoteconf) rmtree, rmtree_save, rmtree_tmp; +typedef TAILQ_HEAD(_rmtree, remoteconf) remoteconf_tailq_head_t; +static remoteconf_tailq_head_t rmtree, rmtree_save; /* * Script hook names and script hook paths @@ -744,15 +745,17 @@ } void -save_rmconf() +rmconf_start_reload() { rmtree_save=rmtree; initrmconf(); } void -save_rmconf_flush() +rmconf_finish_reload() { + remoteconf_tailq_head_t rmtree_tmp; + rmtree_tmp=rmtree; rmtree=rmtree_save; flushrmconf(); Index: src/crypto/dist/ipsec-tools/src/racoon/remoteconf.h diff -u src/crypto/dist/ipsec-tools/src/racoon/remoteconf.h:1.12 src/crypto/dist/ipsec-tools/src/racoon/remoteconf.h:1.13 --- src/crypto/dist/ipsec-tools/src/racoon/remoteconf.h:1.12 Tue Jun 22 09:41:33 2010 +++ src/crypto/dist/ipsec-tools/src/racoon/remoteconf.h Fri Jan 28 13:00:14 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: remoteconf.h,v 1.12 2010/06/22 09:41:33 vanhu Exp $ */ +/* $NetBSD: remoteconf.h,v 1.13 2011/01/28 13:00:14 tteras Exp $ */ /* Id: remoteconf.h,v 1.26 2006/05/06 15:52:44 manubsd Exp */ @@ -209,8 +209,8 @@ extern void remrmconf __P((struct remoteconf *)); extern void flushrmconf __P((void)); extern void initrmconf __P((void)); -extern void save_rmconf __P((void)); -extern void save_rmconf_flush __P((void)); +extern void rmconf_start_reload __P((void)); +extern void rmconf_finish_reload __P((void)); extern int check_etypeok __P((struct remoteconf *, void *)); Index: src/crypto/dist/ipsec-tools/src/racoon/session.c diff -u src/crypto/dist/ipsec-tools/src/racoon/session.c:1.28 src/crypto/dist/ipsec-tools/src/racoon/session.c:1.29 --- src/crypto/dist/ipsec-tools/src/racoon/session.c:1.28 Thu Oct 21 06:15:28 2010 +++ src/crypto/dist/ipsec-tools/src/racoon/session.c Fri Jan 28 13:00:14 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: session.c,v 1.28 2010/10/21 06:15:28 tteras Exp $ */ +/* $NetBSD: session.c,v 1.29 2011/01/28 13:00:14 tteras Exp $ */ /* $KAME: session.c,v 1.32 2003/09/24 02:01:17 jinmei Exp $ */ @@ -391,8 +391,7 @@ /* TODO: save / restore / flush old lcconf (?) / rmtree */ - save_rmconf(); - initrmconf(); + rmconf_start_reload(); #ifdef HAVE_LIBRADIUS /* free and init radius configuration */ @@ -431,7 +430,7 @@ */ save_sainfotree_flush(); - save_rmconf_flush(); + rmconf_finish_reload(); } static void
CVS commit: src/crypto/dist/ipsec-tools/src/racoon
Module Name:src Committed By: tteras Date: Fri Jan 28 13:02:34 UTC 2011 Modified Files: src/crypto/dist/ipsec-tools/src/racoon: sainfo.c sainfo.h session.c Log Message: >From Roman Hoog Antink : Clean up sainfo reloading: rename the functions, and remove unneeded global variable. To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/crypto/dist/ipsec-tools/src/racoon/sainfo.c cvs rdiff -u -r1.6 -r1.7 src/crypto/dist/ipsec-tools/src/racoon/sainfo.h cvs rdiff -u -r1.29 -r1.30 src/crypto/dist/ipsec-tools/src/racoon/session.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/crypto/dist/ipsec-tools/src/racoon/sainfo.c diff -u src/crypto/dist/ipsec-tools/src/racoon/sainfo.c:1.12 src/crypto/dist/ipsec-tools/src/racoon/sainfo.c:1.13 --- src/crypto/dist/ipsec-tools/src/racoon/sainfo.c:1.12 Sun Jan 17 23:03:01 2010 +++ src/crypto/dist/ipsec-tools/src/racoon/sainfo.c Fri Jan 28 13:02:34 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: sainfo.c,v 1.12 2010/01/17 23:03:01 wiz Exp $ */ +/* $NetBSD: sainfo.c,v 1.13 2011/01/28 13:02:34 tteras Exp $ */ /* $KAME: sainfo.c,v 1.16 2003/06/27 07:32:39 sakane Exp $ */ @@ -64,7 +64,8 @@ #include "sainfo.h" #include "gcmalloc.h" -static LIST_HEAD(_sitree, sainfo) sitree, sitree_save, sitree_tmp; +typedef LIST_HEAD(_sitree, sainfo) sainfo_tailq_head_t; +static sainfo_tailq_head_t sitree, sitree_save; /* %%% * modules for ipsec sa info @@ -392,12 +393,14 @@ return buf; } -void save_sainfotree(void){ +void sainfo_start_reload(void){ sitree_save=sitree; initsainfo(); } -void save_sainfotree_flush(void){ +void sainfo_finish_reload(void){ + sainfo_tailq_head_t sitree_tmp; + sitree_tmp=sitree; sitree=sitree_save; flushsainfo(); Index: src/crypto/dist/ipsec-tools/src/racoon/sainfo.h diff -u src/crypto/dist/ipsec-tools/src/racoon/sainfo.h:1.6 src/crypto/dist/ipsec-tools/src/racoon/sainfo.h:1.7 --- src/crypto/dist/ipsec-tools/src/racoon/sainfo.h:1.6 Wed Sep 12 23:39:51 2007 +++ src/crypto/dist/ipsec-tools/src/racoon/sainfo.h Fri Jan 28 13:02:34 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: sainfo.h,v 1.6 2007/09/12 23:39:51 mgrooms Exp $ */ +/* $NetBSD: sainfo.h,v 1.7 2011/01/28 13:02:34 tteras Exp $ */ /* Id: sainfo.h,v 1.5 2006/07/09 17:19:38 manubsd Exp */ @@ -85,8 +85,8 @@ extern void inssainfoalg __P((struct sainfoalg **, struct sainfoalg *)); extern const char * sainfo2str __P((const struct sainfo *)); -extern void save_sainfotree __P((void)); -extern void save_sainfotree_flush __P((void)); +extern void sainfo_start_reload __P((void)); +extern void sainfo_finish_reload __P((void)); extern void save_sainfotree_restore __P((void)); #endif /* _SAINFO_H */ Index: src/crypto/dist/ipsec-tools/src/racoon/session.c diff -u src/crypto/dist/ipsec-tools/src/racoon/session.c:1.29 src/crypto/dist/ipsec-tools/src/racoon/session.c:1.30 --- src/crypto/dist/ipsec-tools/src/racoon/session.c:1.29 Fri Jan 28 13:00:14 2011 +++ src/crypto/dist/ipsec-tools/src/racoon/session.c Fri Jan 28 13:02:34 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: session.c,v 1.29 2011/01/28 13:00:14 tteras Exp $ */ +/* $NetBSD: session.c,v 1.30 2011/01/28 13:02:34 tteras Exp $ */ /* $KAME: session.c,v 1.32 2003/09/24 02:01:17 jinmei Exp $ */ @@ -387,7 +387,7 @@ } #endif - save_sainfotree(); + sainfo_start_reload(); /* TODO: save / restore / flush old lcconf (?) / rmtree */ @@ -429,7 +429,7 @@ /* Update ctdtree ? */ - save_sainfotree_flush(); + sainfo_finish_reload(); rmconf_finish_reload(); }
CVS commit: src/sys/dev/marvell
Module Name:src Committed By: jakllsch Date: Fri Jan 28 16:12:23 UTC 2011 Modified Files: src/sys/dev/marvell: com_mv.c Log Message: Set mva_size in the console case. Addresses first portion of PR#43990. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/dev/marvell/com_mv.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/dev/marvell/com_mv.c diff -u src/sys/dev/marvell/com_mv.c:1.4 src/sys/dev/marvell/com_mv.c:1.5 --- src/sys/dev/marvell/com_mv.c:1.4 Sat Sep 4 05:01:20 2010 +++ src/sys/dev/marvell/com_mv.c Fri Jan 28 16:12:22 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: com_mv.c,v 1.4 2010/09/04 05:01:20 kiyohara Exp $ */ +/* $NetBSD: com_mv.c,v 1.5 2011/01/28 16:12:22 jakllsch Exp $ */ /* * Copyright (c) 2007, 2010 KIYOHARA Takashi * All rights reserved. @@ -26,7 +26,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: com_mv.c,v 1.4 2010/09/04 05:01:20 kiyohara Exp $"); +__KERNEL_RCSID(0, "$NetBSD: com_mv.c,v 1.5 2011/01/28 16:12:22 jakllsch Exp $"); #include "opt_com.h" @@ -88,7 +88,7 @@ return 0; if (com_is_console(mva->mva_iot, mva->mva_addr + mva->mva_offset, NULL)) - return 1; + goto console; if (bus_space_subregion(mva->mva_iot, mva->mva_ioh, mva->mva_offset, MVUART_SIZE, &ioh)) @@ -97,6 +97,7 @@ if (!com_probe_subr(®s)) return 0; +console: mva->mva_size = MVUART_SIZE; return 1; }
CVS commit: src/sys/rump/librump/rumpkern
Module Name:src Committed By: pooka Date: Fri Jan 28 16:34:31 UTC 2011 Modified Files: src/sys/rump/librump/rumpkern: lwproc.c Log Message: fill in a default name for p_comm To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/sys/rump/librump/rumpkern/lwproc.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/librump/rumpkern/lwproc.c diff -u src/sys/rump/librump/rumpkern/lwproc.c:1.10 src/sys/rump/librump/rumpkern/lwproc.c:1.11 --- src/sys/rump/librump/rumpkern/lwproc.c:1.10 Thu Jan 13 15:38:29 2011 +++ src/sys/rump/librump/rumpkern/lwproc.c Fri Jan 28 16:34:31 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: lwproc.c,v 1.10 2011/01/13 15:38:29 pooka Exp $ */ +/* $NetBSD: lwproc.c,v 1.11 2011/01/28 16:34:31 pooka Exp $ */ /* * Copyright (c) 2010, 2011 Antti Kantee. All Rights Reserved. @@ -26,7 +26,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: lwproc.c,v 1.10 2011/01/13 15:38:29 pooka Exp $"); +__KERNEL_RCSID(0, "$NetBSD: lwproc.c,v 1.11 2011/01/28 16:34:31 pooka Exp $"); #include #include @@ -115,6 +115,7 @@ p->p_vmspace = vmspace_kernel(); p->p_emul = &emul_netbsd; + strcpy(p->p_comm, "rumproc"); if ((flags & RUMP_RFCFDG) == 0) KASSERT(parent == curproc);
CVS commit: src/sys
Module Name:src Committed By: pooka Date: Fri Jan 28 16:58:28 UTC 2011 Modified Files: src/sys/rump/librump/rumpkern: locks.c lwproc.c rump.c scheduler.c src/sys/sys: lwp.h Log Message: Some lwp-walkers expect the correct value for l_stat, so use a flag in l_flag instead of l_stat for the purpose of flagging lwps in a dying proc. To generate a diff of this commit: cvs rdiff -u -r1.48 -r1.49 src/sys/rump/librump/rumpkern/locks.c cvs rdiff -u -r1.11 -r1.12 src/sys/rump/librump/rumpkern/lwproc.c cvs rdiff -u -r1.222 -r1.223 src/sys/rump/librump/rumpkern/rump.c cvs rdiff -u -r1.24 -r1.25 src/sys/rump/librump/rumpkern/scheduler.c cvs rdiff -u -r1.141 -r1.142 src/sys/sys/lwp.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/rump/librump/rumpkern/locks.c diff -u src/sys/rump/librump/rumpkern/locks.c:1.48 src/sys/rump/librump/rumpkern/locks.c:1.49 --- src/sys/rump/librump/rumpkern/locks.c:1.48 Tue Jan 18 22:21:23 2011 +++ src/sys/rump/librump/rumpkern/locks.c Fri Jan 28 16:58:28 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: locks.c,v 1.48 2011/01/18 22:21:23 haad Exp $ */ +/* $NetBSD: locks.c,v 1.49 2011/01/28 16:58:28 pooka Exp $ */ /* * Copyright (c) 2007, 2008 Antti Kantee. All Rights Reserved. @@ -29,7 +29,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: locks.c,v 1.48 2011/01/18 22:21:23 haad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: locks.c,v 1.49 2011/01/28 16:58:28 pooka Exp $"); #include #include @@ -283,7 +283,7 @@ struct lwp *l = curlwp; int rv; - if (__predict_false(l->l_stat == LSDEAD || l->l_stat == LSZOMB)) { + if (__predict_false(l->l_flag & LW_RUMP_DYING)) { /* * sleepq code expects us to sleep, so set l_mutex * back to cpu lock here if we didn't. @@ -305,21 +305,21 @@ } /* - * Check for LSDEAD. if so, we need to wait here until we + * Check for DYING. if so, we need to wait here until we * are allowed to exit. */ - if (__predict_false(l->l_stat == LSDEAD)) { + if (__predict_false(l->l_flag & LW_RUMP_DYING)) { struct proc *p = l->l_proc; mutex_exit(mtx); /* drop and retake later */ mutex_enter(p->p_lock); - while (l->l_stat == LSDEAD) { + while (p->p_stat != SDYING) { /* avoid recursion */ rumpuser_cv_wait(RUMPCV(&p->p_waitcv), RUMPMTX(p->p_lock)); } - KASSERT(l->l_stat == LSZOMB); + KASSERT(p->p_stat == SDYING); mutex_exit(p->p_lock); /* ok, we can exit and remove "reference" to l->private */ Index: src/sys/rump/librump/rumpkern/lwproc.c diff -u src/sys/rump/librump/rumpkern/lwproc.c:1.11 src/sys/rump/librump/rumpkern/lwproc.c:1.12 --- src/sys/rump/librump/rumpkern/lwproc.c:1.11 Fri Jan 28 16:34:31 2011 +++ src/sys/rump/librump/rumpkern/lwproc.c Fri Jan 28 16:58:28 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: lwproc.c,v 1.11 2011/01/28 16:34:31 pooka Exp $ */ +/* $NetBSD: lwproc.c,v 1.12 2011/01/28 16:58:28 pooka Exp $ */ /* * Copyright (c) 2010, 2011 Antti Kantee. All Rights Reserved. @@ -26,7 +26,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: lwproc.c,v 1.11 2011/01/28 16:34:31 pooka Exp $"); +__KERNEL_RCSID(0, "$NetBSD: lwproc.c,v 1.12 2011/01/28 16:58:28 pooka Exp $"); #include #include @@ -53,7 +53,8 @@ KASSERT(p->p_nlwps == 0); KASSERT(LIST_EMPTY(&p->p_lwps)); - KASSERT(p->p_stat == SIDL || p->p_stat == SDEAD); + KASSERT(p->p_stat == SACTIVE || p->p_stat == SDYING || + p->p_stat == SDEAD); LIST_REMOVE(p, p_list); LIST_REMOVE(p, p_sibling); @@ -141,6 +142,7 @@ p->p_pptr = parent; p->p_ppid = parent->p_pid; + p->p_stat = SACTIVE; kauth_proc_fork(parent, p); @@ -199,6 +201,8 @@ lwproc_proc_free(p); } +extern kmutex_t unruntime_lock; + /* * called with p_lock held, releases lock before return */ @@ -217,9 +221,10 @@ lwp_update_creds(l); l->l_fd = p->p_fd; - l->l_cpu = NULL; + l->l_cpu = rump_cpu; l->l_target_cpu = rump_cpu; /* Initial target CPU always the same */ l->l_stat = LSRUN; + l->l_mutex = &unruntime_lock; TAILQ_INIT(&l->l_ld_locks); lwp_initspecific(l); @@ -341,7 +346,7 @@ } mutex_exit(newlwp->l_proc->p_lock); - l->l_mutex = NULL; + l->l_mutex = &unruntime_lock; l->l_cpu = NULL; l->l_pflag &= ~LP_RUNNING; l->l_flag &= ~LW_PENDSIG; Index: src/sys/rump/librump/rumpkern/rump.c diff -u src/sys/rump/librump/rumpkern/rump.c:1.222 src/sys/rump/librump/rumpkern/rump.c:1.223 --- src/sys/rump/librump/rumpkern/rump.c:1.222 Thu Jan 27 17:36:27 2011 +++ src/sys/rump/librump/rumpkern/rump.c Fri Jan 28 16:58:28 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: rump.c,v 1.222 2011/01/27 17:36:27 pooka Exp $ */ +/* $NetBSD: rump.c,v 1.223 2011/01/28 16:58:28 pooka Exp $ */ /* * Copyright (c) 2007 Antti Kantee. All Rights Reserved. @@ -28,7 +28,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: rump.c,v 1.222 2011/01/27 17:36:27 pooka Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rump.c,v 1.223 2011/01/28 16:58:28 pooka Exp $");
CVS commit: src/sys/rump/librump/rumpkern
Module Name:src Committed By: pooka Date: Fri Jan 28 17:04:39 UTC 2011 Modified Files: src/sys/rump/librump/rumpkern: locks.c Log Message: If we are "unsleepable" due to a dying proc, yield() instead of returning directly. This allows other threads to run possible setting a condition we are waiting on. Fixes a busyloop condition which could be entered from vfs_unmountall() where we were waiting for vrele_pending and the vrele thread could not run since we were hogging the CPU. To generate a diff of this commit: cvs rdiff -u -r1.49 -r1.50 src/sys/rump/librump/rumpkern/locks.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/librump/rumpkern/locks.c diff -u src/sys/rump/librump/rumpkern/locks.c:1.49 src/sys/rump/librump/rumpkern/locks.c:1.50 --- src/sys/rump/librump/rumpkern/locks.c:1.49 Fri Jan 28 16:58:28 2011 +++ src/sys/rump/librump/rumpkern/locks.c Fri Jan 28 17:04:39 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: locks.c,v 1.49 2011/01/28 16:58:28 pooka Exp $ */ +/* $NetBSD: locks.c,v 1.50 2011/01/28 17:04:39 pooka Exp $ */ /* * Copyright (c) 2007, 2008 Antti Kantee. All Rights Reserved. @@ -29,7 +29,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: locks.c,v 1.49 2011/01/28 16:58:28 pooka Exp $"); +__KERNEL_RCSID(0, "$NetBSD: locks.c,v 1.50 2011/01/28 17:04:39 pooka Exp $"); #include #include @@ -285,10 +285,11 @@ if (__predict_false(l->l_flag & LW_RUMP_DYING)) { /* - * sleepq code expects us to sleep, so set l_mutex - * back to cpu lock here if we didn't. + * yield() here, someone might want the cpu + * to set a condition. otherwise we'll just + * loop forever. */ - l->l_mutex = l->l_cpu->ci_schedstate.spc_mutex; + yield(); return EINTR; }
CVS commit: src/sys/rump/librump/rumpkern
Module Name:src Committed By: pooka Date: Fri Jan 28 17:57:03 UTC 2011 Modified Files: src/sys/rump/librump/rumpkern: sleepq.c Log Message: these days make sure we have an lwp lock (for lwp walker smiths) To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/sys/rump/librump/rumpkern/sleepq.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/librump/rumpkern/sleepq.c diff -u src/sys/rump/librump/rumpkern/sleepq.c:1.12 src/sys/rump/librump/rumpkern/sleepq.c:1.13 --- src/sys/rump/librump/rumpkern/sleepq.c:1.12 Thu Jan 27 21:55:25 2011 +++ src/sys/rump/librump/rumpkern/sleepq.c Fri Jan 28 17:57:03 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: sleepq.c,v 1.12 2011/01/27 21:55:25 pooka Exp $ */ +/* $NetBSD: sleepq.c,v 1.13 2011/01/28 17:57:03 pooka Exp $ */ /* * Copyright (c) 2008 Antti Kantee. All Rights Reserved. @@ -26,7 +26,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: sleepq.c,v 1.12 2011/01/27 21:55:25 pooka Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sleepq.c,v 1.13 2011/01/28 17:57:03 pooka Exp $"); #include #include @@ -87,12 +87,14 @@ int biglocks = l->l_biglocks; while (l->l_wchan) { - l->l_mutex = mp; + l->l_mutex = mp; /* keep sleepq lock until woken up */ error = cv_timedwait(&sq_cv, mp, timo); if (error == EWOULDBLOCK || error == EINTR) { - TAILQ_REMOVE(l->l_sleepq, l, l_sleepchain); - l->l_wchan = NULL; - l->l_wmesg = NULL; + if (l->l_wchan) { +TAILQ_REMOVE(l->l_sleepq, l, l_sleepchain); +l->l_wchan = NULL; +l->l_wmesg = NULL; + } } } mutex_spin_exit(mp); @@ -118,7 +120,6 @@ found = true; l->l_wchan = NULL; l->l_wmesg = NULL; - l->l_mutex = NULL; TAILQ_REMOVE(sq, l, l_sleepchain); } } @@ -135,7 +136,6 @@ l->l_wchan = NULL; l->l_wmesg = NULL; - l->l_mutex = NULL; TAILQ_REMOVE(l->l_sleepq, l, l_sleepchain); cv_broadcast(&sq_cv);
CVS commit: [bouyer-quota2] src/sys/ufs/ufs
Module Name:src Committed By: bouyer Date: Fri Jan 28 18:36:06 UTC 2011 Modified Files: src/sys/ufs/ufs [bouyer-quota2]: quota2.h quota2_subr.c ufs_quota2.c Log Message: Introduce quota2_ufs_rwq2v() and quota2_ufs_rwq2e() functions, which byteswap a quota2_val or quota2_entry if needed. Use this to get quota2_entry in host order before calling q2etoprop(). quota2_walk_list() will byteswap the offset if needed to leave it in FS byte order in callers. To generate a diff of this commit: cvs rdiff -u -r1.1.2.2 -r1.1.2.3 src/sys/ufs/ufs/quota2.h \ src/sys/ufs/ufs/ufs_quota2.c cvs rdiff -u -r1.1.2.1 -r1.1.2.2 src/sys/ufs/ufs/quota2_subr.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/ufs/ufs/quota2.h diff -u src/sys/ufs/ufs/quota2.h:1.1.2.2 src/sys/ufs/ufs/quota2.h:1.1.2.3 --- src/sys/ufs/ufs/quota2.h:1.1.2.2 Fri Jan 21 16:58:06 2011 +++ src/sys/ufs/ufs/quota2.h Fri Jan 28 18:36:06 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: quota2.h,v 1.1.2.2 2011/01/21 16:58:06 bouyer Exp $ */ +/* $NetBSD: quota2.h,v 1.1.2.3 2011/01/28 18:36:06 bouyer Exp $ */ /*- * Copyright (c) 2010 Manuel Bouyer * All rights reserved. @@ -97,4 +97,6 @@ /* quota2_subr.c */ void quota2_addfreeq2e(struct quota2_header *, void *, uint64_t, uint64_t, int); void quota2_create_blk0(uint64_t, void *bp, int, int, int); +void quota2_ufs_rwq2v(const struct quota2_val *, struct quota2_val *, int); +void quota2_ufs_rwq2e(const struct quota2_entry *, struct quota2_entry *, int); #endif /* _UFS_UFS_QUOTA2_H_ */ Index: src/sys/ufs/ufs/ufs_quota2.c diff -u src/sys/ufs/ufs/ufs_quota2.c:1.1.2.2 src/sys/ufs/ufs/ufs_quota2.c:1.1.2.3 --- src/sys/ufs/ufs/ufs_quota2.c:1.1.2.2 Fri Jan 21 16:58:06 2011 +++ src/sys/ufs/ufs/ufs_quota2.c Fri Jan 28 18:36:06 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: ufs_quota2.c,v 1.1.2.2 2011/01/21 16:58:06 bouyer Exp $ */ +/* $NetBSD: ufs_quota2.c,v 1.1.2.3 2011/01/28 18:36:06 bouyer Exp $ */ /*- * Copyright (c) 2010 Manuel Bouyer * All rights reserved. @@ -28,7 +28,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ufs_quota2.c,v 1.1.2.2 2011/01/21 16:58:06 bouyer Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ufs_quota2.c,v 1.1.2.3 2011/01/28 18:36:06 bouyer Exp $"); #include #include @@ -401,9 +401,10 @@ struct dquot *dq; int error; struct quota2_header *q2h; - struct quota2_entry *q2e; + struct quota2_entry *q2ep, q2e; struct buf *bp; prop_dictionary_t dict; + const int needswap = UFS_MPNEEDSWAP(ump); if (ump->um_quotas[type] == NULLVP) return ENODEV; @@ -414,7 +415,7 @@ mutex_exit(&dqlock); return error; } - q2e = &q2h->q2h_defentry; + q2ep = &q2h->q2h_defentry; } else { error = dqget(NULLVP, id, ump, type, &dq); @@ -426,11 +427,12 @@ return ENOENT; } error = getq2e(ump, type, dq->dq2_lblkno, dq->dq2_blkoff, - &bp, &q2e, 0); + &bp, &q2ep, 0); if (error) return error; } - dict = q2etoprop(q2e, defaultq); + quota2_ufs_rwq2e(q2ep, &q2e, needswap); + dict = q2etoprop(&q2e, defaultq); if (defaultq) mutex_exit(&dqlock); else @@ -448,12 +450,15 @@ static int quota2_getall_callback(struct ufsmount *ump, uint64_t *offp, -struct quota2_entry *q2e, uint64_t off, void *v) +struct quota2_entry *q2ep, uint64_t off, void *v) { prop_array_t replies = v; prop_dictionary_t dict; + const int needswap = UFS_MPNEEDSWAP(ump); + struct quota2_entry q2e; - dict = q2etoprop(q2e, 0); + quota2_ufs_rwq2e(q2ep, &q2e, needswap); + dict = q2etoprop(&q2e, 0); if (!prop_array_add_and_rel(replies, dict)) { return ENOMEM; } @@ -465,6 +470,7 @@ { int error; struct quota2_header *q2h; + struct quota2_entry q2e; struct buf *hbp; prop_dictionary_t dict; uint64_t offset; @@ -477,14 +483,15 @@ error = getq2h(ump, type, &hbp, &q2h, 0); if (error) return error; - dict = q2etoprop(&q2h->q2h_defentry, 1); + quota2_ufs_rwq2e(&q2h->q2h_defentry, &q2e, needswap); + dict = q2etoprop(&q2e, 1); if (!prop_array_add_and_rel(replies, dict)) { brelse(hbp, 0); return ENOMEM; } quota2_hash_size = ufs_rw16(q2h->q2h_hash_size, needswap); for (i = 0; i < quota2_hash_size ; i++) { - offset = ufs_rw64(q2h->q2h_entries[i], needswap); + offset = q2h->q2h_entries[i], needswap; error = quota2_walk_list(ump, hbp, type, &offset, 0, replies, quota2_getall_callback); if (error) @@ -533,7 +540,6 @@ int error; daddr_t offset; u_long hash_mask; - const int needswap = UFS_MPNEEDSWAP(ump); struct dq2get_callback c = { .id = id, .dq = dq @@ -545,7 +551,7 @@ goto out_mutex; /* look for our entry */ hash_mask = ((1 << q2h->q2h_hash_shift) - 1); - offset = ufs_rw64(q2h->q2h_entries[id & hash_mask], needswap); + offset = q2h->q2h_entries[id & hash_mask]; error = quota2_walk_list(ump, bp, type, &offset, 0, (void *)&c, dq2get_callback); brelse(bp, 0); Index: src/sys/ufs/ufs/quota2_subr.c diff -u src/sys/
CVS commit: [bouyer-quota2] src/tests/fs/ffs
Module Name:src Committed By: bouyer Date: Fri Jan 28 18:38:08 UTC 2011 Modified Files: src/tests/fs/ffs [bouyer-quota2]: Makefile Added Files: src/tests/fs/ffs [bouyer-quota2]: quotas_common.sh t_getquota.sh src/tests/fs/ffs/clients [bouyer-quota2]: Makefile quota_rumpops.c Log Message: Add rump versions of quota utilities, to be used by tests. Add a test which figures if we can retrieve quota values from the kernel. To generate a diff of this commit: cvs rdiff -u -r1.14.2.1 -r1.14.2.2 src/tests/fs/ffs/Makefile cvs rdiff -u -r0 -r1.1.2.1 src/tests/fs/ffs/quotas_common.sh \ src/tests/fs/ffs/t_getquota.sh cvs rdiff -u -r0 -r1.1.2.1 src/tests/fs/ffs/clients/Makefile \ src/tests/fs/ffs/clients/quota_rumpops.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/fs/ffs/Makefile diff -u src/tests/fs/ffs/Makefile:1.14.2.1 src/tests/fs/ffs/Makefile:1.14.2.2 --- src/tests/fs/ffs/Makefile:1.14.2.1 Thu Jan 20 14:25:04 2011 +++ src/tests/fs/ffs/Makefile Fri Jan 28 18:38:07 2011 @@ -1,16 +1,23 @@ -# $NetBSD: Makefile,v 1.14.2.1 2011/01/20 14:25:04 bouyer Exp $ +# $NetBSD: Makefile,v 1.14.2.2 2011/01/28 18:38:07 bouyer Exp $ # .include +SUBDIR= clients + TESTSDIR= ${TESTSBASE}/fs/ffs WARNS= 4 -PROGS= h_quota2_server +PROGS= h_quota2_server SRCS.h_quota2_server= h_quota2_server.c MAN.h_quota2_server= # empty BINDIR.h_quota2_server= ${TESTSDIR} +.for name in t_getquota +TESTS_SH+= ${name} +TESTS_SH_SRC_${name}= quotas_common.sh ${name}.sh +.endfor + TESTS_C+= t_fifos TESTS_C+= t_snapshot TESTS_C+= t_snapshot_log Added files: Index: src/tests/fs/ffs/quotas_common.sh diff -u /dev/null src/tests/fs/ffs/quotas_common.sh:1.1.2.1 --- /dev/null Fri Jan 28 18:38:08 2011 +++ src/tests/fs/ffs/quotas_common.sh Fri Jan 28 18:38:07 2011 @@ -0,0 +1,51 @@ +# $NetBSD: quotas_common.sh,v 1.1.2.1 2011/01/28 18:38:07 bouyer Exp $ + +create_with_quotas() +{ + local endian=$1; shift + local vers=$1; shift + local type=$1; shift + local op; + if [ ${type} = "both" ]; then + op="-q user -q group" + else + op="-q ${type}" + fi + atf_check -o ignore -e ignore newfs ${op} \ + -B ${endian} -O ${vers} -s 4000 -F ${IMG} + #atf_check -o ignore -e ignore $(atf_get_srcdir)/h_quota2_server \ + # ${IMG} ${RUMP_SERVER} + $(atf_get_srcdir)/h_quota2_server ${IMG} ${RUMP_SERVER} & +} + +# from tests/ipf/h_common.sh via tests/sbin/resize_ffs +test_case() +{ + local name="${1}"; shift + local check_function="${1}"; shift + local descr="${1}"; shift + + atf_test_case "${name}" cleanup + + eval "${name}_head() { \ + atf_set "descr" "${descr}" + }" + eval "${name}_body() { \ + ${check_function} " "${@}" "; \ + }" + eval "${name}_cleanup() { \ + atf_check -s exit:1 -o ignore -e ignore rump.halt; \ + }" + tests="${tests} ${name}" +} + +atf_init_test_cases() +{ + IMG=fsimage + DIR=target + RUMP_SERVER=unix:///tmp/test + export RUMP_SERVER + for i in ${tests}; do + atf_add_test_case $i + done +} Index: src/tests/fs/ffs/t_getquota.sh diff -u /dev/null src/tests/fs/ffs/t_getquota.sh:1.1.2.1 --- /dev/null Fri Jan 28 18:38:08 2011 +++ src/tests/fs/ffs/t_getquota.sh Fri Jan 28 18:38:07 2011 @@ -0,0 +1,101 @@ +# $NetBSD: t_getquota.sh,v 1.1.2.1 2011/01/28 18:38:07 bouyer Exp $ +# +# Copyright (c) 2011 Manuel Bouyer +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS +# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS +# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# + +for e in le be; do + for v in 1 2; do +for q in "user" "group"; do + test_case get_${e}_${v}_${q} get_quota \ + "get quota with ${q} enabled" ${e} ${v} ${q} +done +test_case get_${e}_${v}_"both" get_quota \ + "get quota with bo
CVS commit: src/sys/rump/librump/rumpkern
Module Name:src Committed By: pooka Date: Fri Jan 28 18:45:52 UTC 2011 Modified Files: src/sys/rump/librump/rumpkern: rump.c Log Message: call procinit_sysctl to register the proc sysctl tree To generate a diff of this commit: cvs rdiff -u -r1.223 -r1.224 src/sys/rump/librump/rumpkern/rump.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/librump/rumpkern/rump.c diff -u src/sys/rump/librump/rumpkern/rump.c:1.223 src/sys/rump/librump/rumpkern/rump.c:1.224 --- src/sys/rump/librump/rumpkern/rump.c:1.223 Fri Jan 28 16:58:28 2011 +++ src/sys/rump/librump/rumpkern/rump.c Fri Jan 28 18:45:52 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: rump.c,v 1.223 2011/01/28 16:58:28 pooka Exp $ */ +/* $NetBSD: rump.c,v 1.224 2011/01/28 18:45:52 pooka Exp $ */ /* * Copyright (c) 2007 Antti Kantee. All Rights Reserved. @@ -28,7 +28,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: rump.c,v 1.223 2011/01/28 16:58:28 pooka Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rump.c,v 1.224 2011/01/28 18:45:52 pooka Exp $"); #include #define ELFSIZE ARCH_ELFSIZE @@ -392,6 +392,7 @@ devsw_init(); pipe_init(); resource_init(); + procinit_sysctl(); /* start page baroness */ if (rump_threads) {
CVS commit: src/sys/rump/librump/rumpkern
Module Name:src Committed By: pooka Date: Fri Jan 28 18:48:21 UTC 2011 Modified Files: src/sys/rump/librump/rumpkern: lwproc.c rump.c Log Message: Don't NULL out l_cpu, l_stat is the new rumpkernel way too. To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/sys/rump/librump/rumpkern/lwproc.c cvs rdiff -u -r1.224 -r1.225 src/sys/rump/librump/rumpkern/rump.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/librump/rumpkern/lwproc.c diff -u src/sys/rump/librump/rumpkern/lwproc.c:1.12 src/sys/rump/librump/rumpkern/lwproc.c:1.13 --- src/sys/rump/librump/rumpkern/lwproc.c:1.12 Fri Jan 28 16:58:28 2011 +++ src/sys/rump/librump/rumpkern/lwproc.c Fri Jan 28 18:48:21 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: lwproc.c,v 1.12 2011/01/28 16:58:28 pooka Exp $ */ +/* $NetBSD: lwproc.c,v 1.13 2011/01/28 18:48:21 pooka Exp $ */ /* * Copyright (c) 2010, 2011 Antti Kantee. All Rights Reserved. @@ -26,7 +26,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: lwproc.c,v 1.12 2011/01/28 16:58:28 pooka Exp $"); +__KERNEL_RCSID(0, "$NetBSD: lwproc.c,v 1.13 2011/01/28 18:48:21 pooka Exp $"); #include #include @@ -347,9 +347,9 @@ mutex_exit(newlwp->l_proc->p_lock); l->l_mutex = &unruntime_lock; - l->l_cpu = NULL; l->l_pflag &= ~LP_RUNNING; l->l_flag &= ~LW_PENDSIG; + l->l_stat = LSRUN; if (l->l_flag & LW_WEXIT) { lwproc_freelwp(l); Index: src/sys/rump/librump/rumpkern/rump.c diff -u src/sys/rump/librump/rumpkern/rump.c:1.224 src/sys/rump/librump/rumpkern/rump.c:1.225 --- src/sys/rump/librump/rumpkern/rump.c:1.224 Fri Jan 28 18:45:52 2011 +++ src/sys/rump/librump/rumpkern/rump.c Fri Jan 28 18:48:21 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: rump.c,v 1.224 2011/01/28 18:45:52 pooka Exp $ */ +/* $NetBSD: rump.c,v 1.225 2011/01/28 18:48:21 pooka Exp $ */ /* * Copyright (c) 2007 Antti Kantee. All Rights Reserved. @@ -28,7 +28,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: rump.c,v 1.224 2011/01/28 18:45:52 pooka Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rump.c,v 1.225 2011/01/28 18:48:21 pooka Exp $"); #include #define ELFSIZE ARCH_ELFSIZE @@ -346,7 +346,6 @@ rump_scheduler_init(numcpu); /* revert temporary context and schedule a semireal context */ - l->l_cpu = NULL; rumpuser_set_curlwp(NULL); initproc = &proc0; /* borrow proc0 before we get initproc started */ rump_schedule();
CVS commit: src
Module Name:src Committed By: pooka Date: Fri Jan 28 18:52:50 UTC 2011 Modified Files: src/distrib/sets/lists/base: mi src/distrib/sets/lists/comp: mi src/usr.bin/sockstat: Makefile sockstat.c Added Files: src/usr.bin/sockstat: prog_ops.h sockstat_hostops.c sockstat_rumpops.c Log Message: support rump.sockstat To generate a diff of this commit: cvs rdiff -u -r1.918 -r1.919 src/distrib/sets/lists/base/mi cvs rdiff -u -r1.1577 -r1.1578 src/distrib/sets/lists/comp/mi cvs rdiff -u -r1.2 -r1.3 src/usr.bin/sockstat/Makefile cvs rdiff -u -r0 -r1.1 src/usr.bin/sockstat/prog_ops.h \ src/usr.bin/sockstat/sockstat_hostops.c \ src/usr.bin/sockstat/sockstat_rumpops.c cvs rdiff -u -r1.15 -r1.16 src/usr.bin/sockstat/sockstat.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/sets/lists/base/mi diff -u src/distrib/sets/lists/base/mi:1.918 src/distrib/sets/lists/base/mi:1.919 --- src/distrib/sets/lists/base/mi:1.918 Wed Jan 26 15:00:57 2011 +++ src/distrib/sets/lists/base/mi Fri Jan 28 18:52:48 2011 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.918 2011/01/26 15:00:57 pooka Exp $ +# $NetBSD: mi,v 1.919 2011/01/28 18:52:48 pooka Exp $ # # Note: Don't delete entries from here - mark them as "obsolete" instead, # unless otherwise stated below. @@ -629,6 +629,7 @@ ./usr/bin/skeyinitbase-util-bin skey ./usr/bin/sloginbase-secsh-bin crypto ./usr/bin/sockstatbase-util-bin +./usr/bin/rump.sockstatbase-util-bin ./usr/bin/sort base-util-bin ./usr/bin/spell base-util-bin ./usr/bin/split base-util-bin Index: src/distrib/sets/lists/comp/mi diff -u src/distrib/sets/lists/comp/mi:1.1577 src/distrib/sets/lists/comp/mi:1.1578 --- src/distrib/sets/lists/comp/mi:1.1577 Thu Jan 27 14:48:36 2011 +++ src/distrib/sets/lists/comp/mi Fri Jan 28 18:52:48 2011 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.1577 2011/01/27 14:48:36 wiz Exp $ +# $NetBSD: mi,v 1.1578 2011/01/28 18:52:48 pooka Exp $ # # Note: don't delete entries from here - mark them as "obsolete" instead. # @@ -3369,6 +3369,7 @@ ./usr/libdata/debug/usr/bin/skeyinfo.debug comp-util-debug skey,debug ./usr/libdata/debug/usr/bin/skeyinit.debug comp-util-debug skey,debug ./usr/libdata/debug/usr/bin/sockstat.debug comp-util-debug debug +./usr/libdata/debug/usr/bin/rump.sockstat.debug comp-util-debug debug ./usr/libdata/debug/usr/bin/soelim.debug comp-groff-debug debug ./usr/libdata/debug/usr/bin/sort.debug comp-util-debug debug ./usr/libdata/debug/usr/bin/split.debug comp-util-debug debug Index: src/usr.bin/sockstat/Makefile diff -u src/usr.bin/sockstat/Makefile:1.2 src/usr.bin/sockstat/Makefile:1.3 --- src/usr.bin/sockstat/Makefile:1.2 Wed Aug 10 20:32:57 2005 +++ src/usr.bin/sockstat/Makefile Fri Jan 28 18:52:49 2011 @@ -1,8 +1,12 @@ -# $NetBSD: Makefile,v 1.2 2005/08/10 20:32:57 rpaulo Exp $ +# $NetBSD: Makefile,v 1.3 2011/01/28 18:52:49 pooka Exp $ .include -PROG= sockstat +RUMPPRG= sockstat + +.PATH: ${.CURDIR}/../../lib/libc/gen +CPPFLAGS+= -DRUMP_ACTION +RUMPSRCS+= sysctlgetmibinfo.c sysctlnametomib.c .if (${USE_INET6} != "no") CPPFLAGS+=-DINET6 Index: src/usr.bin/sockstat/sockstat.c diff -u src/usr.bin/sockstat/sockstat.c:1.15 src/usr.bin/sockstat/sockstat.c:1.16 --- src/usr.bin/sockstat/sockstat.c:1.15 Mon Apr 13 10:56:56 2009 +++ src/usr.bin/sockstat/sockstat.c Fri Jan 28 18:52:49 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: sockstat.c,v 1.15 2009/04/13 10:56:56 lukem Exp $ */ +/* $NetBSD: sockstat.c,v 1.16 2011/01/28 18:52:49 pooka Exp $ */ /* * Copyright (c) 2005 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ #include #ifndef lint -__RCSID("$NetBSD: sockstat.c,v 1.15 2009/04/13 10:56:56 lukem Exp $"); +__RCSID("$NetBSD: sockstat.c,v 1.16 2011/01/28 18:52:49 pooka Exp $"); #endif #include @@ -67,6 +67,8 @@ #include #include +#include "prog_ops.h" + #define satosun(sa) ((struct sockaddr_un *)(sa)) #define satosin(sa) ((struct sockaddr_in *)(sa)) #ifdef INET6 @@ -172,6 +174,9 @@ argc -= optind; argv += optind; + if (prog_init && prog_init() == -1) + err(1, "init"); + if ((portmap != NULL) && (pf_list == 0)) { pf_list = PF_LIST_INET; #ifdef INET6 @@ -355,7 +360,7 @@ v = NULL; sz = 0; do { - rc = sysctl(&name[0], namelen, v, &sz, NULL, 0); + rc = prog_sysctl(&name[0], namelen, v, &sz, NULL, 0); if (rc == -1 && errno != ENOMEM) err(1, "sysctl"); if (rc == -1 && v != NULL) { @@ -534,7 +539,7 @@ name[namelen++] = sz; name[namelen++] = 1; - return (sysctl(&name[0], namelen, p, &sz, NULL, 0)); + return (prog_sysctl(&name[0], namelen, p, &sz, NULL, 0)); } int Added files: Index: src/usr.bin/sockstat/prog_ops.h diff -u /dev/null src/usr.bin/sockstat/prog_ops.h:1.1 --- /dev/null Fri Jan 28 18:52:50 2011 +++ src/usr.bin/sockstat/prog_ops.h Fri Jan 28 18:52:49 2011 @@ -0,0 +1,50 @@ +/* $NetBSD: prog_ops.h,v 1.1 2011/01/28 18:52:49
CVS commit: src
Module Name:src Committed By: pooka Date: Fri Jan 28 19:21:29 UTC 2011 Modified Files: src/lib/librumpclient: rumpclient.c src/lib/librumpuser: rumpuser_sp.c src/sys/rump/include/rump: rumpuser.h src/sys/rump/librump/rumpkern: rump.c Log Message: Pass the value of getprogname() from the client to the server and record it in p_comm. This is nice for things like sockstat, since they now display the client command name: pain-rustique:43:~> rump.sockstat USER COMMANDPID FD PROTO LOCAL ADDRESS FOREIGN ADDRESS root xulrunner- 16 0 tcp192.168.2.114.65507 204.152.190.12.80 root xulrunner- 16 1 tcp192.168.2.114.65501 204.152.190.12.80 root xulrunner- 16 2 tcp192.168.2.114.65500 204.152.190.12.80 root xulrunner- 16 3 tcp192.168.2.114.65499 204.152.190.12.80 root xulrunner- 16 5 tcp192.168.2.114.65498 204.152.190.12.80 root xulrunner- 16 6 tcp192.168.2.114.65497 204.152.190.12.80 root socket 62 0 tcp6 *.http*.* root socket 62 1 tcp*.http*.* root socket 63 0 tcp6 *.81 *.* root socket 63 1 tcp*.81 *.* To generate a diff of this commit: cvs rdiff -u -r1.20 -r1.21 src/lib/librumpclient/rumpclient.c cvs rdiff -u -r1.37 -r1.38 src/lib/librumpuser/rumpuser_sp.c cvs rdiff -u -r1.64 -r1.65 src/sys/rump/include/rump/rumpuser.h cvs rdiff -u -r1.225 -r1.226 src/sys/rump/librump/rumpkern/rump.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/librumpclient/rumpclient.c diff -u src/lib/librumpclient/rumpclient.c:1.20 src/lib/librumpclient/rumpclient.c:1.21 --- src/lib/librumpclient/rumpclient.c:1.20 Thu Jan 27 18:04:05 2011 +++ src/lib/librumpclient/rumpclient.c Fri Jan 28 19:21:28 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: rumpclient.c,v 1.20 2011/01/27 18:04:05 pooka Exp $ */ +/* $NetBSD: rumpclient.c,v 1.21 2011/01/28 19:21:28 pooka Exp $ */ /* * Copyright (c) 2010, 2011 Antti Kantee. All Rights Reserved. @@ -307,10 +307,17 @@ struct rsp_hdr rhdr; struct respwait rw; sigset_t omask; + size_t bonus; int rv; + if (auth) { + bonus = sizeof(rf); + } else { + bonus = strlen(getprogname())+1; + } + /* performs server handshake */ - rhdr.rsp_len = sizeof(rhdr) + (auth ? sizeof(rf) : 0); + rhdr.rsp_len = sizeof(rhdr) + bonus; rhdr.rsp_class = RUMPSP_REQ; rhdr.rsp_type = RUMPSP_HANDSHAKE; if (auth) @@ -328,6 +335,8 @@ memcpy(rf.rf_auth, auth, AUTHLEN*sizeof(*auth)); rf.rf_cancel = cancel; rv = send_with_recon(spc, &rf, sizeof(rf)); + } else { + rv = dosend(spc, getprogname(), strlen(getprogname())+1); } if (rv || cancel) { if (haslock) Index: src/lib/librumpuser/rumpuser_sp.c diff -u src/lib/librumpuser/rumpuser_sp.c:1.37 src/lib/librumpuser/rumpuser_sp.c:1.38 --- src/lib/librumpuser/rumpuser_sp.c:1.37 Sat Jan 22 13:41:22 2011 +++ src/lib/librumpuser/rumpuser_sp.c Fri Jan 28 19:21:28 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: rumpuser_sp.c,v 1.37 2011/01/22 13:41:22 pooka Exp $ */ +/* $NetBSD: rumpuser_sp.c,v 1.38 2011/01/28 19:21:28 pooka Exp $ */ /* * Copyright (c) 2010, 2011 Antti Kantee. All Rights Reserved. @@ -35,7 +35,7 @@ */ #include -__RCSID("$NetBSD: rumpuser_sp.c,v 1.37 2011/01/22 13:41:22 pooka Exp $"); +__RCSID("$NetBSD: rumpuser_sp.c,v 1.38 2011/01/28 19:21:28 pooka Exp $"); #include #include @@ -85,7 +85,7 @@ static char banner[MAXBANNER]; #define PROTOMAJOR 0 -#define PROTOMINOR 1 +#define PROTOMINOR 2 struct prefork { uint32_t pf_auth[AUTHLEN]; @@ -149,12 +149,12 @@ } static int -lwproc_rfork(struct spclient *spc, int flags) +lwproc_rfork(struct spclient *spc, int flags, const char *comm) { int rv; spops.spop_schedule(); - rv = spops.spop_lwproc_rfork(spc, flags); + rv = spops.spop_lwproc_rfork(spc, flags, comm); spops.spop_unschedule(); return rv; @@ -779,7 +779,15 @@ } if (spc->spc_hdr.rsp_handshake == HANDSHAKE_GUEST) { - if ((error = lwproc_rfork(spc, RUMP_RFCFDG)) != 0) { + char *comm = (char *)spc->spc_buf; + size_t commlen = spc->spc_hdr.rsp_len - HDRSZ; + + /* ensure it's 0-terminated */ + /* XXX make sure it contains sensible chars? */ + comm[commlen] = '\0'; + + if ((error = lwproc_rfork(spc, + RUMP_RFCFDG, comm)) != 0) { shutdown(spc->spc_fd, SHUT_RDWR); } @@ -844,7 +852,7 @@ * the wrong spc pointer. (yea, optimize * interfaces some day if anyone cares) */ - if ((error = lwproc_rfork(spc, 0)) != 0) { + if ((error = lwproc_rfork(spc, 0, NULL)) != 0) { send_error_resp(spc, reqno, error); shutdown(spc->spc_fd, SHUT_RDWR); lwproc_release(); @@ -889,7 +897,7 @@ * so we can safely use it here. */ lwproc_switch(spc->spc_mainlwp); - if ((error = lwproc_rfork(spc, RUMP_RFFD
CVS commit: src/bin/date
Module Name:src Committed By: drochner Date: Fri Jan 28 20:23:38 UTC 2011 Modified Files: src/bin/date: date.c netdate.c Log Message: roll back to 20101210 -- the current version just hung if one tried to set the date To generate a diff of this commit: cvs rdiff -u -r1.57 -r1.58 src/bin/date/date.c cvs rdiff -u -r1.28 -r1.29 src/bin/date/netdate.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/bin/date/date.c diff -u src/bin/date/date.c:1.57 src/bin/date/date.c:1.58 --- src/bin/date/date.c:1.57 Sun Dec 12 17:30:23 2010 +++ src/bin/date/date.c Fri Jan 28 20:23:38 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: date.c,v 1.57 2010/12/12 17:30:23 christos Exp $ */ +/* $NetBSD: date.c,v 1.58 2011/01/28 20:23:38 drochner Exp $ */ /* * Copyright (c) 1985, 1987, 1988, 1993 @@ -40,7 +40,7 @@ #if 0 static char sccsid[] = "@(#)date.c 8.2 (Berkeley) 4/28/95"; #else -__RCSID("$NetBSD: date.c,v 1.57 2010/12/12 17:30:23 christos Exp $"); +__RCSID("$NetBSD: date.c,v 1.58 2011/01/28 20:23:38 drochner Exp $"); #endif #endif /* not lint */ @@ -50,7 +50,6 @@ #include #include #include -#include #include #include #include @@ -65,12 +64,13 @@ static time_t tval; static int aflag, jflag, rflag, nflag; +int retval; static void badformat(void); static void badtime(void); static void badvalue(const char *); static void setthetime(const char *); -static void usage(void) __attribute__((__noreturn__)); +static void usage(void); int main(int argc, char *argv[]) @@ -79,8 +79,6 @@ size_t bufsiz; const char *format; int ch; - long long val; - struct tm *tm; setprogname(argv[0]); (void)setlocale(LC_ALL, ""); @@ -94,9 +92,8 @@ case 'd': rflag = 1; tval = parsedate(optarg, NULL, NULL); - if (tval == -1) -badarg: errx(EXIT_FAILURE, -"Cannot parse `%s'", optarg); + if (tval == -1) +errx(1, "Cannot parse `%s'", optarg); break; case 'j': /* don't set time */ jflag = 1; @@ -105,15 +102,8 @@ nflag = 1; break; case 'r': /* user specified seconds */ - errno = 0; - val = strtoll(optarg, &buf, 0); - if (optarg[0] == '\0' || *buf != '\0') -goto badarg; - if (errno == ERANGE && (val == LLONG_MAX || - val == LLONG_MIN)) -err(EXIT_FAILURE, "Bad number `%s'", optarg); rflag = 1; - tval = (time_t)val; + tval = strtoll(optarg, NULL, 0); break; case 'u': /* do everything in UTC */ (void)setenv("TZ", "UTC0", 1); @@ -128,13 +118,13 @@ if (!rflag && time(&tval) == -1) err(EXIT_FAILURE, "time"); + format = "+%a %b %e %H:%M:%S %Z %Y"; /* allow the operands in any order */ if (*argv && **argv == '+') { format = *argv; ++argv; - } else - format = "+%a %b %e %H:%M:%S %Z %Y"; + } if (*argv) { setthetime(*argv); @@ -146,19 +136,14 @@ if ((buf = malloc(bufsiz = 1024)) == NULL) goto bad; - - if ((tm = localtime(&tval)) == NULL) - err(EXIT_FAILURE, "localtime %lld failed", (long long)tval); - - while (strftime(buf, bufsiz, format, tm) == 0) + while (strftime(buf, bufsiz, format, localtime(&tval)) == 0) if ((buf = realloc(buf, bufsiz <<= 1)) == NULL) goto bad; - - (void)printf("%s\n", buf + 1); + (void)printf("%s\n", buf+1); free(buf); return 0; bad: - err(EXIT_FAILURE, "Cannot allocate format buffer"); + err(1, "Cannot allocate format buffer"); } static void @@ -204,8 +189,7 @@ badformat(); } - if ((lt = localtime(&tval)) == NULL) - err(EXIT_FAILURE, "localtime %lld failed", (long long)tval); + lt = localtime(&tval); lt->tm_isdst = -1; /* Divine correct DST */ @@ -333,8 +317,7 @@ usage(void) { (void)fprintf(stderr, - "Usage: %s [-ajnu] [-d date] [-r seconds] [+format]", - getprogname()); + "usage: %s [-ajnu] [-d date] [-r seconds] [+format]", getprogname()); (void)fprintf(stderr, " [[CC]yy]mm]dd]HH]MM[.SS]]\n"); exit(EXIT_FAILURE); /* NOTREACHED */ Index: src/bin/date/netdate.c diff -u src/bin/date/netdate.c:1.28 src/bin/date/netdate.c:1.29 --- src/bin/date/netdate.c:1.28 Sat Dec 11 16:57:51 2010 +++ src/bin/date/netdate.c Fri Jan 28 20:23:38 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: netdate.c,v 1.28 2010/12/11 16:57:51 christos Exp $ */ +/* $NetBSD: netdate.c,v 1.29 2011/01/28 20:23:38 drochner Exp $ */ /*- * Copyright (c) 1990, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)netdate.c 8.2 (Berkeley) 4/28/95"; #else -__RCSID("$NetBSD: netdate.c,v 1.28 2010/12/11 16:57:51 christos Exp $"); +__RCSID("$NetBSD: netdate.c,v 1.29 2011/01/28 20:23:38 drochner Exp $"); #endif #endif /* not lint */ @@ -59,6 +59,8 @@ #define WAITACK 2000 /* milliseconds */ #define WAITDATEACK 5000 /* milliseconds */ +extern int retval; + static const char * tsp_type_to_string(const struct tsp *msg) { @@ -73,7 +75,7 @@ * new date to the local timedaemon. If the timedaemon is in the master state, * it performs the correction on a
CVS commit: src/sys/kern
Module Name:src Committed By: pooka Date: Fri Jan 28 20:31:10 UTC 2011 Modified Files: src/sys/kern: init_sysctl.c kern_proc.c Log Message: migrate compat32 handling with previous pointed out by Lars Heidieker To generate a diff of this commit: cvs rdiff -u -r1.177 -r1.178 src/sys/kern/init_sysctl.c cvs rdiff -u -r1.170 -r1.171 src/sys/kern/kern_proc.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/init_sysctl.c diff -u src/sys/kern/init_sysctl.c:1.177 src/sys/kern/init_sysctl.c:1.178 --- src/sys/kern/init_sysctl.c:1.177 Fri Jan 28 18:44:44 2011 +++ src/sys/kern/init_sysctl.c Fri Jan 28 20:31:10 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: init_sysctl.c,v 1.177 2011/01/28 18:44:44 pooka Exp $ */ +/* $NetBSD: init_sysctl.c,v 1.178 2011/01/28 20:31:10 pooka Exp $ */ /*- * Copyright (c) 2003, 2007, 2008, 2009 The NetBSD Foundation, Inc. @@ -30,10 +30,9 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: init_sysctl.c,v 1.177 2011/01/28 18:44:44 pooka Exp $"); +__KERNEL_RCSID(0, "$NetBSD: init_sysctl.c,v 1.178 2011/01/28 20:31:10 pooka Exp $"); #include "opt_sysv.h" -#include "opt_compat_netbsd32.h" #include "opt_compat_netbsd.h" #include "opt_modular.h" #include "opt_sa.h" @@ -71,9 +70,6 @@ #include #include -#ifdef COMPAT_NETBSD32 -#include -#endif #ifdef COMPAT_50 #include #endif Index: src/sys/kern/kern_proc.c diff -u src/sys/kern/kern_proc.c:1.170 src/sys/kern/kern_proc.c:1.171 --- src/sys/kern/kern_proc.c:1.170 Fri Jan 28 18:44:44 2011 +++ src/sys/kern/kern_proc.c Fri Jan 28 20:31:10 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_proc.c,v 1.170 2011/01/28 18:44:44 pooka Exp $ */ +/* $NetBSD: kern_proc.c,v 1.171 2011/01/28 20:31:10 pooka Exp $ */ /*- * Copyright (c) 1999, 2006, 2007, 2008 The NetBSD Foundation, Inc. @@ -62,12 +62,13 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: kern_proc.c,v 1.170 2011/01/28 18:44:44 pooka Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kern_proc.c,v 1.171 2011/01/28 20:31:10 pooka Exp $"); #ifdef _KERNEL_OPT #include "opt_kstack.h" #include "opt_maxuprc.h" #include "opt_dtrace.h" +#include "opt_compat_netbsd32.h" #endif #include @@ -104,6 +105,10 @@ #include #include +#ifdef COMPAT_NETBSD32 +#include +#endif + /* * Other process lists */
CVS commit: src/sys/dev/ic
Module Name:src Committed By: pooka Date: Fri Jan 28 20:36:06 UTC 2011 Modified Files: src/sys/dev/ic: bwi.c Log Message: Don't BWI_DEBUG by default + comment cleanup. requested by Taylor R. Campbell (driver submitter) To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/sys/dev/ic/bwi.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/dev/ic/bwi.c diff -u src/sys/dev/ic/bwi.c:1.16 src/sys/dev/ic/bwi.c:1.17 --- src/sys/dev/ic/bwi.c:1.16 Fri Apr 16 18:59:51 2010 +++ src/sys/dev/ic/bwi.c Fri Jan 28 20:36:06 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: bwi.c,v 1.16 2010/04/16 18:59:51 dyoung Exp $ */ +/* $NetBSD: bwi.c,v 1.17 2011/01/28 20:36:06 pooka Exp $ */ /* $OpenBSD: bwi.c,v 1.74 2008/02/25 21:13:30 mglocker Exp $ */ /* @@ -48,7 +48,7 @@ #include -__KERNEL_RCSID(0, "$NetBSD: bwi.c,v 1.16 2010/04/16 18:59:51 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: bwi.c,v 1.17 2011/01/28 20:36:06 pooka Exp $"); #include #include @@ -81,12 +81,8 @@ #include #include -#define BWI_DEBUG 1 #ifdef BWI_DEBUG - -int bwi_debug = ~BWI_DBG_INTR; - -/* [TRC: XXX I think this is wrong.] */ +int bwi_debug = 0; #define DPRINTF(sc, dbg, fmt, ...) \ do { \
CVS commit: src/distrib/sets
Module Name:src Committed By: matt Date: Fri Jan 28 20:36:20 UTC 2011 Modified Files: src/distrib/sets: sets.subr Added Files: src/distrib/sets/lists/tests: md.evbppc Log Message: Add a method to a whiteout an entry thereby allowing a md/ad file to remove a file from the set lists. Use this for md.evbppc which doesn't build some module tests. To generate a diff of this commit: cvs rdiff -u -r1.126 -r1.127 src/distrib/sets/sets.subr cvs rdiff -u -r0 -r1.1 src/distrib/sets/lists/tests/md.evbppc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/sets.subr diff -u src/distrib/sets/sets.subr:1.126 src/distrib/sets/sets.subr:1.127 --- src/distrib/sets/sets.subr:1.126 Tue Dec 28 09:15:24 2010 +++ src/distrib/sets/sets.subr Fri Jan 28 20:36:19 2011 @@ -1,4 +1,4 @@ -# $NetBSD: sets.subr,v 1.126 2010/12/28 09:15:24 he Exp $ +# $NetBSD: sets.subr,v 1.127 2011/01/28 20:36:19 matt Exp $ # # @@ -172,7 +172,7 @@ # In each file, a record consists of a path and a System Package name, # separated by whitespace. E.g., # -# # $NetBSD: sets.subr,v 1.126 2010/12/28 09:15:24 he Exp $ +# # $NetBSD: sets.subr,v 1.127 2011/01/28 20:36:19 matt Exp $ # . base-sys-root [keyword[,...]] # ./altroot base-sys-root # ./bin base-sys-root @@ -299,7 +299,16 @@ next; } + /^-/ { + notwanted[substr($1, 2)] = 1; + delete list [substr($1, 2)]; + next; + } + + NF > 2 && $3 != "-" { + if (notwanted[$1] != "") +next; split($3, keywords, ",") show = 1 haveobs = 0 @@ -323,13 +332,21 @@ if (obsolete && ! haveobs) next if (show) -print +list[$1] = $0 next } { + if (notwanted[$1] != "") +next; if (! obsolete) -print +list[$1] = $0 + } + + END { + for (i in list) { +print list[i] + } }' } Added files: Index: src/distrib/sets/lists/tests/md.evbppc diff -u /dev/null src/distrib/sets/lists/tests/md.evbppc:1.1 --- /dev/null Fri Jan 28 20:36:20 2011 +++ src/distrib/sets/lists/tests/md.evbppc Fri Jan 28 20:36:20 2011 @@ -0,0 +1,6 @@ +# $NetBSD: md.evbppc,v 1.1 2011/01/28 20:36:20 matt Exp $ +# +# Note: don't delete entries from here - mark them as "obsolete" instead. +# +-./usr/libdata/debug/usr/tests/modules/t_builtin.debug +-./usr/libdata/debug/usr/tests/modules/t_modctl.debug
CVS commit: src/sys/arch/sh3
Module Name:src Committed By: uwe Date: Fri Jan 28 21:06:09 UTC 2011 Modified Files: src/sys/arch/sh3/include: ptrace.h userret.h src/sys/arch/sh3/sh3: db_interface.c exception.c exception_vector.S process_machdep.c sh3_machdep.c Log Message: Implement PT_STEP. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/sys/arch/sh3/include/ptrace.h cvs rdiff -u -r1.10 -r1.11 src/sys/arch/sh3/include/userret.h cvs rdiff -u -r1.60 -r1.61 src/sys/arch/sh3/sh3/db_interface.c \ src/sys/arch/sh3/sh3/exception.c cvs rdiff -u -r1.46 -r1.47 src/sys/arch/sh3/sh3/exception_vector.S cvs rdiff -u -r1.18 -r1.19 src/sys/arch/sh3/sh3/process_machdep.c cvs rdiff -u -r1.89 -r1.90 src/sys/arch/sh3/sh3/sh3_machdep.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/sh3/include/ptrace.h diff -u src/sys/arch/sh3/include/ptrace.h:1.8 src/sys/arch/sh3/include/ptrace.h:1.9 --- src/sys/arch/sh3/include/ptrace.h:1.8 Mon Oct 27 23:50:12 2008 +++ src/sys/arch/sh3/include/ptrace.h Fri Jan 28 21:06:07 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: ptrace.h,v 1.8 2008/10/27 23:50:12 uwe Exp $ */ +/* $NetBSD: ptrace.h,v 1.9 2011/01/28 21:06:07 uwe Exp $ */ /* * Copyright (c) 1993 Christopher G. Demetriou @@ -37,6 +37,8 @@ * sh3-dependent ptrace definitions */ +#define PT_STEP (PT_FIRSTMACH + 0) + /* old struct reg (now struct __reg40) that was missing r_gbr */ #define PT___GETREGS40 (PT_FIRSTMACH + 1) #define PT___SETREGS40 (PT_FIRSTMACH + 2) @@ -45,7 +47,7 @@ #define PT_SETREGS (PT_FIRSTMACH + 4) #define PT_MACHDEP_STRINGS \ - "(unused)", \ + "PT_STEP", \ "PT___GETREGS40", \ "PT___SETREGS40", \ "PT_GETREGS", \ Index: src/sys/arch/sh3/include/userret.h diff -u src/sys/arch/sh3/include/userret.h:1.10 src/sys/arch/sh3/include/userret.h:1.11 --- src/sys/arch/sh3/include/userret.h:1.10 Mon Nov 5 20:37:48 2007 +++ src/sys/arch/sh3/include/userret.h Fri Jan 28 21:06:07 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: userret.h,v 1.10 2007/11/05 20:37:48 ad Exp $ */ +/* $NetBSD: userret.h,v 1.11 2011/01/28 21:06:07 uwe Exp $ */ /* * Copyright (c) 1992, 1993 @@ -81,12 +81,39 @@ #include +#include +#include "opt_ptrace.h" + + static __inline void userret(struct lwp *l) { /* Invoke MI userret code */ mi_userret(l); + +#ifdef PTRACE + /* Check if lwp is being PT_STEP'ed */ + if (l->l_md.md_flags & MDP_SSTEP) { + struct trapframe *tf = l->l_md.md_regs; + + /* + * Channel A is set up for single stepping in sh_cpu_init(). + * Before RTE we write tf_ubc to BBRA and tf_spc to BARA. + */ +#ifdef SH3 + if (CPU_IS_SH3) { + tf->tf_ubc = UBC_CYCLE_INSN | UBC_CYCLE_READ +| SH3_UBC_CYCLE_CPU; + } +#endif +#ifdef SH4 + if (CPU_IS_SH4) { + tf->tf_ubc = UBC_CYCLE_INSN | UBC_CYCLE_READ; + } +#endif + } +#endif /* PTRACE */ } #endif /* !_SH3_USERRET_H_ */ Index: src/sys/arch/sh3/sh3/db_interface.c diff -u src/sys/arch/sh3/sh3/db_interface.c:1.60 src/sys/arch/sh3/sh3/db_interface.c:1.61 --- src/sys/arch/sh3/sh3/db_interface.c:1.60 Wed Jan 26 18:43:30 2011 +++ src/sys/arch/sh3/sh3/db_interface.c Fri Jan 28 21:06:07 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: db_interface.c,v 1.60 2011/01/26 18:43:30 uwe Exp $ */ +/* $NetBSD: db_interface.c,v 1.61 2011/01/28 21:06:07 uwe Exp $ */ /*- * Copyright (C) 2002 UCHIYAMA Yasushi. All rights reserved. @@ -28,7 +28,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: db_interface.c,v 1.60 2011/01/26 18:43:30 uwe Exp $"); +__KERNEL_RCSID(0, "$NetBSD: db_interface.c,v 1.61 2011/01/28 21:06:07 uwe Exp $"); #include "opt_ddb.h" #include "opt_kgdb.h" @@ -227,35 +227,21 @@ db_set_single_step(db_regs_t *regs) { - _reg_write_2(SH_(BBRA), 0); /* disable break */ - + /* + * Channel A is set up for single stepping in sh_cpu_init(). + * Before RTE we write tf_ubc to BBRA and tf_spc to BARA. + */ #ifdef SH3 if (CPU_IS_SH3) { - /* A: compare all address bits */ - _reg_write_4(SH3_BAMRA, 0x); - - /* A: break after execution, ignore ASID */ - _reg_write_4(SH3_BRCR, (UBC_CTL_A_AFTER_INSN - | SH3_UBC_CTL_A_MASK_ASID)); - - /* will be written to BBRA before RTE */ regs->tf_ubc = UBC_CYCLE_INSN | UBC_CYCLE_READ | SH3_UBC_CYCLE_CPU; } -#endif /* SH3 */ - +#endif #ifdef SH4 if (CPU_IS_SH4) { - /* A: compare all address bits, ignore ASID */ - _reg_write_1(SH4_BAMRA, SH4_UBC_MASK_NONE | SH4_UBC_MASK_ASID); - - /* A: break after execution */ - _reg_write_2(SH4_BRCR, UBC_CTL_A_AFTER_INSN); - - /* will be written to BBRA before RTE */ regs->tf_ubc = UBC_CYCLE_INSN | UBC_CYCLE_READ; } -#endif /* SH4 */ +#endif } void Index: src/sys/arch/sh3/sh3/exception.c diff -u src/sys/arch/sh3/sh3/exception.c:1.60 src/sys/arch/sh3/sh3/exception.c:1.61 --- src/sys/arch/sh3/sh3/exception.c:1.60 Thu Jan 27 01:01:55 2011 +++ src/sys/arch/sh3/sh3/exception.c Fri Jan 28 21:06:08 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: exception.c,
CVS commit: src
Module Name:src Committed By: phx Date: Fri Jan 28 22:15:36 UTC 2011 Modified Files: src/distrib/sandpoint: Makefile src/distrib/sets/lists/base: md.sandpoint src/sys/arch/sandpoint: Makefile src/sys/arch/sandpoint/stand/altboot: Makefile Added Files: src/sys/arch/sandpoint/stand: Makefile.inc Log Message: Included sys/arc/sandpoint/stand/altboot in the build process. Install altboot and altboot.bin in /usr/mdec and copy them also into the installation directory of the sandpoint release. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/distrib/sandpoint/Makefile cvs rdiff -u -r1.6 -r1.7 src/distrib/sets/lists/base/md.sandpoint cvs rdiff -u -r1.2 -r1.3 src/sys/arch/sandpoint/Makefile cvs rdiff -u -r0 -r1.1 src/sys/arch/sandpoint/stand/Makefile.inc cvs rdiff -u -r1.6 -r1.7 src/sys/arch/sandpoint/stand/altboot/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sandpoint/Makefile diff -u src/distrib/sandpoint/Makefile:1.5 src/distrib/sandpoint/Makefile:1.6 --- src/distrib/sandpoint/Makefile:1.5 Thu Oct 25 14:20:55 2007 +++ src/distrib/sandpoint/Makefile Fri Jan 28 22:15:35 2011 @@ -1,8 +1,19 @@ -# $NetBSD: Makefile,v 1.5 2007/10/25 14:20:55 nisimura Exp $ +# $NetBSD: Makefile,v 1.6 2011/01/28 22:15:35 phx Exp $ + +.include +.include "${NETBSDSRCDIR}/distrib/common/Makefile.distrib" + +.include SUBDIR= ramdisk .WAIT md-kernel cdroms TARGETS+= release +BOOTOBJ!= cd ${KERNSRCDIR}/arch/sandpoint/stand/altboot && ${PRINTOBJDIR} +ALTBOOTERS= ${BOOTOBJ}/altboot ${BOOTOBJ}/altboot.bin + +release: check_RELEASEDIR .WAIT ${ALTBOOTERS} + ${RELEASE_INSTALL} ${ALTBOOTERS} ${RELEASEDIR}/${RELEASEMACHINEDIR}/installation + iso_image: ${MAKEDIRTARGET} cdroms iso_image Index: src/distrib/sets/lists/base/md.sandpoint diff -u src/distrib/sets/lists/base/md.sandpoint:1.6 src/distrib/sets/lists/base/md.sandpoint:1.7 --- src/distrib/sets/lists/base/md.sandpoint:1.6 Sat Nov 29 17:57:34 2008 +++ src/distrib/sets/lists/base/md.sandpoint Fri Jan 28 22:15:35 2011 @@ -1,2 +1,4 @@ -# $NetBSD: md.sandpoint,v 1.6 2008/11/29 17:57:34 tsutsui Exp $ +# $NetBSD: md.sandpoint,v 1.7 2011/01/28 22:15:35 phx Exp $ ./dev/pms0 base-obsolete obsolete +./usr/mdec/altbootbase-sysutil-bin +./usr/mdec/altboot.binbase-sysutil-bin Index: src/sys/arch/sandpoint/Makefile diff -u src/sys/arch/sandpoint/Makefile:1.2 src/sys/arch/sandpoint/Makefile:1.3 --- src/sys/arch/sandpoint/Makefile:1.2 Mon Jan 6 17:40:47 2003 +++ src/sys/arch/sandpoint/Makefile Fri Jan 28 22:15:36 2011 @@ -1,5 +1,5 @@ -# $NetBSD: Makefile,v 1.2 2003/01/06 17:40:47 lukem Exp $ +# $NetBSD: Makefile,v 1.3 2011/01/28 22:15:36 phx Exp $ -SUBDIR= compile include +SUBDIR= compile include stand .include Index: src/sys/arch/sandpoint/stand/altboot/Makefile diff -u src/sys/arch/sandpoint/stand/altboot/Makefile:1.6 src/sys/arch/sandpoint/stand/altboot/Makefile:1.7 --- src/sys/arch/sandpoint/stand/altboot/Makefile:1.6 Thu Jan 27 16:13:51 2011 +++ src/sys/arch/sandpoint/stand/altboot/Makefile Fri Jan 28 22:15:36 2011 @@ -1,8 +1,9 @@ -# $NetBSD: Makefile,v 1.6 2011/01/27 16:13:51 phx Exp $ +# $NetBSD: Makefile,v 1.7 2011/01/28 22:15:36 phx Exp $ S= ${.CURDIR}/../../../.. PROG= altboot +FILES+= ${PROG}.bin NOMAN= # defined SRCS= entry.S main.c brdsetup.c pci.c devopen.c dev_net.c nif.c SRCS+= fxp.c tlp.c rge.c skg.c dsk.c pciide.c siisata.c printf.c Added files: Index: src/sys/arch/sandpoint/stand/Makefile.inc diff -u /dev/null src/sys/arch/sandpoint/stand/Makefile.inc:1.1 --- /dev/null Fri Jan 28 22:15:36 2011 +++ src/sys/arch/sandpoint/stand/Makefile.inc Fri Jan 28 22:15:36 2011 @@ -0,0 +1,3 @@ +# $NetBSD: Makefile.inc,v 1.1 2011/01/28 22:15:36 phx Exp $ + +BINDIR= /usr/mdec
CVS commit: [bouyer-quota2] src
Module Name:src Committed By: bouyer Date: Fri Jan 28 22:15:36 UTC 2011 Modified Files: src/tests/fs/ffs/clients [bouyer-quota2]: Makefile src/usr.bin/quota [bouyer-quota2]: Makefile printquota.h quota.c Added Files: src/usr.bin/quota [bouyer-quota2]: getvfsquota.c getvfsquota.h Log Message: Rename getufsquota to getvfsquota, and abstract in its own file. To generate a diff of this commit: cvs rdiff -u -r1.1.2.1 -r1.1.2.2 src/tests/fs/ffs/clients/Makefile cvs rdiff -u -r1.6.64.2 -r1.6.64.3 src/usr.bin/quota/Makefile cvs rdiff -u -r0 -r1.1.2.1 src/usr.bin/quota/getvfsquota.c \ src/usr.bin/quota/getvfsquota.h cvs rdiff -u -r1.1.2.1 -r1.1.2.2 src/usr.bin/quota/printquota.h cvs rdiff -u -r1.33.2.2 -r1.33.2.3 src/usr.bin/quota/quota.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/fs/ffs/clients/Makefile diff -u src/tests/fs/ffs/clients/Makefile:1.1.2.1 src/tests/fs/ffs/clients/Makefile:1.1.2.2 --- src/tests/fs/ffs/clients/Makefile:1.1.2.1 Fri Jan 28 18:38:08 2011 +++ src/tests/fs/ffs/clients/Makefile Fri Jan 28 22:15:36 2011 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.1.2.1 2011/01/28 18:38:08 bouyer Exp $ +# $NetBSD: Makefile,v 1.1.2.2 2011/01/28 22:15:36 bouyer Exp $ # .include @@ -9,10 +9,11 @@ PROGS= rump_quota rump_repquota .PATH: ${NETBSDSRCDIR}/usr.bin/quota -SRCS.rump_quota= quota.c printquota.c quota_rumpops.c +SRCS.rump_quota= quota.c printquota.c getvfsquota.c quota_rumpops.c SRCS.rump_repquota= printquota.c quota_rumpops.c -CPPFLAGS.quota.c+= -I${NETBSDSRCDIR}/sys -I${NETBSDSRCDIR}/usr.bin/quota -CPPFLAGS.printquota.c+= -I${NETBSDSRCDIR}/sys -I${NETBSDSRCDIR}/usr.bin/quota +CPPFLAGS.quota.c+= -I${NETBSDSRCDIR}/usr.bin/quota +CPPFLAGS.printquota.c+= -I${NETBSDSRCDIR}/usr.bin/quota +CPPFLAGS.getvfsquota.c+=-I${NETBSDSRCDIR}/usr.bin/quota -I${NETBSDSRCDIR}/sys .PATH: ${NETBSDSRCDIR}/usr.sbin/repquota SRCS.rump_repquota+= repquota.c @@ -20,7 +21,7 @@ .PATH: ${NETBSDSRCDIR}/sys/ufs/ufs SRCS.rump_quota+= quota2_prop.c -SRCS.rump_repquota+= quota2_prop.c +SRCS.rump_repquota+= quota2_prop.c quota1_subr.c CPPFLAGS.quota2_prop.c+=-I${NETBSDSRCDIR}/sys -I${NETBSDSRCDIR}/usr.bin/quota DPADD.rump_quota= ${LIBRPCSVC} ${LIBPROP} ${LIBRUMPCLIENT} Index: src/usr.bin/quota/Makefile diff -u src/usr.bin/quota/Makefile:1.6.64.2 src/usr.bin/quota/Makefile:1.6.64.3 --- src/usr.bin/quota/Makefile:1.6.64.2 Fri Jan 21 16:58:06 2011 +++ src/usr.bin/quota/Makefile Fri Jan 28 22:15:36 2011 @@ -1,9 +1,9 @@ -# $NetBSD: Makefile,v 1.6.64.2 2011/01/21 16:58:06 bouyer Exp $ +# $NetBSD: Makefile,v 1.6.64.3 2011/01/28 22:15:36 bouyer Exp $ # from: @(#)Makefile 8.1 (Berkeley) 6/6/93 .include PROG= quota -SRCS= quota.c printquota.c +SRCS= quota.c printquota.c getvfsquota.c CPPFLAGS+=-I${NETBSDSRCDIR}/sys -I${NETBSDSRCDIR}/usr.bin/quota DPADD= ${LIBRPCSVC} ${LIBPROP} Index: src/usr.bin/quota/printquota.h diff -u src/usr.bin/quota/printquota.h:1.1.2.1 src/usr.bin/quota/printquota.h:1.1.2.2 --- src/usr.bin/quota/printquota.h:1.1.2.1 Fri Jan 21 16:58:06 2011 +++ src/usr.bin/quota/printquota.h Fri Jan 28 22:15:36 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: printquota.h,v 1.1.2.1 2011/01/21 16:58:06 bouyer Exp $ */ +/* $NetBSD: printquota.h,v 1.1.2.2 2011/01/28 22:15:36 bouyer Exp $ */ const char *intprt(uint64_t, int, int); const char *timeprt(time_t); Index: src/usr.bin/quota/quota.c diff -u src/usr.bin/quota/quota.c:1.33.2.2 src/usr.bin/quota/quota.c:1.33.2.3 --- src/usr.bin/quota/quota.c:1.33.2.2 Fri Jan 21 16:58:06 2011 +++ src/usr.bin/quota/quota.c Fri Jan 28 22:15:36 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: quota.c,v 1.33.2.2 2011/01/21 16:58:06 bouyer Exp $ */ +/* $NetBSD: quota.c,v 1.33.2.3 2011/01/28 22:15:36 bouyer Exp $ */ /* * Copyright (c) 1980, 1990, 1993 @@ -42,7 +42,7 @@ #if 0 static char sccsid[] = "@(#)quota.c 8.4 (Berkeley) 4/28/95"; #else -__RCSID("$NetBSD: quota.c,v 1.33.2.2 2011/01/21 16:58:06 bouyer Exp $"); +__RCSID("$NetBSD: quota.c,v 1.33.2.3 2011/01/28 22:15:36 bouyer Exp $"); #endif #endif /* not lint */ @@ -56,9 +56,6 @@ #include #include -#include -#include - #include #include #include @@ -72,11 +69,14 @@ #include #include +#include + #include #include #include #include +#include struct quotause { struct quotause *next; @@ -100,10 +100,6 @@ void showusrname(const char *); void usage(void); -extern const char *qfextension[]; - -int getufsquota(const char *, struct quota2_entry *, long, int, int, int); - int qflag = 0; int vflag = 0; int hflag = 0; @@ -489,7 +485,7 @@ } else if (strncmp(fst[i].f_fstypename, "ffs", sizeof(fst[i].f_fstypename)) == 0 && (fst[i].f_flag & ST_QUOTA) != 0) { - if (getufsquota(fst[i].f_mntonname, &qup->q2e, + if (getvfsquota(fst[i].f_mntonname, &qup->q2e, id, quotatype, dflag, Dflag) == 0) continue; } else @@ -658,104 +654,3
CVS commit: [bouyer-quota2] src/sys/ufs/ufs
Module Name:src Committed By: bouyer Date: Fri Jan 28 23:30:35 UTC 2011 Modified Files: src/sys/ufs/ufs [bouyer-quota2]: quota2_subr.c Log Message: Add RCSID To generate a diff of this commit: cvs rdiff -u -r1.1.2.2 -r1.1.2.3 src/sys/ufs/ufs/quota2_subr.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/ufs/ufs/quota2_subr.c diff -u src/sys/ufs/ufs/quota2_subr.c:1.1.2.2 src/sys/ufs/ufs/quota2_subr.c:1.1.2.3 --- src/sys/ufs/ufs/quota2_subr.c:1.1.2.2 Fri Jan 28 18:36:06 2011 +++ src/sys/ufs/ufs/quota2_subr.c Fri Jan 28 23:30:34 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: quota2_subr.c,v 1.1.2.2 2011/01/28 18:36:06 bouyer Exp $ */ +/* $NetBSD: quota2_subr.c,v 1.1.2.3 2011/01/28 23:30:34 bouyer Exp $ */ /*- * Copyright (c) 2010 Manuel Bouyer * All rights reserved. @@ -27,6 +27,9 @@ * POSSIBILITY OF SUCH DAMAGE. */ +#include +__KERNEL_RCSID(0, "$NetBSD: quota2_subr.c,v 1.1.2.3 2011/01/28 23:30:34 bouyer Exp $"); + #include #include
CVS commit: [bouyer-quota2] src/sys/ufs/ufs
Module Name:src Committed By: bouyer Date: Fri Jan 28 23:31:16 UTC 2011 Modified Files: src/sys/ufs/ufs [bouyer-quota2]: quota1.h Added Files: src/sys/ufs/ufs [bouyer-quota2]: quota1_subr.c Log Message: Add conversion functions between old and new format. To generate a diff of this commit: cvs rdiff -u -r1.1.2.1 -r1.1.2.2 src/sys/ufs/ufs/quota1.h cvs rdiff -u -r0 -r1.1.2.1 src/sys/ufs/ufs/quota1_subr.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/ufs/ufs/quota1.h diff -u src/sys/ufs/ufs/quota1.h:1.1.2.1 src/sys/ufs/ufs/quota1.h:1.1.2.2 --- src/sys/ufs/ufs/quota1.h:1.1.2.1 Thu Jan 20 14:25:03 2011 +++ src/sys/ufs/ufs/quota1.h Fri Jan 28 23:31:16 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: quota1.h,v 1.1.2.1 2011/01/20 14:25:03 bouyer Exp $ */ +/* $NetBSD: quota1.h,v 1.1.2.2 2011/01/28 23:31:16 bouyer Exp $ */ /* * Copyright (c) 1982, 1986, 1993 @@ -92,4 +92,8 @@ int32_t dqb_itime; /* time limit for excessive files */ }; +/* quota1_subr.c */ +void dqblk2q2e(const struct dqblk *, struct quota2_entry *); +void q2e2dqblk(const struct quota2_entry *, struct dqblk *); + #endif /* !_UFS_UFS_QUOTA1_H_ */ Added files: Index: src/sys/ufs/ufs/quota1_subr.c diff -u /dev/null src/sys/ufs/ufs/quota1_subr.c:1.1.2.1 --- /dev/null Fri Jan 28 23:31:16 2011 +++ src/sys/ufs/ufs/quota1_subr.c Fri Jan 28 23:31:16 2011 @@ -0,0 +1,95 @@ +/* $NetBSD: quota1_subr.c,v 1.1.2.1 2011/01/28 23:31:16 bouyer Exp $ */ +/*- + * Copyright (c) 2010 Manuel Bouyer + * All rights reserved. + * This software is distributed under the following condiions + * compliant with the NetBSD foundation policy. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +#include +__KERNEL_RCSID(0, "$NetBSD: quota1_subr.c,v 1.1.2.1 2011/01/28 23:31:16 bouyer Exp $"); + +#include +#include + +#include +#include + +static uint64_t +dqblk2q2e_limit(uint32_t lim) +{ + if (lim == 0) + return UQUAD_MAX; + else if (lim == 1) + return 0; + else + return lim; +} + +static uint32_t +q2e2dqblk_limit(uint64_t lim) +{ + if (lim == UQUAD_MAX) + return 0; + else if (lim == 0) + return 1; + else + return lim; +} + +void +dqblk2q2e(const struct dqblk *dqblk, struct quota2_entry *q2e) +{ + q2e->q2e_val[Q2V_BLOCK].q2v_hardlimit = + dqblk2q2e_limit(dqblk->dqb_bhardlimit); + q2e->q2e_val[Q2V_BLOCK].q2v_softlimit = + dqblk2q2e_limit(dqblk->dqb_bsoftlimit); + q2e->q2e_val[Q2V_BLOCK].q2v_cur = dqblk->dqb_curblocks; + q2e->q2e_val[Q2V_BLOCK].q2v_time = dqblk->dqb_btime; + + q2e->q2e_val[Q2V_FILE].q2v_hardlimit = + dqblk2q2e_limit(dqblk->dqb_ihardlimit); + q2e->q2e_val[Q2V_FILE].q2v_softlimit = + dqblk2q2e_limit(dqblk->dqb_isoftlimit); + q2e->q2e_val[Q2V_FILE].q2v_cur = dqblk->dqb_curinodes; + q2e->q2e_val[Q2V_FILE].q2v_time = dqblk->dqb_itime; +} + +void +q2e2dqblk(const struct quota2_entry *q2e, struct dqblk *dqblk) +{ + dqblk->dqb_bhardlimit = + q2e2dqblk_limit(q2e->q2e_val[Q2V_BLOCK].q2v_hardlimit); + dqblk->dqb_bsoftlimit = + q2e2dqblk_limit(q2e->q2e_val[Q2V_BLOCK].q2v_softlimit); + dqblk->dqb_curblocks = q2e->q2e_val[Q2V_BLOCK].q2v_cur; + dqblk->dqb_btime = q2e->q2e_val[Q2V_BLOCK].q2v_time; + + dqblk->dqb_ihardlimit = + q2e2dqblk_limit(q2e->q2e_val[Q2V_FILE].q2v_hardlimit); + dqblk->dqb_isoftlimit = + q2e2dqblk_limit(q2e->q2e_val[Q2V_FILE].q2v_softlimit); + dqblk->dqb_curinodes = q2e->q2e_val[Q2V_FILE].q2v_cur; + dqblk->dqb_itime = q2e->q2e_val[Q2V_FILE].q2v_time; +}
CVS commit: src/sys
Module Name:src Committed By: haad Date: Fri Jan 28 23:54:28 UTC 2011 Modified Files: src/sys/dev/pud: pud.c Added Files: src/sys/modules/pud: Makefile Log Message: Add support for building pud as module. Do it in a same way how putter is done. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/sys/dev/pud/pud.c cvs rdiff -u -r0 -r1.1 src/sys/modules/pud/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/pud/pud.c diff -u src/sys/dev/pud/pud.c:1.8 src/sys/dev/pud/pud.c:1.9 --- src/sys/dev/pud/pud.c:1.8 Wed Mar 18 10:22:41 2009 +++ src/sys/dev/pud/pud.c Fri Jan 28 23:54:28 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: pud.c,v 1.8 2009/03/18 10:22:41 cegger Exp $ */ +/* $NetBSD: pud.c,v 1.9 2011/01/28 23:54:28 haad Exp $ */ /* * Copyright (c) 2007 Antti Kantee. All Rights Reserved. @@ -29,11 +29,12 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pud.c,v 1.8 2009/03/18 10:22:41 cegger Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pud.c,v 1.9 2011/01/28 23:54:28 haad Exp $"); #include #include #include +#include #include #include @@ -381,3 +382,28 @@ } mutex_init(&pud_mtx, MUTEX_DEFAULT, IPL_NONE); } + +MODULE(MODULE_CLASS_DRIVER, pud, putter); + +static int +pud_modcmd(modcmd_t cmd, void *arg) +{ + #ifdef _MODULE + devmajor_t bmajor = NODEVMAJOR, cmajor = NODEVMAJOR; + + switch (cmd) { + case MODULE_CMD_INIT: + pudattach(); + return devsw_attach("pud", NULL, &bmajor, + &pud_cdevsw, &cmajor); + case MODULE_CMD_FINI: + return ENOTTY; /* XXX: puddetach */ + default: + return ENOTTY; + } + #else + if (cmd == MODULE_CMD_INIT) + return 0; + return ENOTTY; + #endif +} Added files: Index: src/sys/modules/pud/Makefile diff -u /dev/null src/sys/modules/pud/Makefile:1.1 --- /dev/null Fri Jan 28 23:54:28 2011 +++ src/sys/modules/pud/Makefile Fri Jan 28 23:54:28 2011 @@ -0,0 +1,10 @@ +# $NetBSD: Makefile,v 1.1 2011/01/28 23:54:28 haad Exp $ + +.include "../Makefile.inc" + +.PATH: ${S}/dev/pud + +KMOD= pud +SRCS= pud.c pud_dev.c + +.include
CVS commit: src/sys/kern
Module Name:src Committed By: christos Date: Sat Jan 29 00:38:25 UTC 2011 Modified Files: src/sys/kern: kern_verifiedexec.c Log Message: allow get the size of the request sysctls to work. To generate a diff of this commit: cvs rdiff -u -r1.124 -r1.125 src/sys/kern/kern_verifiedexec.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/kern_verifiedexec.c diff -u src/sys/kern/kern_verifiedexec.c:1.124 src/sys/kern/kern_verifiedexec.c:1.125 --- src/sys/kern/kern_verifiedexec.c:1.124 Sat Jan 8 15:29:13 2011 +++ src/sys/kern/kern_verifiedexec.c Fri Jan 28 19:38:25 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_verifiedexec.c,v 1.124 2011/01/08 20:29:13 christos Exp $ */ +/* $NetBSD: kern_verifiedexec.c,v 1.125 2011/01/29 00:38:25 christos Exp $ */ /*- * Copyright (c) 2005, 2006 Elad Efrat @@ -29,7 +29,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: kern_verifiedexec.c,v 1.124 2011/01/08 20:29:13 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kern_verifiedexec.c,v 1.125 2011/01/29 00:38:25 christos Exp $"); #include "opt_veriexec.h" @@ -161,7 +161,7 @@ len = strlen(p) + 1; - if (*oldlenp < len) + if (*oldlenp < len && oldp) return ENOMEM; if (oldp && (error = copyout(p, oldp, len)) != 0)
CVS commit: src/sys/dev/marvell
Module Name:src Committed By: jakllsch Date: Sat Jan 29 01:53:19 UTC 2011 Modified Files: src/sys/dev/marvell: if_mvgbe.c Log Message: Use macros for ring position advances, assuming a power of two ring size. (Also, spelling correction in comment.) To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/dev/marvell/if_mvgbe.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/dev/marvell/if_mvgbe.c diff -u src/sys/dev/marvell/if_mvgbe.c:1.3 src/sys/dev/marvell/if_mvgbe.c:1.4 --- src/sys/dev/marvell/if_mvgbe.c:1.3 Sat Oct 2 05:57:42 2010 +++ src/sys/dev/marvell/if_mvgbe.c Sat Jan 29 01:53:18 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: if_mvgbe.c,v 1.3 2010/10/02 05:57:42 kiyohara Exp $ */ +/* $NetBSD: if_mvgbe.c,v 1.4 2011/01/29 01:53:18 jakllsch Exp $ */ /* * Copyright (c) 2007, 2008 KIYOHARA Takashi * All rights reserved. @@ -25,7 +25,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include -__KERNEL_RCSID(0, "$NetBSD: if_mvgbe.c,v 1.3 2010/10/02 05:57:42 kiyohara Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_mvgbe.c,v 1.4 2011/01/29 01:53:18 jakllsch Exp $"); #include "rnd.h" @@ -81,7 +81,16 @@ bus_space_set_region_4((sc)->sc_iot, (sc)->sc_dafh, (reg), (val), (c)) #define MVGBE_TX_RING_CNT 256 +#define MVGBE_TX_RING_MSK (MVGBE_TX_RING_CNT - 1) +#define MVGBE_TX_RING_NEXT(x) (((x) + 1) & MVGBE_TX_RING_MSK) #define MVGBE_RX_RING_CNT 256 +#define MVGBE_RX_RING_MSK (MVGBE_RX_RING_CNT - 1) +#define MVGBE_RX_RING_NEXT(x) (((x) + 1) & MVGBE_RX_RING_MSK) + +CTASSERT(MVGBE_TX_RING_CNT > 1 && MVGBE_TX_RING_NEXT(MVGBE_TX_RING_CNT) == + (MVGBE_TX_RING_CNT + 1) % MVGBE_TX_RING_CNT); +CTASSERT(MVGBE_RX_RING_CNT > 1 && MVGBE_RX_RING_NEXT(MVGBE_RX_RING_CNT) == + (MVGBE_RX_RING_CNT + 1) % MVGBE_RX_RING_CNT); #define MVGBE_JSLOTS 384 /* */ #define MVGBE_JLEN (MVGBE_MRU + MVGBE_BUF_ALIGN) @@ -1014,8 +1023,8 @@ MVGBE_WRITE(sc, MVGBE_SDC, MVGBE_SDC_RXBSZ_16_64BITWORDS | #if BYTE_ORDER == LITTLE_ENDIAN - MVGBE_SDC_BLMR | /* Big/Litlle Endian Receive Mode: No swap */ - MVGBE_SDC_BLMT | /* Big/Litlle Endian Transmit Mode: No swap */ + MVGBE_SDC_BLMR | /* Big/Little Endian Receive Mode: No swap */ + MVGBE_SDC_BLMT | /* Big/Little Endian Transmit Mode: No swap */ #endif MVGBE_SDC_TXBSZ_16_64BITWORDS); @@ -1543,7 +1552,7 @@ f->bytecnt = txseg[i].ds_len; f->cmdsts = MVGBE_BUFFER_OWNED_BY_DMA; last = current; - current = (current + 1) % MVGBE_TX_RING_CNT; + current = MVGBE_TX_RING_NEXT(current); } if (m_csumflags & M_CSUM_IPv4) @@ -1650,7 +1659,7 @@ cdata->mvgbe_rx_map[idx] = NULL; - idx = (idx + 1) % MVGBE_RX_RING_CNT; + idx = MVGBE_RX_RING_NEXT(idx); if (rxstat & MVGBE_ERROR_SUMMARY) { #if 0 @@ -1783,7 +1792,7 @@ cdata->mvgbe_tx_map[idx] = NULL; } cdata->mvgbe_tx_cnt--; - idx = (idx + 1) % MVGBE_TX_RING_CNT; + idx = MVGBE_TX_RING_NEXT(idx); } if (cdata->mvgbe_tx_cnt == 0) ifp->if_timer = 0;
CVS commit: src/distrib/amd64/cdroms
Module Name:src Committed By: jym Date: Sat Jan 29 01:54:33 UTC 2011 Modified Files: src/distrib/amd64/cdroms: Makefile.cdrom Log Message: Mirror a change that was made on i386 by gdt@. XXX i386 and amd64 distrib have lots in common, maybe more files/logic could/should be shared. Message log reads: Use ${INSTALL} ${COPY} instead of ${CP}. This avoids a problem where files with mode 0400 (CVSREAD=t) are copied to OBJDIR and then can't be re-copied on a subsequent build. ok joerg@ To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/distrib/amd64/cdroms/Makefile.cdrom Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/amd64/cdroms/Makefile.cdrom diff -u src/distrib/amd64/cdroms/Makefile.cdrom:1.2 src/distrib/amd64/cdroms/Makefile.cdrom:1.3 --- src/distrib/amd64/cdroms/Makefile.cdrom:1.2 Tue Jan 18 00:16:13 2011 +++ src/distrib/amd64/cdroms/Makefile.cdrom Sat Jan 29 01:54:33 2011 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.cdrom,v 1.2 2011/01/18 00:16:13 jym Exp $ +# $NetBSD: Makefile.cdrom,v 1.3 2011/01/29 01:54:33 jym Exp $ .include @@ -55,15 +55,15 @@ image_md_pre: ${MKDIR} cdrom/libexec/dhcpcd-hooks - ${CP} ${.CURDIR}/../../../common/10-resolv.conf cdrom/libexec/dhcpcd-hooks - ${CP} ${.CURDIR}/../../../common/99-print-sysinst cdrom/libexec/dhcpcd-hooks + ${INSTALL} ${COPY} ${.CURDIR}/../../../common/10-resolv.conf cdrom/libexec/dhcpcd-hooks + ${INSTALL} ${COPY} ${.CURDIR}/../../../common/99-print-sysinst cdrom/libexec/dhcpcd-hooks ${MKDIR} cdrom/etc ${HOST_LN} -fs /tmp/gettytab cdrom/etc/gettytab ${INSTALL} ${COPY} ${.CURDIR}/../etc.ttys cdrom/etc/ttys ${INSTALL} ${COPY} ${.CURDIR}/../etc.rc cdrom/etc/rc ${INSTALL} ${COPY} -m 0555 ${.CURDIR}/../install.sh cdrom/install.sh ${MKDIR} cdrom/mnt2 cdrom/targetroot - ${CP} ${SYSINSTDIR}/sysinst cdrom + ${INSTALL} ${COPY} ${SYSINSTDIR}/sysinst cdrom ${CHMOD} ugo+rx cdrom/sysinst - ${CP} ${SYSINSTDIR}/sysinstmsgs.?? cdrom + ${INSTALL} ${COPY} ${SYSINSTDIR}/sysinstmsgs.?? cdrom ${MKDIR} cdrom/var
CVS commit: src/bin/date
Module Name:src Committed By: christos Date: Sat Jan 29 02:16:52 UTC 2011 Modified Files: src/bin/date: date.c netdate.c Log Message: revert the revert and fix the code properly. To generate a diff of this commit: cvs rdiff -u -r1.58 -r1.59 src/bin/date/date.c cvs rdiff -u -r1.29 -r1.30 src/bin/date/netdate.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/bin/date/date.c diff -u src/bin/date/date.c:1.58 src/bin/date/date.c:1.59 --- src/bin/date/date.c:1.58 Fri Jan 28 15:23:38 2011 +++ src/bin/date/date.c Fri Jan 28 21:16:52 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: date.c,v 1.58 2011/01/28 20:23:38 drochner Exp $ */ +/* $NetBSD: date.c,v 1.59 2011/01/29 02:16:52 christos Exp $ */ /* * Copyright (c) 1985, 1987, 1988, 1993 @@ -40,7 +40,7 @@ #if 0 static char sccsid[] = "@(#)date.c 8.2 (Berkeley) 4/28/95"; #else -__RCSID("$NetBSD: date.c,v 1.58 2011/01/28 20:23:38 drochner Exp $"); +__RCSID("$NetBSD: date.c,v 1.59 2011/01/29 02:16:52 christos Exp $"); #endif #endif /* not lint */ @@ -50,6 +50,7 @@ #include #include #include +#include #include #include #include @@ -64,13 +65,12 @@ static time_t tval; static int aflag, jflag, rflag, nflag; -int retval; static void badformat(void); static void badtime(void); static void badvalue(const char *); static void setthetime(const char *); -static void usage(void); +static void usage(void) __attribute__((__noreturn__)); int main(int argc, char *argv[]) @@ -79,6 +79,8 @@ size_t bufsiz; const char *format; int ch; + long long val; + struct tm *tm; setprogname(argv[0]); (void)setlocale(LC_ALL, ""); @@ -92,8 +94,9 @@ case 'd': rflag = 1; tval = parsedate(optarg, NULL, NULL); - if (tval == -1) -errx(1, "Cannot parse `%s'", optarg); + if (tval == -1) +badarg: errx(EXIT_FAILURE, +"Cannot parse `%s'", optarg); break; case 'j': /* don't set time */ jflag = 1; @@ -102,8 +105,15 @@ nflag = 1; break; case 'r': /* user specified seconds */ + errno = 0; + val = strtoll(optarg, &buf, 0); + if (optarg[0] == '\0' || *buf != '\0') +goto badarg; + if (errno == ERANGE && (val == LLONG_MAX || + val == LLONG_MIN)) +err(EXIT_FAILURE, "Bad number `%s'", optarg); rflag = 1; - tval = strtoll(optarg, NULL, 0); + tval = (time_t)val; break; case 'u': /* do everything in UTC */ (void)setenv("TZ", "UTC0", 1); @@ -118,13 +128,13 @@ if (!rflag && time(&tval) == -1) err(EXIT_FAILURE, "time"); - format = "+%a %b %e %H:%M:%S %Z %Y"; /* allow the operands in any order */ if (*argv && **argv == '+') { format = *argv; ++argv; - } + } else + format = "+%a %b %e %H:%M:%S %Z %Y"; if (*argv) { setthetime(*argv); @@ -136,14 +146,19 @@ if ((buf = malloc(bufsiz = 1024)) == NULL) goto bad; - while (strftime(buf, bufsiz, format, localtime(&tval)) == 0) + + if ((tm = localtime(&tval)) == NULL) + err(EXIT_FAILURE, "localtime %lld failed", (long long)tval); + + while (strftime(buf, bufsiz, format, tm) == 0) if ((buf = realloc(buf, bufsiz <<= 1)) == NULL) goto bad; - (void)printf("%s\n", buf+1); + + (void)printf("%s\n", buf + 1); free(buf); return 0; bad: - err(1, "Cannot allocate format buffer"); + err(EXIT_FAILURE, "Cannot allocate format buffer"); } static void @@ -189,7 +204,8 @@ badformat(); } - lt = localtime(&tval); + if ((lt = localtime(&tval)) == NULL) + err(EXIT_FAILURE, "localtime %lld failed", (long long)tval); lt->tm_isdst = -1; /* Divine correct DST */ @@ -317,7 +333,8 @@ usage(void) { (void)fprintf(stderr, - "usage: %s [-ajnu] [-d date] [-r seconds] [+format]", getprogname()); + "Usage: %s [-ajnu] [-d date] [-r seconds] [+format]", + getprogname()); (void)fprintf(stderr, " [[CC]yy]mm]dd]HH]MM[.SS]]\n"); exit(EXIT_FAILURE); /* NOTREACHED */ Index: src/bin/date/netdate.c diff -u src/bin/date/netdate.c:1.29 src/bin/date/netdate.c:1.30 --- src/bin/date/netdate.c:1.29 Fri Jan 28 15:23:38 2011 +++ src/bin/date/netdate.c Fri Jan 28 21:16:52 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: netdate.c,v 1.29 2011/01/28 20:23:38 drochner Exp $ */ +/* $NetBSD: netdate.c,v 1.30 2011/01/29 02:16:52 christos Exp $ */ /*- * Copyright (c) 1990, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)netdate.c 8.2 (Berkeley) 4/28/95"; #else -__RCSID("$NetBSD: netdate.c,v 1.29 2011/01/28 20:23:38 drochner Exp $"); +__RCSID("$NetBSD: netdate.c,v 1.30 2011/01/29 02:16:52 christos Exp $"); #endif #endif /* not lint */ @@ -59,8 +59,6 @@ #define WAITACK 2000 /* milliseconds */ #define WAITDATEACK 5000 /* milliseconds */ -extern int retval; - static const char * tsp_type_to_string(const struct tsp *msg) { @@ -75,7 +73,7 @@ * new date to the local timedaemon. If the timedaemon is in the master state, * it performs the correction on all slaves. If it is in the slave state
CVS commit: xsrc/external/mit/xf86-input-synaptics/dist
Module Name:xsrc Committed By: mrg Date: Sat Jan 29 02:17:22 UTC 2011 Update of /cvsroot/xsrc/external/mit/xf86-input-synaptics/dist In directory ivanova.netbsd.org:/tmp/cvs-serv17735 Log Message: initial import of xf86-input-synaptics-1.3.0 Status: Vendor Tag: xorg Release Tags: xf86-input-synaptics-1-3-0 N xsrc/external/mit/xf86-input-synaptics/dist/COPYING N xsrc/external/mit/xf86-input-synaptics/dist/Makefile.am N xsrc/external/mit/xf86-input-synaptics/dist/README N xsrc/external/mit/xf86-input-synaptics/dist/aclocal.m4 N xsrc/external/mit/xf86-input-synaptics/dist/INSTALL N xsrc/external/mit/xf86-input-synaptics/dist/config.sub N xsrc/external/mit/xf86-input-synaptics/dist/missing N xsrc/external/mit/xf86-input-synaptics/dist/ChangeLog N xsrc/external/mit/xf86-input-synaptics/dist/xorg-synaptics.pc.in N xsrc/external/mit/xf86-input-synaptics/dist/config.guess N xsrc/external/mit/xf86-input-synaptics/dist/Makefile.in N xsrc/external/mit/xf86-input-synaptics/dist/configure.ac N xsrc/external/mit/xf86-input-synaptics/dist/install-sh N xsrc/external/mit/xf86-input-synaptics/dist/ltmain.sh N xsrc/external/mit/xf86-input-synaptics/dist/config.h.in N xsrc/external/mit/xf86-input-synaptics/dist/configure N xsrc/external/mit/xf86-input-synaptics/dist/depcomp N xsrc/external/mit/xf86-input-synaptics/dist/conf/50-synaptics.conf N xsrc/external/mit/xf86-input-synaptics/dist/conf/Makefile.am N xsrc/external/mit/xf86-input-synaptics/dist/conf/11-x11-synaptics.fdi N xsrc/external/mit/xf86-input-synaptics/dist/conf/Makefile.in N xsrc/external/mit/xf86-input-synaptics/dist/tools/syndaemon.c N xsrc/external/mit/xf86-input-synaptics/dist/tools/Makefile.am N xsrc/external/mit/xf86-input-synaptics/dist/tools/Makefile.in N xsrc/external/mit/xf86-input-synaptics/dist/tools/synclient.c N xsrc/external/mit/xf86-input-synaptics/dist/man/syndaemon.man N xsrc/external/mit/xf86-input-synaptics/dist/man/Makefile.am N xsrc/external/mit/xf86-input-synaptics/dist/man/Makefile.in N xsrc/external/mit/xf86-input-synaptics/dist/man/synclient.man N xsrc/external/mit/xf86-input-synaptics/dist/man/synaptics.man N xsrc/external/mit/xf86-input-synaptics/dist/include/synaptics.h N xsrc/external/mit/xf86-input-synaptics/dist/include/Makefile.am N xsrc/external/mit/xf86-input-synaptics/dist/include/Makefile.in N xsrc/external/mit/xf86-input-synaptics/dist/include/synaptics-properties.h N xsrc/external/mit/xf86-input-synaptics/dist/src/synapticsstr.h N xsrc/external/mit/xf86-input-synaptics/dist/src/eventcomm.c N xsrc/external/mit/xf86-input-synaptics/dist/src/Makefile.am N xsrc/external/mit/xf86-input-synaptics/dist/src/alpscomm.c N xsrc/external/mit/xf86-input-synaptics/dist/src/properties.c N xsrc/external/mit/xf86-input-synaptics/dist/src/psmcomm.c N xsrc/external/mit/xf86-input-synaptics/dist/src/synaptics.c N xsrc/external/mit/xf86-input-synaptics/dist/src/Makefile.in N xsrc/external/mit/xf86-input-synaptics/dist/src/ps2comm.c N xsrc/external/mit/xf86-input-synaptics/dist/src/eventcomm.h N xsrc/external/mit/xf86-input-synaptics/dist/src/alpscomm.h N xsrc/external/mit/xf86-input-synaptics/dist/src/ps2comm.h N xsrc/external/mit/xf86-input-synaptics/dist/src/synproto.h No conflicts created by this import
CVS commit: src/lib/libc/arch/powerpc/string
Module Name:src Committed By: matt Date: Sat Jan 29 02:21:20 UTC 2011 Modified Files: src/lib/libc/arch/powerpc/string: bzero.S Log Message: Don't use r0 to restore LR, use r7 instead. To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/lib/libc/arch/powerpc/string/bzero.S 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/arch/powerpc/string/bzero.S diff -u src/lib/libc/arch/powerpc/string/bzero.S:1.10 src/lib/libc/arch/powerpc/string/bzero.S:1.11 --- src/lib/libc/arch/powerpc/string/bzero.S:1.10 Wed Jan 19 02:47:01 2011 +++ src/lib/libc/arch/powerpc/string/bzero.S Sat Jan 29 02:21:20 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: bzero.S,v 1.10 2011/01/19 02:47:01 matt Exp $ */ +/* $NetBSD: bzero.S,v 1.11 2011/01/29 02:21:20 matt Exp $ */ /*- * Copyright (C) 2001 Martin J. Laubach @@ -32,7 +32,7 @@ #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: bzero.S,v 1.10 2011/01/19 02:47:01 matt Exp $") +__RCSID("$NetBSD: bzero.S,v 1.11 2011/01/29 02:21:20 matt Exp $") #endif /* LIBC_SCCS && !lint */ #ifdef _KERNEL @@ -60,10 +60,10 @@ END(bzero) ENTRY(memset) - cmplwi cr1, %r5, 0 + cmplwi %cr1, %r5, 0 mr. %r0, %r4 mr %r8, %r3 - beqlr- cr1 /* Nothing to do */ + beqlr- %cr1 /* Nothing to do */ rlwimi %r0, %r4, 8, 16, 23 /* word extend fill value */ rlwimi %r0, %r0, 16, 0, 15 @@ -167,8 +167,8 @@ lwz %r30, R30_SAVE(%r1) #endif addi %r1, %r1, STKFRAME_SZ - lwz %r0, 4(%r1) - mtlr %r0 + lwz %r7, 4(%r1) + mtlr %r7 cntlzw %r6, %r9 /* compute shift value */ li %r5, 31 @@ -213,10 +213,10 @@ #endif /* _KERNEL */ /* Back in memory filling business */ - cmplwi cr1, r_len, 0 /* Nothing to do? */ + cmplwi %cr1, r_len, 0 /* Nothing to do? */ add %r5, %r9, %r9 cmplw r_len, %r5 /* <= 2*CL bytes to move? */ - beqlr- cr1 /* then do nothing */ + beqlr- %cr1 /* then do nothing */ blt+ simple_fill /* a trivial fill routine */ @@ -277,9 +277,9 @@ bdnz 1b cblocks_done: /* still CL aligned, but less than CL bytes left */ - cmplwi cr1, r_len, 0 + cmplwi %cr1, r_len, 0 cmplwi r_len, 8 - beq- cr1, sf_return + beq- %cr1, sf_return blt- sf_bytewise /* <8 remaining? */ b sf_aligned_w @@ -292,12 +292,12 @@ simple_fill: #if USE_STSWX - cmplwi cr1, r_len, 12 /* < 12 bytes to move? */ + cmplwi %cr1, r_len, 12 /* < 12 bytes to move? */ #else - cmplwi cr1, r_len, 8 /* < 8 bytes to move? */ + cmplwi %cr1, r_len, 8 /* < 8 bytes to move? */ #endif andi. %r5, r_dst, 0x03 /* bytes to fill to align4 */ - blt cr1, sf_bytewise /* trivial byte mover */ + blt %cr1, sf_bytewise /* trivial byte mover */ li %r6, 4 subf %r5, %r5, %r6
CVS commit: xsrc/external/mit/xf86-input-synaptics/include
Module Name:xsrc Committed By: mrg Date: Sat Jan 29 02:32:20 UTC 2011 Added Files: xsrc/external/mit/xf86-input-synaptics/include: config.h Log Message: add a config.h for xf86-input-synaptics 1.3.0. To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 \ xsrc/external/mit/xf86-input-synaptics/include/config.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Added files: Index: xsrc/external/mit/xf86-input-synaptics/include/config.h diff -u /dev/null xsrc/external/mit/xf86-input-synaptics/include/config.h:1.1 --- /dev/null Sat Jan 29 02:32:20 2011 +++ xsrc/external/mit/xf86-input-synaptics/include/config.h Sat Jan 29 02:32:19 2011 @@ -0,0 +1,87 @@ +/* config.h. Generated from config.h.in by configure. */ +/* config.h.in. Generated from configure.ac by autoheader. */ + +/* Optional backend eventcomm enabled */ +/* #undef BUILD_EVENTCOMM */ + +/* Optional backend psmcomm enabled */ +#define BUILD_PSMCOMM 1 + +/* Enable debugging code */ +/* #undef DEBUG */ + +/* Define to 1 if you have the header file. */ +#define HAVE_DLFCN_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_INTTYPES_H 1 + +/* Define to 1 if you have the `m' library (-lm). */ +#define HAVE_LIBM 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_MEMORY_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDINT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDLIB_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRINGS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_UNISTD_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_X11_EXTENSIONS_RECORD_H 1 + +/* Define to the sub-directory in which libtool stores uninstalled libraries. + */ +#define LT_OBJDIR ".libs/" + +/* Name of package */ +#define PACKAGE "xf86-input-synaptics" + +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "https://bugs.freedesktop.org/enter_bug.cgi?product=xorg"; + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "xf86-input-synaptics" + +/* Define to the full name and version of this package. */ +#define PACKAGE_STRING "xf86-input-synaptics 1.3.0" + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME "xf86-input-synaptics" + +/* Define to the home page for this package. */ +#define PACKAGE_URL "" + +/* Define to the version of this package. */ +#define PACKAGE_VERSION "1.3.0" + +/* Major version of this package */ +#define PACKAGE_VERSION_MAJOR 1 + +/* Minor version of this package */ +#define PACKAGE_VERSION_MINOR 3 + +/* Patch version of this package */ +#define PACKAGE_VERSION_PATCHLEVEL 0 + +/* Define to 1 if you have the ANSI C header files. */ +#define STDC_HEADERS 1 + +/* Version number of package */ +#define VERSION "1.3.0"
CVS commit: src/external/mit/xorg/server/drivers/xf86-input-synaptics
Module Name:src Committed By: mrg Date: Sat Jan 29 02:32:36 UTC 2011 Added Files: src/external/mit/xorg/server/drivers/xf86-input-synaptics: Makefile Log Message: add a makefile to build xf86-input-synaptics. To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 \ src/external/mit/xorg/server/drivers/xf86-input-synaptics/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Added files: Index: src/external/mit/xorg/server/drivers/xf86-input-synaptics/Makefile diff -u /dev/null src/external/mit/xorg/server/drivers/xf86-input-synaptics/Makefile:1.1 --- /dev/null Sat Jan 29 02:32:36 2011 +++ src/external/mit/xorg/server/drivers/xf86-input-synaptics/Makefile Sat Jan 29 02:32:36 2011 @@ -0,0 +1,14 @@ +# $NetBSD: Makefile,v 1.1 2011/01/29 02:32:36 mrg Exp $ + +DRIVER= xf86-input-synaptics +DRIVER_NAME= synaptics_drv + +SRCS= synaptics.c alpscomm.c ps2comm.c properties.c +#SRCS+= psmcomm.c + +CPPFLAGS+= -I${X11SRCDIR.${DRIVER}}/include +CPPFLAGS+= -DHAVE_CONFIG_H -I${X11SRCDIR.${DRIVER}}/../include + +MAN= synaptics.4 + +.include "../Makefile.xf86-driver"
CVS commit: src/crypto/dist/heimdal/kuser
Module Name:src Committed By: jnemeth Date: Sat Jan 29 04:00:19 UTC 2011 Modified Files: src/crypto/dist/heimdal/kuser: kgetcred.1 Log Message: PR/44482 - Ryo HAYASAKA -- typo To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/crypto/dist/heimdal/kuser/kgetcred.1 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/crypto/dist/heimdal/kuser/kgetcred.1 diff -u src/crypto/dist/heimdal/kuser/kgetcred.1:1.8 src/crypto/dist/heimdal/kuser/kgetcred.1:1.9 --- src/crypto/dist/heimdal/kuser/kgetcred.1:1.8 Wed Oct 14 23:37:33 2009 +++ src/crypto/dist/heimdal/kuser/kgetcred.1 Sat Jan 29 04:00:19 2011 @@ -30,7 +30,7 @@ .\" SUCH DAMAGE. .\" .\" $Heimdal: kgetcred.1 14090 2004-08-05 18:49:47Z lha $ -.\" $NetBSD: kgetcred.1,v 1.8 2009/10/14 23:37:33 joerg Exp $ +.\" $NetBSD: kgetcred.1,v 1.9 2011/01/29 04:00:19 jnemeth Exp $ .\" .Dd March 12, 2004 .Dt KGETCRED 1 @@ -69,7 +69,7 @@ .It Fl e Ar enctype , Fl -enctype= Ns Ar enctype encryption type to use. .It Fl -no-transit-check -requests that the KDC doesn't do trasnit checking. +requests that the KDC doesn't do transit checking. .It Fl -version .It Fl -help .El