Module Name: src Committed By: martin Date: Mon Oct 20 09:55:55 UTC 2014
Modified Files: src/sys/compat/svr4 [netbsd-7]: svr4_stat.c src/sys/dev/dm [netbsd-7]: dm_target_snapshot.c src/sys/dev/if_ndis [netbsd-7]: if_ndis_pci.c src/sys/fs/smbfs [netbsd-7]: smbfs_smb.c src/sys/ufs/ext2fs [netbsd-7]: ext2fs_readwrite.c Log Message: Pullup the following revisions, requested by maxv in ticket #148: sys/compat/svr4/svr4_stat.c 1.70 sys/dev/dm/dm_target_snapshot.c 1.17 sys/dev/if_ndis/if_ndis_pci.c 1.20 sys/fs/smbfs/smbfs_smb.c 1.45 sys/ufs/ext2fs/ext2fs_readwrite.c 1.65 Various fixes: two memory leaks, a typo, a dead compiler condition and unused macros, respectively in if_ndis and dm, smbfs, svr4 and ext2fs. To generate a diff of this commit: cvs rdiff -u -r1.69 -r1.69.40.1 src/sys/compat/svr4/svr4_stat.c cvs rdiff -u -r1.16 -r1.16.2.1 src/sys/dev/dm/dm_target_snapshot.c cvs rdiff -u -r1.19 -r1.19.12.1 src/sys/dev/if_ndis/if_ndis_pci.c cvs rdiff -u -r1.44 -r1.44.12.1 src/sys/fs/smbfs/smbfs_smb.c cvs rdiff -u -r1.64 -r1.64.8.1 src/sys/ufs/ext2fs/ext2fs_readwrite.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/compat/svr4/svr4_stat.c diff -u src/sys/compat/svr4/svr4_stat.c:1.69 src/sys/compat/svr4/svr4_stat.c:1.69.40.1 --- src/sys/compat/svr4/svr4_stat.c:1.69 Sun Jan 11 02:45:50 2009 +++ src/sys/compat/svr4/svr4_stat.c Mon Oct 20 09:55:54 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: svr4_stat.c,v 1.69 2009/01/11 02:45:50 christos Exp $ */ +/* $NetBSD: svr4_stat.c,v 1.69.40.1 2014/10/20 09:55:54 martin Exp $ */ /*- * Copyright (c) 1994, 2008 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: svr4_stat.c,v 1.69 2009/01/11 02:45:50 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: svr4_stat.c,v 1.69.40.1 2014/10/20 09:55:54 martin Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -478,7 +478,6 @@ svr4_sys_systeminfo(struct lwp *l, const #if defined(__i386__) str = "i86pc"; #elif defined(__sparc__) -#elif defined(__sparc__) { extern char machine_model[]; Index: src/sys/dev/dm/dm_target_snapshot.c diff -u src/sys/dev/dm/dm_target_snapshot.c:1.16 src/sys/dev/dm/dm_target_snapshot.c:1.16.2.1 --- src/sys/dev/dm/dm_target_snapshot.c:1.16 Sat Jun 14 07:39:00 2014 +++ src/sys/dev/dm/dm_target_snapshot.c Mon Oct 20 09:55:54 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: dm_target_snapshot.c,v 1.16 2014/06/14 07:39:00 hannken Exp $ */ +/* $NetBSD: dm_target_snapshot.c,v 1.16.2.1 2014/10/20 09:55:54 martin Exp $ */ /* * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -221,8 +221,7 @@ dm_target_snapshot_init(dm_dev_t * dmv, if ((dmp_snap = dm_pdev_insert(argv[0])) == NULL) return ENOENT; - if ((tsc = kmem_alloc(sizeof(dm_target_snapshot_config_t), KM_NOSLEEP)) - == NULL) + if ((tsc = kmem_alloc(sizeof(*tsc), KM_NOSLEEP)) == NULL) return 1; tsc->tsc_persistent_dev = 0; @@ -232,8 +231,10 @@ dm_target_snapshot_init(dm_dev_t * dmv, tsc->tsc_persistent_dev = 1; /* Insert cow device to global pdev list */ - if ((dmp_cow = dm_pdev_insert(argv[1])) == NULL) + if ((dmp_cow = dm_pdev_insert(argv[1])) == NULL) { + kmem_free(tsc, sizeof(*tsc)); return ENOENT; + } } tsc->tsc_chunk_size = atoi(argv[3]); Index: src/sys/dev/if_ndis/if_ndis_pci.c diff -u src/sys/dev/if_ndis/if_ndis_pci.c:1.19 src/sys/dev/if_ndis/if_ndis_pci.c:1.19.12.1 --- src/sys/dev/if_ndis/if_ndis_pci.c:1.19 Sat Oct 27 17:18:23 2012 +++ src/sys/dev/if_ndis/if_ndis_pci.c Mon Oct 20 09:55:54 2014 @@ -31,7 +31,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_ndis_pci.c,v 1.19 2012/10/27 17:18:23 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_ndis_pci.c,v 1.19.12.1 2014/10/20 09:55:54 martin Exp $"); #ifdef __FreeBSD__ __FBSDID("$FreeBSD: src/sys/dev/if_ndis/if_ndis_pci.c,v 1.8.2.3 2005/03/31 04:24:36 wpaul Exp $"); #endif @@ -358,11 +358,6 @@ void ndis_attach_pci(device_t parent, de printf("pci interrupt: %s\n", pci_intr_string(pa->pa_pc, ih)); - if(rl == NULL) { - sc->error = ENOMEM; - return; - } - /* save resource list in the softc */ sc->ndis_rl = rl; sc->ndis_rescnt = rl->cprl_count; Index: src/sys/fs/smbfs/smbfs_smb.c diff -u src/sys/fs/smbfs/smbfs_smb.c:1.44 src/sys/fs/smbfs/smbfs_smb.c:1.44.12.1 --- src/sys/fs/smbfs/smbfs_smb.c:1.44 Fri Nov 30 23:24:21 2012 +++ src/sys/fs/smbfs/smbfs_smb.c Mon Oct 20 09:55:54 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: smbfs_smb.c,v 1.44 2012/11/30 23:24:21 nakayama Exp $ */ +/* $NetBSD: smbfs_smb.c,v 1.44.12.1 2014/10/20 09:55:54 martin Exp $ */ /*- * Copyright (c) 2003 The NetBSD Foundation, Inc. @@ -64,7 +64,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: smbfs_smb.c,v 1.44 2012/11/30 23:24:21 nakayama Exp $"); +__KERNEL_RCSID(0, "$NetBSD: smbfs_smb.c,v 1.44.12.1 2014/10/20 09:55:54 martin Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -778,7 +778,7 @@ smbfs_smb_move(struct smbnode *src, stru struct mbchain *mbp; int error; - error = smb_rq_alloc(rqp, SSTOCP(ssp), SMB_COM_MOVE, scred, &rqp); + error = smb_rq_alloc(SSTOCP(ssp), SMB_COM_MOVE, scred, &rqp); if (error) return error; smb_rq_getrequest(rqp, &mbp); Index: src/sys/ufs/ext2fs/ext2fs_readwrite.c diff -u src/sys/ufs/ext2fs/ext2fs_readwrite.c:1.64 src/sys/ufs/ext2fs/ext2fs_readwrite.c:1.64.8.1 --- src/sys/ufs/ext2fs/ext2fs_readwrite.c:1.64 Sun Jun 23 07:28:37 2013 +++ src/sys/ufs/ext2fs/ext2fs_readwrite.c Mon Oct 20 09:55:54 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: ext2fs_readwrite.c,v 1.64 2013/06/23 07:28:37 dholland Exp $ */ +/* $NetBSD: ext2fs_readwrite.c,v 1.64.8.1 2014/10/20 09:55:54 martin Exp $ */ /*- * Copyright (c) 1993 @@ -60,7 +60,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ext2fs_readwrite.c,v 1.64 2013/06/23 07:28:37 dholland Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ext2fs_readwrite.c,v 1.64.8.1 2014/10/20 09:55:54 martin Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -82,10 +82,6 @@ __KERNEL_RCSID(0, "$NetBSD: ext2fs_readw #include <ufs/ext2fs/ext2fs.h> #include <ufs/ext2fs/ext2fs_extern.h> - -#define doclusterread 0 /* XXX underway */ -#define doclusterwrite 0 - /* * Vnode op for reading. */