CVS commit: src/sys/dev
Module Name:src Committed By: cegger Date: Fri Apr 17 10:20:33 UTC 2009 Modified Files: src/sys/dev/cardbus: if_tlp_cardbus.c src/sys/dev/eisa: if_tlp_eisa.c src/sys/dev/ic: tulip.c tulipvar.h src/sys/dev/pci: if_tlp_pci.c Log Message: device_t/softc split. Tested with tlp at pci To generate a diff of this commit: cvs rdiff -u -r1.60 -r1.61 src/sys/dev/cardbus/if_tlp_cardbus.c cvs rdiff -u -r1.21 -r1.22 src/sys/dev/eisa/if_tlp_eisa.c cvs rdiff -u -r1.166 -r1.167 src/sys/dev/ic/tulip.c cvs rdiff -u -r1.62 -r1.63 src/sys/dev/ic/tulipvar.h cvs rdiff -u -r1.106 -r1.107 src/sys/dev/pci/if_tlp_pci.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/cardbus/if_tlp_cardbus.c diff -u src/sys/dev/cardbus/if_tlp_cardbus.c:1.60 src/sys/dev/cardbus/if_tlp_cardbus.c:1.61 --- src/sys/dev/cardbus/if_tlp_cardbus.c:1.60 Sat Mar 14 15:36:16 2009 +++ src/sys/dev/cardbus/if_tlp_cardbus.c Fri Apr 17 10:20:32 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: if_tlp_cardbus.c,v 1.60 2009/03/14 15:36:16 dsl Exp $ */ +/* $NetBSD: if_tlp_cardbus.c,v 1.61 2009/04/17 10:20:32 cegger Exp $ */ /*- * Copyright (c) 1999, 2000 The NetBSD Foundation, Inc. @@ -36,7 +36,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: if_tlp_cardbus.c,v 1.60 2009/03/14 15:36:16 dsl Exp $); +__KERNEL_RCSID(0, $NetBSD: if_tlp_cardbus.c,v 1.61 2009/04/17 10:20:32 cegger Exp $); #include opt_inet.h #include bpfilter.h @@ -112,11 +112,11 @@ cardbus_intr_line_t sc_intrline; /* interrupt line */ }; -int tlp_cardbus_match(struct device *, struct cfdata *, void *); -void tlp_cardbus_attach(struct device *, struct device *, void *); -int tlp_cardbus_detach(struct device *, int); +int tlp_cardbus_match(device_t, cfdata_t, void *); +void tlp_cardbus_attach(device_t, device_t, void *); +int tlp_cardbus_detach(device_t, int); -CFATTACH_DECL(tlp_cardbus, sizeof(struct tulip_cardbus_softc), +CFATTACH_DECL_NEW(tlp_cardbus, sizeof(struct tulip_cardbus_softc), tlp_cardbus_match, tlp_cardbus_attach, tlp_cardbus_detach, tlp_activate); const struct tulip_cardbus_product { @@ -218,7 +218,7 @@ } int -tlp_cardbus_match(struct device *parent, struct cfdata *match, +tlp_cardbus_match(device_t parent, cfdata_t match, void *aux) { struct cardbus_attach_args *ca = aux; @@ -230,7 +230,7 @@ } void -tlp_cardbus_attach(struct device *parent, struct device *self, +tlp_cardbus_attach(device_t parent, device_t self, void *aux) { struct tulip_cardbus_softc *csc = device_private(self); @@ -242,6 +242,7 @@ bus_addr_t adr; pcireg_t reg; + sc-sc_dev = self; sc-sc_devno = 0; sc-sc_dmat = ca-ca_dmat; csc-sc_ct = ct; @@ -333,7 +334,7 @@ csc-sc_bar_reg = TULIP_PCI_IOBA; csc-sc_bar_val = adr | CARDBUS_MAPREG_TYPE_IO; } else { - aprint_error_dev(sc-sc_dev, unable to map device registers\n); + aprint_error_dev(self, unable to map device registers\n); return; } @@ -399,7 +400,7 @@ */ if (sc-sc_mediasw == NULL) { printf(%s: defaulting to MII-over-SIO; no bets...\n, - device_xname(sc-sc_dev)); + device_xname(self)); sc-sc_mediasw = tlp_sio_mii_mediasw; } break; @@ -441,7 +442,7 @@ default: cant_cope: printf(%s: sorry, unable to handle your board\n, - device_xname(sc-sc_dev)); + device_xname(self)); return; } @@ -460,7 +461,7 @@ } int -tlp_cardbus_detach(struct device *self, int flags) +tlp_cardbus_detach(device_t self, int flags) { struct tulip_cardbus_softc *csc = device_private(self); struct tulip_softc *sc = csc-sc_tulip; @@ -469,7 +470,7 @@ #if defined(DIAGNOSTIC) if (ct == NULL) - panic(%s: data structure lacks, device_xname(sc-sc_dev)); + panic(%s: data structure lacks, device_xname(self)); #endif rv = tlp_detach(sc); @@ -516,7 +517,7 @@ csc-sc_ih = cardbus_intr_establish(cc, cf, csc-sc_intrline, IPL_NET, tlp_intr, sc); if (csc-sc_ih == NULL) { - aprint_error_dev(sc-sc_dev, + aprint_error_dev(sc-sc_dev, unable to establish interrupt\n); Cardbus_function_disable(csc-sc_ct); return (1); Index: src/sys/dev/eisa/if_tlp_eisa.c diff -u src/sys/dev/eisa/if_tlp_eisa.c:1.21 src/sys/dev/eisa/if_tlp_eisa.c:1.22 --- src/sys/dev/eisa/if_tlp_eisa.c:1.21 Mon Apr 28 20:23:48 2008 +++ src/sys/dev/eisa/if_tlp_eisa.c Fri Apr 17 10:20:32 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: if_tlp_eisa.c,v 1.21 2008/04/28 20:23:48 martin Exp $ */ +/* $NetBSD: if_tlp_eisa.c,v 1.22 2009/04/17 10:20:32 cegger Exp $ */ /*- * Copyright (c) 1999, 2000 The NetBSD Foundation, Inc. @@ -36,7 +36,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: if_tlp_eisa.c,v 1.21 2008/04/28 20:23:48 martin Exp $); +__KERNEL_RCSID(0, $NetBSD: if_tlp_eisa.c,v 1.22 2009/04/17 10:20:32 cegger Exp $); #include opt_inet.h #include bpfilter.h @@ -106,10 +106,10 @@ void *sc_ih; /* interrupt handle */ }; -static int
CVS commit: [nick-hppapmap] src/sys/arch/hppa/include
Module Name:src Committed By: skrll Date: Fri Apr 17 11:44:52 UTC 2009 Modified Files: src/sys/arch/hppa/include [nick-hppapmap]: reg.h Log Message: Correct a comment. To generate a diff of this commit: cvs rdiff -u -r1.6.18.2 -r1.6.18.3 src/sys/arch/hppa/include/reg.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hppa/include/reg.h diff -u src/sys/arch/hppa/include/reg.h:1.6.18.2 src/sys/arch/hppa/include/reg.h:1.6.18.3 --- src/sys/arch/hppa/include/reg.h:1.6.18.2 Sat Feb 28 14:47:48 2009 +++ src/sys/arch/hppa/include/reg.h Fri Apr 17 11:44:52 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: reg.h,v 1.6.18.2 2009/02/28 14:47:48 skrll Exp $ */ +/* $NetBSD: reg.h,v 1.6.18.3 2009/04/17 11:44:52 skrll Exp $ */ /* $OpenBSD: reg.h,v 1.7 2000/06/15 17:00:37 mickey Exp $ */ @@ -92,7 +92,7 @@ #define CR_TR3 27 /* tr3: (TLS?)*/ #define CR_HVTP 28 /* tr4: faulted HVT slot ptr on LC cpus */ #define CR_TR5 29 /* tr5: emu / TLB_STATS_{PRE,AFT} */ -#define CR_UPADDR 30 /* tr6: paddr of U-area of curproc */ +#define CR_UPADDR 30 /* tr6: paddr of U-area of curlwp */ #define CR_TR7 31 /* tr7: trap temporary register */ /*
CVS commit: src/sys/dev/pci
Module Name:src Committed By: cegger Date: Fri Apr 17 13:15:53 UTC 2009 Modified Files: src/sys/dev/pci: if_tlp_pci.c Log Message: use aprint_* To generate a diff of this commit: cvs rdiff -u -r1.108 -r1.109 src/sys/dev/pci/if_tlp_pci.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/pci/if_tlp_pci.c diff -u src/sys/dev/pci/if_tlp_pci.c:1.108 src/sys/dev/pci/if_tlp_pci.c:1.109 --- src/sys/dev/pci/if_tlp_pci.c:1.108 Fri Apr 17 12:59:19 2009 +++ src/sys/dev/pci/if_tlp_pci.c Fri Apr 17 13:15:53 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: if_tlp_pci.c,v 1.108 2009/04/17 12:59:19 cegger Exp $ */ +/* $NetBSD: if_tlp_pci.c,v 1.109 2009/04/17 13:15:53 cegger Exp $ */ /*- * Copyright (c) 1998, 1999, 2000, 2002 The NetBSD Foundation, Inc. @@ -36,7 +36,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: if_tlp_pci.c,v 1.108 2009/04/17 12:59:19 cegger Exp $); +__KERNEL_RCSID(0, $NetBSD: if_tlp_pci.c,v 1.109 2009/04/17 13:15:53 cegger Exp $); #include sys/param.h #include sys/systm.h @@ -463,23 +463,23 @@ break; } - printf(: %s Ethernet, pass %d.%d\n, + aprint_normal(: %s Ethernet, pass %d.%d\n, tlp_chip_names[sc-sc_chip], (sc-sc_rev 4) 0xf, sc-sc_rev 0xf); switch (sc-sc_chip) { case TULIP_CHIP_21040: if (sc-sc_rev 0x20) { - printf(%s: 21040 must be at least pass 2.0\n, - device_xname(self)); + aprint_normal_dev(self, + 21040 must be at least pass 2.0\n); return; } break; case TULIP_CHIP_21140: if (sc-sc_rev 0x11) { - printf(%s: 21140 must be at least pass 1.1\n, - device_xname(self)); + aprint_normal_dev(self, + 21140 must be at least pass 1.1\n); return; } break; @@ -625,8 +625,7 @@ break; } if (val PNIC_MIIROM_BUSY) { -printf(%s: EEPROM timed out\n, -device_xname(self)); +aprint_error_dev(self, EEPROM timed out\n); return; } val = PNIC_MIIROM_DATA; @@ -660,13 +659,13 @@ M_NOWAIT|M_ZERO); memcpy(sc-sc_srom, enaddr, sizeof(enaddr)); if (tlp_srom_debug) { -printf(SROM CONTENTS:); +aprint_normal(SROM CONTENTS:); for (i = 0; i TULIP_ROM_SIZE(6); i++) { if ((i % 8) == 0) - printf(\n\t); - printf(0x%02x , sc-sc_srom[i]); + aprint_normal(\n\t); + aprint_normal(0x%02x , sc-sc_srom[i]); } -printf(\n); +aprint_normal(\n); } break; } @@ -981,8 +980,7 @@ default: cant_cope: - printf(%s: sorry, unable to handle your board\n, - device_xname(self)); + aprint_error_dev(self, sorry, unable to handle your board\n); return; } @@ -1003,8 +1001,7 @@ } if (psc-sc_flags TULIP_PCI_SLAVEINTR) { - printf(%s: sharing interrupt with %s\n, - device_xname(self), + aprint_normal_dev(self, sharing interrupt with %s\n, device_xname(psc-sc_master-sc_tulip.sc_dev)); } else { /* @@ -1021,11 +1018,11 @@ if (psc-sc_ih == NULL) { aprint_error_dev(self, unable to establish interrupt); if (intrstr != NULL) -printf( at %s, intrstr); - printf(\n); +aprint_error( at %s, intrstr); + aprint_error(\n); return; } - printf(%s: interrupting at %s\n, device_xname(self), + aprint_normal_dev(self, interrupting at %s\n, intrstr); }
CVS commit: src/usr.sbin/mountd
Module Name:src Committed By: lukem Date: Fri Apr 17 13:56:33 UTC 2009 Modified Files: src/usr.sbin/mountd: mountd.c Log Message: Fix WARNS=4 issues (-Wshadow -Wcast-qual -Wsign-compare) To generate a diff of this commit: cvs rdiff -u -r1.118 -r1.119 src/usr.sbin/mountd/mountd.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/mountd/mountd.c diff -u src/usr.sbin/mountd/mountd.c:1.118 src/usr.sbin/mountd/mountd.c:1.119 --- src/usr.sbin/mountd/mountd.c:1.118 Fri Aug 29 00:50:45 2008 +++ src/usr.sbin/mountd/mountd.c Fri Apr 17 13:56:33 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: mountd.c,v 1.118 2008/08/29 00:50:45 gmcgarry Exp $ */ +/* $NetBSD: mountd.c,v 1.119 2009/04/17 13:56:33 lukem Exp $ */ /* * Copyright (c) 1989, 1993 @@ -42,7 +42,7 @@ #if 0 static char sccsid[] = @(#)mountd.c 8.15 (Berkeley) 5/1/95; #else -__RCSID($NetBSD: mountd.c,v 1.118 2008/08/29 00:50:45 gmcgarry Exp $); +__RCSID($NetBSD: mountd.c,v 1.119 2009/04/17 13:56:33 lukem Exp $); #endif #endif/* not lint */ @@ -218,7 +218,7 @@ static struct exportlist *exphead; static struct mountlist *mlhead; static struct grouplist *grphead; -static char*exname; +static const char *exname; static struct uucred def_anon = { 1, (uid_t) -2, @@ -489,7 +489,7 @@ int lookup_failed = 1; struct sockaddr *saddr; u_short sport; - charrpcpath[RPCMNT_PATHLEN + 1], dirpath[MAXPATHLEN]; + charrpcpath[RPCMNT_PATHLEN + 1], rdirpath[MAXPATHLEN]; longbad = EACCES; int defset, hostset, ret; sigset_tsighup_mask; @@ -542,27 +542,27 @@ * Get the real pathname and make sure it is a file or * directory that exists. */ - if (realpath(rpcpath, dirpath) == 0 || - stat(dirpath, stb) 0 || + if (realpath(rpcpath, rdirpath) == 0 || + stat(rdirpath, stb) 0 || (!S_ISDIR(stb.st_mode) !S_ISREG(stb.st_mode)) || - statvfs(dirpath, fsb) 0) { + statvfs(rdirpath, fsb) 0) { (void)chdir(/); /* Just in case realpath doesn't */ if (debug) (void)fprintf(stderr, - stat failed on %s\n, -dirpath); +rdirpath); if (!svc_sendreply(transp, xdr_long, (caddr_t) bad)) syslog(LOG_ERR, Can't send reply); return; } if (debug) fprintf(stderr, - - dirpath: %s\n, dirpath); + - dirpath: %s\n, rdirpath); /* Check in the exports list */ (void)sigprocmask(SIG_BLOCK, sighup_mask, NULL); ep = ex_search(fsb.f_fsidx); hostset = defset = 0; if (ep (chk_host(ep-ex_defdir, saddr, defset, - hostset) || ((dp = dirp_search(ep-ex_dirl, dirpath)) + hostset) || ((dp = dirp_search(ep-ex_dirl, rdirpath)) chk_host(dp, saddr, defset, hostset)) || (defset scan_tree(ep-ex_defdir, saddr) == 0 scan_tree(ep-ex_dirl, saddr) == 0))) { @@ -582,9 +582,9 @@ /* Get the file handle */ memset(fhr.fhr_fh, 0, sizeof(fhr.fhr_fh)); /* for v2 */ fh_size = sizeof(fhr.fhr_fh); - if (getfh(dirpath, fhr.fhr_fh, fh_size) 0) { + if (getfh(rdirpath, fhr.fhr_fh, fh_size) 0) { bad = errno; -syslog(LOG_ERR, Can't get fh for %s, dirpath); +syslog(LOG_ERR, Can't get fh for %s, rdirpath); if (!svc_sendreply(transp, xdr_long, (char *)bad)) syslog(LOG_ERR, Can't send reply); @@ -602,9 +602,9 @@ if (!svc_sendreply(transp, xdr_fhs, (char *) fhr)) syslog(LOG_ERR, Can't send reply); if (!lookup_failed) -add_mlist(host, dirpath, hostset); +add_mlist(host, rdirpath, hostset); else -add_mlist(numerichost, dirpath, hostset); +add_mlist(numerichost, rdirpath, hostset); if (debug) (void)fprintf(stderr, Mount successful.\n); } else { @@ -619,13 +619,13 @@ syslog(LOG_ERR, Can't send reply); return; case MOUNTPROC_UMNT: - if (!svc_getargs(transp, xdr_dir, dirpath)) { + if (!svc_getargs(transp, xdr_dir, rdirpath)) { svcerr_decode(transp); return; } if (!lookup_failed) - ret = del_mlist(host, dirpath, saddr); - ret |= del_mlist(numerichost, dirpath, saddr); + ret = del_mlist(host, rdirpath, saddr); + ret |= del_mlist(numerichost, rdirpath, saddr); if (ret) { svcerr_weakauth(transp); return; @@ -1460,7 +1460,7 @@ case AF_INET: src = ((struct sockaddr_in *)s1)-sin_addr; dst = ((struct sockaddr_in *)s2)-sin_addr; - if (bitlen sizeof(((struct sockaddr_in *)s1)-sin_addr) * 8) + if (bitlen (int)sizeof(((struct sockaddr_in *)s1)-sin_addr) * 8) return 1; break; case AF_INET6: @@ -1469,7 +1469,7 @@ if (((struct sockaddr_in6 *)s1)-sin6_scope_id != ((struct sockaddr_in6 *)s2)-sin6_scope_id) return 1; - if (bitlen sizeof(((struct sockaddr_in6 *)s1)-sin6_addr) * 8) + if (bitlen (int)sizeof(((struct sockaddr_in6 *)s1)-sin6_addr) * 8) return 1; break; default: @@ -2011,7 +2011,7 @@ int maskflg; { struct netent *np; - char
CVS commit: src/usr.sbin/moused
Module Name:src Committed By: lukem Date: Fri Apr 17 14:02:22 UTC 2009 Modified Files: src/usr.sbin/moused: moused.c Log Message: Fix WARNS=4 issues (-Wshadow -Wcast-qual -Wextra -Wsign-compare) To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/usr.sbin/moused/moused.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/moused/moused.c diff -u src/usr.sbin/moused/moused.c:1.17 src/usr.sbin/moused/moused.c:1.18 --- src/usr.sbin/moused/moused.c:1.17 Mon Jul 21 12:44:25 2008 +++ src/usr.sbin/moused/moused.c Fri Apr 17 14:02:21 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: moused.c,v 1.17 2008/07/21 12:44:25 gmcgarry Exp $ */ +/* $NetBSD: moused.c,v 1.18 2009/04/17 14:02:21 lukem Exp $ */ /** ** Copyright (c) 1995 Michael Smith, All rights reserved. ** @@ -48,7 +48,7 @@ #include sys/cdefs.h #ifndef lint -__RCSID($NetBSD: moused.c,v 1.17 2008/07/21 12:44:25 gmcgarry Exp $); +__RCSID($NetBSD: moused.c,v 1.18 2009/04/17 14:02:21 lukem Exp $); #endif /* not lint */ #include ctype.h @@ -111,7 +111,7 @@ /* symbol table entry */ typedef struct { -char *name; +const char *name; int val; int val2; } symtab_t; @@ -119,11 +119,11 @@ /* serial PnP ID string */ typedef struct { int revision; /* PnP revision, 100 for 1.00 */ -char *eisaid; /* EISA ID including mfr ID and product ID */ -char *serial; /* serial No, optional */ -char *class; /* device class, optional */ -char *compat; /* list of compatible drivers, optional */ -char *description; /* product description, optional */ +const char *eisaid; /* EISA ID including mfr ID and product ID */ +const char *serial; /* serial No, optional */ +const char *class; /* device class, optional */ +const char *compat; /* list of compatible drivers, optional */ +const char *description; /* product description, optional */ int neisaid; /* length of the above fields... */ int nserial; int nclass; @@ -137,23 +137,23 @@ int nodaemon = FALSE; int background = FALSE; int identify = ID_NONE; -char *pidfile = /var/run/moused.pid; +const char *pidfile = /var/run/moused.pid; /* local variables */ /* interface (the table must be ordered by MOUSE_IF_XXX in mouse.h) */ static symtab_t rifs[] = { -{ serial, MOUSE_IF_SERIAL }, -{ bus, MOUSE_IF_BUS }, -{ inport, MOUSE_IF_INPORT }, -{ ps/2, MOUSE_IF_PS2 }, -{ sysmouse, MOUSE_IF_SYSMOUSE }, -{ usb, MOUSE_IF_USB }, -{ NULL, MOUSE_IF_UNKNOWN }, +{ serial, MOUSE_IF_SERIAL, 0 }, +{ bus, MOUSE_IF_BUS, 0 }, +{ inport, MOUSE_IF_INPORT, 0 }, +{ ps/2, MOUSE_IF_PS2, 0 }, +{ sysmouse, MOUSE_IF_SYSMOUSE, 0 }, +{ usb, MOUSE_IF_USB, 0 }, +{ NULL, MOUSE_IF_UNKNOWN, 0 }, }; /* types (the table must be ordered by MOUSE_PROTO_XXX in mouse.h) */ -static char *rnames[] = { +static const char *rnames[] = { microsoft, mousesystems, logitech, @@ -177,20 +177,20 @@ /* models */ static symtab_t rmodels[] = { -{ NetScroll, MOUSE_MODEL_NETSCROLL }, -{ NetMouse/NetScroll Optical, MOUSE_MODEL_NET }, -{ GlidePoint, MOUSE_MODEL_GLIDEPOINT }, -{ ThinkingMouse, MOUSE_MODEL_THINK }, -{ IntelliMouse, MOUSE_MODEL_INTELLI }, -{ EasyScroll/SmartScroll, MOUSE_MODEL_EASYSCROLL }, -{ MouseMan+, MOUSE_MODEL_MOUSEMANPLUS }, -{ Kidspad, MOUSE_MODEL_KIDSPAD }, -{ VersaPad, MOUSE_MODEL_VERSAPAD }, -{ IntelliMouse Explorer, MOUSE_MODEL_EXPLORER }, -{ 4D Mouse, MOUSE_MODEL_4D }, -{ 4D+ Mouse, MOUSE_MODEL_4DPLUS }, -{ generic, MOUSE_MODEL_GENERIC }, -{ NULL, MOUSE_MODEL_UNKNOWN }, +{ NetScroll, MOUSE_MODEL_NETSCROLL, 0 }, +{ NetMouse/NetScroll Optical, MOUSE_MODEL_NET, 0 }, +{ GlidePoint, MOUSE_MODEL_GLIDEPOINT, 0 }, +{ ThinkingMouse, MOUSE_MODEL_THINK, 0 }, +{ IntelliMouse, MOUSE_MODEL_INTELLI, 0 }, +{ EasyScroll/SmartScroll, MOUSE_MODEL_EASYSCROLL, 0 }, +{ MouseMan+, MOUSE_MODEL_MOUSEMANPLUS, 0 }, +{ Kidspad, MOUSE_MODEL_KIDSPAD, 0 }, +{ VersaPad, MOUSE_MODEL_VERSAPAD, 0 }, +{ IntelliMouse Explorer, MOUSE_MODEL_EXPLORER, 0 }, +{ 4D Mouse, MOUSE_MODEL_4D, 0 }, +{ 4D+ Mouse, MOUSE_MODEL_4DPLUS, 0 }, +{ generic, MOUSE_MODEL_GENERIC, 0 }, +{ NULL, MOUSE_MODEL_UNKNOWN, 0 }, }; /* PnP EISA/product IDs */ @@ -437,15 +437,15 @@ /* function prototypes */ -static void moused(char *); +static void moused(const char *); static void hup(int sig); static void cleanup(int sig); static void usage(void); static int r_identify(void); -static char *r_if(int type); -static char *r_name(int type); -static char *r_model(int model); +static const char *r_if(int type); +static const char *r_name(int type); +static const char *r_model(int model); static void r_init(void); static int r_protocol(u_char b, mousestatus_t *act); static int
CVS commit: src/sys/dev/pci
Module Name:src Committed By: cegger Date: Fri Apr 17 14:07:32 UTC 2009 Modified Files: src/sys/dev/pci: if_tlp_pci.c Log Message: Free resources in error path. While here, fix copypaste error I introduced in rev. 1.108. To generate a diff of this commit: cvs rdiff -u -r1.109 -r1.110 src/sys/dev/pci/if_tlp_pci.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/pci/if_tlp_pci.c diff -u src/sys/dev/pci/if_tlp_pci.c:1.109 src/sys/dev/pci/if_tlp_pci.c:1.110 --- src/sys/dev/pci/if_tlp_pci.c:1.109 Fri Apr 17 13:15:53 2009 +++ src/sys/dev/pci/if_tlp_pci.c Fri Apr 17 14:07:32 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: if_tlp_pci.c,v 1.109 2009/04/17 13:15:53 cegger Exp $ */ +/* $NetBSD: if_tlp_pci.c,v 1.110 2009/04/17 14:07:32 cegger Exp $ */ /*- * Copyright (c) 1998, 1999, 2000, 2002 The NetBSD Foundation, Inc. @@ -36,7 +36,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: if_tlp_pci.c,v 1.109 2009/04/17 13:15:53 cegger Exp $); +__KERNEL_RCSID(0, $NetBSD: if_tlp_pci.c,v 1.110 2009/04/17 14:07:32 cegger Exp $); #include sys/param.h #include sys/systm.h @@ -544,21 +544,21 @@ sc-sc_st = memt; sc-sc_sh = memh; psc-sc_mapsize = memsize; - if (ioh_valid) + if (ioh_valid) { bus_space_unmap(iot, ioh, iosize); + ioh_valid = 0; + } } else if (ioh_valid) { sc-sc_st = iot; sc-sc_sh = ioh; psc-sc_mapsize = iosize; - if (memh_valid) - bus_space_unmap(iot, ioh, memsize); + if (memh_valid) { + bus_space_unmap(memt, memh, memsize); + memh_valid = 0; + } } else { aprint_error_dev(self, unable to map device registers\n); - if (ioh_valid) - bus_space_unmap(iot, ioh, iosize); - if (memh_valid) - bus_space_unmap(iot, ioh, memsize); - return; + goto fail; } sc-sc_dmat = pa-pa_dmat; @@ -626,7 +626,7 @@ } if (val PNIC_MIIROM_BUSY) { aprint_error_dev(self, EEPROM timed out\n); -return; +goto fail; } val = PNIC_MIIROM_DATA; sc-sc_srom[i] = val 8; @@ -981,7 +981,7 @@ default: cant_cope: aprint_error_dev(self, sorry, unable to handle your board\n); - return; + goto fail; } /* @@ -1009,7 +1009,7 @@ */ if (pci_intr_map(pa, ih)) { aprint_error_dev(self, unable to map interrupt\n); - return; + goto fail; } intrstr = pci_intr_string(pc, ih); psc-sc_ih = pci_intr_establish(pc, ih, IPL_NET, @@ -1020,7 +1020,7 @@ if (intrstr != NULL) aprint_error( at %s, intrstr); aprint_error(\n); - return; + goto fail; } aprint_normal_dev(self, interrupting at %s\n, intrstr); @@ -1030,6 +1030,20 @@ * Finish off the attach. */ tlp_attach(sc, enaddr); + return; + +fail: + if (psc-sc_ih != NULL) { + pci_intr_disestablish(psc-sc_pc, psc-sc_ih); + psc-sc_ih = NULL; + } + + if (ioh_valid) + bus_space_unmap(iot, ioh, iosize); + if (memh_valid) + bus_space_unmap(memt, memh, memsize); + psc-sc_mapsize = 0; + return; } static int
CVS commit: src/sys/arch/newsmips/apbus
Module Name:src Committed By: tsutsui Date: Fri Apr 17 14:48:17 UTC 2009 Modified Files: src/sys/arch/newsmips/apbus: if_tlp_ap.c Log Message: Split device_t/softc, use aprint_*(). To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/sys/arch/newsmips/apbus/if_tlp_ap.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/newsmips/apbus/if_tlp_ap.c diff -u src/sys/arch/newsmips/apbus/if_tlp_ap.c:1.10 src/sys/arch/newsmips/apbus/if_tlp_ap.c:1.11 --- src/sys/arch/newsmips/apbus/if_tlp_ap.c:1.10 Mon Apr 28 20:23:30 2008 +++ src/sys/arch/newsmips/apbus/if_tlp_ap.c Fri Apr 17 14:48:17 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: if_tlp_ap.c,v 1.10 2008/04/28 20:23:30 martin Exp $ */ +/* $NetBSD: if_tlp_ap.c,v 1.11 2009/04/17 14:48:17 tsutsui Exp $ */ /* * Copyright (c) 2000 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: if_tlp_ap.c,v 1.10 2008/04/28 20:23:30 martin Exp $); +__KERNEL_RCSID(0, $NetBSD: if_tlp_ap.c,v 1.11 2009/04/17 14:48:17 tsutsui Exp $); #include sys/param.h #include sys/device.h @@ -78,10 +78,10 @@ bus_space_handle_t sc_cfsh; }; -static int tlp_ap_match(struct device *, struct cfdata *, void *); -static void tlp_ap_attach(struct device *, struct device *, void *); +static int tlp_ap_match(device_t, cfdata_t, void *); +static void tlp_ap_attach(device_t, device_t, void *); -CFATTACH_DECL(tlp_ap, sizeof(struct tulip_ap_softc), +CFATTACH_DECL_NEW(tlp_ap, sizeof(struct tulip_ap_softc), tlp_ap_match, tlp_ap_attach, NULL, NULL); static void tlp_ap_preinit(struct tulip_softc *); @@ -94,7 +94,7 @@ }; static int -tlp_ap_match(struct device *parent, struct cfdata *cf, void *aux) +tlp_ap_match(device_t parent, cfdata_t cf, void *aux) { struct apbus_attach_args *apa = aux; @@ -108,16 +108,18 @@ * Install interface into kernel networking data structures */ static void -tlp_ap_attach(struct device *parent, struct device *self, void *aux) +tlp_ap_attach(device_t parent, device_t self, void *aux) { - struct tulip_ap_softc *psc = (void *) self; + struct tulip_ap_softc *psc = device_private(self); struct tulip_softc *sc = psc-sc_tulip; struct apbus_attach_args *apa = aux; uint8_t enaddr[ETHER_ADDR_LEN]; u_int intrmask; int i; - printf( slot%d addr 0x%lx, apa-apa_slotno, apa-apa_hwbase); + sc-sc_dev = self; + + aprint_normal( slot%d addr 0x%lx, apa-apa_slotno, apa-apa_hwbase); /* PCI configuration register */ psc-sc_cfst = 0; @@ -133,11 +135,11 @@ sc-sc_chip = TULIP_CHIP_21140; break; default: - printf(: unable to handle your board\n); + aprint_error(: unable to handle your board\n); return; } - printf(: %s Ethernet, pass %d.%d\n, + aprint_normal(: %s Ethernet, pass %d.%d\n, tlp_chip_names[sc-sc_chip], (sc-sc_rev 4) 0xf, sc-sc_rev 0xf); @@ -146,7 +148,7 @@ sc-sc_sh = apa-apa_hwbase + TLP_AP_CSR; sc-sc_dmat = apbus_dmatag_init(apa); if (sc-sc_dmat == NULL) { - printf(%s: cannot allocate memory\n, sc-sc_dev.dv_xname); + aprint_error_dev(self, cannot allocate memory\n); return; } @@ -202,7 +204,7 @@ TULIP_WRITE(sc, CSR_GPP, 0xcf); /* mask abort/DMA err */ if (tlp_read_srom(sc) == 0) { - printf(%s: srom read failed\n, sc-sc_dev.dv_xname); + aprint_error_dev(self, srom read failed\n); free(sc-sc_dmat, M_DEVBUF); return; }
CVS commit: src/sys/dev/ic
Module Name:src Committed By: cegger Date: Fri Apr 17 15:16:52 UTC 2009 Modified Files: src/sys/dev/ic: tulip.c Log Message: set dmamap to NULL when bus_dmamap_create() fails to prevent bus_dmamap_destroy to be called with an invalid dmamap in error path. To generate a diff of this commit: cvs rdiff -u -r1.167 -r1.168 src/sys/dev/ic/tulip.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/tulip.c diff -u src/sys/dev/ic/tulip.c:1.167 src/sys/dev/ic/tulip.c:1.168 --- src/sys/dev/ic/tulip.c:1.167 Fri Apr 17 10:20:33 2009 +++ src/sys/dev/ic/tulip.c Fri Apr 17 15:16:52 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: tulip.c,v 1.167 2009/04/17 10:20:33 cegger Exp $ */ +/* $NetBSD: tulip.c,v 1.168 2009/04/17 15:16:52 cegger Exp $ */ /*- * Copyright (c) 1998, 1999, 2000, 2002 The NetBSD Foundation, Inc. @@ -36,7 +36,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: tulip.c,v 1.167 2009/04/17 10:20:33 cegger Exp $); +__KERNEL_RCSID(0, $NetBSD: tulip.c,v 1.168 2009/04/17 15:16:52 cegger Exp $); #include bpfilter.h @@ -415,6 +415,7 @@ if ((error = bus_dmamap_create(sc-sc_dmat, sizeof(struct tulip_control_data), 1, sizeof(struct tulip_control_data), 0, 0, sc-sc_cddmamap)) != 0) { + sc-sc_cddmamap = NULL; aprint_error_dev(self, unable to create control data DMA map, error = %d\n, error); goto fail_2; @@ -455,6 +456,7 @@ if ((error = bus_dmamap_create(sc-sc_dmat, MCLBYTES, sc-sc_ntxsegs, MCLBYTES, 0, 0, sc-sc_txsoft[i].txs_dmamap)) != 0) { + sc-sc_txsoft[i].txs_dmamap = NULL; aprint_error_dev(self, unable to create tx DMA map %d, error = %d\n, i, error); goto fail_4; @@ -467,6 +469,7 @@ for (i = 0; i TULIP_NRXDESC; i++) { if ((error = bus_dmamap_create(sc-sc_dmat, MCLBYTES, 1, MCLBYTES, 0, 0, sc-sc_rxsoft[i].rxs_dmamap)) != 0) { + sc-sc_rxsoft[i].rxs_dmamap = NULL; aprint_error_dev(self, unable to create rx DMA map %d, error = %d\n, i, error); goto fail_5;
CVS commit: src/sys/dev/ic
Module Name:src Committed By: cegger Date: Fri Apr 17 15:22:36 UTC 2009 Modified Files: src/sys/dev/ic: tulip.c tulipvar.h Log Message: change tlp_attach() to return an error code on failure. To generate a diff of this commit: cvs rdiff -u -r1.168 -r1.169 src/sys/dev/ic/tulip.c cvs rdiff -u -r1.63 -r1.64 src/sys/dev/ic/tulipvar.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/dev/ic/tulip.c diff -u src/sys/dev/ic/tulip.c:1.168 src/sys/dev/ic/tulip.c:1.169 --- src/sys/dev/ic/tulip.c:1.168 Fri Apr 17 15:16:52 2009 +++ src/sys/dev/ic/tulip.c Fri Apr 17 15:22:35 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: tulip.c,v 1.168 2009/04/17 15:16:52 cegger Exp $ */ +/* $NetBSD: tulip.c,v 1.169 2009/04/17 15:22:35 cegger Exp $ */ /*- * Copyright (c) 1998, 1999, 2000, 2002 The NetBSD Foundation, Inc. @@ -36,7 +36,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: tulip.c,v 1.168 2009/04/17 15:16:52 cegger Exp $); +__KERNEL_RCSID(0, $NetBSD: tulip.c,v 1.169 2009/04/17 15:22:35 cegger Exp $); #include bpfilter.h @@ -186,7 +186,7 @@ * * Attach a Tulip interface to the system. */ -void +int tlp_attach(struct tulip_softc *sc, const uint8_t *enaddr) { struct ifnet *ifp = sc-sc_ethercom.ec_if; @@ -540,7 +540,7 @@ else pmf_class_network_register(self, ifp); - return; + return 0; /* * Free any resources we've allocated during the failed attach @@ -567,7 +567,7 @@ fail_1: bus_dmamem_free(sc-sc_dmat, sc-sc_cdseg, sc-sc_cdnseg); fail_0: - return; + return error; } /* Index: src/sys/dev/ic/tulipvar.h diff -u src/sys/dev/ic/tulipvar.h:1.63 src/sys/dev/ic/tulipvar.h:1.64 --- src/sys/dev/ic/tulipvar.h:1.63 Fri Apr 17 10:20:33 2009 +++ src/sys/dev/ic/tulipvar.h Fri Apr 17 15:22:35 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: tulipvar.h,v 1.63 2009/04/17 10:20:33 cegger Exp $ */ +/* $NetBSD: tulipvar.h,v 1.64 2009/04/17 15:22:35 cegger Exp $ */ /*- * Copyright (c) 1998, 1999, 2000 The NetBSD Foundation, Inc. @@ -587,7 +587,7 @@ extern const struct tulip_mediasw tlp_asix_mediasw; extern const struct tulip_mediasw tlp_rs7112_mediasw; -void tlp_attach(struct tulip_softc *, const uint8_t *); +int tlp_attach(struct tulip_softc *, const uint8_t *); int tlp_activate(device_t, enum devact); int tlp_detach(struct tulip_softc *); int tlp_intr(void *);
CVS commit: src/sys/dev
Module Name:src Committed By: tsutsui Date: Fri Apr 17 15:37:43 UTC 2009 Modified Files: src/sys/dev/ic: i82557reg.h src/sys/dev/pci: if_fxp_pci.c Log Message: Check revisions and print names of i82551/i82551ER, per Intel manual. To generate a diff of this commit: cvs rdiff -u -r1.23 -r1.24 src/sys/dev/ic/i82557reg.h cvs rdiff -u -r1.68 -r1.69 src/sys/dev/pci/if_fxp_pci.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/i82557reg.h diff -u src/sys/dev/ic/i82557reg.h:1.23 src/sys/dev/ic/i82557reg.h:1.24 --- src/sys/dev/ic/i82557reg.h:1.23 Wed Mar 11 13:12:41 2009 +++ src/sys/dev/ic/i82557reg.h Fri Apr 17 15:37:43 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: i82557reg.h,v 1.23 2009/03/11 13:12:41 tsutsui Exp $ */ +/* $NetBSD: i82557reg.h,v 1.24 2009/04/17 15:37:43 tsutsui Exp $ */ /*- * Copyright (c) 1998, 1999, 2001 The NetBSD Foundation, Inc. @@ -529,3 +529,4 @@ #define FXP_REV_82559S_A 9 #define FXP_REV_82550 12 #define FXP_REV_82550_C 13 +#define FXP_REV_82551 15 Index: src/sys/dev/pci/if_fxp_pci.c diff -u src/sys/dev/pci/if_fxp_pci.c:1.68 src/sys/dev/pci/if_fxp_pci.c:1.69 --- src/sys/dev/pci/if_fxp_pci.c:1.68 Thu Apr 16 12:41:51 2009 +++ src/sys/dev/pci/if_fxp_pci.c Fri Apr 17 15:37:43 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: if_fxp_pci.c,v 1.68 2009/04/16 12:41:51 tsutsui Exp $ */ +/* $NetBSD: if_fxp_pci.c,v 1.69 2009/04/17 15:37:43 tsutsui Exp $ */ /*- * Copyright (c) 1997, 1998, 1999, 2000, 2001 The NetBSD Foundation, Inc. @@ -36,7 +36,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: if_fxp_pci.c,v 1.68 2009/04/16 12:41:51 tsutsui Exp $); +__KERNEL_RCSID(0, $NetBSD: if_fxp_pci.c,v 1.69 2009/04/17 15:37:43 tsutsui Exp $); #include rnd.h @@ -252,6 +252,7 @@ pci_chipset_tag_t pc = pa-pa_pc; pci_intr_handle_t ih; const struct fxp_pci_product *fpp; + const char *chipname = NULL; const char *intrstr = NULL; bus_space_tag_t iot, memt; bus_space_handle_t ioh, memh; @@ -329,8 +330,6 @@ switch (fpp-fpp_prodid) { case PCI_PRODUCT_INTEL_82557: case PCI_PRODUCT_INTEL_IN_BUSINESS: - { - const char *chipname = NULL; if (sc-sc_rev = FXP_REV_82558_A4) { chipname = i82558 Ethernet; @@ -352,6 +351,8 @@ sc-sc_flags = ~FXPF_82559_RXCSUM; sc-sc_flags |= FXPF_EXT_RFA; } + if (sc-sc_rev = FXP_REV_82551) + chipname = i82551 Ethernet; /* * Mark all i82559 and i82550 revisions as having @@ -363,13 +364,12 @@ aprint_normal(: %s, rev %d\n, chipname != NULL ? chipname : fpp-fpp_name, sc-sc_rev); break; - } case PCI_PRODUCT_INTEL_82559ER: sc-sc_flags |= FXPF_FC|FXPF_EXT_TXCB; /* - * i82559ER doesn't support RX hardware checksumming + * i82559ER/82551ER don't support RX hardware checksumming * even though it has a newer revision number than 82559_A0. */ @@ -380,7 +380,11 @@ if (pa-pa_flags PCI_FLAGS_MWI_OKAY) sc-sc_flags |= FXPF_MWI; - aprint_normal(: %s, rev %d\n, fpp-fpp_name, sc-sc_rev); + if (sc-sc_rev = FXP_REV_82551) + chipname = Intel i82551ER Ethernet; + + aprint_normal(: %s, rev %d\n, chipname != NULL ? chipname : + fpp-fpp_name, sc-sc_rev); break; case PCI_PRODUCT_INTEL_82801BA_LAN:
CVS commit: src/usr.sbin/mrouted
Module Name:src Committed By: lukem Date: Fri Apr 17 16:05:43 UTC 2009 Modified Files: src/usr.sbin/mrouted: cfparse.y igmp.c prune.c route.c Log Message: Fix WARNS=4 (-Wshadow -Wsign-compare -Wcast-qual) To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/usr.sbin/mrouted/cfparse.y cvs rdiff -u -r1.13 -r1.14 src/usr.sbin/mrouted/igmp.c cvs rdiff -u -r1.17 -r1.18 src/usr.sbin/mrouted/prune.c cvs rdiff -u -r1.12 -r1.13 src/usr.sbin/mrouted/route.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/mrouted/cfparse.y diff -u src/usr.sbin/mrouted/cfparse.y:1.15 src/usr.sbin/mrouted/cfparse.y:1.16 --- src/usr.sbin/mrouted/cfparse.y:1.15 Mon Aug 18 05:39:53 2003 +++ src/usr.sbin/mrouted/cfparse.y Fri Apr 17 16:05:43 2009 @@ -1,5 +1,5 @@ %{ -/* $NetBSD: cfparse.y,v 1.15 2003/08/18 05:39:53 itojun Exp $ */ +/* $NetBSD: cfparse.y,v 1.16 2009/04/17 16:05:43 lukem Exp $ */ /* * Configuration file parser for mrouted. @@ -31,11 +31,11 @@ /* * Local function declarations */ -static void fatal(char *fmt, ...) +static void fatal(const char *fmt, ...) __attribute__((__format__(__printf__, 1, 2))); -static void warn(char *fmt, ...) +static void warn(const char *fmt, ...) __attribute__((__format__(__printf__, 1, 2))); -static void yyerror(char *s); +static void yyerror(const char *s); static char * next_word(void); static int yylex(void); static u_int32_t valid_if(char *s); @@ -44,7 +44,7 @@ static FILE *f __attribute__((__unused__)); /* XXX egcs */ extern int udp_socket; -char *configfilename = _PATH_MROUTED_CONF; +const char *configfilename = _PATH_MROUTED_CONF; extern int cache_lifetime; extern int max_prune_lifetime; @@ -390,7 +390,7 @@ ; %% static void -fatal(char *fmt, ...) +fatal(const char *fmt, ...) { va_list ap; char buf[200]; @@ -403,7 +403,7 @@ } static void -warn(char *fmt, ...) +warn(const char *fmt, ...) { va_list ap; char buf[200]; @@ -417,7 +417,7 @@ static void yyerror(s) -char *s; +const char *s; { logit(LOG_ERR, 0, %s: %s near line %d, configfilename, s, lineno); } @@ -577,11 +577,11 @@ char *s; { vifi_t vifi; - struct uvif *v; + struct uvif *uv; - for (vifi=0, v=uvifs; vifinumvifs; vifi++, v++) - if (!strcmp(v-uv_name, s)) - return v-uv_lcl_addr; + for (vifi=0, uv=uvifs; vifinumvifs; vifi++, uv++) + if (!strcmp(uv-uv_name, s)) + return uv-uv_lcl_addr; return 0; } Index: src/usr.sbin/mrouted/igmp.c diff -u src/usr.sbin/mrouted/igmp.c:1.13 src/usr.sbin/mrouted/igmp.c:1.14 --- src/usr.sbin/mrouted/igmp.c:1.13 Thu May 11 21:17:02 2006 +++ src/usr.sbin/mrouted/igmp.c Fri Apr 17 16:05:43 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: igmp.c,v 1.13 2006/05/11 21:17:02 mrg Exp $ */ +/* $NetBSD: igmp.c,v 1.14 2009/04/17 16:05:43 lukem Exp $ */ /* * The mrouted program is covered by the license in the accompanying file @@ -29,7 +29,7 @@ * Local function definitions. */ /* u_char promoted to u_int */ -static char * packet_kind(u_int type, u_int code); +static const char * packet_kind(u_int type, u_int code); static int igmp_log_level(u_int type, u_int code); /* @@ -75,7 +75,7 @@ #define PIM_GRAFT6 #define PIM_GRAFT_ACK7 -static char * +static const char * packet_kind(u_int type, u_int code) { switch (type) { @@ -128,7 +128,7 @@ struct igmp *igmp; int ipdatalen, iphdrlen, igmpdatalen; -if (recvlen sizeof(struct ip)) { +if (recvlen (int)sizeof(struct ip)) { logit(LOG_WARNING, 0, received packet too short (%u bytes) for IP header, recvlen); return; Index: src/usr.sbin/mrouted/prune.c diff -u src/usr.sbin/mrouted/prune.c:1.17 src/usr.sbin/mrouted/prune.c:1.18 --- src/usr.sbin/mrouted/prune.c:1.17 Thu May 25 01:41:13 2006 +++ src/usr.sbin/mrouted/prune.c Fri Apr 17 16:05:43 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: prune.c,v 1.17 2006/05/25 01:41:13 christos Exp $ */ +/* $NetBSD: prune.c,v 1.18 2009/04/17 16:05:43 lukem Exp $ */ /* * The mrouted program is covered by the license in the accompanying file @@ -56,7 +56,7 @@ static void send_graft_ack(u_int32_t src, u_int32_t dst, u_int32_t origin, u_int32_t grp); static void update_kernel(struct gtable *g); -static char * scaletime(u_long t); +static const char * scaletime(u_long t); /* * Updates the ttl values for each vif. @@ -1211,7 +1211,7 @@ /* Refresh the group's lifetime */ g-gt_timer = CACHE_LIFETIME(cache_lifetime); - if (g-gt_timer prun_tmr) + if ((u_int32_t)g-gt_timer prun_tmr) g-gt_timer = prun_tmr; /* @@ -1834,7 +1834,7 @@ } -static char * +static const char * scaletime(u_long t) { static char buf1[5]; @@ -1994,7 +1994,7 @@ /* * if it is a packet with all reports filled, drop it */ -if ((rcount = (datalen - QLEN)/RLEN) == no) { +if ((u_int)(rcount = (datalen - QLEN)/RLEN) == no) { logit(LOG_DEBUG,
CVS commit: src/sys/dev/pci
Module Name:src Committed By: cegger Date: Fri Apr 17 16:57:37 UTC 2009 Modified Files: src/sys/dev/pci: if_tlp_pci.c Log Message: check return code of tlp_attach() To generate a diff of this commit: cvs rdiff -u -r1.110 -r1.111 src/sys/dev/pci/if_tlp_pci.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/pci/if_tlp_pci.c diff -u src/sys/dev/pci/if_tlp_pci.c:1.110 src/sys/dev/pci/if_tlp_pci.c:1.111 --- src/sys/dev/pci/if_tlp_pci.c:1.110 Fri Apr 17 14:07:32 2009 +++ src/sys/dev/pci/if_tlp_pci.c Fri Apr 17 16:57:37 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: if_tlp_pci.c,v 1.110 2009/04/17 14:07:32 cegger Exp $ */ +/* $NetBSD: if_tlp_pci.c,v 1.111 2009/04/17 16:57:37 cegger Exp $ */ /*- * Copyright (c) 1998, 1999, 2000, 2002 The NetBSD Foundation, Inc. @@ -36,7 +36,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: if_tlp_pci.c,v 1.110 2009/04/17 14:07:32 cegger Exp $); +__KERNEL_RCSID(0, $NetBSD: if_tlp_pci.c,v 1.111 2009/04/17 16:57:37 cegger Exp $); #include sys/param.h #include sys/systm.h @@ -1029,7 +1029,9 @@ /* * Finish off the attach. */ - tlp_attach(sc, enaddr); + error = tlp_attach(sc, enaddr); + if (error) + goto fail; return; fail:
CVS commit: src/sys/dev/pci
Module Name:src Committed By: cegger Date: Fri Apr 17 18:43:53 UTC 2009 Modified Files: src/sys/dev/pci: if_tlp_pci.c Log Message: pci_activate() wants a softc and not a device To generate a diff of this commit: cvs rdiff -u -r1.111 -r1.112 src/sys/dev/pci/if_tlp_pci.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/pci/if_tlp_pci.c diff -u src/sys/dev/pci/if_tlp_pci.c:1.111 src/sys/dev/pci/if_tlp_pci.c:1.112 --- src/sys/dev/pci/if_tlp_pci.c:1.111 Fri Apr 17 16:57:37 2009 +++ src/sys/dev/pci/if_tlp_pci.c Fri Apr 17 18:43:53 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: if_tlp_pci.c,v 1.111 2009/04/17 16:57:37 cegger Exp $ */ +/* $NetBSD: if_tlp_pci.c,v 1.112 2009/04/17 18:43:53 cegger Exp $ */ /*- * Copyright (c) 1998, 1999, 2000, 2002 The NetBSD Foundation, Inc. @@ -36,7 +36,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: if_tlp_pci.c,v 1.111 2009/04/17 16:57:37 cegger Exp $); +__KERNEL_RCSID(0, $NetBSD: if_tlp_pci.c,v 1.112 2009/04/17 18:43:53 cegger Exp $); #include sys/param.h #include sys/systm.h @@ -523,7 +523,7 @@ } /* power up chip */ - if ((error = pci_activate(pa-pa_pc, pa-pa_tag, self, + if ((error = pci_activate(pa-pa_pc, pa-pa_tag, (void *)psc, NULL)) error != EOPNOTSUPP) { aprint_error_dev(self, cannot activate %d\n, error);
CVS commit: src/share/man/man9
Module Name:src Committed By: cegger Date: Fri Apr 17 19:02:04 UTC 2009 Modified Files: src/share/man/man9: pci.9 Log Message: pci_activate() wants a device and not a softc. This matches the implementation. To generate a diff of this commit: cvs rdiff -u -r1.28 -r1.29 src/share/man/man9/pci.9 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/man9/pci.9 diff -u src/share/man/man9/pci.9:1.28 src/share/man/man9/pci.9:1.29 --- src/share/man/man9/pci.9:1.28 Fri Apr 17 18:28:39 2009 +++ src/share/man/man9/pci.9 Fri Apr 17 19:02:03 2009 @@ -1,4 +1,4 @@ -.\ $NetBSD: pci.9,v 1.28 2009/04/17 18:28:39 cegger Exp $ +.\ $NetBSD: pci.9,v 1.29 2009/04/17 19:02:03 cegger Exp $ .\ .\ Copyright (c) 2001, 2003 The NetBSD Foundation, Inc. .\ All rights reserved. @@ -66,9 +66,9 @@ .In dev/pci/pcireg.h .In dev/pci/pcidevs.h .Ft int -.Fn pci_activate pci_chipset_tag_t pc pcitag_t tag void *sc \ +.Fn pci_activate pci_chipset_tag_t pc pcitag_t tag device_t dev \ int (*wakeup)(pci_chipset_tag_t pc, pcitag_t tag \ -\t\tvoid *sc, pcireg_t reg) +\t\tdevice_t dev, pcireg_t reg) .Ft pcireg_t .Fn pci_conf_read pci_chipset_tag_t pc pcitag_t tag int reg .Ft void @@ -216,7 +216,7 @@ .El .Sh FUNCTIONS .Bl -tag -width compact -.It Fn pci_activate pc tag sc fun +.It Fn pci_activate pc tag dev fun Attempt to bring the device to state D0. If the device is not in the D0 state call .Fa fun
CVS commit: src/sys/dev/drm
Module Name:src Committed By: joerg Date: Fri Apr 17 19:02:33 UTC 2009 Modified Files: src/sys/dev/drm: drm_drv.c drm_irq.c Log Message: Move initialisation of the irq spinlock into the device handling code, at least the Intel driver depends on it whether the IRQ is currently enabled or not. To generate a diff of this commit: cvs rdiff -u -r1.22 -r1.23 src/sys/dev/drm/drm_drv.c cvs rdiff -u -r1.16 -r1.17 src/sys/dev/drm/drm_irq.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/drm/drm_drv.c diff -u src/sys/dev/drm/drm_drv.c:1.22 src/sys/dev/drm/drm_drv.c:1.23 --- src/sys/dev/drm/drm_drv.c:1.22 Sat Jan 31 13:49:29 2009 +++ src/sys/dev/drm/drm_drv.c Fri Apr 17 19:02:33 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: drm_drv.c,v 1.22 2009/01/31 13:49:29 bouyer Exp $ */ +/* $NetBSD: drm_drv.c,v 1.23 2009/04/17 19:02:33 joerg Exp $ */ /* drm_drv.h -- Generic driver template -*- linux-c -*- * Created: Thu Nov 23 03:10:50 2000 by gar...@valinux.com @@ -34,7 +34,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: drm_drv.c,v 1.22 2009/01/31 13:49:29 bouyer Exp $); +__KERNEL_RCSID(0, $NetBSD: drm_drv.c,v 1.23 2009/04/17 19:02:33 joerg Exp $); /* __FBSDID($FreeBSD: src/sys/dev/drm/drm_drv.c,v 1.6 2006/09/07 23:04:47 anholt Exp $); */ @@ -302,6 +302,7 @@ int i; DRM_SPINLOCK_ASSERT(dev-dev_lock); + DRM_SPININIT(dev-irq_lock, DRM IRQ lock); /* prebuild the SAREA */ i = drm_addmap(dev, 0, SAREA_MAX, _DRM_SHM, @@ -436,6 +437,8 @@ free(filep, M_DRM); } + DRM_SPINUNINIT(dev-irq_lock); + return 0; } Index: src/sys/dev/drm/drm_irq.c diff -u src/sys/dev/drm/drm_irq.c:1.16 src/sys/dev/drm/drm_irq.c:1.17 --- src/sys/dev/drm/drm_irq.c:1.16 Mon Jul 7 00:33:23 2008 +++ src/sys/dev/drm/drm_irq.c Fri Apr 17 19:02:33 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: drm_irq.c,v 1.16 2008/07/07 00:33:23 mrg Exp $ */ +/* $NetBSD: drm_irq.c,v 1.17 2009/04/17 19:02:33 joerg Exp $ */ /* drm_irq.c -- IRQ IOCTL and function support * Created: Fri Oct 18 2003 by anh...@freebsd.org @@ -31,7 +31,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: drm_irq.c,v 1.16 2008/07/07 00:33:23 mrg Exp $); +__KERNEL_RCSID(0, $NetBSD: drm_irq.c,v 1.17 2009/04/17 19:02:33 joerg Exp $); /* __FBSDID($FreeBSD: src/sys/dev/drm/drm_irq.c,v 1.2 2005/11/28 23:13:52 anholt Exp $); */ @@ -94,8 +94,6 @@ dev-context_flag = 0; - DRM_SPININIT(dev-irq_lock, DRM IRQ lock); - /* Before installing handler */ dev-driver.irq_preinstall(dev); @@ -141,7 +139,6 @@ dev-driver.irq_uninstall(dev); pci_intr_disestablish(dev-pa.pa_pc, dev-irqh); - DRM_SPINUNINIT(dev-irq_lock); return 0; }
CVS commit: src/sys/dev/pci
Module Name:src Committed By: cegger Date: Fri Apr 17 19:04:20 UTC 2009 Modified Files: src/sys/dev/pci: if_tlp_pci.c Log Message: backout rev. 1.112. I was misleaded by the wrong pci(9) manpage. To generate a diff of this commit: cvs rdiff -u -r1.112 -r1.113 src/sys/dev/pci/if_tlp_pci.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/pci/if_tlp_pci.c diff -u src/sys/dev/pci/if_tlp_pci.c:1.112 src/sys/dev/pci/if_tlp_pci.c:1.113 --- src/sys/dev/pci/if_tlp_pci.c:1.112 Fri Apr 17 18:43:53 2009 +++ src/sys/dev/pci/if_tlp_pci.c Fri Apr 17 19:04:20 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: if_tlp_pci.c,v 1.112 2009/04/17 18:43:53 cegger Exp $ */ +/* $NetBSD: if_tlp_pci.c,v 1.113 2009/04/17 19:04:20 cegger Exp $ */ /*- * Copyright (c) 1998, 1999, 2000, 2002 The NetBSD Foundation, Inc. @@ -36,7 +36,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: if_tlp_pci.c,v 1.112 2009/04/17 18:43:53 cegger Exp $); +__KERNEL_RCSID(0, $NetBSD: if_tlp_pci.c,v 1.113 2009/04/17 19:04:20 cegger Exp $); #include sys/param.h #include sys/systm.h @@ -523,7 +523,7 @@ } /* power up chip */ - if ((error = pci_activate(pa-pa_pc, pa-pa_tag, (void *)psc, + if ((error = pci_activate(pa-pa_pc, pa-pa_tag, self, NULL)) error != EOPNOTSUPP) { aprint_error_dev(self, cannot activate %d\n, error);
CVS commit: src/sys/dev
Module Name:src Committed By: dyoung Date: Fri Apr 17 20:04:35 UTC 2009 Modified Files: src/sys/dev: audio.c Log Message: Detach audio(4) during shutdown. To generate a diff of this commit: cvs rdiff -u -r1.243 -r1.244 src/sys/dev/audio.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/audio.c diff -u src/sys/dev/audio.c:1.243 src/sys/dev/audio.c:1.244 --- src/sys/dev/audio.c:1.243 Tue Jun 10 22:53:08 2008 +++ src/sys/dev/audio.c Fri Apr 17 20:04:35 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: audio.c,v 1.243 2008/06/10 22:53:08 cegger Exp $ */ +/* $NetBSD: audio.c,v 1.244 2009/04/17 20:04:35 dyoung Exp $ */ /* * Copyright (c) 1991-1993 Regents of the University of California. @@ -61,7 +61,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: audio.c,v 1.243 2008/06/10 22:53:08 cegger Exp $); +__KERNEL_RCSID(0, $NetBSD: audio.c,v 1.244 2009/04/17 20:04:35 dyoung Exp $); #include audio.h #if NAUDIO 0 @@ -262,8 +262,9 @@ .channels = 1, }; -CFATTACH_DECL_NEW(audio, sizeof(struct audio_softc), -audioprobe, audioattach, audiodetach, audioactivate); +CFATTACH_DECL3_NEW(audio, sizeof(struct audio_softc), +audioprobe, audioattach, audiodetach, audioactivate, NULL, NULL, +DVF_DETACH_SHUTDOWN); extern struct cfdriver audio_cd;
CVS commit: src/external/bsd/dhcpcd/dist
Module Name:src Committed By: roy Date: Fri Apr 17 20:05:30 UTC 2009 Update of /cvsroot/src/external/bsd/dhcpcd/dist In directory ivanova.netbsd.org:/tmp/cvs-serv14945 Log Message: Import dhcpcd-4.0.13 Fixed since dhcpcd-4.0.12 include * Every DHCP message now requires a ServerID as some rogue DHCP servers NAK without one. * Extra UDP validation is now done for testing dhcpcd over a loopback Status: Vendor Tag: roy Release Tags: dhcpcd-4-0-13 U src/external/bsd/dhcpcd/dist/dhcpcd-run-hooks.8.in U src/external/bsd/dhcpcd/dist/dhcpcd.conf.5.in U src/external/bsd/dhcpcd/dist/config.h U src/external/bsd/dhcpcd/dist/bpf.c U src/external/bsd/dhcpcd/dist/client.c U src/external/bsd/dhcpcd/dist/dhcp.c U src/external/bsd/dhcpcd/dist/logger.c U src/external/bsd/dhcpcd/dist/configure.c U src/external/bsd/dhcpcd/dist/client.h U src/external/bsd/dhcpcd/dist/dhcp.h U src/external/bsd/dhcpcd/dist/logger.h U src/external/bsd/dhcpcd/dist/bpf-filter.h U src/external/bsd/dhcpcd/dist/configure.h U src/external/bsd/dhcpcd/dist/dhcpcd.conf U src/external/bsd/dhcpcd/dist/common.c U src/external/bsd/dhcpcd/dist/dhcpcd-run-hooks.in U src/external/bsd/dhcpcd/dist/signals.c U src/external/bsd/dhcpcd/dist/if-bsd.c U src/external/bsd/dhcpcd/dist/signals.h U src/external/bsd/dhcpcd/dist/README U src/external/bsd/dhcpcd/dist/dhcpcd.8.in U src/external/bsd/dhcpcd/dist/dhcpcd.c U src/external/bsd/dhcpcd/dist/net.c U src/external/bsd/dhcpcd/dist/dhcpcd.h U src/external/bsd/dhcpcd/dist/net.h U src/external/bsd/dhcpcd/dist/common.h U src/external/bsd/dhcpcd/dist/dhcpcd-hooks/50-ntp.conf U src/external/bsd/dhcpcd/dist/dhcpcd-hooks/10-mtu U src/external/bsd/dhcpcd/dist/dhcpcd-hooks/01-test U src/external/bsd/dhcpcd/dist/dhcpcd-hooks/20-resolv.conf U src/external/bsd/dhcpcd/dist/dhcpcd-hooks/29-lookup-hostname U src/external/bsd/dhcpcd/dist/dhcpcd-hooks/30-hostname No conflicts created by this import
CVS commit: src/doc
Module Name:src Committed By: roy Date: Fri Apr 17 20:09:35 UTC 2009 Modified Files: src/doc: 3RDPARTY CHANGES Log Message: Import dhcpcd-4.0.13 To generate a diff of this commit: cvs rdiff -u -r1.684 -r1.685 src/doc/3RDPARTY cvs rdiff -u -r1.1208 -r1.1209 src/doc/CHANGES Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/3RDPARTY diff -u src/doc/3RDPARTY:1.684 src/doc/3RDPARTY:1.685 --- src/doc/3RDPARTY:1.684 Sun Apr 12 18:34:07 2009 +++ src/doc/3RDPARTY Fri Apr 17 20:09:34 2009 @@ -1,4 +1,4 @@ -# $NetBSD: 3RDPARTY,v 1.684 2009/04/12 18:34:07 christos Exp $ +# $NetBSD: 3RDPARTY,v 1.685 2009/04/17 20:09:34 roy Exp $ # # This file contains a list of the software that has been integrated into # NetBSD where we are not the primary maintainer. @@ -258,8 +258,8 @@ top of the current tree. Package: dhcpcd -Version: 4.0.12 -Current Vers: 4.0.12 +Version: 4.0.13 +Current Vers: 4.0.13 Maintainer: roy Archive Site: ftp://roy.marples.name/pub/dhcpcd/ Home Page: http://roy.marples.name/projects/dhcpcd/ Index: src/doc/CHANGES diff -u src/doc/CHANGES:1.1208 src/doc/CHANGES:1.1209 --- src/doc/CHANGES:1.1208 Sun Apr 12 17:32:41 2009 +++ src/doc/CHANGES Fri Apr 17 20:09:34 2009 @@ -1,4 +1,4 @@ -# LIST OF CHANGES FROM LAST RELEASE: $Revision: 1.1208 $ +# LIST OF CHANGES FROM LAST RELEASE: $Revision: 1.1209 $ # # # [Note: This file does not mention every change made to the NetBSD source tree. @@ -177,3 +177,4 @@ sequential id, add suppport for DS, SSHFP, RRSIG, NSEC, DNSKEY, DHCID, NSEC3, NSEC3PARAM, HIP and DLV, various new api functions. [christos 20090412] + dhcpcd: Import dhcpcd-4.0.13 [roy 20090417]
CVS commit: src/sys
Module Name:src Committed By: dyoung Date: Fri Apr 17 20:22:52 UTC 2009 Modified Files: src/sys/kern: vfs_subr.c src/sys/sys: mount.h Log Message: Make vfs_unmountall() return true if it was able to unmount any filesystem at all, false otherwise. This will support tearing down stacks of filesystems, ccd(4), raid(4), and vnd(4). Change the misleading variable name 'allerror' to 'any_error'. Make it a bool. To generate a diff of this commit: cvs rdiff -u -r1.370 -r1.371 src/sys/kern/vfs_subr.c cvs rdiff -u -r1.186 -r1.187 src/sys/sys/mount.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/kern/vfs_subr.c diff -u src/sys/kern/vfs_subr.c:1.370 src/sys/kern/vfs_subr.c:1.371 --- src/sys/kern/vfs_subr.c:1.370 Mon Mar 30 16:38:05 2009 +++ src/sys/kern/vfs_subr.c Fri Apr 17 20:22:52 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: vfs_subr.c,v 1.370 2009/03/30 16:38:05 yamt Exp $ */ +/* $NetBSD: vfs_subr.c,v 1.371 2009/04/17 20:22:52 dyoung Exp $ */ /*- * Copyright (c) 1997, 1998, 2004, 2005, 2007, 2008 The NetBSD Foundation, Inc. @@ -81,7 +81,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: vfs_subr.c,v 1.370 2009/03/30 16:38:05 yamt Exp $); +__KERNEL_RCSID(0, $NetBSD: vfs_subr.c,v 1.371 2009/04/17 20:22:52 dyoung Exp $); #include opt_ddb.h #include opt_compat_netbsd.h @@ -2230,14 +2230,15 @@ * We traverse the list in reverse order under the assumption that doing so * will avoid needing to worry about dependencies. */ -void +bool vfs_unmountall(struct lwp *l) { struct mount *mp, *nmp; - int allerror, error; + bool any_error, progress; + int error; printf(unmounting file systems...); - for (allerror = 0, mp = CIRCLEQ_LAST(mountlist); + for (any_error = false, mp = CIRCLEQ_LAST(mountlist); !CIRCLEQ_EMPTY(mountlist); mp = nmp) { nmp = CIRCLEQ_PREV(mp, mnt_list); @@ -2246,15 +2247,18 @@ mp-mnt_stat.f_mntonname, mp-mnt_stat.f_mntfromname); #endif atomic_inc_uint(mp-mnt_refcnt); - if ((error = dounmount(mp, MNT_FORCE, l)) != 0) { + if ((error = dounmount(mp, MNT_FORCE, l)) == 0) + progress = true; + else { printf(unmount of %s failed with error %d\n, mp-mnt_stat.f_mntonname, error); - allerror = 1; + any_error = true; } } printf( done\n); - if (allerror) + if (any_error) printf(WARNING: some file systems would not unmount\n); + return progress; } /* Index: src/sys/sys/mount.h diff -u src/sys/sys/mount.h:1.186 src/sys/sys/mount.h:1.187 --- src/sys/sys/mount.h:1.186 Sun Jan 11 02:45:55 2009 +++ src/sys/sys/mount.h Fri Apr 17 20:22:52 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: mount.h,v 1.186 2009/01/11 02:45:55 christos Exp $ */ +/* $NetBSD: mount.h,v 1.187 2009/04/17 20:22:52 dyoung Exp $ */ /* * Copyright (c) 1989, 1991, 1993 @@ -389,7 +389,7 @@ int vfs_mountedon(struct vnode *);/* is a vfs mounted on vp */ int vfs_mountroot(void); void vfs_shutdown(void); /* unmount and sync file systems */ -void vfs_unmountall(struct lwp *); /* unmount file systems */ +bool vfs_unmountall(struct lwp *); /* unmount file systems */ int vfs_busy(struct mount *, struct mount **); int vfs_rootmountalloc(const char *, const char *, struct mount **); void vfs_unbusy(struct mount *, bool, struct mount **);
CVS commit: src/usr.bin/passwd
Module Name:src Committed By: dyoung Date: Fri Apr 17 20:25:08 UTC 2009 Modified Files: src/usr.bin/passwd: local_passwd.c passwd.c Log Message: Rename variables to fix GCC warnings: local variables optopt and optarg shadow globals. To generate a diff of this commit: cvs rdiff -u -r1.32 -r1.33 src/usr.bin/passwd/local_passwd.c cvs rdiff -u -r1.29 -r1.30 src/usr.bin/passwd/passwd.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/passwd/local_passwd.c diff -u src/usr.bin/passwd/local_passwd.c:1.32 src/usr.bin/passwd/local_passwd.c:1.33 --- src/usr.bin/passwd/local_passwd.c:1.32 Sun Apr 12 23:59:37 2009 +++ src/usr.bin/passwd/local_passwd.c Fri Apr 17 20:25:08 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: local_passwd.c,v 1.32 2009/04/12 23:59:37 lukem Exp $ */ +/* $NetBSD: local_passwd.c,v 1.33 2009/04/17 20:25:08 dyoung Exp $ */ /*- * Copyright (c) 1990, 1993, 1994 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = from: @(#)local_passwd.c8.3 (Berkeley) 4/2/94; #else -__RCSID($NetBSD: local_passwd.c,v 1.32 2009/04/12 23:59:37 lukem Exp $); +__RCSID($NetBSD: local_passwd.c,v 1.33 2009/04/17 20:25:08 dyoung Exp $); #endif #endif /* not lint */ @@ -228,9 +228,9 @@ } int -local_arg(char arg, const char *optarg) +local_arg(char ch, const char *arg) { - switch (arg) { + switch (ch) { case 'l': force_local = 1; break; Index: src/usr.bin/passwd/passwd.c diff -u src/usr.bin/passwd/passwd.c:1.29 src/usr.bin/passwd/passwd.c:1.30 --- src/usr.bin/passwd/passwd.c:1.29 Sun Apr 12 23:59:37 2009 +++ src/usr.bin/passwd/passwd.c Fri Apr 17 20:25:08 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: passwd.c,v 1.29 2009/04/12 23:59:37 lukem Exp $ */ +/* $NetBSD: passwd.c,v 1.30 2009/04/17 20:25:08 dyoung Exp $ */ /* * Copyright (c) 1988, 1993, 1994 @@ -39,7 +39,7 @@ #if 0 static char sccsid[] = from: @(#)passwd.c8.3 (Berkeley) 4/2/94; #else -__RCSID($NetBSD: passwd.c,v 1.29 2009/04/12 23:59:37 lukem Exp $); +__RCSID($NetBSD: passwd.c,v 1.30 2009/04/17 20:25:08 dyoung Exp $); #endif #endif /* not lint */ @@ -250,7 +250,7 @@ int ch; char *username; char optstring[64]; /* if we ever get more than 64 args, shoot me. */ - const char *curopt, *optopt; + const char *curopt, *oopt; int i, j; int valid; int use_always; @@ -306,15 +306,15 @@ curopt = pw_modules[i].args; while (*curopt != '\0') { - if ((optopt = strchr(optstring, *curopt)) == NULL) { + if ((oopt = strchr(optstring, *curopt)) == NULL) { optstring[j++] = *curopt; if (curopt[1] == ':') { curopt++; optstring[j++] = *curopt; } optstring[j] = '\0'; - } else if ((optopt[1] == ':' curopt[1] != ':') || - (optopt[1] != ':' curopt[1] == ':')) { + } else if ((oopt[1] == ':' curopt[1] != ':') || + (oopt[1] != ':' curopt[1] == ':')) { errx(1, NetBSD ERROR! Different password modules have two different ideas about %c argument format., curopt[0]); @@ -329,8 +329,8 @@ for (i = 0; pw_modules[i].pw_init != NULL; i++) { if (pw_modules[i].invalid) continue; - if ((optopt = strchr(pw_modules[i].args, ch)) != NULL) { -j = (optopt[1] == ':') ? + if ((oopt = strchr(pw_modules[i].args, ch)) != NULL) { +j = (oopt[1] == ':') ? ! (*pw_modules[i].pw_arg)(ch, optarg) : ! (*pw_modules[i].pw_arg)(ch, NULL); if (j != 0)
CVS commit: src/sys/dev/pci
Module Name:src Committed By: christos Date: Fri Apr 17 20:32:27 UTC 2009 Modified Files: src/sys/dev/pci: ehci_pci.c Log Message: appease gcc To generate a diff of this commit: cvs rdiff -u -r1.41 -r1.42 src/sys/dev/pci/ehci_pci.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/pci/ehci_pci.c diff -u src/sys/dev/pci/ehci_pci.c:1.41 src/sys/dev/pci/ehci_pci.c:1.42 --- src/sys/dev/pci/ehci_pci.c:1.41 Fri Apr 17 15:44:13 2009 +++ src/sys/dev/pci/ehci_pci.c Fri Apr 17 16:32:27 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: ehci_pci.c,v 1.41 2009/04/17 19:44:13 dyoung Exp $ */ +/* $NetBSD: ehci_pci.c,v 1.42 2009/04/17 20:32:27 christos Exp $ */ /* * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: ehci_pci.c,v 1.41 2009/04/17 19:44:13 dyoung Exp $); +__KERNEL_RCSID(0, $NetBSD: ehci_pci.c,v 1.42 2009/04/17 20:32:27 christos Exp $); #include sys/param.h #include sys/systm.h @@ -233,7 +233,7 @@ /* disable interrupts */ EOWRITE2(sc-sc, EHCI_USBINTR, 0); /* XXX grotty hack to flush the write */ - EOREAD2(sc-sc, EHCI_USBINTR); + (void)EOREAD2(sc-sc, EHCI_USBINTR); if (sc-sc_ih != NULL) { pci_intr_disestablish(sc-sc_pc, sc-sc_ih);
CVS commit: src/sys/arch
Module Name:src Committed By: dyoung Date: Fri Apr 17 21:07:59 UTC 2009 Modified Files: src/sys/arch/amd64/amd64: mainbus.c src/sys/arch/i386/i386: mainbus.c src/sys/arch/x86/conf: files.x86 src/sys/arch/x86/include: mpacpi.h mpbiosvar.h mpconfig.h src/sys/arch/x86/x86: mpacpi.c mpbios.c Added Files: src/sys/arch/x86/x86: mp.c Log Message: Introduce sys/arch/x86/x86/mp.c for common x86 MP configuration code. mpacpi_scan_pci() and mpbios_scan_pci() are identical code, so replace them with mp_pci_scan(). Introduce mp_pci_childdetached(), which helps us to detach root PCI buses that were enumerated either by MP BIOS or by ACPI. Let us detach and re-attach PCI buses from mainbus0 on i386. This is necessarily a work-in-progress, because testing detach and re-attach is very difficult: to detach and re-attach the entire PCI tree on most x86 computers that I own is not possible because some essential device attaches under the PCI subtree: the console, com0, NIC, or storage controller always attaches in the PCI tree. To generate a diff of this commit: cvs rdiff -u -r1.26 -r1.27 src/sys/arch/amd64/amd64/mainbus.c cvs rdiff -u -r1.83 -r1.84 src/sys/arch/i386/i386/mainbus.c cvs rdiff -u -r1.50 -r1.51 src/sys/arch/x86/conf/files.x86 cvs rdiff -u -r1.8 -r1.9 src/sys/arch/x86/include/mpacpi.h cvs rdiff -u -r1.7 -r1.8 src/sys/arch/x86/include/mpbiosvar.h cvs rdiff -u -r1.10 -r1.11 src/sys/arch/x86/include/mpconfig.h cvs rdiff -u -r0 -r1.1 src/sys/arch/x86/x86/mp.c cvs rdiff -u -r1.75 -r1.76 src/sys/arch/x86/x86/mpacpi.c cvs rdiff -u -r1.53 -r1.54 src/sys/arch/x86/x86/mpbios.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/amd64/amd64/mainbus.c diff -u src/sys/arch/amd64/amd64/mainbus.c:1.26 src/sys/arch/amd64/amd64/mainbus.c:1.27 --- src/sys/arch/amd64/amd64/mainbus.c:1.26 Mon Nov 10 14:36:59 2008 +++ src/sys/arch/amd64/amd64/mainbus.c Fri Apr 17 21:07:58 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: mainbus.c,v 1.26 2008/11/10 14:36:59 cegger Exp $ */ +/* $NetBSD: mainbus.c,v 1.27 2009/04/17 21:07:58 dyoung Exp $ */ /* * Copyright (c) 1996 Christopher G. Demetriou. All rights reserved. @@ -31,7 +31,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: mainbus.c,v 1.26 2008/11/10 14:36:59 cegger Exp $); +__KERNEL_RCSID(0, $NetBSD: mainbus.c,v 1.27 2009/04/17 21:07:58 dyoung Exp $); #include sys/param.h #include sys/systm.h @@ -263,12 +263,12 @@ mba.mba_pba.pba_bridgetag = NULL; #if NACPI 0 defined(ACPI_SCANPCI) if (mpacpi_active) - mpacpi_scan_pci(self, mba.mba_pba, pcibusprint); + mp_pci_scan(self, mba.mba_pba, pcibusprint); else #endif #if defined(MPBIOS) defined(MPBIOS_SCANPCI) if (mpbios_scanned != 0) - mpbios_scan_pci(self, mba.mba_pba, pcibusprint); + mp_pci_scan(self, mba.mba_pba, pcibusprint); else #endif config_found_ia(self, pcibus, mba.mba_pba, pcibusprint); Index: src/sys/arch/i386/i386/mainbus.c diff -u src/sys/arch/i386/i386/mainbus.c:1.83 src/sys/arch/i386/i386/mainbus.c:1.84 --- src/sys/arch/i386/i386/mainbus.c:1.83 Wed Apr 8 17:08:02 2009 +++ src/sys/arch/i386/i386/mainbus.c Fri Apr 17 21:07:58 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: mainbus.c,v 1.83 2009/04/08 17:08:02 dyoung Exp $ */ +/* $NetBSD: mainbus.c,v 1.84 2009/04/17 21:07:58 dyoung Exp $ */ /* * Copyright (c) 1996 Christopher G. Demetriou. All rights reserved. @@ -31,7 +31,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: mainbus.c,v 1.83 2009/04/08 17:08:02 dyoung Exp $); +__KERNEL_RCSID(0, $NetBSD: mainbus.c,v 1.84 2009/04/17 21:07:58 dyoung Exp $); #include sys/param.h #include sys/systm.h @@ -104,9 +104,11 @@ device_t sc_acpi; device_t sc_dev; device_t sc_ipmi; + device_t sc_pci; device_t sc_mca; device_t sc_pnpbios; bool sc_acpi_present; + bool sc_mpacpi_active; }; CFATTACH_DECL2_NEW(mainbus, sizeof(struct mainbus_softc), @@ -185,6 +187,10 @@ sc-sc_mca = NULL; if (sc-sc_pnpbios == child) sc-sc_pnpbios = NULL; + if (sc-sc_pci == child) + sc-sc_pci = NULL; + + mp_pci_childdetached(self, child); } /* @@ -211,7 +217,6 @@ #if defined(PCI_BUS_FIXUP) int pci_maxbus = 0; #endif - int mpacpi_active = 0; int numcpus = 0; sc-sc_dev = self; @@ -251,10 +256,10 @@ * be done later (via a callback). */ if (sc-sc_acpi_present) - mpacpi_active = mpacpi_scan_apics(self, numcpus); + sc-sc_mpacpi_active = mpacpi_scan_apics(self, numcpus) != 0; #endif - if (!mpacpi_active) { + if (!sc-sc_mpacpi_active) { #ifdef MPBIOS if (mpbios_present) mpbios_scan(self, numcpus); @@ -286,39 +291,7 @@ mainbus_rescan(self, ipmibus, NULL); - /* - * XXX Note also that the presence of a PCI bus should - * XXX _always_ be checked, and if present the bus should be - * XXX 'found'. However, because of the structure of the code, - * XXX that's not currently possible. - */ -#if NPCI 0
CVS commit: src/sys/dev/pci
Module Name:src Committed By: dyoung Date: Fri Apr 17 23:23:24 UTC 2009 Modified Files: src/sys/dev/pci: if_bnx.c Log Message: Bug fix: don't release the Rx DMA maps twice. To generate a diff of this commit: cvs rdiff -u -r1.25 -r1.26 src/sys/dev/pci/if_bnx.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/pci/if_bnx.c diff -u src/sys/dev/pci/if_bnx.c:1.25 src/sys/dev/pci/if_bnx.c:1.26 --- src/sys/dev/pci/if_bnx.c:1.25 Tue Apr 7 18:07:10 2009 +++ src/sys/dev/pci/if_bnx.c Fri Apr 17 23:23:23 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: if_bnx.c,v 1.25 2009/04/07 18:07:10 dyoung Exp $ */ +/* $NetBSD: if_bnx.c,v 1.26 2009/04/17 23:23:23 dyoung Exp $ */ /* $OpenBSD: if_bnx.c,v 1.43 2007/01/30 03:21:10 krw Exp $ */ /*- @@ -35,7 +35,7 @@ #if 0 __FBSDID($FreeBSD: src/sys/dev/bce/if_bce.c,v 1.3 2006/04/13 14:12:26 ru Exp $); #endif -__KERNEL_RCSID(0, $NetBSD: if_bnx.c,v 1.25 2009/04/07 18:07:10 dyoung Exp $); +__KERNEL_RCSID(0, $NetBSD: if_bnx.c,v 1.26 2009/04/17 23:23:23 dyoung Exp $); /* * The following controllers are supported by this driver: @@ -2203,7 +2203,6 @@ void bnx_release_resources(struct bnx_softc *sc) { - int i; struct pci_attach_args *pa = (sc-bnx_pa); DBPRINT(sc, BNX_VERBOSE_RESET, Entering %s()\n, __func__); @@ -2216,10 +2215,6 @@ if (sc-bnx_size) bus_space_unmap(sc-bnx_btag, sc-bnx_bhandle, sc-bnx_size); - for (i = 0; i TOTAL_RX_BD; i++) - if (sc-rx_mbuf_map[i]) - bus_dmamap_destroy(sc-bnx_dmatag, sc-rx_mbuf_map[i]); - DBPRINT(sc, BNX_VERBOSE_RESET, Exiting %s()\n, __func__); }
CVS commit: [netbsd-3] src/dist/ntp/ntpq
Module Name:src Committed By: snj Date: Sat Apr 18 00:25:04 UTC 2009 Modified Files: src/dist/ntp/ntpq [netbsd-3]: ntpq.c Log Message: Pull up following revision(s) (requested by christos in ticket #2009): dist/ntp/ntpq/ntpq.c: revision 1.12 Fix: http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2009-0159 Using: https://support.ntp.org/bugs/show_bug.cgi?id=1144 To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.6.6.1 src/dist/ntp/ntpq/ntpq.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/dist/ntp/ntpq/ntpq.c diff -u src/dist/ntp/ntpq/ntpq.c:1.6 src/dist/ntp/ntpq/ntpq.c:1.6.6.1 --- src/dist/ntp/ntpq/ntpq.c:1.6 Thu Dec 4 16:23:38 2003 +++ src/dist/ntp/ntpq/ntpq.c Sat Apr 18 00:25:04 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: ntpq.c,v 1.6 2003/12/04 16:23:38 drochner Exp $ */ +/* $NetBSD: ntpq.c,v 1.6.6.1 2009/04/18 00:25:04 snj Exp $ */ /* * ntpq - query an NTP server using mode 6 commands @@ -3122,9 +3122,10 @@ if (!decodeuint(value, uval)) output_raw = '?'; else { - char b[10]; + char b[12]; - (void) sprintf(b, %03lo, uval); + (void) snprintf(b, sizeof(b), %03lo, + uval); output(fp, name, b); } break;
CVS commit: [netbsd-3-0] src/doc
Module Name:src Committed By: snj Date: Sat Apr 18 00:28:06 UTC 2009 Modified Files: src/doc [netbsd-3-0]: CHANGES-3.0.4 Log Message: Ticket 2009. To generate a diff of this commit: cvs rdiff -u -r1.1.2.43 -r1.1.2.44 src/doc/CHANGES-3.0.4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-3.0.4 diff -u src/doc/CHANGES-3.0.4:1.1.2.43 src/doc/CHANGES-3.0.4:1.1.2.44 --- src/doc/CHANGES-3.0.4:1.1.2.43 Tue Apr 14 09:03:48 2009 +++ src/doc/CHANGES-3.0.4 Sat Apr 18 00:28:06 2009 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-3.0.4,v 1.1.2.43 2009/04/14 09:03:48 jdc Exp $ +# $NetBSD: CHANGES-3.0.4,v 1.1.2.44 2009/04/18 00:28:06 snj Exp $ A complete list of changes from the NetBSD 3.0.3 release to the NetBSD 3.0.4 release: @@ -1273,3 +1273,9 @@ sys/kern/uipc_usrreq.cpatch Fix a problem with a failure path (PR#38391). [mlelstv, ticket #2005] + +dist/ntp/ntpq/ntpq.c1.12 + + Fix CVE-2009-0159. + [christos, ticket #2009] +
CVS commit: [netbsd-3-1] src/dist/ntp/ntpq
Module Name:src Committed By: snj Date: Sat Apr 18 00:28:43 UTC 2009 Modified Files: src/dist/ntp/ntpq [netbsd-3-1]: ntpq.c Log Message: Pull up following revision(s) (requested by christos in ticket #2009): dist/ntp/ntpq/ntpq.c: revision 1.12 Fix: http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2009-0159 Using: https://support.ntp.org/bugs/show_bug.cgi?id=1144 To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.6.12.1 src/dist/ntp/ntpq/ntpq.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/dist/ntp/ntpq/ntpq.c diff -u src/dist/ntp/ntpq/ntpq.c:1.6 src/dist/ntp/ntpq/ntpq.c:1.6.12.1 --- src/dist/ntp/ntpq/ntpq.c:1.6 Thu Dec 4 16:23:38 2003 +++ src/dist/ntp/ntpq/ntpq.c Sat Apr 18 00:28:43 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: ntpq.c,v 1.6 2003/12/04 16:23:38 drochner Exp $ */ +/* $NetBSD: ntpq.c,v 1.6.12.1 2009/04/18 00:28:43 snj Exp $ */ /* * ntpq - query an NTP server using mode 6 commands @@ -3122,9 +3122,10 @@ if (!decodeuint(value, uval)) output_raw = '?'; else { - char b[10]; + char b[12]; - (void) sprintf(b, %03lo, uval); + (void) snprintf(b, sizeof(b), %03lo, + uval); output(fp, name, b); } break;
CVS commit: [netbsd-3-1] src/doc
Module Name:src Committed By: snj Date: Sat Apr 18 00:29:44 UTC 2009 Modified Files: src/doc [netbsd-3-1]: CHANGES-3.1.2 Log Message: Ticket 2009. To generate a diff of this commit: cvs rdiff -u -r1.1.2.40 -r1.1.2.41 src/doc/CHANGES-3.1.2 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-3.1.2 diff -u src/doc/CHANGES-3.1.2:1.1.2.40 src/doc/CHANGES-3.1.2:1.1.2.41 --- src/doc/CHANGES-3.1.2:1.1.2.40 Tue Apr 14 09:04:08 2009 +++ src/doc/CHANGES-3.1.2 Sat Apr 18 00:29:43 2009 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-3.1.2,v 1.1.2.40 2009/04/14 09:04:08 jdc Exp $ +# $NetBSD: CHANGES-3.1.2,v 1.1.2.41 2009/04/18 00:29:43 snj Exp $ A complete list of changes from the NetBSD 3.1.1 release to the NetBSD 3.1.2 release: @@ -1181,3 +1181,9 @@ sys/kern/uipc_usrreq.cpatch Fix a problem with a failure path (PR#38391). [mlelstv, ticket #2005] + +dist/ntp/ntpq/ntpq.c1.12 + + Fix CVE-2009-0159. + [christos, ticket #2009] +
CVS commit: [netbsd-4] src/doc
Module Name:src Committed By: snj Date: Sat Apr 18 00:31:54 UTC 2009 Modified Files: src/doc [netbsd-4]: CHANGES-4.1 Log Message: Ticket 1308. To generate a diff of this commit: cvs rdiff -u -r1.1.2.143 -r1.1.2.144 src/doc/CHANGES-4.1 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-4.1 diff -u src/doc/CHANGES-4.1:1.1.2.143 src/doc/CHANGES-4.1:1.1.2.144 --- src/doc/CHANGES-4.1:1.1.2.143 Wed Apr 15 21:07:13 2009 +++ src/doc/CHANGES-4.1 Sat Apr 18 00:31:54 2009 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-4.1,v 1.1.2.143 2009/04/15 21:07:13 snj Exp $ +# $NetBSD: CHANGES-4.1,v 1.1.2.144 2009/04/18 00:31:54 snj Exp $ A complete list of changes from the NetBSD 4.0 release to the NetBSD 4.1 release: @@ -3010,3 +3010,8 @@ While here, use -Os instead of -O2 to compile mvme68k stand code. [scw, ticket #1304] +dist/ntp/ntpq/ntpq.c1.12 + + Fix CVE-2009-0159. + [christos, ticket #1308] +
CVS commit: [netbsd-4-0] src/dist/ntp/ntpq
Module Name:src Committed By: snj Date: Sat Apr 18 00:32:26 UTC 2009 Modified Files: src/dist/ntp/ntpq [netbsd-4-0]: ntpq.c Log Message: Pull up following revision(s) (requested by christos in ticket #1308): dist/ntp/ntpq/ntpq.c: revision 1.12 Fix: http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2009-0159 Using: https://support.ntp.org/bugs/show_bug.cgi?id=1144 To generate a diff of this commit: cvs rdiff -u -r1.10.4.1 -r1.10.4.1.2.1 src/dist/ntp/ntpq/ntpq.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/dist/ntp/ntpq/ntpq.c diff -u src/dist/ntp/ntpq/ntpq.c:1.10.4.1 src/dist/ntp/ntpq/ntpq.c:1.10.4.1.2.1 --- src/dist/ntp/ntpq/ntpq.c:1.10.4.1 Tue Aug 21 08:40:22 2007 +++ src/dist/ntp/ntpq/ntpq.c Sat Apr 18 00:32:26 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: ntpq.c,v 1.10.4.1 2007/08/21 08:40:22 ghen Exp $ */ +/* $NetBSD: ntpq.c,v 1.10.4.1.2.1 2009/04/18 00:32:26 snj Exp $ */ /* * ntpq - query an NTP server using mode 6 commands @@ -3187,9 +3187,10 @@ if (!decodeuint(value, uval)) output_raw = '?'; else { - char b[10]; + char b[12]; - (void) sprintf(b, %03lo, uval); + (void) snprintf(b, sizeof(b), %03lo, + uval); output(fp, name, b); } break;
CVS commit: [netbsd-4-0] src/doc
Module Name:src Committed By: snj Date: Sat Apr 18 00:32:59 UTC 2009 Modified Files: src/doc [netbsd-4-0]: CHANGES-4.0.2 Log Message: Ticket 1308. To generate a diff of this commit: cvs rdiff -u -r1.1.2.25 -r1.1.2.26 src/doc/CHANGES-4.0.2 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-4.0.2 diff -u src/doc/CHANGES-4.0.2:1.1.2.25 src/doc/CHANGES-4.0.2:1.1.2.26 --- src/doc/CHANGES-4.0.2:1.1.2.25 Wed Apr 15 21:05:53 2009 +++ src/doc/CHANGES-4.0.2 Sat Apr 18 00:32:59 2009 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-4.0.2,v 1.1.2.25 2009/04/15 21:05:53 snj Exp $ +# $NetBSD: CHANGES-4.0.2,v 1.1.2.26 2009/04/18 00:32:59 snj Exp $ A complete list of changes from the NetBSD 4.0.1 release to the NetBSD 4.0.2 release: @@ -211,3 +211,8 @@ While here, use -Os instead of -O2 to compile mvme68k stand code. [scw, ticket #1304] +dist/ntp/ntpq/ntpq.c1.12 + + Fix CVE-2009-0159. + [christos, ticket #1308] +
CVS commit: src/usr.bin/patch
Module Name:src Committed By: lukem Date: Sat Apr 18 03:25:34 UTC 2009 Modified Files: src/usr.bin/patch: inp.c Log Message: Attempt to fix previous to address a coredump. To generate a diff of this commit: cvs rdiff -u -r1.20 -r1.21 src/usr.bin/patch/inp.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/patch/inp.c diff -u src/usr.bin/patch/inp.c:1.20 src/usr.bin/patch/inp.c:1.21 --- src/usr.bin/patch/inp.c:1.20 Mon Apr 13 00:07:26 2009 +++ src/usr.bin/patch/inp.c Sat Apr 18 03:25:34 2009 @@ -1,7 +1,7 @@ /* * $OpenBSD: inp.c,v 1.34 2006/03/11 19:41:30 otto Exp $ * $DragonFly: src/usr.bin/patch/inp.c,v 1.6 2007/09/29 23:11:10 swildner Exp $ - * $NetBSD: inp.c,v 1.20 2009/04/13 00:07:26 lukem Exp $ + * $NetBSD: inp.c,v 1.21 2009/04/18 03:25:34 lukem Exp $ */ /* @@ -31,7 +31,7 @@ */ #include sys/cdefs.h -__RCSID($NetBSD: inp.c,v 1.20 2009/04/13 00:07:26 lukem Exp $); +__RCSID($NetBSD: inp.c,v 1.21 2009/04/18 03:25:34 lukem Exp $); #include sys/types.h #include sys/file.h @@ -253,7 +253,7 @@ out_of_mem = false; return false; /* force plan b because plan a bombed */ } - if (i_size (off_t)SIZE_MAX) { + if ((uintmax_t)i_size (uintmax_t)SIZE_MAX) { say(block too large to mmap\n); return false; }
CVS commit: src/usr.sbin/netgroup_mkdb
Module Name:src Committed By: lukem Date: Sat Apr 18 05:09:16 UTC 2009 Modified Files: src/usr.sbin/netgroup_mkdb: netgroup_mkdb.c Log Message: Fix -Wcast-qual issues To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/usr.sbin/netgroup_mkdb/netgroup_mkdb.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/netgroup_mkdb/netgroup_mkdb.c diff -u src/usr.sbin/netgroup_mkdb/netgroup_mkdb.c:1.16 src/usr.sbin/netgroup_mkdb/netgroup_mkdb.c:1.17 --- src/usr.sbin/netgroup_mkdb/netgroup_mkdb.c:1.16 Sat Dec 15 19:44:56 2007 +++ src/usr.sbin/netgroup_mkdb/netgroup_mkdb.c Sat Apr 18 05:09:15 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: netgroup_mkdb.c,v 1.16 2007/12/15 19:44:56 perry Exp $ */ +/* $NetBSD: netgroup_mkdb.c,v 1.17 2009/04/18 05:09:15 lukem Exp $ */ /* * Copyright (c) 1994 Christos Zoulas @@ -32,7 +32,7 @@ */ #include sys/cdefs.h #ifndef lint -__RCSID($NetBSD: netgroup_mkdb.c,v 1.16 2007/12/15 19:44:56 perry Exp $); +__RCSID($NetBSD: netgroup_mkdb.c,v 1.17 2009/04/18 05:09:15 lukem Exp $); #endif #include sys/types.h @@ -95,7 +95,7 @@ static const char ng_empty[] = ; #define NG_EMPTY(a) ((a) ? (a) : ng_empty) -static char*dbname = _PATH_NETGROUP_DB; +static const char *dbname = _PATH_NETGROUP_DB; int main(int argc, char **argv) @@ -103,7 +103,7 @@ DB *db, *ndb, *hdb, *udb; int ch; char buf[MAXPATHLEN]; - char *fname = _PATH_NETGROUP; + const char *fname = _PATH_NETGROUP; while ((ch = getopt(argc, argv, dDo:)) != -1) @@ -315,7 +315,7 @@ DB *xdb = NULL; DBT key, data; - key.data = (u_char *)name; + key.data = __UNCONST(name); key.size = strlen(name) + 1; switch ((db-get)(db, key, data, 0)) {