Re: CVS commit: src/etc/rc.d

2011-01-08 Thread Hubert Feyrer

On Sat, 8 Jan 2011, David Holland wrote:

 XXX. Why is chown in /usr/sbin ? it should be moved to /sbin

Because historically nothing needed to be chowned during boot because
it was all root.

This is no longer true, for lvm and other things, so let's take a deep
breath and move chown. I don't like the idea of having rc.d scripts
depend on /rescue.


Seconded (on the don't depend on /rescue part).
FWIW:
fehu.org% cat /etc/debian_version
squeeze/sid
fehu.org% which chown
/bin/chown


 - Hubert


CVS commit: src/sys/arch/i386/conf

2010-03-08 Thread Hubert Feyrer
Module Name:src
Committed By:   hubertf
Date:   Mon Mar  8 22:51:52 UTC 2010

Modified Files:
src/sys/arch/i386/conf: GENERIC

Log Message:
Add etherip(4), commented out


To generate a diff of this commit:
cvs rdiff -u -r1.973 -r1.974 src/sys/arch/i386/conf/GENERIC

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/i386/conf

2010-03-08 Thread Hubert Feyrer
Module Name:src
Committed By:   hubertf
Date:   Mon Mar  8 22:51:52 UTC 2010

Modified Files:
src/sys/arch/i386/conf: GENERIC

Log Message:
Add etherip(4), commented out


To generate a diff of this commit:
cvs rdiff -u -r1.973 -r1.974 src/sys/arch/i386/conf/GENERIC

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/i386/conf/GENERIC
diff -u src/sys/arch/i386/conf/GENERIC:1.973 src/sys/arch/i386/conf/GENERIC:1.974
--- src/sys/arch/i386/conf/GENERIC:1.973	Sat Mar  6 21:12:04 2010
+++ src/sys/arch/i386/conf/GENERIC	Mon Mar  8 22:51:52 2010
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.973 2010/03/06 21:12:04 plunky Exp $
+# $NetBSD: GENERIC,v 1.974 2010/03/08 22:51:52 hubertf Exp $
 #
 # GENERIC machine description file
 #
@@ -22,7 +22,7 @@
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		GENERIC-$Revision: 1.973 $
+#ident 		GENERIC-$Revision: 1.974 $
 
 maxusers	64		# estimated number of users
 
@@ -1534,6 +1534,7 @@
 pseudo-device	agr			# IEEE 802.3ad link aggregation
 #pseudo-device	pf			# PF packet filter
 #pseudo-device	pflog			# PF log if
+#pseudo-device 	etherip 		# Tunnel Ethernet over IP
 # srt is EXPERIMENTAL
 #pseudo-device	srt			# source-address-based routing
 



Re: CVS commit: src/sys/uvm

2010-02-12 Thread Hubert Feyrer

On Fri, 12 Feb 2010, Masao Uebayashi wrote:

Log Message:
uvm_fault_internal: Skip another long code segment (lower neighbor fault)
by a goto.


To generate a diff of this commit:
cvs rdiff -u -r1.133 -r1.134 src/sys/uvm/uvm_fault.c


Isn't this what the compiler would make anyways,
and making the code harder to read?
There's a reason modern programming doesn't advocate gotos...


I used goto there because it had the if-indented block a) was long, b) had
an important sequence of code, and c) had a very similar code fragment in
the same file.  So the intent was to make the block into a function, reduce
unnecessary differences, then kill code duplication.  (The current code is
not in a good shape yet.)


Replacing common code with a function sounds ok, but I've never seen 
either size or importance as justification of a goto.



 - Hubert


CVS commit: src/sys/arch/i386/conf

2010-02-12 Thread Hubert Feyrer
Module Name:src
Committed By:   hubertf
Date:   Fri Feb 12 15:51:16 UTC 2010

Modified Files:
src/sys/arch/i386/conf: ALL GENERIC

Log Message:
Add PPPOE_SERVER
 - disabled (commented out) in GENERIC,
 - enabled in ALL


To generate a diff of this commit:
cvs rdiff -u -r1.237 -r1.238 src/sys/arch/i386/conf/ALL
cvs rdiff -u -r1.967 -r1.968 src/sys/arch/i386/conf/GENERIC

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



Re: CVS commit: src/sys/uvm

2010-02-11 Thread Hubert Feyrer

On Sun, 31 Jan 2010, Masao Uebayashi wrote:

Modified Files:
src/sys/uvm: uvm_fault.c

Log Message:
uvm_fault_internal: Skip another long code segment (lower neighbor fault)
by a goto.


To generate a diff of this commit:
cvs rdiff -u -r1.133 -r1.134 src/sys/uvm/uvm_fault.c


Isn't this what the compiler would make anyways,
and making the code harder to read?
There's a reason modern programming doesn't advocate gotos...


 - Hubert


