re: CVS commit: src/distrib/sets
> > "dtrace,zfs" means "MKDTRACE=yes" *and* "MKZFS=yes" which is not what > > we want. Invent a flag "solaris" which is the or of those two flags. > > should sets be taught an or operator? Not really. In modular world, these should be represented as modules (syspkg) + dependency. Pretty much same as binary packages + dependencies in pkgsrc. maybe, but this isn't how sets could be used today with our system. there are issues that are like having different, incompatble, build options for packages. some people can't or don't want to use them. eg, do you want to force all pkg users to have no options? i think all the people who want mplayer but don't want arts might get a bit upset with that idea... i think smarter sets tag handling would be great. we could remove a *lot* of duplicated X11 lines.. for instance. this has nothing to do with modular world. .mrg.
Re: CVS commit: src/sys/dev/acpi
On Thu, Mar 04, 2010 at 03:10:18AM +, Paul Goyette wrote: > Module Name: src > Committed By: pgoyette > Date: Thu Mar 4 03:10:18 UTC 2010 > > Modified Files: > src/sys/dev/acpi: smbus_acpi.c > > Log Message: > Replace ACPI_FREE() with AcpiOsFree() so we no longer need to define > _COMPONENT (we don't have a bit defined for SMBUS anyway). This was > uncovered by turning on ACPI_DEBUG for the i386 ALL kernel config. > > Reported by Greg Woods on current-users@ Well, this is wrong in the sense that the _COMPONENT definition was incorrect to begin with, and in the sense that we have explicitly tried to recently add the _COMPONENT definitions. Also: now it does BadThings(tm) if the memory tracking of ACPICA is enabled. The right solution is to e.g. "#define _COMPONENT ACPI_BUS_COMPONENT". The components that can be used are defined in . But a bigger question I'd like to ask from all: do we really need to play these games with the ACPICA; why not just convert everything to use native allocators? - Jukka.
re: CVS commit: src/sys/kern
Module Name: src Committed By:pooka Date:Wed Mar 3 17:58:37 UTC 2010 Modified Files: src/sys/kern: kern_module.c Log Message: Replace unsafe use of TAILQ_FOREACH: as the comment says, the structures are pulled off the list in the loop and it's anyone's guess where they go after that. ... i recommend using TAILQ_FOREACH_SAFE(). :-)
CVS commit: src/sys/dev/acpi
Module Name:src Committed By: pgoyette Date: Thu Mar 4 03:10:18 UTC 2010 Modified Files: src/sys/dev/acpi: smbus_acpi.c Log Message: Replace ACPI_FREE() with AcpiOsFree() so we no longer need to define _COMPONENT (we don't have a bit defined for SMBUS anyway). This was uncovered by turning on ACPI_DEBUG for the i386 ALL kernel config. Reported by Greg Woods on current-users@ To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/dev/acpi/smbus_acpi.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/acpi
Module Name:src Committed By: pgoyette Date: Thu Mar 4 03:10:18 UTC 2010 Modified Files: src/sys/dev/acpi: smbus_acpi.c Log Message: Replace ACPI_FREE() with AcpiOsFree() so we no longer need to define _COMPONENT (we don't have a bit defined for SMBUS anyway). This was uncovered by turning on ACPI_DEBUG for the i386 ALL kernel config. Reported by Greg Woods on current-users@ To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/dev/acpi/smbus_acpi.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/acpi/smbus_acpi.c diff -u src/sys/dev/acpi/smbus_acpi.c:1.3 src/sys/dev/acpi/smbus_acpi.c:1.4 --- src/sys/dev/acpi/smbus_acpi.c:1.3 Mon Mar 1 13:16:21 2010 +++ src/sys/dev/acpi/smbus_acpi.c Thu Mar 4 03:10:18 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: smbus_acpi.c,v 1.3 2010/03/01 13:16:21 jruoho Exp $ */ +/* $NetBSD: smbus_acpi.c,v 1.4 2010/03/04 03:10:18 pgoyette Exp $ */ /*- * Copyright (c) 2009 The NetBSD Foundation, Inc. @@ -36,7 +36,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: smbus_acpi.c,v 1.3 2010/03/01 13:16:21 jruoho Exp $"); +__KERNEL_RCSID(0, "$NetBSD: smbus_acpi.c,v 1.4 2010/03/04 03:10:18 pgoyette Exp $"); #include #include @@ -55,9 +55,6 @@ #include -#define _COMPONENT ACPI_SMBUS_COMPONENT -ACPI_MODULE_NAME("acpi_smbus") - /* * ACPI SMBus CMI protocol codes */ @@ -166,7 +163,7 @@ } done: if (smi_buf.Pointer != NULL) - ACPI_FREE(smi_buf.Pointer); + AcpiOsFree(smi_buf.Pointer); return r; } @@ -215,7 +212,7 @@ } } if (smi_buf.Pointer != NULL) - ACPI_FREE(smi_buf.Pointer); + AcpiOsFree(smi_buf.Pointer); /* Install notify handler if possible */ rv = AcpiInstallNotifyHandler(sc->sc_devnode->ad_handle, @@ -422,7 +419,7 @@ } } if (smbuf.Pointer) - ACPI_FREE(smbuf.Pointer); + AcpiOsFree(smbuf.Pointer); return r; } @@ -467,7 +464,7 @@ } done: if (alert.Pointer != NULL) - ACPI_FREE(alert.Pointer); + AcpiOsFree(alert.Pointer); } while (status == 0); }
Re: CVS commit: src/distrib/sets
> > "dtrace,zfs" means "MKDTRACE=yes" *and* "MKZFS=yes" which is not what > > we want. Invent a flag "solaris" which is the or of those two flags. > > should sets be taught an or operator? Not really. In modular world, these should be represented as modules (syspkg) + dependency. Pretty much same as binary packages + dependencies in pkgsrc. Masao -- Masao Uebayashi / Tombi Inc. / Tel: +81-90-9141-4635
Re: CVS commit: src/distrib/sets
> I specifically decided not to do that because this flag is not necessary > outside of set lists. make(1) can combine two conditions with or just fine. "MKSOLARIS" in *.mk and "solaris" in set lists should be identical. Both mean "build solaris.kmod". MKZFS (zfs.kmod) and MKDTRACE (dtrace.kmod) _depend on_ MKSOLARIS (solaris.kmod). The place where those dependencies are resolved is bsd.own.mk. Masao -- Masao Uebayashi / Tombi Inc. / Tel: +81-90-9141-4635
Re: CVS commit: src/distrib/sets
> The solaris module provides OpenSolaris compatibility functions. Both > DTrace and ZFS are ports from OpenSolaris and rely on the solaris module > to provide some OpenSolaris functionality. Understood, thanks. In modular world, the "rely on" should be represented as a dependency. So we should have two dependencies here: dtrace.kmod -> solaris.kmod zfs.kmod -> solaris.kmod Masao -- Masao Uebayashi / Tombi Inc. / Tel: +81-90-9141-4635
Re: CVS commit: src/share/man/man3
On Wed, Mar 03, 2010 at 12:58:33PM -0500, Greg A. Woods wrote: > I believe that __UNCONST() in particular is _never_ absolutely necessary > -- it may sometimes save a very few cycles and a few bytes of storage, > but that's the best it can do. No such luck, at least not until C grows a stronger type system. See for example strchr(3). -- David A. Holland dholl...@netbsd.org
Re: CVS commit: src/distrib/sets
On Wed, Mar 03, 2010 at 04:13:42PM +, Matthias Scheler wrote: > src/distrib/sets: mkvars.mk sets.subr > src/distrib/sets/lists/modules: mi > > Log Message: > "dtrace,zfs" means "MKDTRACE=yes" *and* "MKZFS=yes" which is not what > we want. Invent a flag "solaris" which is the or of those two flags. should sets be taught an or operator? -- David A. Holland dholl...@netbsd.org
Re: CVS commit: src/distrib/sets
On 3 Mar 2010, at 16:33, Masao Uebayashi wrote: >> +mksolaris: .PHONY >> +.if (${MKDTRACE} != "no" || ${MKZFS} != "no") >> +@echo "MKSOLARIS=yes" >> +.else >> +@echo "MKSOLARIS=no" >> +.endif >> > > Could you move this to bsd.own.mk, where all the dirty work is done now? I specifically decided not to do that because this flag is not necessary outside of set lists. make(1) can combine two conditions with or just fine. Kind regards -- Matthias Scheler http://zhadum.org.uk/
Re: CVS commit: src/distrib/sets
On 4/03/2010, at 5:43 AM, Masao Uebayashi wrote: Log Message: "dtrace,zfs" means "MKDTRACE=yes" *and* "MKZFS=yes" which is not what we want. Invent a flag "solaris" which is the or of those two flags. Why is this needed ? I would rather see two flags one for zfs and one for dtrace. Because solaris.kmod is shared? The real question is, why it's shared... The solaris module provides OpenSolaris compatibility functions. Both DTrace and ZFS are ports from OpenSolaris and rely on the solaris module to provide some OpenSolaris functionality. Darran.
Re: CVS commit: src/share/man/man3
On Wed, Mar 03, 2010 at 12:58:33PM -0500, Greg A. Woods wrote: > I believe that __UNCONST() in particular is _never_ absolutely necessary > -- it may sometimes save a very few cycles and a few bytes of storage, > but that's the best it can do. At least one important interface would use its purpose without __UNCONST. I'm talking about writev -- if you have to copy all constants first, because struct iovec has a void * as iov_base, it stops making sense to use writev in first place. There is the general issue of const char ** vs char * const * in POSIX to be considered as well. Joerg
Re: CVS commit: src/share/man/man3
At Tue, 02 Mar 2010 07:57:42 +1100, matthew green wrote: Subject: re: CVS commit: src/share/man/man3 > > >Module Name: src >Committed By: jruoho >Date: Mon Mar 1 13:44:10 UTC 2010 > >Modified Files: > src/share/man/man3: Makefile >Added Files: > src/share/man/man3: __UNCONST.3 > >Log Message: >Document __UNCONST and __UNVOLATILE. > >XXX: If there is anything to add or correct, please do so! > > > could you use some stronger wording about avoiding using these unless > absolutely necessary, and please note that they can also be used for > variable assignment, not just for function calls. Perhaps it would also be good to suggest correct ways to avoid "const" mismatches in the first place, such as in variable assignments by copying strings into non-const (eg. allocated) storage instead of trying to assign pointers to them to a "char *". I believe that __UNCONST() in particular is _never_ absolutely necessary -- it may sometimes save a very few cycles and a few bytes of storage, but that's the best it can do. -- Greg A. Woods Planix, Inc. +1 416 218 0099http://www.planix.com/ pgpP7uiHUBnzO.pgp Description: PGP signature
CVS commit: src/sys/kern
Module Name:src Committed By: pooka Date: Wed Mar 3 17:58:37 UTC 2010 Modified Files: src/sys/kern: kern_module.c Log Message: Replace unsafe use of TAILQ_FOREACH: as the comment says, the structures are pulled off the list in the loop and it's anyone's guess where they go after that. To generate a diff of this commit: cvs rdiff -u -r1.57 -r1.58 src/sys/kern/kern_module.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_module.c diff -u src/sys/kern/kern_module.c:1.57 src/sys/kern/kern_module.c:1.58 --- src/sys/kern/kern_module.c:1.57 Tue Jan 19 15:23:14 2010 +++ src/sys/kern/kern_module.c Wed Mar 3 17:58:36 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_module.c,v 1.57 2010/01/19 15:23:14 pooka Exp $ */ +/* $NetBSD: kern_module.c,v 1.58 2010/03/03 17:58:36 pooka Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -34,7 +34,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: kern_module.c,v 1.57 2010/01/19 15:23:14 pooka Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kern_module.c,v 1.58 2010/03/03 17:58:36 pooka Exp $"); #define _MODULE_INTERNAL @@ -247,7 +247,7 @@ { __link_set_decl(modules, modinfo_t); modinfo_t *const *mip, *mi; - module_t *mod; + module_t *mod, *mod_next; mutex_enter(&module_lock); /* @@ -268,7 +268,8 @@ * list as we call module_do_load(); */ do { - TAILQ_FOREACH(mod, &module_bootlist, mod_chain) { + for (mod = TAILQ_FIRST(&module_bootlist); mod; mod = mod_next) { + mod_next = TAILQ_NEXT(mod, mod_chain); mi = mod->mod_info; if (class != MODULE_CLASS_ANY && class != mi->mi_class)
CVS commit: src/sys/kern
Module Name:src Committed By: pooka Date: Wed Mar 3 17:58:37 UTC 2010 Modified Files: src/sys/kern: kern_module.c Log Message: Replace unsafe use of TAILQ_FOREACH: as the comment says, the structures are pulled off the list in the loop and it's anyone's guess where they go after that. To generate a diff of this commit: cvs rdiff -u -r1.57 -r1.58 src/sys/kern/kern_module.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.sbin/puffs/rump_lfs
Module Name:src Committed By: pooka Date: Wed Mar 3 17:37:01 UTC 2010 Modified Files: src/usr.sbin/puffs/rump_lfs: rump_lfs.c Log Message: Give usage() a chance. XXX: UKFS_DEVICE_ARGVPROBE() interface To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/usr.sbin/puffs/rump_lfs/rump_lfs.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.sbin/puffs/rump_lfs
Module Name:src Committed By: pooka Date: Wed Mar 3 17:37:01 UTC 2010 Modified Files: src/usr.sbin/puffs/rump_lfs: rump_lfs.c Log Message: Give usage() a chance. XXX: UKFS_DEVICE_ARGVPROBE() interface To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/usr.sbin/puffs/rump_lfs/rump_lfs.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/puffs/rump_lfs/rump_lfs.c diff -u src/usr.sbin/puffs/rump_lfs/rump_lfs.c:1.15 src/usr.sbin/puffs/rump_lfs/rump_lfs.c:1.16 --- src/usr.sbin/puffs/rump_lfs/rump_lfs.c:1.15 Tue Jan 12 18:43:37 2010 +++ src/usr.sbin/puffs/rump_lfs/rump_lfs.c Wed Mar 3 17:37:01 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: rump_lfs.c,v 1.15 2010/01/12 18:43:37 pooka Exp $ */ +/* $NetBSD: rump_lfs.c,v 1.16 2010/03/03 17:37:01 pooka Exp $ */ /* * Copyright (c) 2008 Antti Kantee. All Rights Reserved. @@ -73,9 +73,12 @@ puffs_unmountonsignal(SIGINT, true); puffs_unmountonsignal(SIGTERM, true); - UKFS_DEVICE_ARGVPROBE(&part); - if (part != ukfs_part_none) { - errx(1, "lfs does not currently support embedded partitions"); + if (argc >= 3) { + UKFS_DEVICE_ARGVPROBE(&part); + if (part != ukfs_part_none) { + errx(1, "lfs does not currently support " + "embedded partitions"); + } } mount_lfs_parseargs(argc, argv, &args, &mntflags, canon_dev, canon_dir);
Re: CVS commit: src/distrib/sets
> > Log Message: > > "dtrace,zfs" means "MKDTRACE=yes" *and* "MKZFS=yes" which is not what > > we want. Invent a flag "solaris" which is the or of those two flags. > > Why is this needed ? I would rather see two flags one for zfs and one > for dtrace. Because solaris.kmod is shared? The real question is, why it's shared... Masao -- Masao Uebayashi / Tombi Inc. / Tel: +81-90-9141-4635
Re: CVS commit: src/distrib/sets
On Wed, Mar 3, 2010 at 5:13 PM, Matthias Scheler wrote: > Module Name: src > Committed By: tron > Date: Wed Mar 3 16:13:42 UTC 2010 > > Modified Files: > src/distrib/sets: mkvars.mk sets.subr > src/distrib/sets/lists/modules: mi > > Log Message: > "dtrace,zfs" means "MKDTRACE=yes" *and* "MKZFS=yes" which is not what > we want. Invent a flag "solaris" which is the or of those two flags. Why is this needed ? I would rather see two flags one for zfs and one for dtrace. -- Regards. Adam
Re: CVS commit: src/distrib/sets
> @@ -45,7 +45,7 @@ > > # > > -mkvars: mkvarsyesno mkextravars .PHONY > +mkvars: mkvarsyesno mkextravars mksolaris .PHONY > > mkvarsyesno: .PHONY > .for i in ${_MKVARS.yes} > @@ -59,3 +59,10 @@ > .for i in ${MKEXTRAVARS} > @echo $i="${$i}" > .endfor > + > +mksolaris: .PHONY > +.if (${MKDTRACE} != "no" || ${MKZFS} != "no") > + @echo "MKSOLARIS=yes" > +.else > + @echo "MKSOLARIS=no" > +.endif > Could you move this to bsd.own.mk, where all the dirty work is done now? Masao
CVS commit: src/distrib/sets
Module Name:src Committed By: tron Date: Wed Mar 3 16:13:42 UTC 2010 Modified Files: src/distrib/sets: mkvars.mk sets.subr src/distrib/sets/lists/modules: mi Log Message: "dtrace,zfs" means "MKDTRACE=yes" *and* "MKZFS=yes" which is not what we want. Invent a flag "solaris" which is the or of those two flags. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/distrib/sets/mkvars.mk cvs rdiff -u -r1.121 -r1.122 src/distrib/sets/sets.subr cvs rdiff -u -r1.10 -r1.11 src/distrib/sets/lists/modules/mi 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/mkvars.mk diff -u src/distrib/sets/mkvars.mk:1.1 src/distrib/sets/mkvars.mk:1.2 --- src/distrib/sets/mkvars.mk:1.1 Thu Dec 10 15:51:24 2009 +++ src/distrib/sets/mkvars.mk Wed Mar 3 16:13:42 2010 @@ -1,4 +1,4 @@ -# $NetBSD: mkvars.mk,v 1.1 2009/12/10 15:51:24 uebayasi Exp $ +# $NetBSD: mkvars.mk,v 1.2 2010/03/03 16:13:42 tron Exp $ MKEXTRAVARS= \ MACHINE \ @@ -45,7 +45,7 @@ # -mkvars: mkvarsyesno mkextravars .PHONY +mkvars: mkvarsyesno mkextravars mksolaris .PHONY mkvarsyesno: .PHONY .for i in ${_MKVARS.yes} @@ -59,3 +59,10 @@ .for i in ${MKEXTRAVARS} @echo $i="${$i}" .endfor + +mksolaris: .PHONY +.if (${MKDTRACE} != "no" || ${MKZFS} != "no") + @echo "MKSOLARIS=yes" +.else + @echo "MKSOLARIS=no" +.endif Index: src/distrib/sets/sets.subr diff -u src/distrib/sets/sets.subr:1.121 src/distrib/sets/sets.subr:1.122 --- src/distrib/sets/sets.subr:1.121 Sun Feb 21 03:18:45 2010 +++ src/distrib/sets/sets.subr Wed Mar 3 16:13:42 2010 @@ -1,4 +1,4 @@ -# $NetBSD: sets.subr,v 1.121 2010/02/21 03:18:45 darran Exp $ +# $NetBSD: sets.subr,v 1.122 2010/03/03 16:13:42 tron Exp $ # # @@ -168,7 +168,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.121 2010/02/21 03:18:45 darran Exp $ +# # $NetBSD: sets.subr,v 1.122 2010/03/03 16:13:42 tron Exp $ # . base-sys-root [keyword[,...]] # ./altroot base-sys-root # ./bin base-sys-root @@ -232,6 +232,7 @@ # profile ${MKPROFILE} != no # share ${MKSHARE} != no # skey ${MKSKEY} != no +# solaris ${MKDTRACE} != no or ${MKZFS} != no # x11 ${MKX11} != no && ${X11FLAVOUR} != "Xorg" # xorg ${MKX11} != no && ${X11FLAVOUR} == "Xorg" # yp ${MKYP} != no Index: src/distrib/sets/lists/modules/mi diff -u src/distrib/sets/lists/modules/mi:1.10 src/distrib/sets/lists/modules/mi:1.11 --- src/distrib/sets/lists/modules/mi:1.10 Wed Mar 3 14:43:41 2010 +++ src/distrib/sets/lists/modules/mi Wed Mar 3 16:13:42 2010 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.10 2010/03/03 14:43:41 tron Exp $ +# $NetBSD: mi,v 1.11 2010/03/03 16:13:42 tron Exp $ # # Note: don't delete entries from here - mark them as "obsolete" instead. # @@ -102,8 +102,8 @@ ./@MODULEDIR@/securelevel/securelevel.kmod base-kernel-modules kmod ./@MODULEDIR@/smbfsbase-kernel-modules kmod ./@MODULEDIR@/smbfs/smbfs.kmod base-kernel-modules kmod -./@MODULEDIR@/solarisbase-kernel-modules kmod,dtrace,zfs -./@MODULEDIR@/solaris/solaris.kmod base-kernel-modules kmod,dtrace,zfs +./@MODULEDIR@/solarisbase-kernel-modules kmod,solaris +./@MODULEDIR@/solaris/solaris.kmod base-kernel-modules kmod,solaris ./@MODULEDIR@/suserbase-kernel-modules kmod ./@MODULEDIR@/suser/suser.kmod base-kernel-modules kmod ./@MODULEDIR@/sysvbfsbase-kernel-modules kmod
CVS commit: src/distrib/sets
Module Name:src Committed By: tron Date: Wed Mar 3 16:13:42 UTC 2010 Modified Files: src/distrib/sets: mkvars.mk sets.subr src/distrib/sets/lists/modules: mi Log Message: "dtrace,zfs" means "MKDTRACE=yes" *and* "MKZFS=yes" which is not what we want. Invent a flag "solaris" which is the or of those two flags. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/distrib/sets/mkvars.mk cvs rdiff -u -r1.121 -r1.122 src/distrib/sets/sets.subr cvs rdiff -u -r1.10 -r1.11 src/distrib/sets/lists/modules/mi Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Re: CVS commit: src/sys/arch/xen/x86
> OT: these are a little unclear to me. Could someone outline what > > roundup > roundup2 > rounddown > howmany They are in . >> #define howmany(x, y) (((x)+((y)-1))/(y)) how many y-byte blocks are required to store x-bytes region? >> #define roundup(x, y) x)+((y)-1))/(y))*(y)) >> #define rounddown(x,y) (((x)/(y))*(y)) roundup or rounddown x per y, as is? >> #define roundup2(x, m) (((x) + (m) - 1) & ~((m) - 1)) optimized version (avoid division op) roundup() where m is a power of two --- Izumi Tsutsui
Re: CVS commit: src/sys/arch/xen/x86
On Wed, Mar 03, 2010 at 12:09:03AM +, Jean-Yves Migeon wrote: > Module Name: src > Committed By: jym > Date: Wed Mar 3 00:09:03 UTC 2010 > > Modified Files: > src/sys/arch/xen/x86: cpu.c > > Log Message: > Use roundup2() instead of hardcoding the CACHE_LINE_SIZE rounding > operation. OT: these are a little unclear to me. Could someone outline what roundup roundup2 rounddown howmany do in their intended usage. I will then document these. - Jukka. PS. I posted the same question already to netbsd-d...@.
CVS commit: src/distrib/sets/lists/modules
Module Name:src Committed By: tron Date: Wed Mar 3 14:43:41 UTC 2010 Modified Files: src/distrib/sets/lists/modules: mi Log Message: The directory "modules/solaris" depends on ZFS as well. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/distrib/sets/lists/modules/mi Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/distrib/sets/lists/modules
Module Name:src Committed By: tron Date: Wed Mar 3 14:43:41 UTC 2010 Modified Files: src/distrib/sets/lists/modules: mi Log Message: The directory "modules/solaris" depends on ZFS as well. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/distrib/sets/lists/modules/mi 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/modules/mi diff -u src/distrib/sets/lists/modules/mi:1.9 src/distrib/sets/lists/modules/mi:1.10 --- src/distrib/sets/lists/modules/mi:1.9 Wed Mar 3 14:32:29 2010 +++ src/distrib/sets/lists/modules/mi Wed Mar 3 14:43:41 2010 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.9 2010/03/03 14:32:29 tron Exp $ +# $NetBSD: mi,v 1.10 2010/03/03 14:43:41 tron Exp $ # # Note: don't delete entries from here - mark them as "obsolete" instead. # @@ -102,7 +102,7 @@ ./@MODULEDIR@/securelevel/securelevel.kmod base-kernel-modules kmod ./@MODULEDIR@/smbfsbase-kernel-modules kmod ./@MODULEDIR@/smbfs/smbfs.kmod base-kernel-modules kmod -./@MODULEDIR@/solarisbase-kernel-modules kmod,dtrace +./@MODULEDIR@/solarisbase-kernel-modules kmod,dtrace,zfs ./@MODULEDIR@/solaris/solaris.kmod base-kernel-modules kmod,dtrace,zfs ./@MODULEDIR@/suserbase-kernel-modules kmod ./@MODULEDIR@/suser/suser.kmod base-kernel-modules kmod
CVS commit: src/distrib/sets/lists/modules
Module Name:src Committed By: tron Date: Wed Mar 3 14:32:29 UTC 2010 Modified Files: src/distrib/sets/lists/modules: mi Log Message: The "solaris" kernel module also gets build if ZFS is enabled. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/distrib/sets/lists/modules/mi 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/modules/mi diff -u src/distrib/sets/lists/modules/mi:1.8 src/distrib/sets/lists/modules/mi:1.9 --- src/distrib/sets/lists/modules/mi:1.8 Mon Mar 1 21:10:19 2010 +++ src/distrib/sets/lists/modules/mi Wed Mar 3 14:32:29 2010 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.8 2010/03/01 21:10:19 darran Exp $ +# $NetBSD: mi,v 1.9 2010/03/03 14:32:29 tron Exp $ # # Note: don't delete entries from here - mark them as "obsolete" instead. # @@ -103,7 +103,7 @@ ./@MODULEDIR@/smbfsbase-kernel-modules kmod ./@MODULEDIR@/smbfs/smbfs.kmod base-kernel-modules kmod ./@MODULEDIR@/solarisbase-kernel-modules kmod,dtrace -./@MODULEDIR@/solaris/solaris.kmod base-kernel-modules kmod,dtrace +./@MODULEDIR@/solaris/solaris.kmod base-kernel-modules kmod,dtrace,zfs ./@MODULEDIR@/suserbase-kernel-modules kmod ./@MODULEDIR@/suser/suser.kmod base-kernel-modules kmod ./@MODULEDIR@/sysvbfsbase-kernel-modules kmod
CVS commit: src/distrib/sets/lists/modules
Module Name:src Committed By: tron Date: Wed Mar 3 14:32:29 UTC 2010 Modified Files: src/distrib/sets/lists/modules: mi Log Message: The "solaris" kernel module also gets build if ZFS is enabled. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/distrib/sets/lists/modules/mi Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/raidframe
Module Name:src Committed By: oster Date: Wed Mar 3 14:23:27 UTC 2010 Modified Files: src/sys/dev/raidframe: rf_paritymap.c Log Message: Don't attempt to read or write component label stuff from/to 'dead disks'. Update used spares with the correct parity map bits too. Addresses PR#42904 by Louis Guillaume. Fix confirmed by submitter. Thanks! To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/dev/raidframe/rf_paritymap.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/raidframe
Module Name:src Committed By: oster Date: Wed Mar 3 14:23:27 UTC 2010 Modified Files: src/sys/dev/raidframe: rf_paritymap.c Log Message: Don't attempt to read or write component label stuff from/to 'dead disks'. Update used spares with the correct parity map bits too. Addresses PR#42904 by Louis Guillaume. Fix confirmed by submitter. Thanks! To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/dev/raidframe/rf_paritymap.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/raidframe/rf_paritymap.c diff -u src/sys/dev/raidframe/rf_paritymap.c:1.3 src/sys/dev/raidframe/rf_paritymap.c:1.4 --- src/sys/dev/raidframe/rf_paritymap.c:1.3 Thu Nov 26 07:35:39 2009 +++ src/sys/dev/raidframe/rf_paritymap.c Wed Mar 3 14:23:27 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: rf_paritymap.c,v 1.3 2009/11/26 07:35:39 pooka Exp $ */ +/* $NetBSD: rf_paritymap.c,v 1.4 2010/03/03 14:23:27 oster Exp $ */ /*- * Copyright (c) 2009 Jed Davis. @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: rf_paritymap.c,v 1.3 2009/11/26 07:35:39 pooka Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rf_paritymap.c,v 1.4 2010/03/03 14:23:27 oster Exp $"); #include #include @@ -359,12 +359,31 @@ if (todisk) { raidPtr = pm->raid; for (col = 0; col < raidPtr->numCol; col++) { + if (RF_DEAD_DISK(raidPtr->Disks[col].status)) +continue; + clabel = raidget_component_label(raidPtr, col); clabel->parity_map_ntick = cooldown; clabel->parity_map_tickms = tickms; clabel->parity_map_regions = regions; + + /* Don't touch the disk if it's been spared */ + if (clabel->status == rf_ds_spared) +continue; + raidflush_component_label(raidPtr, col); } + + /* handle the spares too... */ + for (col = 0; col < raidPtr->numSpare; col++) { + if (raidPtr->Disks[raidPtr->numCol+col].status == rf_ds_used_spare) { +clabel = raidget_component_label(raidPtr, raidPtr->numCol+col); +clabel->parity_map_ntick = cooldown; +clabel->parity_map_tickms = tickms; +clabel->parity_map_regions = regions; +raidflush_component_label(raidPtr, raidPtr->numCol+col); + } + } } return 0; } @@ -603,6 +622,8 @@ */ if (!force) { for (col = 0; col < raidPtr->numCol; col++) { + if (RF_DEAD_DISK(raidPtr->Disks[col].status)) +continue; clabel = raidget_component_label(raidPtr, col); flags = clabel->parity_map_flags; /* Check for use by non-parity-map kernel. */ @@ -670,6 +691,8 @@ /* Alter labels in-core to reflect the current view of things. */ for (col = 0; col < raidPtr->numCol; col++) { + if (RF_DEAD_DISK(raidPtr->Disks[col].status)) + continue; clabel = raidget_component_label(raidPtr, col); if (pm_use) @@ -683,12 +706,13 @@ clabel->parity_map_regions = g_regions; raidflush_component_label(raidPtr, col); } + /* Note that we're just in 'attach' here, and there won't + be any spare disks at this point. */ } /* * For initializing the parity-map fields of a component label, both on - * initial creation and on reconstruct/copyback/etc. - */ + * initial creation and on reconstruct/copyback/etc. */ void rf_paritymap_init_label(struct rf_paritymap *pm, RF_ComponentLabel_t *clabel) { @@ -724,10 +748,19 @@ dis = 0; for (col = 0; col < raidPtr->numCol; col++) { + if (RF_DEAD_DISK(raidPtr->Disks[col].status)) + continue; clabel = raidget_component_label(raidPtr, col); if (clabel->parity_map_flags & RF_PMLABEL_DISABLE) dis = 1; } +for (col = 0; col < raidPtr->numSpare; col++) { + if (raidPtr->Disks[raidPtr->numCol+col].status != rf_ds_used_spare) +continue; +clabel = raidget_component_label(raidPtr, raidPtr->numCol+col); +if (clabel->parity_map_flags & RF_PMLABEL_DISABLE) +dis = 1; +} return dis; } @@ -740,6 +773,8 @@ RF_RowCol_t col; for (col = 0; col < raidPtr->numCol; col++) { + if (RF_DEAD_DISK(raidPtr->Disks[col].status)) + continue; clabel = raidget_component_label(raidPtr, col); if (dis) clabel->parity_map_flags |= RF_PMLABEL_DISABLE; @@ -747,4 +782,17 @@ clabel->parity_map_flags &= ~RF_PMLABEL_DISABLE; raidflush_component_label(raidPtr, col); } + + /* update any used spares as well */ + for (col = 0; col < raidPtr->numSpare; col++) { + if (raidPtr->Disks[raidPtr->numCol+col].status != rf_ds_used_spare) + continue; + + clabel = raidget_component_label(raidPtr, raidPtr->numCol+col); + if (dis) + clabel->parity_map_flags |= RF_PMLABEL_DISABLE; + else + clabel->parity_map_flags &= ~RF_PMLABEL_DISABLE; + raidflush_component_label(raidPtr, raidPtr->numCol+col); + } }
CVS commit: src/share/man/man9
Module Name:src Committed By: pooka Date: Wed Mar 3 13:57:35 UTC 2010 Modified Files: src/share/man/man9: config.9 Log Message: update description of deffs To generate a diff of this commit: cvs rdiff -u -r1.26 -r1.27 src/share/man/man9/config.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/config.9 diff -u src/share/man/man9/config.9:1.26 src/share/man/man9/config.9:1.27 --- src/share/man/man9/config.9:1.26 Sun Mar 15 14:02:39 2009 +++ src/share/man/man9/config.9 Wed Mar 3 13:57:35 2010 @@ -1,4 +1,4 @@ -.\" $NetBSD: config.9,v 1.26 2009/03/15 14:02:39 joerg Exp $ +.\" $NetBSD: config.9,v 1.27 2010/03/03 13:57:35 pooka Exp $ .\" .\" Copyright (c) 2001 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -27,7 +27,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd August 19, 2003 +.Dd March 3, 2010 .Dt CONFIG 9 .Os .Sh NAME @@ -193,7 +193,7 @@ The .Em option is case-sensitive. -.It deffs [filename] name +.It deffs name [[name] ...] Define a filesystem .Em name . .It devclass name
CVS commit: src/share/man/man9
Module Name:src Committed By: pooka Date: Wed Mar 3 13:57:35 UTC 2010 Modified Files: src/share/man/man9: config.9 Log Message: update description of deffs To generate a diff of this commit: cvs rdiff -u -r1.26 -r1.27 src/share/man/man9/config.9 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.bin/config
Module Name:src Committed By: pooka Date: Wed Mar 3 13:56:30 UTC 2010 Modified Files: src/usr.bin/config: main.c Log Message: reflect previous change in comment To generate a diff of this commit: cvs rdiff -u -r1.39 -r1.40 src/usr.bin/config/main.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.bin/config
Module Name:src Committed By: pooka Date: Wed Mar 3 13:56:30 UTC 2010 Modified Files: src/usr.bin/config: main.c Log Message: reflect previous change in comment To generate a diff of this commit: cvs rdiff -u -r1.39 -r1.40 src/usr.bin/config/main.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/config/main.c diff -u src/usr.bin/config/main.c:1.39 src/usr.bin/config/main.c:1.40 --- src/usr.bin/config/main.c:1.39 Wed Mar 3 13:53:22 2010 +++ src/usr.bin/config/main.c Wed Mar 3 13:56:29 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: main.c,v 1.39 2010/03/03 13:53:22 pooka Exp $ */ +/* $NetBSD: main.c,v 1.40 2010/03/03 13:56:29 pooka Exp $ */ /* * Copyright (c) 1992, 1993 @@ -603,10 +603,7 @@ } /* - * Define one or more file systems. If file system options file name is - * specified, a preprocessor #define for that file system will be placed - * in that file. In this case, only one file system may be specified. - * Otherwise, no preprocessor #defines will be generated. + * Define one or more file systems. */ void deffilesystem(struct nvlist *fses, struct nvlist *deps)
CVS commit: src/usr.bin/config
Module Name:src Committed By: pooka Date: Wed Mar 3 13:53:22 UTC 2010 Modified Files: src/usr.bin/config: config.5 defs.h gram.y main.c Log Message: Remove fs_foo.h support from deffs now that nothing uses it. To generate a diff of this commit: cvs rdiff -u -r1.20 -r1.21 src/usr.bin/config/config.5 \ src/usr.bin/config/gram.y cvs rdiff -u -r1.31 -r1.32 src/usr.bin/config/defs.h cvs rdiff -u -r1.38 -r1.39 src/usr.bin/config/main.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/config/config.5 diff -u src/usr.bin/config/config.5:1.20 src/usr.bin/config/config.5:1.21 --- src/usr.bin/config/config.5:1.20 Fri Feb 20 05:26:51 2009 +++ src/usr.bin/config/config.5 Wed Mar 3 13:53:22 2010 @@ -1,4 +1,4 @@ -.\" $NetBSD: config.5,v 1.20 2009/02/20 05:26:51 cube Exp $ +.\" $NetBSD: config.5,v 1.21 2010/03/03 13:53:22 pooka Exp $ .\" .\" Copyright (c) 2006, 2007 The NetBSD Foundation. .\" All rights reserved. @@ -24,7 +24,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd February 20, 2009 +.Dd March 3, 2010 .Dt CONFIG 5 .Os .Sh NAME @@ -355,7 +355,7 @@ will use it as a value when generating a lint configuration with .Fl L , and ignore it in all other cases. -.It Ic deffs Oo Ar file Oc Ar name Op Ar name Op Ar ... +.It Ic deffs Ar name Op Ar name Op Ar ... Defines a file-system name. It is no more than a regular option, as defined by .Ic defflag , Index: src/usr.bin/config/gram.y diff -u src/usr.bin/config/gram.y:1.20 src/usr.bin/config/gram.y:1.21 --- src/usr.bin/config/gram.y:1.20 Wed Feb 3 21:00:49 2010 +++ src/usr.bin/config/gram.y Wed Mar 3 13:53:22 2010 @@ -1,5 +1,5 @@ %{ -/* $NetBSD: gram.y,v 1.20 2010/02/03 21:00:49 pooka Exp $ */ +/* $NetBSD: gram.y,v 1.21 2010/03/03 13:53:22 pooka Exp $ */ /* * Copyright (c) 1992, 1993 @@ -147,7 +147,6 @@ %type flags_opt %type deffs %type deffses -%type fsoptfile_opt %type defopt %type defopts %type optdep @@ -277,8 +276,7 @@ device_major { do_devsw = 1; } | prefix | DEVCLASS WORD { (void)defattr($2, NULL, NULL, 1); } | - DEFFS fsoptfile_opt deffses defoptdeps - { deffilesystem($2, $3, $4); } | + DEFFS deffses defoptdeps { deffilesystem($2, $3); } | DEFINE WORD interface_opt attrs_opt { (void)defattr($2, $3, $4, 0); } | DEFOPT optfile_opt defopts defoptdeps @@ -391,10 +389,6 @@ locdefaults: '=' '{' values '}' { $$ = $3; }; -fsoptfile_opt: - filename { $$ = $1; } | - /* empty */ { $$ = NULL; }; - optfile_opt: filename { $$ = $1; } | /* empty */ { $$ = NULL; }; Index: src/usr.bin/config/defs.h diff -u src/usr.bin/config/defs.h:1.31 src/usr.bin/config/defs.h:1.32 --- src/usr.bin/config/defs.h:1.31 Wed Feb 3 21:00:49 2010 +++ src/usr.bin/config/defs.h Wed Mar 3 13:53:22 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: defs.h,v 1.31 2010/02/03 21:00:49 pooka Exp $ */ +/* $NetBSD: defs.h,v 1.32 2010/03/03 13:53:22 pooka Exp $ */ /* * Copyright (c) 1992, 1993 @@ -494,7 +494,7 @@ void addmkoption(const char *, const char *); void appendmkoption(const char *, const char *); void appendcondmkoption(struct nvlist *, const char *, const char *); -void deffilesystem(const char *, struct nvlist *, struct nvlist *); +void deffilesystem(struct nvlist *, struct nvlist *); void defoption(const char *, struct nvlist *, struct nvlist *); void defflag(const char *, struct nvlist *, struct nvlist *, int); void defparam(const char *, struct nvlist *, struct nvlist *, int); Index: src/usr.bin/config/main.c diff -u src/usr.bin/config/main.c:1.38 src/usr.bin/config/main.c:1.39 --- src/usr.bin/config/main.c:1.38 Sat Feb 13 22:57:03 2010 +++ src/usr.bin/config/main.c Wed Mar 3 13:53:22 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: main.c,v 1.38 2010/02/13 22:57:03 pooka Exp $ */ +/* $NetBSD: main.c,v 1.39 2010/03/03 13:53:22 pooka Exp $ */ /* * Copyright (c) 1992, 1993 @@ -609,7 +609,7 @@ * Otherwise, no preprocessor #defines will be generated. */ void -deffilesystem(const char *fname, struct nvlist *fses, struct nvlist *deps) +deffilesystem(struct nvlist *fses, struct nvlist *deps) { struct nvlist *nv; @@ -632,23 +632,6 @@ panic("file system `%s' already in table?!", nv->nv_name); - if (fname != NULL) { - /* - * Only one file system allowed in this case. - */ - if (nv->nv_next != NULL) { -cfgerror("only one file system per option " -"file may be specified"); -return; - } - - if (ht_insert(optfiletab, fname, nv)) { -cfgerror("option file `%s' already exists", -fname); -return; - } - } - add_dependencies(nv, deps); } }
CVS commit: src/usr.bin/config
Module Name:src Committed By: pooka Date: Wed Mar 3 13:53:22 UTC 2010 Modified Files: src/usr.bin/config: config.5 defs.h gram.y main.c Log Message: Remove fs_foo.h support from deffs now that nothing uses it. To generate a diff of this commit: cvs rdiff -u -r1.20 -r1.21 src/usr.bin/config/config.5 \ src/usr.bin/config/gram.y cvs rdiff -u -r1.31 -r1.32 src/usr.bin/config/defs.h cvs rdiff -u -r1.38 -r1.39 src/usr.bin/config/main.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys
Module Name:src Committed By: tsutsui Date: Wed Mar 3 13:39:58 UTC 2010 Modified Files: src/sys/arch/x68k/dev: if_ne_intio.c if_ne_neptune.c src/sys/conf: files src/sys/dev/ic: ne2000.c ne2000var.h src/sys/dev/isa: if_ne_isa.c src/sys/dev/isapnp: if_ne_isapnp.c Log Message: Put several fixes to ne(4) driver for better 8 bit mode support, especially on RTL8019AS which is also used for non-ISA local bus of embedded controllers and some m68k machines like atari and x68k. * move RTL8019 probe and attach code from each bus attachment to MI ne2000_detect() and ne2000_attach() * change a method for backend and attachment to specify 8 bit mode to use a new sc->sc_quirk member, instead of sc->sc_dmawidth * handle more NE2000 8 bit mode specific settings, including bus_space(9) access width and available size of buffer memory * add a function to detect NE2000 8 bit mode (disabled by default, but enalbed by options NE2000_DETECT_8BIT to avoid possible regression on various ISA clones) * fix ipkdb attachment accordingly (untested) Tested on two NE2000 ISA variants (RTL8019AS and another clone named UL0001) in both 8 bit and 16 bit mode on i386. "Looks good" from non...@. See my post on tech-kern for details: http://mail-index.NetBSD.org/tech-kern/2010/02/26/msg007423.html To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/sys/arch/x68k/dev/if_ne_intio.c cvs rdiff -u -r1.19 -r1.20 src/sys/arch/x68k/dev/if_ne_neptune.c cvs rdiff -u -r1.979 -r1.980 src/sys/conf/files cvs rdiff -u -r1.67 -r1.68 src/sys/dev/ic/ne2000.c cvs rdiff -u -r1.24 -r1.25 src/sys/dev/ic/ne2000var.h cvs rdiff -u -r1.26 -r1.27 src/sys/dev/isa/if_ne_isa.c cvs rdiff -u -r1.26 -r1.27 src/sys/dev/isapnp/if_ne_isapnp.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/x68k/dev/if_ne_intio.c diff -u src/sys/arch/x68k/dev/if_ne_intio.c:1.15 src/sys/arch/x68k/dev/if_ne_intio.c:1.16 --- src/sys/arch/x68k/dev/if_ne_intio.c:1.15 Tue Jan 19 22:06:23 2010 +++ src/sys/arch/x68k/dev/if_ne_intio.c Wed Mar 3 13:39:57 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: if_ne_intio.c,v 1.15 2010/01/19 22:06:23 pooka Exp $ */ +/* $NetBSD: if_ne_intio.c,v 1.16 2010/03/03 13:39:57 tsutsui Exp $ */ /* * Copyright (c) 2001 Tetsuya Isaki. All rights reserved. @@ -32,7 +32,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_ne_intio.c,v 1.15 2010/01/19 22:06:23 pooka Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_ne_intio.c,v 1.16 2010/03/03 13:39:57 tsutsui Exp $"); #include "opt_inet.h" #include "opt_ns.h" @@ -74,8 +74,6 @@ #include #include #include -#include -#include #include @@ -187,21 +185,10 @@ case NE2000_TYPE_NE2000: typestr = "NE2000"; - /* - * Check for a Realtek 8019. - */ - bus_space_write_1(iot, ioh, ED_P0_CR, - ED_CR_PAGE_0 | ED_CR_STP); - if (bus_space_read_1(iot, ioh, NERTL_RTL0_8019ID0) == - RTL0_8019ID0 && - bus_space_read_1(iot, ioh, NERTL_RTL0_8019ID1) == - RTL0_8019ID1) { - typestr = "NE2000 (RTL8019)"; - dsc->sc_mediachange = rtl80x9_mediachange; - dsc->sc_mediastatus = rtl80x9_mediastatus; - dsc->init_card = rtl80x9_init_card; - dsc->sc_media_init = rtl80x9_media_init; - } + break; + + case NE2000_TYPE_RTL8019: + typestr = "NE2000 (RTL8019)"; break; default: Index: src/sys/arch/x68k/dev/if_ne_neptune.c diff -u src/sys/arch/x68k/dev/if_ne_neptune.c:1.19 src/sys/arch/x68k/dev/if_ne_neptune.c:1.20 --- src/sys/arch/x68k/dev/if_ne_neptune.c:1.19 Tue Jan 19 22:06:23 2010 +++ src/sys/arch/x68k/dev/if_ne_neptune.c Wed Mar 3 13:39:57 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: if_ne_neptune.c,v 1.19 2010/01/19 22:06:23 pooka Exp $ */ +/* $NetBSD: if_ne_neptune.c,v 1.20 2010/03/03 13:39:57 tsutsui Exp $ */ /*- * Copyright (c) 1997, 1998 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_ne_neptune.c,v 1.19 2010/01/19 22:06:23 pooka Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_ne_neptune.c,v 1.20 2010/03/03 13:39:57 tsutsui Exp $"); #include "opt_inet.h" #include "opt_ns.h" @@ -72,9 +72,6 @@ #include #include -#include -#include - #include static int ne_neptune_match(device_t, cfdata_t, void *); @@ -165,21 +162,10 @@ case NE2000_TYPE_NE2000: typestr = "NE2000"; - /* - * Check for a Realtek 8019. - */ - bus_space_write_1(nict, nich, ED_P0_CR, - ED_CR_PAGE_0 | ED_CR_STP); - if (bus_space_read_1(nict, nich, NERTL_RTL0_8019ID0) == -RTL0_8019ID0 && - bus_space_read_1(nict, nich, NERTL_RTL0_8019ID1) == -RTL0_8019ID1) { - typestr = "NE2000 (RTL8019)"; - dsc->sc_mediachange = rtl80x9_mediachange; - dsc->sc_mediastatus = rtl80x9_mediastatus; - dsc->init_card = rtl80x9_init_card; - dsc->sc_media_init = rtl80x9_media_init; - } + break; + + case NE2000_TYPE_RTL8019: + typestr = "NE2000 (RTL8019)"; break;
CVS commit: src/sys
Module Name:src Committed By: tsutsui Date: Wed Mar 3 13:39:58 UTC 2010 Modified Files: src/sys/arch/x68k/dev: if_ne_intio.c if_ne_neptune.c src/sys/conf: files src/sys/dev/ic: ne2000.c ne2000var.h src/sys/dev/isa: if_ne_isa.c src/sys/dev/isapnp: if_ne_isapnp.c Log Message: Put several fixes to ne(4) driver for better 8 bit mode support, especially on RTL8019AS which is also used for non-ISA local bus of embedded controllers and some m68k machines like atari and x68k. * move RTL8019 probe and attach code from each bus attachment to MI ne2000_detect() and ne2000_attach() * change a method for backend and attachment to specify 8 bit mode to use a new sc->sc_quirk member, instead of sc->sc_dmawidth * handle more NE2000 8 bit mode specific settings, including bus_space(9) access width and available size of buffer memory * add a function to detect NE2000 8 bit mode (disabled by default, but enalbed by options NE2000_DETECT_8BIT to avoid possible regression on various ISA clones) * fix ipkdb attachment accordingly (untested) Tested on two NE2000 ISA variants (RTL8019AS and another clone named UL0001) in both 8 bit and 16 bit mode on i386. "Looks good" from non...@. See my post on tech-kern for details: http://mail-index.NetBSD.org/tech-kern/2010/02/26/msg007423.html To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/sys/arch/x68k/dev/if_ne_intio.c cvs rdiff -u -r1.19 -r1.20 src/sys/arch/x68k/dev/if_ne_neptune.c cvs rdiff -u -r1.979 -r1.980 src/sys/conf/files cvs rdiff -u -r1.67 -r1.68 src/sys/dev/ic/ne2000.c cvs rdiff -u -r1.24 -r1.25 src/sys/dev/ic/ne2000var.h cvs rdiff -u -r1.26 -r1.27 src/sys/dev/isa/if_ne_isa.c cvs rdiff -u -r1.26 -r1.27 src/sys/dev/isapnp/if_ne_isapnp.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/lib/libterminfo
Module Name:src Committed By: roy Date: Wed Mar 3 12:09:49 UTC 2010 Modified Files: src/lib/libterminfo: genhash genman genterms genthash Log Message: Abort an error. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/lib/libterminfo/genhash cvs rdiff -u -r1.2 -r1.3 src/lib/libterminfo/genman cvs rdiff -u -r1.1 -r1.2 src/lib/libterminfo/genterms cvs rdiff -u -r1.3 -r1.4 src/lib/libterminfo/genthash Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libterminfo/genhash diff -u src/lib/libterminfo/genhash:1.5 src/lib/libterminfo/genhash:1.6 --- src/lib/libterminfo/genhash:1.5 Thu Feb 4 12:25:08 2010 +++ src/lib/libterminfo/genhash Wed Mar 3 12:09:49 2010 @@ -1,5 +1,5 @@ #!/bin/sh -# $NetBSD: genhash,v 1.5 2010/02/04 12:25:08 roy Exp $ +# $NetBSD: genhash,v 1.6 2010/03/03 12:09:49 roy Exp $ # Copyright (c) 2009 The NetBSD Foundation, Inc. # @@ -32,6 +32,7 @@ # This allows us to freely change how we hash or store our string tables # in the future. +set -e : ${TOOL_AWK:=awk} : ${TOOL_NBPERF:=nbperf} : ${TOOL_SED:=sed} @@ -92,7 +93,7 @@ #endif #include -__RCSID("\$NetBSD: genhash,v 1.5 2010/02/04 12:25:08 roy Exp $"); +__RCSID("\$NetBSD: genhash,v 1.6 2010/03/03 12:09:49 roy Exp $"); #include #include Index: src/lib/libterminfo/genman diff -u src/lib/libterminfo/genman:1.2 src/lib/libterminfo/genman:1.3 --- src/lib/libterminfo/genman:1.2 Wed Feb 3 20:56:54 2010 +++ src/lib/libterminfo/genman Wed Mar 3 12:09:49 2010 @@ -1,5 +1,5 @@ #!/bin/sh -# $NetBSD: genman,v 1.2 2010/02/03 20:56:54 roy Exp $ +# $NetBSD: genman,v 1.3 2010/03/03 12:09:49 roy Exp $ # Copyright (c) 2009 The NetBSD Foundation, Inc. # @@ -29,6 +29,7 @@ # Generate variable tables for terminfo.5 from our source files. +set -e : ${TOOL_SED:=sed} : ${TOOL_SORT:=sort} Index: src/lib/libterminfo/genterms diff -u src/lib/libterminfo/genterms:1.1 src/lib/libterminfo/genterms:1.2 --- src/lib/libterminfo/genterms:1.1 Fri Feb 12 12:18:33 2010 +++ src/lib/libterminfo/genterms Wed Mar 3 12:09:49 2010 @@ -1,5 +1,5 @@ #!/bin/sh -# $NetBSD: genterms,v 1.1 2010/02/12 12:18:33 roy Exp $ +# $NetBSD: genterms,v 1.2 2010/03/03 12:09:49 roy Exp $ # Copyright (c) 2010 The NetBSD Foundation, Inc. # @@ -29,6 +29,7 @@ # Generate compiled terminfo descriptions to embed into libterminfo +set -e : ${TOOL_TIC:=tic} : ${NETBSDSRCDIR:=/usr/src} : ${TERMINFO:=${NETBSDSRCDIR}/share/terminfo/terminfo} Index: src/lib/libterminfo/genthash diff -u src/lib/libterminfo/genthash:1.3 src/lib/libterminfo/genthash:1.4 --- src/lib/libterminfo/genthash:1.3 Thu Feb 4 09:46:26 2010 +++ src/lib/libterminfo/genthash Wed Mar 3 12:09:49 2010 @@ -1,5 +1,5 @@ #!/bin/sh -# $NetBSD: genthash,v 1.3 2010/02/04 09:46:26 roy Exp $ +# $NetBSD: genthash,v 1.4 2010/03/03 12:09:49 roy Exp $ # Copyright (c) 2009 The NetBSD Foundation, Inc. # @@ -29,6 +29,7 @@ # Generate string and hash tables for our termcap strings in termcap.c +set -e : ${TOOL_NBPERF:=nbperf} : ${TOOL_SED:=sed} @@ -40,7 +41,7 @@ * Automatically generated from termcap.c */ #include -__RCSID("\$NetBSD: genthash,v 1.3 2010/02/04 09:46:26 roy Exp $"); +__RCSID("\$NetBSD: genthash,v 1.4 2010/03/03 12:09:49 roy Exp $"); #include #include
CVS commit: src/lib/libterminfo
Module Name:src Committed By: roy Date: Wed Mar 3 12:09:49 UTC 2010 Modified Files: src/lib/libterminfo: genhash genman genterms genthash Log Message: Abort an error. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/lib/libterminfo/genhash cvs rdiff -u -r1.2 -r1.3 src/lib/libterminfo/genman cvs rdiff -u -r1.1 -r1.2 src/lib/libterminfo/genterms cvs rdiff -u -r1.3 -r1.4 src/lib/libterminfo/genthash Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/compat/sunos
Module Name:src Committed By: pooka Date: Wed Mar 3 11:08:00 UTC 2010 Modified Files: src/sys/compat/sunos: sunos_syscall.h sunos_syscallargs.h sunos_syscalls.c sunos_sysent.c Log Message: regen: ENOSYS nfssvc honestly To generate a diff of this commit: cvs rdiff -u -r1.85 -r1.86 src/sys/compat/sunos/sunos_syscall.h cvs rdiff -u -r1.69 -r1.70 src/sys/compat/sunos/sunos_syscallargs.h cvs rdiff -u -r1.84 -r1.85 src/sys/compat/sunos/sunos_syscalls.c cvs rdiff -u -r1.80 -r1.81 src/sys/compat/sunos/sunos_sysent.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/compat/sunos
Module Name:src Committed By: pooka Date: Wed Mar 3 11:08:00 UTC 2010 Modified Files: src/sys/compat/sunos: sunos_syscall.h sunos_syscallargs.h sunos_syscalls.c sunos_sysent.c Log Message: regen: ENOSYS nfssvc honestly To generate a diff of this commit: cvs rdiff -u -r1.85 -r1.86 src/sys/compat/sunos/sunos_syscall.h cvs rdiff -u -r1.69 -r1.70 src/sys/compat/sunos/sunos_syscallargs.h cvs rdiff -u -r1.84 -r1.85 src/sys/compat/sunos/sunos_syscalls.c cvs rdiff -u -r1.80 -r1.81 src/sys/compat/sunos/sunos_sysent.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/sunos/sunos_syscall.h diff -u src/sys/compat/sunos/sunos_syscall.h:1.85 src/sys/compat/sunos/sunos_syscall.h:1.86 --- src/sys/compat/sunos/sunos_syscall.h:1.85 Mon Dec 14 00:58:37 2009 +++ src/sys/compat/sunos/sunos_syscall.h Wed Mar 3 11:08:00 2010 @@ -1,10 +1,10 @@ -/* $NetBSD: sunos_syscall.h,v 1.85 2009/12/14 00:58:37 matt Exp $ */ +/* $NetBSD: sunos_syscall.h,v 1.86 2010/03/03 11:08:00 pooka Exp $ */ /* * System call numbers. * * DO NOT EDIT-- this file is automatically generated. - * created from NetBSD: syscalls.master,v 1.74 2009/01/13 22:27:43 pooka Exp + * created from NetBSD: syscalls.master,v 1.75 2010/03/03 11:07:17 pooka Exp */ #ifndef _SUNOS_SYS_SYSCALL_H_ @@ -367,9 +367,6 @@ /* syscall: "poll" ret: "int" args: "struct pollfd *" "u_int" "int" */ #define SUNOS_SYS_poll 153 -/* syscall: "nfssvc" ret: "int" args: "int" */ -#define SUNOS_SYS_nfssvc 155 - /* syscall: "getdirentries" ret: "int" args: "int" "char *" "u_int" "long *" */ #define SUNOS_SYS_getdirentries 156 Index: src/sys/compat/sunos/sunos_syscallargs.h diff -u src/sys/compat/sunos/sunos_syscallargs.h:1.69 src/sys/compat/sunos/sunos_syscallargs.h:1.70 --- src/sys/compat/sunos/sunos_syscallargs.h:1.69 Mon Dec 14 00:58:37 2009 +++ src/sys/compat/sunos/sunos_syscallargs.h Wed Mar 3 11:08:00 2010 @@ -1,10 +1,10 @@ -/* $NetBSD: sunos_syscallargs.h,v 1.69 2009/12/14 00:58:37 matt Exp $ */ +/* $NetBSD: sunos_syscallargs.h,v 1.70 2010/03/03 11:08:00 pooka Exp $ */ /* * System call argument lists. * * DO NOT EDIT-- this file is automatically generated. - * created from NetBSD: syscalls.master,v 1.74 2009/01/13 22:27:43 pooka Exp + * created from NetBSD: syscalls.master,v 1.75 2010/03/03 11:07:17 pooka Exp */ #ifndef _SUNOS_SYS_SYSCALLARGS_H_ @@ -350,11 +350,6 @@ struct sys_poll_args; -struct sunos_sys_nfssvc_args { - syscallarg(int) fd; -}; -check_syscall_args(sunos_sys_nfssvc) - struct compat_12_sys_getdirentries_args; struct sunos_sys_statfs_args { @@ -696,8 +691,6 @@ int sys_poll(struct lwp *, const struct sys_poll_args *, register_t *); -int sunos_sys_nfssvc(struct lwp *, const struct sunos_sys_nfssvc_args *, register_t *); - int compat_12_sys_getdirentries(struct lwp *, const struct compat_12_sys_getdirentries_args *, register_t *); int sunos_sys_statfs(struct lwp *, const struct sunos_sys_statfs_args *, register_t *); Index: src/sys/compat/sunos/sunos_syscalls.c diff -u src/sys/compat/sunos/sunos_syscalls.c:1.84 src/sys/compat/sunos/sunos_syscalls.c:1.85 --- src/sys/compat/sunos/sunos_syscalls.c:1.84 Mon Dec 14 00:58:37 2009 +++ src/sys/compat/sunos/sunos_syscalls.c Wed Mar 3 11:08:00 2010 @@ -1,14 +1,14 @@ -/* $NetBSD: sunos_syscalls.c,v 1.84 2009/12/14 00:58:37 matt Exp $ */ +/* $NetBSD: sunos_syscalls.c,v 1.85 2010/03/03 11:08:00 pooka Exp $ */ /* * System call names. * * DO NOT EDIT-- this file is automatically generated. - * created from NetBSD: syscalls.master,v 1.74 2009/01/13 22:27:43 pooka Exp + * created from NetBSD: syscalls.master,v 1.75 2010/03/03 11:07:17 pooka Exp */ #include -__KERNEL_RCSID(0, "$NetBSD: sunos_syscalls.c,v 1.84 2009/12/14 00:58:37 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sunos_syscalls.c,v 1.85 2010/03/03 11:08:00 pooka Exp $"); #if defined(_KERNEL_OPT) #if defined(_KERNEL_OPT) @@ -181,7 +181,7 @@ /* 152 */ "#152 (unimplemented putmsg)", /* 153 */ "poll", /* 154 */ "#154 (unimplemented)", - /* 155 */ "nfssvc", + /* 155 */ "#155 (unimplemented nfssvc)", /* 156 */ "getdirentries", /* 157 */ "statfs", /* 158 */ "fstatfs", Index: src/sys/compat/sunos/sunos_sysent.c diff -u src/sys/compat/sunos/sunos_sysent.c:1.80 src/sys/compat/sunos/sunos_sysent.c:1.81 --- src/sys/compat/sunos/sunos_sysent.c:1.80 Mon Dec 14 00:58:37 2009 +++ src/sys/compat/sunos/sunos_sysent.c Wed Mar 3 11:08:00 2010 @@ -1,14 +1,14 @@ -/* $NetBSD: sunos_sysent.c,v 1.80 2009/12/14 00:58:37 matt Exp $ */ +/* $NetBSD: sunos_sysent.c,v 1.81 2010/03/03 11:08:00 pooka Exp $ */ /* * System call switch table. * * DO NOT EDIT-- this file is automatically generated. - * created from NetBSD: syscalls.master,v 1.74 2009/01/13 22:27:43 pooka Exp + * created from NetBSD: syscalls.master,v 1.75 2010/03/03 11:07:17 pooka Exp */ #include -__KERNEL_RCSID(0, "
CVS commit: src/sys/compat/sunos
Module Name:src Committed By: pooka Date: Wed Mar 3 11:07:17 UTC 2010 Modified Files: src/sys/compat/sunos: sunos_misc.c syscalls.master Log Message: One more overcomplex ENOSYS bites the dust. To generate a diff of this commit: cvs rdiff -u -r1.166 -r1.167 src/sys/compat/sunos/sunos_misc.c cvs rdiff -u -r1.74 -r1.75 src/sys/compat/sunos/syscalls.master 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/sunos/sunos_misc.c diff -u src/sys/compat/sunos/sunos_misc.c:1.166 src/sys/compat/sunos/sunos_misc.c:1.167 --- src/sys/compat/sunos/sunos_misc.c:1.166 Wed Mar 3 08:20:39 2010 +++ src/sys/compat/sunos/sunos_misc.c Wed Mar 3 11:07:17 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: sunos_misc.c,v 1.166 2010/03/03 08:20:39 he Exp $ */ +/* $NetBSD: sunos_misc.c,v 1.167 2010/03/03 11:07:17 pooka Exp $ */ /* * Copyright (c) 1992, 1993 @@ -50,7 +50,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: sunos_misc.c,v 1.166 2010/03/03 08:20:39 he Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sunos_misc.c,v 1.167 2010/03/03 11:07:17 pooka Exp $"); #include #include @@ -719,36 +719,6 @@ } int -sunos_sys_nfssvc(struct lwp *l, const struct sunos_sys_nfssvc_args *uap, register_t *retval) -{ -#if 0 - struct proc *p = l->l_proc; - struct emul *e = p->p_emul; - struct sys_nfssvc_args outuap; - struct sockaddr sa; - int error; - void *sg = stackgap_init(p, 0); - - memset(&outuap, 0, sizeof outuap); - SCARG(&outuap, fd) = SCARG(uap, fd); - SCARG(&outuap, mskval) = stackgap_alloc(p, &sg, sizeof(sa)); - SCARG(&outuap, msklen) = sizeof(sa); - SCARG(&outuap, mtchval) = stackgap_alloc(p, &sg, sizeof(sa)); - SCARG(&outuap, mtchlen) = sizeof(sa); - - memset(&sa, 0, sizeof sa); - if (error = copyout(&sa, SCARG(&outuap, mskval), SCARG(&outuap, msklen))) - return (error); - if (error = copyout(&sa, SCARG(&outuap, mtchval), SCARG(&outuap, mtchlen))) - return (error); - - return nfssvc(l, &outuap, retval); -#else - return (ENOSYS); -#endif -} - -int sunos_sys_ustat(struct lwp *l, const struct sunos_sys_ustat_args *uap, register_t *retval) { struct sunos_ustat us; Index: src/sys/compat/sunos/syscalls.master diff -u src/sys/compat/sunos/syscalls.master:1.74 src/sys/compat/sunos/syscalls.master:1.75 --- src/sys/compat/sunos/syscalls.master:1.74 Tue Jan 13 22:27:43 2009 +++ src/sys/compat/sunos/syscalls.master Wed Mar 3 11:07:17 2010 @@ -1,4 +1,4 @@ - $NetBSD: syscalls.master,v 1.74 2009/01/13 22:27:43 pooka Exp $ + $NetBSD: syscalls.master,v 1.75 2010/03/03 11:07:17 pooka Exp $ ; @(#)syscalls.master 8.1 (Berkeley) 7/19/93 @@ -249,7 +249,7 @@ 153 NOARGS { int|sys||poll(struct pollfd *fds, u_int nfds, \ int timeout); } 154 UNIMPL -155 STD { int|sunos_sys||nfssvc(int fd); } +155 UNIMPL nfssvc 156 NOARGS { int|compat_12_sys||getdirentries(int fd, char *buf, \ u_int count, long *basep); } 157 STD { int|sunos_sys||statfs(const char *path, \
CVS commit: src/sys/compat/sunos
Module Name:src Committed By: pooka Date: Wed Mar 3 11:07:17 UTC 2010 Modified Files: src/sys/compat/sunos: sunos_misc.c syscalls.master Log Message: One more overcomplex ENOSYS bites the dust. To generate a diff of this commit: cvs rdiff -u -r1.166 -r1.167 src/sys/compat/sunos/sunos_misc.c cvs rdiff -u -r1.74 -r1.75 src/sys/compat/sunos/syscalls.master Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/compat
Module Name:src Committed By: pooka Date: Wed Mar 3 11:02:34 UTC 2010 Modified Files: src/sys/compat/sunos32: sunos32_misc.c src/sys/compat/ultrix: ultrix_misc.c Log Message: Remove nfssvc non-emulations I missed yesterday. To generate a diff of this commit: cvs rdiff -u -r1.70 -r1.71 src/sys/compat/sunos32/sunos32_misc.c cvs rdiff -u -r1.119 -r1.120 src/sys/compat/ultrix/ultrix_misc.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/sunos32/sunos32_misc.c diff -u src/sys/compat/sunos32/sunos32_misc.c:1.70 src/sys/compat/sunos32/sunos32_misc.c:1.71 --- src/sys/compat/sunos32/sunos32_misc.c:1.70 Wed Mar 3 10:56:47 2010 +++ src/sys/compat/sunos32/sunos32_misc.c Wed Mar 3 11:02:34 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: sunos32_misc.c,v 1.70 2010/03/03 10:56:47 martin Exp $ */ +/* $NetBSD: sunos32_misc.c,v 1.71 2010/03/03 11:02:34 pooka Exp $ */ /* from :NetBSD: sunos_misc.c,v 1.107 2000/12/01 19:25:10 jdolecek Exp */ /* @@ -77,7 +77,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: sunos32_misc.c,v 1.70 2010/03/03 10:56:47 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sunos32_misc.c,v 1.71 2010/03/03 11:02:34 pooka Exp $"); #define COMPAT_SUNOS 1 @@ -997,37 +997,6 @@ return ret; } -struct sunos32_sys_nfssvc_args; -int sunos32_sys_nfssvc(struct lwp *l, const struct sunos32_sys_nfssvc_args *uap, register_t *retval); -int -sunos32_sys_nfssvc(struct lwp *l, const struct sunos32_sys_nfssvc_args *uap, register_t *retval) -{ -#if 0 - struct emul *e = p->p_emul; - struct sys_nfssvc_args outuap; - struct sockaddr sa; - int error; - void *sg = stackgap_init(p, 0); - - memset(&outuap, 0, sizeof outuap); - SCARG(&outuap, fd) = SCARG(uap, fd); - SCARG(&outuap, mskval) = stackgap_alloc(p, &sg, sizeof(sa)); - SCARG(&outuap, msklen) = sizeof(sa); - SCARG(&outuap, mtchval) = stackgap_alloc(p, &sg, sizeof(sa)); - SCARG(&outuap, mtchlen) = sizeof(sa); - - memset(&sa, 0, sizeof sa); - if (error = copyout(&sa, SCARG(&outuap, mskval), SCARG(&outuap, msklen))) - return (error); - if (error = copyout(&sa, SCARG(&outuap, mtchval), SCARG(&outuap, mtchlen))) - return (error); - - return nfssvc(l, &outuap, retval); -#else - return (ENOSYS); -#endif -} - int sunos32_sys_ustat(struct lwp *l, const struct sunos32_sys_ustat_args *uap, register_t *retval) { Index: src/sys/compat/ultrix/ultrix_misc.c diff -u src/sys/compat/ultrix/ultrix_misc.c:1.119 src/sys/compat/ultrix/ultrix_misc.c:1.120 --- src/sys/compat/ultrix/ultrix_misc.c:1.119 Tue Mar 2 21:09:21 2010 +++ src/sys/compat/ultrix/ultrix_misc.c Wed Mar 3 11:02:34 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: ultrix_misc.c,v 1.119 2010/03/02 21:09:21 pooka Exp $ */ +/* $NetBSD: ultrix_misc.c,v 1.120 2010/03/03 11:02:34 pooka Exp $ */ /* * Copyright (c) 1995, 1997 Jonathan Stone (hereinafter referred to as the author) @@ -76,7 +76,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ultrix_misc.c,v 1.119 2010/03/02 21:09:21 pooka Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ultrix_misc.c,v 1.120 2010/03/03 11:02:34 pooka Exp $"); #if defined(_KERNEL_OPT) #include "opt_sysv.h" @@ -449,37 +449,6 @@ return sys_setpgid(l, &ap, retval); } -int -ultrix_sys_nfssvc(struct lwp *l, const struct ultrix_sys_nfssvc_args *uap, -register_t *retval) -{ - -#if 0 /* XXX */ - struct emul *e = p->p_emul; - struct sys_nfssvc_args outuap; - struct sockaddr sa; - int error; - void *sg = stackgap_init(p, 0); - - memset(&outuap, 0, sizeof outuap); - SCARG(&outuap, fd) = SCARG(uap, fd); - SCARG(&outuap, mskval) = stackgap_alloc(p, &sg, sizeof sa); - SCARG(&outuap, msklen) = sizeof sa; - SCARG(&outuap, mtchval) = stackgap_alloc(p, &sg, sizeof sa); - SCARG(&outuap, mtchlen) = sizeof sa; - - memset(&sa, 0, sizeof sa); - if (error = copyout(&sa, SCARG(&outuap, mskval), SCARG(&outuap, msklen))) - return error; - if (error = copyout(&sa, SCARG(&outuap, mtchval), SCARG(&outuap, mtchlen))) - return error; - - return nfssvc(l, &outuap, retval); -#else - return ENOSYS; -#endif -} - struct ultrix_ustat { daddr_t f_tfree; /* total free */ uint32_t f_tinode; /* total inodes free */
CVS commit: src/sys/compat
Module Name:src Committed By: pooka Date: Wed Mar 3 11:02:34 UTC 2010 Modified Files: src/sys/compat/sunos32: sunos32_misc.c src/sys/compat/ultrix: ultrix_misc.c Log Message: Remove nfssvc non-emulations I missed yesterday. To generate a diff of this commit: cvs rdiff -u -r1.70 -r1.71 src/sys/compat/sunos32/sunos32_misc.c cvs rdiff -u -r1.119 -r1.120 src/sys/compat/ultrix/ultrix_misc.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/compat/sunos32
Module Name:src Committed By: martin Date: Wed Mar 3 10:56:47 UTC 2010 Modified Files: src/sys/compat/sunos32: sunos32_misc.c Log Message: Add prototype and forward declarations to make the empty nfs stub compile. To generate a diff of this commit: cvs rdiff -u -r1.69 -r1.70 src/sys/compat/sunos32/sunos32_misc.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/sunos32/sunos32_misc.c diff -u src/sys/compat/sunos32/sunos32_misc.c:1.69 src/sys/compat/sunos32/sunos32_misc.c:1.70 --- src/sys/compat/sunos32/sunos32_misc.c:1.69 Wed Mar 3 08:20:39 2010 +++ src/sys/compat/sunos32/sunos32_misc.c Wed Mar 3 10:56:47 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: sunos32_misc.c,v 1.69 2010/03/03 08:20:39 he Exp $ */ +/* $NetBSD: sunos32_misc.c,v 1.70 2010/03/03 10:56:47 martin Exp $ */ /* from :NetBSD: sunos_misc.c,v 1.107 2000/12/01 19:25:10 jdolecek Exp */ /* @@ -77,7 +77,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: sunos32_misc.c,v 1.69 2010/03/03 08:20:39 he Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sunos32_misc.c,v 1.70 2010/03/03 10:56:47 martin Exp $"); #define COMPAT_SUNOS 1 @@ -997,6 +997,8 @@ return ret; } +struct sunos32_sys_nfssvc_args; +int sunos32_sys_nfssvc(struct lwp *l, const struct sunos32_sys_nfssvc_args *uap, register_t *retval); int sunos32_sys_nfssvc(struct lwp *l, const struct sunos32_sys_nfssvc_args *uap, register_t *retval) {
CVS commit: src/sys/compat/sunos32
Module Name:src Committed By: martin Date: Wed Mar 3 10:56:47 UTC 2010 Modified Files: src/sys/compat/sunos32: sunos32_misc.c Log Message: Add prototype and forward declarations to make the empty nfs stub compile. To generate a diff of this commit: cvs rdiff -u -r1.69 -r1.70 src/sys/compat/sunos32/sunos32_misc.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/compat
Module Name:src Committed By: he Date: Wed Mar 3 08:20:39 UTC 2010 Modified Files: src/sys/compat/common: vfs_syscalls_30.c src/sys/compat/ibcs2: ibcs2_misc.c src/sys/compat/irix: irix_dirent.c src/sys/compat/linux/common: linux_file64.c linux_misc.c src/sys/compat/linux32/common: linux32_dirent.c src/sys/compat/osf1: osf1_file.c src/sys/compat/sunos: sunos_misc.c src/sys/compat/sunos32: sunos32_misc.c src/sys/compat/svr4: svr4_misc.c src/sys/compat/svr4_32: svr4_32_misc.c Log Message: When implementing "read directory", when there are too many empty entries in a row, and we need to try to read the next block, and have passed a non-NULL cookie pointer to VOP_READDIR, ensure that we free the cookie buffer before re-doing VOP_READDIR, so that we don't leak memory. This fix is similar to nfs_serv.c revisions 1.115 + 1.124. This should fix the long-standing problem observed by e.g. using Linux- emulated programs to take backup of servers, which is one of the problems which were reported in PR#42661. Thanks to pooka@ for the hints for traversing the VOP* layer. To generate a diff of this commit: cvs rdiff -u -r1.30 -r1.31 src/sys/compat/common/vfs_syscalls_30.c cvs rdiff -u -r1.109 -r1.110 src/sys/compat/ibcs2/ibcs2_misc.c cvs rdiff -u -r1.23 -r1.24 src/sys/compat/irix/irix_dirent.c cvs rdiff -u -r1.49 -r1.50 src/sys/compat/linux/common/linux_file64.c cvs rdiff -u -r1.213 -r1.214 src/sys/compat/linux/common/linux_misc.c cvs rdiff -u -r1.9 -r1.10 src/sys/compat/linux32/common/linux32_dirent.c cvs rdiff -u -r1.37 -r1.38 src/sys/compat/osf1/osf1_file.c cvs rdiff -u -r1.165 -r1.166 src/sys/compat/sunos/sunos_misc.c cvs rdiff -u -r1.68 -r1.69 src/sys/compat/sunos32/sunos32_misc.c cvs rdiff -u -r1.148 -r1.149 src/sys/compat/svr4/svr4_misc.c cvs rdiff -u -r1.67 -r1.68 src/sys/compat/svr4_32/svr4_32_misc.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/compat
Module Name:src Committed By: he Date: Wed Mar 3 08:20:39 UTC 2010 Modified Files: src/sys/compat/common: vfs_syscalls_30.c src/sys/compat/ibcs2: ibcs2_misc.c src/sys/compat/irix: irix_dirent.c src/sys/compat/linux/common: linux_file64.c linux_misc.c src/sys/compat/linux32/common: linux32_dirent.c src/sys/compat/osf1: osf1_file.c src/sys/compat/sunos: sunos_misc.c src/sys/compat/sunos32: sunos32_misc.c src/sys/compat/svr4: svr4_misc.c src/sys/compat/svr4_32: svr4_32_misc.c Log Message: When implementing "read directory", when there are too many empty entries in a row, and we need to try to read the next block, and have passed a non-NULL cookie pointer to VOP_READDIR, ensure that we free the cookie buffer before re-doing VOP_READDIR, so that we don't leak memory. This fix is similar to nfs_serv.c revisions 1.115 + 1.124. This should fix the long-standing problem observed by e.g. using Linux- emulated programs to take backup of servers, which is one of the problems which were reported in PR#42661. Thanks to pooka@ for the hints for traversing the VOP* layer. To generate a diff of this commit: cvs rdiff -u -r1.30 -r1.31 src/sys/compat/common/vfs_syscalls_30.c cvs rdiff -u -r1.109 -r1.110 src/sys/compat/ibcs2/ibcs2_misc.c cvs rdiff -u -r1.23 -r1.24 src/sys/compat/irix/irix_dirent.c cvs rdiff -u -r1.49 -r1.50 src/sys/compat/linux/common/linux_file64.c cvs rdiff -u -r1.213 -r1.214 src/sys/compat/linux/common/linux_misc.c cvs rdiff -u -r1.9 -r1.10 src/sys/compat/linux32/common/linux32_dirent.c cvs rdiff -u -r1.37 -r1.38 src/sys/compat/osf1/osf1_file.c cvs rdiff -u -r1.165 -r1.166 src/sys/compat/sunos/sunos_misc.c cvs rdiff -u -r1.68 -r1.69 src/sys/compat/sunos32/sunos32_misc.c cvs rdiff -u -r1.148 -r1.149 src/sys/compat/svr4/svr4_misc.c cvs rdiff -u -r1.67 -r1.68 src/sys/compat/svr4_32/svr4_32_misc.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/common/vfs_syscalls_30.c diff -u src/sys/compat/common/vfs_syscalls_30.c:1.30 src/sys/compat/common/vfs_syscalls_30.c:1.31 --- src/sys/compat/common/vfs_syscalls_30.c:1.30 Mon Jan 26 13:00:04 2009 +++ src/sys/compat/common/vfs_syscalls_30.c Wed Mar 3 08:20:38 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: vfs_syscalls_30.c,v 1.30 2009/01/26 13:00:04 njoly Exp $ */ +/* $NetBSD: vfs_syscalls_30.c,v 1.31 2010/03/03 08:20:38 he Exp $ */ /*- * Copyright (c) 2005, 2008 The NetBSD Foundation, Inc. @@ -29,7 +29,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include -__KERNEL_RCSID(0, "$NetBSD: vfs_syscalls_30.c,v 1.30 2009/01/26 13:00:04 njoly Exp $"); +__KERNEL_RCSID(0, "$NetBSD: vfs_syscalls_30.c,v 1.31 2010/03/03 08:20:38 he Exp $"); #include #include @@ -305,8 +305,12 @@ } /* if we squished out the whole block, try again */ - if (outp == SCARG(uap, buf)) + if (outp == SCARG(uap, buf)) { + if (cookiebuf) + free(cookiebuf, M_TEMP); + cookiebuf = NULL; goto again; + } fp->f_offset = off; /* update the vnode offset */ eof: Index: src/sys/compat/ibcs2/ibcs2_misc.c diff -u src/sys/compat/ibcs2/ibcs2_misc.c:1.109 src/sys/compat/ibcs2/ibcs2_misc.c:1.110 --- src/sys/compat/ibcs2/ibcs2_misc.c:1.109 Wed Nov 4 21:23:02 2009 +++ src/sys/compat/ibcs2/ibcs2_misc.c Wed Mar 3 08:20:39 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: ibcs2_misc.c,v 1.109 2009/11/04 21:23:02 rmind Exp $ */ +/* $NetBSD: ibcs2_misc.c,v 1.110 2010/03/03 08:20:39 he Exp $ */ /* * Copyright (c) 1992, 1993 @@ -95,7 +95,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ibcs2_misc.c,v 1.109 2009/11/04 21:23:02 rmind Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ibcs2_misc.c,v 1.110 2010/03/03 08:20:39 he Exp $"); #include #include @@ -472,8 +472,12 @@ } /* if we squished out the whole block, try again */ - if (outp == SCARG(uap, buf)) + if (outp == SCARG(uap, buf)) { + if (cookiebuf) + free(cookiebuf, M_TEMP); + cookiebuf = NULL; goto again; + } fp->f_offset = off; /* update the vnode offset */ eof: @@ -602,8 +606,12 @@ resid -= ibcs2_reclen; } /* if we squished out the whole block, try again */ - if (outp == SCARG(uap, buf)) + if (outp == SCARG(uap, buf)) { + if (cookiebuf) + free(cookiebuf, M_TEMP); + cookiebuf = NULL; goto again; + } fp->f_offset = off; /* update the vnode offset */ eof: *retval = SCARG(uap, nbytes) - resid; Index: src/sys/compat/irix/irix_dirent.c diff -u src/sys/compat/irix/irix_dirent.c:1.23 src/sys/compat/irix/irix_dirent.c:1.24 --- src/sys/compat/irix/irix_dirent.c:1.23 Mon Apr 28 20:23:41 2008 +++ src/sys/compat/irix/irix_dirent.c Wed Mar 3 08:20:38 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: irix_dirent.c,v 1.23 2008/04/28 20:23:41 martin Exp $ */ +/* $NetBSD: irix_dirent.c,v 1.24 2010/03/03 08:20:38 he Exp $ */ /*- * Copyright (c) 1994, 2001, 2008 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: irix_