CVS commit: src/sys/arch/i386/stand/boot

2010-02-08 Thread Hubert Feyrer
Module Name:src
Committed By:   hubertf
Date:   Mon Feb  8 21:25:32 UTC 2010

Modified Files:
src/sys/arch/i386/stand/boot: boot2.c

Log Message:
When a password is set for the bootloader (installboot -o password=...),
it currently complains about an unknown command and prints a usage if the
password is entered wrong:

...
Choose an option; RETURN for default; SPACE to stop countdown.
Option 1 will be chosen in 0 seconds.
Password: *
Password: *
Password: *
unknown command
commands are:
boot [xdNx:][filename] [-12acdqsvxz]
 (ex. hd0a:netbsd.old -s
ls [path]
dev xd[N[x]]:
consdev {pc|com[0123]|com[0123]kbd|auto}
modules {enabled|disabled}
load {path_to_module}
multiboot [xdNx:][filename] [args]
help|?
quit

Choose an option; RETURN for default; SPACE to stop countdown.
Option 1 will be chosen in 0 seconds.
...

This is confusing, plus someone may use it to determine bits of
information about the system. What should happen instead is that the user
is informed that the password is wrong:

...
Choose an option; RETURN for default; SPACE to stop countdown.
Option 1 will be chosen in 0 seconds.
Password: 
Password: 
Password: 
Wrong password.

Choose an option; RETURN for default; SPACE to stop countdown.
...

Implement the latter behaviour.


To generate a diff of this commit:
cvs rdiff -u -r1.47 -r1.48 src/sys/arch/i386/stand/boot/boot2.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/pci

2010-02-01 Thread Hubert Feyrer
Module Name:src
Committed By:   hubertf
Date:   Mon Feb  1 22:34:29 UTC 2010

Modified Files:
src/sys/dev/pci: hifn7751.c

Log Message:
Use uppercase for acronyms on output: DRAM, SRAM


To generate a diff of this commit:
cvs rdiff -u -r1.43 -r1.44 src/sys/dev/pci/hifn7751.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/share/man/man4

2010-01-31 Thread Hubert Feyrer
Module Name:src
Committed By:   hubertf
Date:   Sun Jan 31 14:43:04 UTC 2010

Modified Files:
src/share/man/man4: crypto.4

Log Message:
Fix two typos to make documentation match the code:
 * the CIOCFKEY ioctl is really called CIOCKEY
 * CRK_MOD_EX = CRK_MOD_EXP

Bump date.


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/share/man/man4/crypto.4

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys

2010-01-30 Thread Hubert Feyrer
Module Name:src
Committed By:   hubertf
Date:   Sun Jan 31 00:43:38 UTC 2010

Modified Files:
src/sys/arch/x86/x86: pmap.c x86_autoconf.c
src/sys/dev/pci: agp_via.c
src/sys/kern: cnmagic.c init_main.c kern_ksyms.c
src/sys/netipsec: ipsec.c key.c
src/sys/netkey: key.c

Log Message:
Replace more printfs with aprint_normal / aprint_verbose
Makes boot -z go mostly silent for me.


To generate a diff of this commit:
cvs rdiff -u -r1.99 -r1.100 src/sys/arch/x86/x86/pmap.c
cvs rdiff -u -r1.48 -r1.49 src/sys/arch/x86/x86/x86_autoconf.c
cvs rdiff -u -r1.17 -r1.18 src/sys/dev/pci/agp_via.c
cvs rdiff -u -r1.10 -r1.11 src/sys/kern/cnmagic.c
cvs rdiff -u -r1.414 -r1.415 src/sys/kern/init_main.c
cvs rdiff -u -r1.52 -r1.53 src/sys/kern/kern_ksyms.c
cvs rdiff -u -r1.46 -r1.47 src/sys/netipsec/ipsec.c
cvs rdiff -u -r1.62 -r1.63 src/sys/netipsec/key.c
cvs rdiff -u -r1.175 -r1.176 src/sys/netkey/key.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/share/man/man9

2010-01-22 Thread Hubert Feyrer
Module Name:src
Committed By:   hubertf
Date:   Fri Jan 22 09:18:07 UTC 2010

Modified Files:
src/share/man/man9: opencrypto.9

Log Message:
Document sysctls


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/share/man/man9/opencrypto.9

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/pci

2010-01-21 Thread Hubert Feyrer
Module Name:src
Committed By:   hubertf
Date:   Thu Jan 21 23:23:44 UTC 2010

Modified Files:
src/sys/dev/pci: pcidevs

Log Message:
add/improve a few devices


To generate a diff of this commit:
cvs rdiff -u -r1.1015 -r1.1016 src/sys/dev/pci/pcidevs

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.