Re: svn commit: r241576 - in head/usr.sbin/cron: cron crontab lib

2012-10-15 Thread Bruce Cran

On 15/10/2012 22:18, Ian Lepore wrote:

In 1987 I would have been outraged at waking up at 1hz needlessly.
Sitting here typing on a machine that's doing 12,000 interrupts/sec just
to maintain clocks, and top shows interrupts using 0.0% cpu, it's hard
to get too upset about a 1hz loop anymore.


People are getting upset about unnecessary wakeups again because it's 
possible to save quite a bit of power by keeping the system idle.


--
Bruce Cran
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


Re: svn commit: r241576 - in head/usr.sbin/cron: cron crontab lib

2012-10-15 Thread Bruce Cran

On 16/10/2012 00:26, Adrian Chadd wrote:

Maybe crontab should be using a command via a socket to reload, rather
than stat'ing files..


Or kqueue?

--
Bruce Cran
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


Re: svn commit: r240527 - head/bin/df

2012-09-15 Thread Bruce Cran

On 15/09/2012 21:57, Tijl Coosemans wrote:
Freeing memory right before exiting is a waste of time. The tool 
shouldn't complain about it. 


/Stop wasting time and just exit already/. - 
http://blogs.msdn.com/b/oldnewthing/archive/2012/01/05/10253268.aspx


--
Bruce Cran
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r232509 - head/sys/compat/ndis

2012-03-04 Thread Bruce Cran
Author: brucec
Date: Sun Mar  4 17:08:43 2012
New Revision: 232509
URL: http://svn.freebsd.org/changeset/base/232509

Log:
  Fix race condition in KfRaiseIrql().
  
  After getting the current irql, if the kthread gets preempted and
  subsequently runs on a different CPU, the saved irql could be wrong.
  
  Also, correct the panic string.
  
  PR:   kern/165630
  Submitted by: Vladislav Movchan vladislav.movchan at gmail.com

Modified:
  head/sys/compat/ndis/subr_hal.c

Modified: head/sys/compat/ndis/subr_hal.c
==
--- head/sys/compat/ndis/subr_hal.c Sun Mar  4 17:00:46 2012
(r232508)
+++ head/sys/compat/ndis/subr_hal.c Sun Mar  4 17:08:43 2012
(r232509)
@@ -392,16 +392,18 @@ KfRaiseIrql(uint8_t irql)
 {
uint8_t oldirql;
 
+   sched_pin();
oldirql = KeGetCurrentIrql();
 
/* I am so going to hell for this. */
if (oldirql  irql)
-   panic(IRQL_NOT_LESS_THAN);
+   panic(IRQL_NOT_LESS_THAN_OR_EQUAL);
 
-   if (oldirql != DISPATCH_LEVEL) {
-   sched_pin();
+   if (oldirql != DISPATCH_LEVEL) 
mtx_lock(disp_lock[curthread-td_oncpu]);
-   }
+   else
+   sched_unpin();  
+
 /*printf(RAISE IRQL: %d %d\n, irql, oldirql);*/
 
return (oldirql);
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


Re: svn commit: r228192 - head/usr.sbin/bsdinstall/scripts

2011-12-02 Thread Bruce Cran

On 02/12/2011 09:44, Joel Dahl wrote:

* Not specifically aimed at this commit, but my recommendation
   would be that we keep bsdinstall as simple as possible: installing FreeBSD
   should require a minimum amount of keystrokes. I realise this is just one
   more screen, but I hope we don't turn bsdinstall into a configuration
   utility where you can disable/enable just about anything in rc.conf.


This is an argument I see again and again. FreeBSD is a technical OS, 
where I would expect users would appreciate the chance to configure 
their systems without having to look up man pages for every detail (e.g. 
console settings).

For people who want their OS to be as simple as possible there's PC-BSD.

--
Bruce Cran
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


Re: svn commit: r222998 - head/usr.sbin/bsdinstall

2011-06-12 Thread Bruce Cran

On 11/06/2011 22:44, Nathan Whitehorn wrote:

Author: nwhitehorn
Date: Sat Jun 11 21:44:07 2011
New Revision: 222998
URL: http://svn.freebsd.org/changeset/base/222998

Log:
   Long-overdue man page for bsdinstall.




+.Dd June 11, 2010


I guess this should be 2011?

--
Bruce Cran
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r222248 - head/sys/conf

2011-05-24 Thread Bruce Cran
Author: brucec
Date: Tue May 24 09:01:56 2011
New Revision: 48
URL: http://svn.freebsd.org/changeset/base/48

Log:
  Remove an outdated comment as requested by Bruce Evans in a private email to
  Alexander Best (arundel@).
  
  For clang, -fdiagnostics-show-option is enabled by default, but for gcc it
  isn't. This option will report which -W* flag was responsible for triggering
  a certain warning. This will bring gcc warnings closer to the ones clang emits
  and might also help developers track down tinderbox failures a bit quicker.
  
  Submitted by: arundel

Modified:
  head/sys/conf/kern.mk

Modified: head/sys/conf/kern.mk
==
--- head/sys/conf/kern.mk   Tue May 24 08:02:55 2011(r47)
+++ head/sys/conf/kern.mk   Tue May 24 09:01:56 2011(r48)
@@ -1,15 +1,12 @@
 # $FreeBSD$
 
 #
-# Warning flags for compiling the kernel and components of the kernel.
+# Warning flags for compiling the kernel and components of the kernel:
 #
-# Note that the newly added -Wcast-qual is responsible for generating
-# most of the remaining warnings.  Warnings introduced with -Wall will
-# also pop up, but are easier to fix.
 CWARNFLAGS?=   -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes \
-Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual \
-Wundef -Wno-pointer-sign -fformat-extensions \
-   -Wmissing-include-dirs
+   -Wmissing-include-dirs -fdiagnostics-show-option
 #
 # The following flags are next up for working on:
 #  -Wextra
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r221879 - head/sys/conf

2011-05-14 Thread Bruce Cran
Author: brucec
Date: Sat May 14 11:26:00 2011
New Revision: 221879
URL: http://svn.freebsd.org/changeset/base/221879

Log:
  gcc and clang semantics imply certain -mno-* flags when other certain -mno-*
  flags are also specified. This change makes use of this behaviour and removes
  unneeded -mno-* flags.
  
  Note that clang does not yet enable AVX support for any CPU. However at some
  point in the future it will and since we definitely want to disable it for the
  kernel, we might as well add the -mno-avx flag now.
  
  Submitted by: arundel

Modified:
  head/sys/conf/kern.mk

Modified: head/sys/conf/kern.mk
==
--- head/sys/conf/kern.mk   Sat May 14 05:43:33 2011(r221878)
+++ head/sys/conf/kern.mk   Sat May 14 11:26:00 2011(r221879)
@@ -25,11 +25,21 @@ CWARNFLAGS?=-Wall -Wredundant-decls -Wn
 # operations inside the kernel itself.  These operations are exclusively
 # reserved for user applications.
 #
+# gcc:
+# Setting -mno-mmx implies -mno-3dnow
+# Setting -mno-sse implies -mno-sse2, -mno-sse3 and -mno-ssse3
+#
+# clang:
+# Setting -mno-mmx implies -mno-3dnow, -mno-3dnowa, -mno-sse, -mno-sse2,
+#  -mno-sse3, -mno-ssse3, -mno-sse41 and -mno-sse42
+#
 .if ${MACHINE_CPUARCH} == i386
 .if ${CC:T:Mclang} != clang
-CFLAGS+=   -mno-align-long-strings -mpreferred-stack-boundary=2
+CFLAGS+=   -mno-align-long-strings -mpreferred-stack-boundary=2 -mno-sse
+.else
+CFLAGS+=   -mno-aes -mno-avx
 .endif
-CFLAGS+=   -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -msoft-float
+CFLAGS+=   -mno-mmx -msoft-float
 INLINE_LIMIT?= 8000
 .endif
 
@@ -61,10 +71,23 @@ INLINE_LIMIT?=  15000
 # operations inside the kernel itself.  These operations are exclusively
 # reserved for user applications.
 #
+# gcc:
+# Setting -mno-mmx implies -mno-3dnow
+# Setting -mno-sse implies -mno-sse2, -mno-sse3, -mno-ssse3 and -mfpmath=387
+#
+# clang:
+# Setting -mno-mmx implies -mno-3dnow, -mno-3dnowa, -mno-sse, -mno-sse2,
+#  -mno-sse3, -mno-ssse3, -mno-sse41 and -mno-sse42
+# (-mfpmath= is not supported)
+#
 .if ${MACHINE_CPUARCH} == amd64
-CFLAGS+=   -mcmodel=kernel -mno-red-zone \
-   -mfpmath=387 -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 \
-   -msoft-float -fno-asynchronous-unwind-tables
+.if ${CC:T:Mclang} != clang
+CFLAGS+=   -mno-sse
+.else
+CFLAGS+=   -mno-aes -mno-avx
+.endif
+CFLAGS+=   -mcmodel=kernel -mno-red-zone -mno-mmx -msoft-float \
+   -fno-asynchronous-unwind-tables
 INLINE_LIMIT?= 8000
 .endif
 
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r221320 - head/sys/conf

2011-05-02 Thread Bruce Cran
Author: brucec
Date: Mon May  2 10:35:27 2011
New Revision: 221320
URL: http://svn.freebsd.org/changeset/base/221320

Log:
  Add -Wmissing-include-dirs to CWARNFLAGS, so tinderbox will punish those
  developers committing new code with broken include directories.
  Fix a few whitespace issues.
  Improve a couple of comments.
  -W is now deprecated and is referred to as -Wextra (see gcc(1)).
  
  Submitted by: arundel

Modified:
  head/sys/conf/kern.mk

Modified: head/sys/conf/kern.mk
==
--- head/sys/conf/kern.mk   Mon May  2 09:47:13 2011(r221319)
+++ head/sys/conf/kern.mk   Mon May  2 10:35:27 2011(r221320)
@@ -3,24 +3,25 @@
 #
 # Warning flags for compiling the kernel and components of the kernel.
 #
-# Note that the newly added -Wcast-qual is responsible for generating 
+# Note that the newly added -Wcast-qual is responsible for generating
 # most of the remaining warnings.  Warnings introduced with -Wall will
 # also pop up, but are easier to fix.
 CWARNFLAGS?=   -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes \
-Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual \
-   -Wundef -Wno-pointer-sign -fformat-extensions
+   -Wundef -Wno-pointer-sign -fformat-extensions \
+   -Wmissing-include-dirs
 #
 # The following flags are next up for working on:
-#  -W
+#  -Wextra
 
 #
-# On the i386, do not align the stack to 16-byte boundaries.  Otherwise GCC
-# 2.95 adds code to the entry and exit point of every function to align the
+# On i386, do not align the stack to 16-byte boundaries.  Otherwise GCC 2.95
+# and above adds code to the entry and exit point of every function to align 
the
 # stack to 16-byte boundaries -- thus wasting approximately 12 bytes of stack
-# per function call.  While the 16-byte alignment may benefit micro 
benchmarks, 
+# per function call.  While the 16-byte alignment may benefit micro benchmarks,
 # it is probably an overall loss as it makes the code bigger (less efficient
 # use of code cache tag lines) and uses more stack (less efficient use of data
-# cache tag lines).  Explicitly prohibit the use of SSE and other SIMD
+# cache tag lines).  Explicitly prohibit the use of FPU, SSE and other SIMD
 # operations inside the kernel itself.  These operations are exclusively
 # reserved for user applications.
 #
@@ -35,6 +36,7 @@ INLINE_LIMIT?=8000
 .if ${MACHINE_CPUARCH} == arm
 INLINE_LIMIT?= 8000
 .endif
+
 #
 # For IA-64, we use r13 for the kernel globals pointer and we only use
 # a very small subset of float registers for integer divides.
@@ -98,7 +100,7 @@ INLINE_LIMIT?=   8000
 CFLAGS+=   -ffreestanding
 
 #
-# GCC SSP support.
+# GCC SSP support
 #
 .if ${MK_SSP} != no  ${MACHINE_CPUARCH} != ia64  \
 ${MACHINE_CPUARCH} != arm  ${MACHINE_CPUARCH} != mips
@@ -106,9 +108,8 @@ CFLAGS+=-fstack-protector
 .endif
 
 #
-# Enable CTF conversation on request.
+# Enable CTF conversation on request
 #
 .if defined(WITH_CTF)
 .undef NO_CTF
 .endif
-
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


Re: svn commit: r220982 - in head: . sys/amd64/conf sys/arm/conf sys/conf sys/i386/conf sys/ia64/conf sys/mips/conf sys/mips/malta sys/pc98/conf sys/powerpc/conf sys/sparc64/conf sys/sun4v/conf

2011-04-24 Thread Bruce Cran
On Sun, 24 Apr 2011 08:58:58 + (UTC)
Alexander Motin m...@freebsd.org wrote:

 If you are using ATA
 device names in /etc/fstab or other places, make sure to update them
 respectively (adX - adaY, acdX - cdY, afdX - daY, astX - saY,
 where 'Y's are the sequential numbers for each type in order of
 detection, unless configured otherwise with tunables, see cam(4)).

People might expect that if ata(4) numbering starts with ad4, ada4
would be created. However on my machines I've seen ad4 get mapped to
ada0.

-- 
Bruce Cran
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


Re: svn commit: r220982 - in head: . sys/amd64/conf sys/arm/conf sys/conf sys/i386/conf sys/ia64/conf sys/mips/conf sys/mips/malta sys/pc98/conf sys/powerpc/conf sys/sparc64/conf sys/sun4v/conf

2011-04-24 Thread Bruce Cran
On Sun, 24 Apr 2011 12:15:51 +0300
Alexander Motin m...@freebsd.org wrote:

 On 24.04.2011 12:06, Bruce Cran wrote:

  People might expect that if ata(4) numbering starts with ad4, ada4
  would be created. However on my machines I've seen ad4 get mapped to
  ada0.
 
 Yes. With sequential I mean from 0 and up. :)

Sorry I didn't read it properly and sent my reply before I noticed you
said adX - adaY, not adX - adaX.

-- 
Bruce Cran
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r220712 - head/sys/modules/netgraph/atm/ccatm

2011-04-16 Thread Bruce Cran
Author: brucec
Date: Sat Apr 16 11:15:57 2011
New Revision: 220712
URL: http://svn.freebsd.org/changeset/base/220712

Log:
  Remove missing include directory in preparation for adding
  -Wmissing-include-dirs to CWARNFLAGS.

Modified:
  head/sys/modules/netgraph/atm/ccatm/Makefile

Modified: head/sys/modules/netgraph/atm/ccatm/Makefile
==
--- head/sys/modules/netgraph/atm/ccatm/MakefileSat Apr 16 11:14:42 
2011(r220711)
+++ head/sys/modules/netgraph/atm/ccatm/MakefileSat Apr 16 11:15:57 
2011(r220712)
@@ -12,6 +12,6 @@ KMOD= ng_ccatm
 SRCS=  ng_ccatm.c cc_conn.c cc_data.c cc_dump.c cc_port.c cc_sig.c \
cc_user.c unisap.c
 
-CFLAGS+= -I${LIBBASE} -I${LIBBASE}/netnatm/ccatm -DCCATM_DEBUG
+CFLAGS+= -I${LIBBASE} -DCCATM_DEBUG
 
 .include bsd.kmod.mk
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


Re: svn commit: r220712 - head/sys/modules/netgraph/atm/ccatm

2011-04-16 Thread Bruce Cran
On Sat, 2011-04-16 at 11:15 +, Bruce Cran wrote:

 Log:
   Remove missing include directory in preparation for adding
   -Wmissing-include-dirs to CWARNFLAGS.

Submitted by: arundel

-- 
Bruce Cran

___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


Re: svn commit: r220412 - in head: share/man/man4 sys/cam/ata

2011-04-07 Thread Bruce Cran
On Thursday 07 Apr 2011 09:17:53 Alexander Motin wrote:

 +This variable determines whether device write cache should be enabled or
 not. +Set to 1 to enable write cache, 0 to disable, -1 to left it as-is.

left should probably be leave.

-- 
Bruce Cran
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


Re: svn commit: r219699 - head/sys/kern

2011-03-16 Thread Bruce Cran
On Wed, 16 Mar 2011 20:51:17 +0100
Ivan Voras ivo...@freebsd.org wrote:

 (Are there any ready read
 multi-stream read tests which are not trivial i.e. they start from
 different positions in the file?)

I think sysutils/fio can do that.

-- 
Bruce Cran
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


Re: svn commit: r219679 - head/sys/i386/include

2011-03-16 Thread Bruce Cran
On Wed, 16 Mar 2011 21:03:46 +0100
Erik Trulsson ertr1...@student.uu.se wrote:

 There are probably only a handful of people (if that) who actually run
 FreeBSD on an actual 486-class machine, but requiring SSE2 would mean
 dropping support for Pentium-III and Athlon-XP equipped machines and
 I believe there are a large number of such machines still in use, and
 they are still perfectly suitable for a large number of tasks.

Some low power x86 CPUs don't have SSE2 either.

-- 
Bruce Cran
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r219613 - head/usr.bin/netstat

2011-03-13 Thread Bruce Cran
Author: brucec
Date: Sun Mar 13 16:47:21 2011
New Revision: 219613
URL: http://svn.freebsd.org/changeset/base/219613

Log:
  Fix typo.

Modified:
  head/usr.bin/netstat/sctp.c

Modified: head/usr.bin/netstat/sctp.c
==
--- head/usr.bin/netstat/sctp.c Sun Mar 13 16:27:36 2011(r219612)
+++ head/usr.bin/netstat/sctp.c Sun Mar 13 16:47:21 2011(r219613)
@@ -563,7 +563,7 @@ sctp_stats(u_long off, const char *name,
p(sctps_sendfastretrans, \t\t%ju fast retransmitted DATA chunk%s\n);
p(sctps_sendmultfastretrans, \t\t%ju FR'%s that happened more 
than once to same chunk\n);
-   p(sctps_sendheartbeat, \t\t%ju intput HB chunk%s\n);
+   p(sctps_sendheartbeat, \t\t%ju output HB chunk%s\n);
p(sctps_sendecne, \t\t%ju output ECNE chunk%s\n);
p(sctps_sendauth, \t\t%ju output AUTH chunk%s\n);
p1a(sctps_senderrors, \t\t%ju ip_output error counter\n);
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r219568 - head/tools/regression/doat

2011-03-12 Thread Bruce Cran
Author: brucec
Date: Sat Mar 12 14:47:54 2011
New Revision: 219568
URL: http://svn.freebsd.org/changeset/base/219568

Log:
  Fix warnings and style(9) issues.
  Set WARNS to 6.

Modified:
  head/tools/regression/doat/Makefile
  head/tools/regression/doat/doat.c

Modified: head/tools/regression/doat/Makefile
==
--- head/tools/regression/doat/Makefile Sat Mar 12 14:33:32 2011
(r219567)
+++ head/tools/regression/doat/Makefile Sat Mar 12 14:47:54 2011
(r219568)
@@ -3,5 +3,6 @@
 PROG=  doat
 
 NO_MAN=
+WARNS?=6
 
 .include bsd.prog.mk

Modified: head/tools/regression/doat/doat.c
==
--- head/tools/regression/doat/doat.c   Sat Mar 12 14:33:32 2011
(r219567)
+++ head/tools/regression/doat/doat.c   Sat Mar 12 14:47:54 2011
(r219568)
@@ -26,25 +26,31 @@
  * $FreeBSD$
  */
 
+#include sys/types.h
+#include sys/syscall.h
+#include sys/stat.h
+
 #include errno.h
 #include fcntl.h
 #include stdbool.h
 #include stdio.h
 #include stdlib.h
 #include string.h
-#include sys/types.h
-#include sys/syscall.h
-#include sys/stat.h
+#include unistd.h
+
+void cleanup(void);
+void setup(void);
+void setup_once(void);
 
 union param {
int i;
-   char*cp;
+   const char  *cp;
mode_t  m;
dev_t   d;
void*vp;
uid_t   u;
gid_t   g;
-   char**cpp;
+   const char  **cpp;
 };
 
 struct testcase {
@@ -55,7 +61,7 @@ struct testcase {
 struct test {
int syscall;
int num_of_cases;
-   char*name;
+   const char *name;
struct testcase tests[10];  /* no more than 10 tests */

 };
@@ -64,21 +70,21 @@ struct test *tests;
 #defineNUM_OF_TESTS14  /* we dont want the fexecve 
test to run */
 
 char *absolute_path = NULL;
-char *relative_path = tmp/;
-char *not_dir_path = /bin/date;
+const char *relative_path = tmp/;
+const char *not_dir_path = /bin/date;
 
-char *file = foo;
+const char *file = foo;
 char *absolute_file = NULL;
 char *relative_file = NULL;
-char *symlinkf = link;
-char *newlink = nlink1;
-char *newlink2 = nlink2;
-char *newlink3 = nlink3;
-char *newdir = newdir;
-char *fifo = fifo;
-char *nod = nod;
-char *newfile = newfile;
-char *newslink = nslink1;
+const char *symlinkf = link;
+const char *newlink = nlink1;
+const char *newlink2 = nlink2;
+const char *newlink3 = nlink3;
+const char *newdir = newdir;
+const char *fifo = fifo;
+const char *nod = nod;
+const char *newfile = newfile;
+const char *newslink = nslink1;
 
 bool dir_exist = false;
 bool file_exist = false;
@@ -88,15 +94,14 @@ int rel_fd, abs_fd, notd_fd, exec_fd;
 
 struct timeval times[2];
 struct stat buf;
-char *pargv[2] = { /bin/date, NULL };
+const char *pargv[2] = { /bin/date, NULL };
 #definePATH_MAX1024
 char cbuf[PATH_MAX];
 
 void
-setup()
+setup(void)
 {
int i, error;
-   size_t siz;
struct stat sb;
 
tests = calloc(NUM_OF_TESTS, sizeof(struct test));
@@ -607,13 +612,13 @@ setup()
 }
 
 void
-cleanup()
+cleanup(void)
 {
system(/bin/sh -c 'rm -rf tmp');
 }
 
 void
-setup_once()
+setup_once(void)
 {
 }
 
@@ -623,10 +628,13 @@ main(int argc, char *argv[])
int i,j;
int error;
 
+   (void)argc;
+   (void)argv;
+
setup();
 
for (i = 0; i  NUM_OF_TESTS; i++) {
-   printf(\nTest: %s\n, tests[i].name);
+   printf(\nTest: %s\n, tests[i].name);
for (j = 0; j  tests[i].num_of_cases; j++) {
error = syscall(tests[i].syscall,
tests[i].tests[j].params[0],
@@ -652,13 +660,10 @@ main(int argc, char *argv[])
printf(#%i ... OK\n, j);
}
}
-
-
}
}
 
cleanup();
 
-
return (0);
 }
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r219511 - head/tools/test/malloc

2011-03-11 Thread Bruce Cran
Author: brucec
Date: Fri Mar 11 17:33:31 2011
New Revision: 219511
URL: http://svn.freebsd.org/changeset/base/219511

Log:
  Fix warnings and style(9) issues.
  Set WARNS to 6.
  
  MFC after:1 week

Modified:
  head/tools/test/malloc/Makefile
  head/tools/test/malloc/main.c

Modified: head/tools/test/malloc/Makefile
==
--- head/tools/test/malloc/Makefile Fri Mar 11 17:12:39 2011
(r219510)
+++ head/tools/test/malloc/Makefile Fri Mar 11 17:33:31 2011
(r219511)
@@ -4,6 +4,7 @@ SRCS=   main.c
 .PATH: ${.CURDIR}/../../../lib/libc/stdlib
 
 NO_MAN=
+WARNS?=6
 
 test:  malloc
@echo

Modified: head/tools/test/malloc/main.c
==
--- head/tools/test/malloc/main.c   Fri Mar 11 17:12:39 2011
(r219510)
+++ head/tools/test/malloc/main.c   Fri Mar 11 17:33:31 2011
(r219511)
@@ -1,6 +1,7 @@
 /* $FreeBSD$ */
 #include stdlib.h
 #include stdio.h
+#include string.h
 #include unistd.h
 
 u_long NBUCKETS= 2000;
@@ -12,25 +13,25 @@ char **foo;
 int
 main(int argc, char **argv) 
 {
-int i,j,k;
+u_long i,j,k;
 
 if (argc  1) NOPS = strtoul(argv[1],0,0);
 if (argc  2) NBUCKETS = strtoul(argv[2],0,0);
 if (argc  3) NSIZE   = strtoul(argv[3],0,0);
-printf(BRK(0)=%x ,sbrk(0));
-foo = malloc (sizeof *foo * NBUCKETS);
-memset(foo,0,sizeof *foo * NBUCKETS);
+printf(BRK(0)=%p , sbrk(0));
+foo = malloc(sizeof(*foo) * NBUCKETS);
+memset(foo, 0, sizeof(*foo) * NBUCKETS);
 for (i = 1; i = 4096; i *= 2) {
-for (j = 0 ; j  40960/i  j  NBUCKETS; j++) {
+for (j = 0; j  40960/i  j  NBUCKETS; j++) {
foo[j] = malloc(i);
 }
-for (j = 0 ; j  40960/i  j  NBUCKETS; j++) {
+for (j = 0; j  40960/i  j  NBUCKETS; j++) {
free(foo[j]);
-   foo[j] = 0;
+   foo[j] = NULL;
 }
 }
 
-for (i = 0 ; i  NOPS ; i++) {
+for (i = 0; i  NOPS; i++) {
j = random() % NBUCKETS;
k = random() % NSIZE;
foo[j] = realloc(foo[j], k  1 ? 0 : k);
@@ -39,19 +40,19 @@ main(int argc, char **argv) 
 * Workaround because realloc return bogus pointer rather than
 * NULL if passed zero length.
 */
-   foo[j] = 0;
+   foo[j] = NULL;
}
if (foo[j])
foo[j][0] = 1;
 }
-printf(BRK(1)=%x ,sbrk(0));
-for (j = 0 ; j  NBUCKETS ; j++) {
+printf(BRK(1)=%p , sbrk(0));
+for (j = 0; j  NBUCKETS; j++) {
if (foo[j]) {
free(foo[j]);
-   foo[j] = 0;
+   foo[j] = NULL;
}
 }
-printf(BRK(2)=%x NOPS=%lu NBUCKETS=%lu NSIZE=%lu\n,
-   sbrk(0),NOPS,NBUCKETS,NSIZE);
+printf(BRK(2)=%p NOPS=%lu NBUCKETS=%lu NSIZE=%lu\n,
+   sbrk(0), NOPS, NBUCKETS, NSIZE);
 return 0;
 }
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r219519 - head/tools/tools/ncpus

2011-03-11 Thread Bruce Cran
Author: brucec
Date: Fri Mar 11 18:44:16 2011
New Revision: 219519
URL: http://svn.freebsd.org/changeset/base/219519

Log:
  mptable.h is now in include/x86.

Modified:
  head/tools/tools/ncpus/biosmptable.c

Modified: head/tools/tools/ncpus/biosmptable.c
==
--- head/tools/tools/ncpus/biosmptable.cFri Mar 11 18:42:17 2011
(r219518)
+++ head/tools/tools/ncpus/biosmptable.cFri Mar 11 18:44:16 2011
(r219519)
@@ -34,7 +34,7 @@
 __FBSDID($FreeBSD$);
 
 #include sys/types.h
-#include machine/mptable.h
+#include x86/mptable.h
 
 #include err.h
 #include fcntl.h
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r219521 - head/tools/tools/cfi

2011-03-11 Thread Bruce Cran
Author: brucec
Date: Fri Mar 11 18:48:28 2011
New Revision: 219521
URL: http://svn.freebsd.org/changeset/base/219521

Log:
  Fix warnings and set WARNS to 6.
  
  MFC after:1 week

Modified:
  head/tools/tools/cfi/Makefile
  head/tools/tools/cfi/cfi.c

Modified: head/tools/tools/cfi/Makefile
==
--- head/tools/tools/cfi/Makefile   Fri Mar 11 18:46:11 2011
(r219520)
+++ head/tools/tools/cfi/Makefile   Fri Mar 11 18:48:28 2011
(r219521)
@@ -3,5 +3,6 @@
 PROG=  cfi
 BINDIR=/usr/local/bin
 NO_MAN=
+WARNS?=6
 
 .include bsd.prog.mk

Modified: head/tools/tools/cfi/cfi.c
==
--- head/tools/tools/cfi/cfi.c  Fri Mar 11 18:46:11 2011(r219520)
+++ head/tools/tools/cfi/cfi.c  Fri Mar 11 18:48:28 2011(r219521)
@@ -38,9 +38,12 @@
 #include sys/ioctl.h
 #include sys/cfictl.h
 
-#include stdio.h
+#include err.h
 #include getopt.h
+#include stdio.h
 #include stdlib.h
+#include string.h
+#include unistd.h
 
 const char *progname;
 const char *dvname;
@@ -48,8 +51,6 @@ const char *dvname;
 static void
 usage(void)
 {
-   int i;
-
fprintf(stderr, usage: %s [-f device] op...\n, progname);
fprintf(stderr, where op's are:\n);
fprintf(stderr, fact\t\tread factory PR segment\n);
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r219522 - head/tools/tools/aac

2011-03-11 Thread Bruce Cran
Author: brucec
Date: Fri Mar 11 18:51:42 2011
New Revision: 219522
URL: http://svn.freebsd.org/changeset/base/219522

Log:
  Fix warnings and set WARNS to 6.
  
  MFC after:1 week

Modified:
  head/tools/tools/aac/Makefile
  head/tools/tools/aac/aac_checkq.c

Modified: head/tools/tools/aac/Makefile
==
--- head/tools/tools/aac/Makefile   Fri Mar 11 18:48:28 2011
(r219521)
+++ head/tools/tools/aac/Makefile   Fri Mar 11 18:51:42 2011
(r219522)
@@ -2,6 +2,7 @@
 
 PROG=  aac_checkq
 NO_MAN=
+WARNS?=6
 BINDIR?=/usr/local/bin
 
 .include bsd.prog.mk

Modified: head/tools/tools/aac/aac_checkq.c
==
--- head/tools/tools/aac/aac_checkq.c   Fri Mar 11 18:48:28 2011
(r219521)
+++ head/tools/tools/aac/aac_checkq.c   Fri Mar 11 18:51:42 2011
(r219522)
@@ -34,7 +34,11 @@ __FBSDID($FreeBSD$);
 #include errno.h
 #include stdio.h
 #include stdlib.h
+#include string.h
 #include strings.h
+#include unistd.h
+
+void usage(void);
 
 /*
  * Simple program to print out the queue stats on the given queue index.
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r219524 - head/tools/tools/ether_reflect

2011-03-11 Thread Bruce Cran
Author: brucec
Date: Fri Mar 11 19:19:47 2011
New Revision: 219524
URL: http://svn.freebsd.org/changeset/base/219524

Log:
  Fix the build: we have snprintf(3).
  
  MFC after:1 week

Modified:
  head/tools/tools/ether_reflect/Makefile

Modified: head/tools/tools/ether_reflect/Makefile
==
--- head/tools/tools/ether_reflect/Makefile Fri Mar 11 18:56:55 2011
(r219523)
+++ head/tools/tools/ether_reflect/Makefile Fri Mar 11 19:19:47 2011
(r219524)
@@ -6,5 +6,6 @@
 PROG=   ether_reflect
 DPADD= ${LIBPCAP}
 LDADD= -lpcap
+CFLAGS+=-DHAVE_SNPRINTF
 
 .include bsd.prog.mk
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r219527 - head/tools/tools/iwi

2011-03-11 Thread Bruce Cran
Author: brucec
Date: Fri Mar 11 19:32:15 2011
New Revision: 219527
URL: http://svn.freebsd.org/changeset/base/219527

Log:
  Fix warnings and style(9) issues.
  Set WARNS to 6.

Modified:
  head/tools/tools/iwi/Makefile
  head/tools/tools/iwi/iwistats.c

Modified: head/tools/tools/iwi/Makefile
==
--- head/tools/tools/iwi/Makefile   Fri Mar 11 19:27:31 2011
(r219526)
+++ head/tools/tools/iwi/Makefile   Fri Mar 11 19:32:15 2011
(r219527)
@@ -2,5 +2,6 @@
 
 PROG=  iwistats
 NO_MAN=
+WARNS?=6
 
 .include bsd.prog.mk

Modified: head/tools/tools/iwi/iwistats.c
==
--- head/tools/tools/iwi/iwistats.c Fri Mar 11 19:27:31 2011
(r219526)
+++ head/tools/tools/iwi/iwistats.c Fri Mar 11 19:32:15 2011
(r219527)
@@ -113,16 +113,17 @@ get_statistics(const char *iface)
static uint32_t stats[256];
const struct statistic *stat;
char oid[32];
-   int ifaceno, len;
+   size_t len;
+   int ifaceno;
 
if (sscanf(iface, iwi%u, ifaceno) != 1)
errx(EX_DATAERR, Invalid interface name '%s', iface);
 
-   len = sizeof stats;
-   (void)snprintf(oid, sizeof oid, dev.iwi.%u.stats, ifaceno);
+   len = sizeof(stats);
+   (void)snprintf(oid, sizeof(oid), dev.iwi.%u.stats, ifaceno);
if (sysctlbyname(oid, stats, len, NULL, 0) == -1)
err(EX_OSERR, Can't retrieve statistics);
 
for (stat = tbl; stat-index != -1; stat++)
-   (void)printf(%-60s[%lu]\n, stat-desc, stats[stat-index]);
+   (void)printf(%-60s[%u]\n, stat-desc, stats[stat-index]);
 }
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


Re: svn commit: r219096 - in head: lib/libc/yp lib/libelf share/man/man7 sys/boot/i386/cdboot sys/boot/pc98/cdboot usr.bin/checknr

2011-03-01 Thread Bruce Cran
On Mon, 2011-02-28 at 19:07 -0800, Rob Farmer wrote:
 On Mon, Feb 28, 2011 at 2:03 AM, Bruce Cran bru...@freebsd.org wrote:
  Author: brucec
  Date: Mon Feb 28 10:03:48 2011
  New Revision: 219096
  URL: http://svn.freebsd.org/changeset/base/219096
 
  Log:
   Revert some of r177626. in in is valid in certain sentences.
 
 I disagree. in in (or any doubled word) looks awkward in print and
 should be avoided. Even if its grammatically correct, its a style
 problem because the reader has to do a double take and starts to
 wonder about the quality of the writing. With the exception of the
 security manpage, where break in originally or similar would work,
 these are all unnecessary verbosity and should be cut.

So you actually agree with me that it's valid grammatically :)
I'll commit the changes you suggested.

-- 
Bruce Cran

___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r219124 - head/sys/vm

2011-03-01 Thread Bruce Cran
Author: brucec
Date: Tue Mar  1 11:04:30 2011
New Revision: 219124
URL: http://svn.freebsd.org/changeset/base/219124

Log:
  Change the return type of vmspace_swap_count to a long to match the other
  vmspace_*_count functions.
  
  MFC after:3 days

Modified:
  head/sys/vm/swap_pager.c
  head/sys/vm/vm_map.h

Modified: head/sys/vm/swap_pager.c
==
--- head/sys/vm/swap_pager.cTue Mar  1 08:52:10 2011(r219123)
+++ head/sys/vm/swap_pager.cTue Mar  1 11:04:30 2011(r219124)
@@ -2420,13 +2420,13 @@ SYSCTL_NODE(_vm, OID_AUTO, swap_info, CT
  * if the VM object has any swap use at all the associated map entries
  * count for at least 1 swap page.
  */
-vm_offset_t
+long
 vmspace_swap_count(struct vmspace *vmspace)
 {
vm_map_t map;
vm_map_entry_t cur;
vm_object_t object;
-   vm_offset_t count, n;
+   long count, n;
 
map = vmspace-vm_map;
count = 0;

Modified: head/sys/vm/vm_map.h
==
--- head/sys/vm/vm_map.hTue Mar  1 08:52:10 2011(r219123)
+++ head/sys/vm/vm_map.hTue Mar  1 11:04:30 2011(r219124)
@@ -380,6 +380,6 @@ int vm_map_unwire(vm_map_t map, vm_offse
 int flags);
 int vm_map_wire(vm_map_t map, vm_offset_t start, vm_offset_t end,
 int flags);
-vm_offset_t vmspace_swap_count(struct vmspace *vmspace);
+long vmspace_swap_count(struct vmspace *vmspace);
 #endif /* _KERNEL */
 #endif /* _VM_MAP_ */
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


Re: svn commit: r218966 - head/sys/vm

2011-02-27 Thread Bruce Cran
On Thu, 2011-02-24 at 10:36 +1100, Bruce Evans wrote:
 
 I would cast operand(s) in the expression as necessary to prevent overflow
 of subexpressions.  vm_pindex_t would work, but I prefer to use a type
 related to the subexpressions.  Not sure what that is.  Maybe just
 uintmax_t for safety (even that is not safe if the subexpressions have
 large values).  So:
 
  (uintmax_t)swap_bcount * SWAP_META_PAGES * n / mumble.

Following Alan's suggestion, I've attached an updated patch which uses a
cast to u_long and returns long.

-- 
Bruce Cran
Index: vm_map.h
===
--- vm_map.h	(revision 219050)
+++ vm_map.h	(working copy)
@@ -380,6 +380,6 @@
 int flags);
 int vm_map_wire(vm_map_t map, vm_offset_t start, vm_offset_t end,
 int flags);
-vm_offset_t vmspace_swap_count(struct vmspace *vmspace);
+long vmspace_swap_count(struct vmspace *vmspace);
 #endif/* _KERNEL */
 #endif/* _VM_MAP_ */
Index: swap_pager.c
===
--- swap_pager.c	(revision 219050)
+++ swap_pager.c	(working copy)
@@ -2420,13 +2420,13 @@
  *	if the VM object has any swap use at all the associated map entries
  *	count for at least 1 swap page.
  */
-vm_offset_t
+long
 vmspace_swap_count(struct vmspace *vmspace)
 {
 	vm_map_t map;
 	vm_map_entry_t cur;
 	vm_object_t object;
-	vm_offset_t count, n;
+	long count, n;
 
 	map = vmspace-vm_map;
 	count = 0;
@@ -2438,7 +2438,7 @@
 			if (object-type == OBJT_SWAP 
 			object-un_pager.swp.swp_bcount != 0) {
 n = (cur-end - cur-start) / PAGE_SIZE;
-count += object-un_pager.swp.swp_bcount *
+count += (u_long)object-un_pager.swp.swp_bcount *
 SWAP_META_PAGES * n / object-size + 1;
 			}
 			VM_OBJECT_UNLOCK(object);
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org

svn commit: r219081 - head/contrib/lukemftp/src

2011-02-27 Thread Bruce Cran
Author: brucec
Date: Sun Feb 27 10:13:16 2011
New Revision: 219081
URL: http://svn.freebsd.org/changeset/base/219081

Log:
  Merge fix from r1.108 of NetBSD's usr.bin/ftp/main.c:
  
  Only attempt to el_parse() a command unknown by the default parser
  if editing is enabled.
  
  PR:   bin/100089
  MFC after:3 days

Modified:
  head/contrib/lukemftp/src/main.c

Modified: head/contrib/lukemftp/src/main.c
==
--- head/contrib/lukemftp/src/main.cSun Feb 27 09:12:24 2011
(r219080)
+++ head/contrib/lukemftp/src/main.cSun Feb 27 10:13:16 2011
(r219081)
@@ -707,6 +707,7 @@ cmdscanner(void)
 * such commands as invalid.
 */
if (strchr(margv[0], ':') != NULL ||
+   !editing ||
el_parse(el, margc, (const char **)margv) != 0)
 #endif /* !NO_EDITCOMPLETE */
fputs(?Invalid command.\n, ttyout);
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


Re: svn commit: r219091 - head/share/timedef

2011-02-27 Thread Bruce Cran
On Sun, 2011-02-27 at 21:32 +, Konrad Jankowski wrote:
 Author: versus
 Date: Sun Feb 27 21:32:25 2011
 New Revision: 219091
 URL: http://svn.freebsd.org/changeset/base/219091
 
 Log:
   Partial fix for PR 91106. Correct the short weekday names. Done according 
 to this poll https://bugzilla.redhat.com/show_bug.cgi?id=242296. This will 
 not close the bug fully yet, as the month names are still not correctly in 
 Genitive. More research on this topic will be done, as I'm suspecting a bug 
 in the libc locale functions picking the month name from the wrong group.

Could you limit lines to 80 characters please?
If you use vim, the following in ~/.vimrc will cause it to highlight
overly long lines in red:

highlight OverLength ctermbg=red ctermfg=white guibg=#592929
match OverLength /\%81v.\+/

-- 
Bruce Cran

___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r219055 - head/share/doc/psd/23.rpc

2011-02-26 Thread Bruce Cran
Author: brucec
Date: Sat Feb 26 12:50:28 2011
New Revision: 219055
URL: http://svn.freebsd.org/changeset/base/219055

Log:
  Fix typo - is is should have been changed to it is in r218965.

Modified:
  head/share/doc/psd/23.rpc/rpc.prog.ms

Modified: head/share/doc/psd/23.rpc/rpc.prog.ms
==
--- head/share/doc/psd/23.rpc/rpc.prog.ms   Sat Feb 26 12:07:16 2011
(r219054)
+++ head/share/doc/psd/23.rpc/rpc.prog.ms   Sat Feb 26 12:50:28 2011
(r219055)
@@ -71,7 +71,7 @@ manual page.
 .I The Highest Layer:
 .IX RPC The Highest Layer
 The highest layer is totally transparent to the operating system,
-machine and network upon which is run.  It's probably best to
+machine and network upon which it is run.  It's probably best to
 think of this level as a way of
 .I using
 RPC, rather than as
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r218965 - in head: sbin/growfs share/doc/papers/devfs share/doc/psd/23.rpc sys/fs/nullfs sys/libkern sys/net80211 sys/x86/isa usr.bin/tip/tip

2011-02-23 Thread Bruce Cran
Author: brucec
Date: Wed Feb 23 09:22:33 2011
New Revision: 218965
URL: http://svn.freebsd.org/changeset/base/218965

Log:
  Fix typos - remove duplicate is.
  
  PR:   docs/154934
  Submitted by: Eitan Adler lists at eitanadler.com
  MFC after:3 days

Modified:
  head/sbin/growfs/growfs.c
  head/share/doc/papers/devfs/paper.me
  head/share/doc/psd/23.rpc/rpc.prog.ms
  head/sys/fs/nullfs/null_vnops.c
  head/sys/libkern/jenkins.h
  head/sys/net80211/ieee80211_ageq.c
  head/sys/x86/isa/clock.c
  head/usr.bin/tip/tip/tip.h

Modified: head/sbin/growfs/growfs.c
==
--- head/sbin/growfs/growfs.c   Wed Feb 23 02:40:31 2011(r218964)
+++ head/sbin/growfs/growfs.c   Wed Feb 23 09:22:33 2011(r218965)
@@ -646,7 +646,7 @@ cond_bl_upd(ufs2_daddr_t *block, struct 
/*
 * Copy the block back immediately.
 *
-* XXX  If src is is from an indirect block we have
+* XXX  If src is from an indirect block we have
 *  to implement copy on write here in case of
 *  active snapshots.
 */

Modified: head/share/doc/papers/devfs/paper.me
==
--- head/share/doc/papers/devfs/paper.meWed Feb 23 02:40:31 2011
(r218964)
+++ head/share/doc/papers/devfs/paper.meWed Feb 23 09:22:33 2011
(r218965)
@@ -779,7 +779,7 @@ The entry points to the device driver ar
 structure, removing the need for the devsw[] array and allowing
 device drivers to use separate entrypoints for various minor numbers.
 .lp
-This is is very convenient for devices which have a ``control''
+This is very convenient for devices which have a ``control''
 device for management and tuning.  The control device, almost always
 have entirely separate open/close/ioctl implementations [MD.C].
 .lp

Modified: head/share/doc/psd/23.rpc/rpc.prog.ms
==
--- head/share/doc/psd/23.rpc/rpc.prog.ms   Wed Feb 23 02:40:31 2011
(r218964)
+++ head/share/doc/psd/23.rpc/rpc.prog.ms   Wed Feb 23 09:22:33 2011
(r218965)
@@ -71,7 +71,7 @@ manual page.
 .I The Highest Layer:
 .IX RPC The Highest Layer
 The highest layer is totally transparent to the operating system,
-machine and network upon which is is run.  It's probably best to
+machine and network upon which is run.  It's probably best to
 think of this level as a way of
 .I using
 RPC, rather than as

Modified: head/sys/fs/nullfs/null_vnops.c
==
--- head/sys/fs/nullfs/null_vnops.c Wed Feb 23 02:40:31 2011
(r218964)
+++ head/sys/fs/nullfs/null_vnops.c Wed Feb 23 09:22:33 2011
(r218965)
@@ -672,7 +672,7 @@ null_unlock(struct vop_unlock_args *ap)
  * as soon as possible.
  *
  * Note, we can't release any resources nor remove vnode from hash before 
- * appropriate VXLOCK stuff is is done because other process can find this
+ * appropriate VXLOCK stuff is done because other process can find this
  * vnode in hash during inactivation and may be sitting in vget() and waiting
  * for null_inactive to unlock vnode. Thus we will do all those in VOP_RECLAIM.
  */

Modified: head/sys/libkern/jenkins.h
==
--- head/sys/libkern/jenkins.h  Wed Feb 23 02:40:31 2011(r218964)
+++ head/sys/libkern/jenkins.h  Wed Feb 23 09:22:33 2011(r218965)
@@ -16,7 +16,7 @@
   the public domain.  It has no warranty.
 
   You probably want to use hashlittle().  hashlittle() and hashbig()
-  hash byte arrays.  hashlittle() is is faster than hashbig() on
+  hash byte arrays.  hashlittle() is faster than hashbig() on
   little-endian machines.  Intel and AMD are little-endian machines.
   On second thought, you probably want hashlittle2(), which is identical to
   hashlittle() except it returns two 32-bit hashes for the price of one.

Modified: head/sys/net80211/ieee80211_ageq.c
==
--- head/sys/net80211/ieee80211_ageq.c  Wed Feb 23 02:40:31 2011
(r218964)
+++ head/sys/net80211/ieee80211_ageq.c  Wed Feb 23 09:22:33 2011
(r218965)
@@ -154,7 +154,7 @@ ieee80211_ageq_drain_node(struct ieee802
  * deltas (in seconds) relative to the head so we can check
  * and/or adjust only the head of the list.  If a frame's age
  * exceeds the time quanta then remove it.  The list of removed
- * frames is is returned to the caller joined by m_nextpkt.
+ * frames is returned to the caller joined by m_nextpkt.
  */
 struct mbuf *
 ieee80211_ageq_age(struct ieee80211_ageq *aq, int quanta)

Modified: head/sys/x86/isa/clock.c

svn commit: r218966 - head/sys/vm

2011-02-23 Thread Bruce Cran
Author: brucec
Date: Wed Feb 23 10:28:37 2011
New Revision: 218966
URL: http://svn.freebsd.org/changeset/base/218966

Log:
  Calculate and return the count in vmspace_swap_count as a vm_offset_t
  instead of an int to avoid overflow.
  
  While here, clean up some style(9) issues.
  
  PR:   kern/152200
  Reviewed by:  kib
  MFC after:2 weeks

Modified:
  head/sys/vm/swap_pager.c
  head/sys/vm/vm_map.h

Modified: head/sys/vm/swap_pager.c
==
--- head/sys/vm/swap_pager.cWed Feb 23 09:22:33 2011(r218965)
+++ head/sys/vm/swap_pager.cWed Feb 23 10:28:37 2011(r218966)
@@ -2420,23 +2420,24 @@ SYSCTL_NODE(_vm, OID_AUTO, swap_info, CT
  * if the VM object has any swap use at all the associated map entries
  * count for at least 1 swap page.
  */
-int
+vm_offset_t
 vmspace_swap_count(struct vmspace *vmspace)
 {
-   vm_map_t map = vmspace-vm_map;
+   vm_map_t map;
vm_map_entry_t cur;
-   int count = 0;
+   vm_object_t object;
+   vm_offset_t count, n;
 
-   for (cur = map-header.next; cur != map-header; cur = cur-next) {
-   vm_object_t object;
+   map = vmspace-vm_map;
+   count = 0;
 
+   for (cur = map-header.next; cur != map-header; cur = cur-next) {
if ((cur-eflags  MAP_ENTRY_IS_SUB_MAP) == 0 
(object = cur-object.vm_object) != NULL) {
VM_OBJECT_LOCK(object);
if (object-type == OBJT_SWAP 
object-un_pager.swp.swp_bcount != 0) {
-   int n = (cur-end - cur-start) / PAGE_SIZE;
-
+   n = (cur-end - cur-start) / PAGE_SIZE;
count += object-un_pager.swp.swp_bcount *
SWAP_META_PAGES * n / object-size + 1;
}

Modified: head/sys/vm/vm_map.h
==
--- head/sys/vm/vm_map.hWed Feb 23 09:22:33 2011(r218965)
+++ head/sys/vm/vm_map.hWed Feb 23 10:28:37 2011(r218966)
@@ -380,6 +380,6 @@ int vm_map_unwire(vm_map_t map, vm_offse
 int flags);
 int vm_map_wire(vm_map_t map, vm_offset_t start, vm_offset_t end,
 int flags);
-int vmspace_swap_count (struct vmspace *vmspace);
+vm_offset_t vmspace_swap_count(struct vmspace *vmspace);
 #endif /* _KERNEL */
 #endif /* _VM_MAP_ */
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r218974 - in head/sys/boot: common efi/libefi

2011-02-23 Thread Bruce Cran
Author: brucec
Date: Wed Feb 23 17:17:05 2011
New Revision: 218974
URL: http://svn.freebsd.org/changeset/base/218974

Log:
  Handle memory allocation failures in include().
  
  PR:   i386/85652
  Submitted by: Ben Thomas bthomas at virtualiron.com
  MFC after:3 days

Modified:
  head/sys/boot/common/interp.c
  head/sys/boot/efi/libefi/efipart.c

Modified: head/sys/boot/common/interp.c
==
--- head/sys/boot/common/interp.c   Wed Feb 23 13:51:41 2011
(r218973)
+++ head/sys/boot/common/interp.c   Wed Feb 23 17:17:05 2011
(r218974)
@@ -246,6 +246,17 @@ include(const char *filename)
if (*cp == '\0')
continue;   /* ignore empty line, save memory */
sp = malloc(sizeof(struct includeline) + strlen(cp) + 1);
+   /* On malloc failure (it happens!), free as much as possible and exit */
+   if (sp == NULL) {
+   while (script != NULL) {
+   se = script;
+   script = script-next;
+   free(se);
+   }
+   sprintf(command_errbuf, file '%s' line %d: memory allocation 
+   failure - aborting\n, filename, line);
+   return (CMD_ERROR);
+   }
strcpy(sp-text, cp);
 #ifndef BOOT_FORTH
sp-flags = flags;

Modified: head/sys/boot/efi/libefi/efipart.c
==
--- head/sys/boot/efi/libefi/efipart.c  Wed Feb 23 13:51:41 2011
(r218973)
+++ head/sys/boot/efi/libefi/efipart.c  Wed Feb 23 17:17:05 2011
(r218974)
@@ -204,7 +204,7 @@ efipart_readwrite(EFI_BLOCK_IO *blkio, i
}
 
if (EFI_ERROR(status))
-   printf(%s: rw=%d, status=%lu\n, __func__, rw, status);
+   printf(%s: rw=%d, status=%u\n, __func__, rw, status);
return (efi_status_to_errno(status));
 }
 
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


Re: svn commit: r218974 - in head/sys/boot: common efi/libefi

2011-02-23 Thread Bruce Cran
On Wed, 2011-02-23 at 17:17 +, Bruce Cran wrote:
 Author: brucec
 Date: Wed Feb 23 17:17:05 2011
 New Revision: 218974
 URL: http://svn.freebsd.org/changeset/base/218974
 
 Log:
   Handle memory allocation failures in include().
   

   if (EFI_ERROR(status))
 - printf(%s: rw=%d, status=%lu\n, __func__, rw, status);
 + printf(%s: rw=%d, status=%u\n, __func__, rw, status);
   return (efi_status_to_errno(status));
  }

I accidentally included this unrelated change too - 'status' is of type
unsigned int, not unsigned long.

-- 
Bruce Cran


___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r218985 - head/sys/compat/ndis

2011-02-23 Thread Bruce Cran
Author: brucec
Date: Wed Feb 23 21:45:28 2011
New Revision: 218985
URL: http://svn.freebsd.org/changeset/base/218985

Log:
  Use the cprd_mem field when setting the start and length for a memory
  resource - the layout of cprd_port is identical but using cprd_mem
  makes the code easier to understand.
  
  PR:   kern/118493
  Submitted by: Weongyo Jeong weongyo.jeong at gmail.com
  MFC after:3 days

Modified:
  head/sys/compat/ndis/kern_ndis.c

Modified: head/sys/compat/ndis/kern_ndis.c
==
--- head/sys/compat/ndis/kern_ndis.cWed Feb 23 21:17:38 2011
(r218984)
+++ head/sys/compat/ndis/kern_ndis.cWed Feb 23 21:45:28 2011
(r218985)
@@ -591,9 +591,9 @@ ndis_convert_res(arg)
CM_RESOURCE_MEMORY_READ_WRITE;
prd-cprd_sharedisp =
CmResourceShareDeviceExclusive;
-   prd-u.cprd_port.cprd_start.np_quad =
+   prd-u.cprd_mem.cprd_start.np_quad =
brle-start;
-   prd-u.cprd_port.cprd_len = brle-count;
+   prd-u.cprd_mem.cprd_len = brle-count;
break;
case SYS_RES_IRQ:
prd-cprd_type = CmResourceTypeInterrupt;
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


Re: svn commit: r218966 - head/sys/vm

2011-02-23 Thread Bruce Cran
On Thu, 2011-02-24 at 08:23 +1100, Bruce Evans wrote:

 The bug seems to have been overflow in this calculation.  `start' and
 `end' have type vm_offset_t and large style bugs (missing prefixes in
 their names) so they are hard to grep for.  When n is 32 bits int and
 PAGE_SIZE is 2**12, the assignment to n overflows at a difference of 8TB,
 but this probably can't happen (see above).  swap_bcnt still has type
 int; SWAP_META_PAGES is 1, 2, 4, 8 or 16; thus swp_bcount * SWAP_META_PAGES
 may overflow at 2**31/16 = 128 M.  If this doesn't overflow, but has its
 maximal value of about 128 M, then multiplying it by int n may overflow
 when n is just 32.  Then, if nothing has overflowed, division by
 object-size reduces to a relatively small count in pages.  object-size
 seems to have type vm_pindex_t which is 64 bits even on i386 (since it
 is associated with vm_ooffset_t and not vm_offset_t, and vm_ooffset_t
 must be 64 bits to support file of sizes = 2GB although vm_pindex_t only
 needs to be more than 32 bits to support files of sizes = 8 TB (with
 PAGE_SIZE = 2**12).  object-size has even larger bugs than `start' and
 `end', since it is more global.

I've attached a patch which changes 'n' to be of type vm_ooffset_t. I
think this should fix the overflow bug?

-- 
Bruce Cran
Index: swap_pager.c
===
--- swap_pager.c	(revision 218966)
+++ swap_pager.c	(working copy)
@@ -2426,7 +2426,8 @@
 	vm_map_t map;
 	vm_map_entry_t cur;
 	vm_object_t object;
-	vm_offset_t count, n;
+	vm_ooffset_t n;
+	vm_offset_t count;
 
 	map = vmspace-vm_map;
 	count = 0;
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org

svn commit: r218910 - head/usr.sbin/fdformat

2011-02-21 Thread Bruce Cran
Author: brucec
Date: Mon Feb 21 09:56:08 2011
New Revision: 218910
URL: http://svn.freebsd.org/changeset/base/218910

Log:
  The FD_FORM ioctl used to ignore errors from the floppy controller; now when
  it encounters an error it returns an error from the ioctl.
  Ignore any errors when using the FD_FORM ioctl.
  
  PR:   kern/103862
  MFC after:3 days

Modified:
  head/usr.sbin/fdformat/fdformat.c

Modified: head/usr.sbin/fdformat/fdformat.c
==
--- head/usr.sbin/fdformat/fdformat.c   Mon Feb 21 09:01:34 2011
(r218909)
+++ head/usr.sbin/fdformat/fdformat.c   Mon Feb 21 09:56:08 2011
(r218910)
@@ -75,8 +75,7 @@ format_track(int fd, int cyl, int secs, 
f.fd_formb_secno(i) = il[i+1];
f.fd_formb_secsize(i) = secsize;
}
-   if(ioctl(fd, FD_FORM, (caddr_t)f)  0)
-   err(EX_OSERR, ioctl(FD_FORM));
+   (void)ioctl(fd, FD_FORM, (caddr_t)f);
 }
 
 static int
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r218918 - head/sys/crypto/sha2

2011-02-21 Thread Bruce Cran
Author: brucec
Date: Mon Feb 21 16:21:43 2011
New Revision: 218918
URL: http://svn.freebsd.org/changeset/base/218918

Log:
  Make private functions static.
  
  PR:   kern/43611
  Submitted by: Matt Emmerton matt at gsicomp.on.ca
  Reviewed by:  kib
  MFC after:3 days

Modified:
  head/sys/crypto/sha2/sha2.c

Modified: head/sys/crypto/sha2/sha2.c
==
--- head/sys/crypto/sha2/sha2.c Mon Feb 21 16:03:39 2011(r218917)
+++ head/sys/crypto/sha2/sha2.c Mon Feb 21 16:21:43 2011(r218918)
@@ -206,9 +206,9 @@ typedef u_int64_t sha2_word64;  /* Exactl
  * library -- they are intended for private internal visibility/use
  * only.
  */
-void SHA512_Last(SHA512_CTX*);
-void SHA256_Transform(SHA256_CTX*, const sha2_word32*);
-void SHA512_Transform(SHA512_CTX*, const sha2_word64*);
+static void SHA512_Last(SHA512_CTX*);
+static void SHA256_Transform(SHA256_CTX*, const sha2_word32*);
+static void SHA512_Transform(SHA512_CTX*, const sha2_word64*);
 
 
 /*** SHA-XYZ INITIAL HASH VALUES AND CONSTANTS /
@@ -366,7 +366,7 @@ void SHA256_Init(SHA256_CTX* context) {
(h) = T1 + Sigma0_256(a) + Maj((a), (b), (c)); \
j++
 
-void SHA256_Transform(SHA256_CTX* context, const sha2_word32* data) {
+static void SHA256_Transform(SHA256_CTX* context, const sha2_word32* data) {
sha2_word32 a, b, c, d, e, f, g, h, s0, s1;
sha2_word32 T1, *W256;
int j;
@@ -424,7 +424,7 @@ void SHA256_Transform(SHA256_CTX* contex
 
 #else /* SHA2_UNROLL_TRANSFORM */
 
-void SHA256_Transform(SHA256_CTX* context, const sha2_word32* data) {
+static void SHA256_Transform(SHA256_CTX* context, const sha2_word32* data) {
sha2_word32 a, b, c, d, e, f, g, h, s0, s1;
sha2_word32 T1, T2, *W256;
int j;
@@ -693,7 +693,7 @@ void SHA512_Init(SHA512_CTX* context) {
(h) = T1 + Sigma0_512(a) + Maj((a), (b), (c)); \
j++
 
-void SHA512_Transform(SHA512_CTX* context, const sha2_word64* data) {
+static void SHA512_Transform(SHA512_CTX* context, const sha2_word64* data) {
sha2_word64 a, b, c, d, e, f, g, h, s0, s1;
sha2_word64 T1, *W512 = (sha2_word64*)context-buffer;
int j;
@@ -748,7 +748,7 @@ void SHA512_Transform(SHA512_CTX* contex
 
 #else /* SHA2_UNROLL_TRANSFORM */
 
-void SHA512_Transform(SHA512_CTX* context, const sha2_word64* data) {
+static void SHA512_Transform(SHA512_CTX* context, const sha2_word64* data) {
sha2_word64 a, b, c, d, e, f, g, h, s0, s1;
sha2_word64 T1 = 0, T2 = 0, *W512 = (sha2_word64*)context-buffer;
int j;
@@ -874,7 +874,7 @@ void SHA512_Update(SHA512_CTX* context, 
usedspace = freespace = 0;
 }
 
-void SHA512_Last(SHA512_CTX* context) {
+static void SHA512_Last(SHA512_CTX* context) {
unsigned intusedspace;
 
usedspace = (context-bitcount[0]  3) % SHA512_BLOCK_LENGTH;
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


Re: svn commit: r218650 - head/games/fortune/datfiles

2011-02-20 Thread Bruce Cran
On Sat, 19 Feb 2011 16:19:14 -0800
Steve Kargl s...@troutmask.apl.washington.edu wrote:

 So, 'svn revert' does not work on branches?

It only works for uncommitted changes - svn merge does work though.

-- 
Bruce Cran
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r218839 - head/usr.sbin/sysinstall

2011-02-19 Thread Bruce Cran
Author: brucec
Date: Sat Feb 19 09:08:13 2011
New Revision: 218839
URL: http://svn.freebsd.org/changeset/base/218839

Log:
  In the distribution list, 'A' is listed as the key to press to select both
  'All' and 'Minimal'. Update the keys for Minimal and Custom to avoid the
  conflict.
  
  PR:   bin/153809
  Submitted by: Janne Snabb snabb at epipe.com
  MFC after:3 days

Modified:
  head/usr.sbin/sysinstall/menus.c

Modified: head/usr.sbin/sysinstall/menus.c
==
--- head/usr.sbin/sysinstall/menus.cSat Feb 19 07:47:25 2011
(r218838)
+++ head/usr.sbin/sysinstall/menus.cSat Feb 19 09:08:13 2011
(r218839)
@@ -961,9 +961,9 @@ DMenu MenuDistributions = {
checkDistKernDeveloper, distSetKernDeveloper },
   { 6 User,  Average user - binaries and doc only,
checkDistUser,  distSetUser },
-  { A Minimal,   The smallest configuration possible,
+  { 7 Minimal,   The smallest configuration possible,
checkDistMinimum,   distSetMinimum },
-  { B Custom,Specify your own distribution set,
+  { 8 Custom,Specify your own distribution set,
NULL,   dmenuSubmenu, NULL, MenuSubDistributions, '', 
'', '' },
   { NULL } },
 };
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r218840 - head/usr.sbin/sysinstall

2011-02-19 Thread Bruce Cran
Author: brucec
Date: Sat Feb 19 09:24:24 2011
New Revision: 218840
URL: http://svn.freebsd.org/changeset/base/218840

Log:
  Remove the quotas option from the Startup Services menu.
  GENERIC has no support for quotas so this option has no effect.
  
  PR:   bin/123237
  Submitted by: Lawrence Mayer lawmay3 at i12.com
  MFC after:3 days

Modified:
  head/usr.sbin/sysinstall/menus.c

Modified: head/usr.sbin/sysinstall/menus.c
==
--- head/usr.sbin/sysinstall/menus.cSat Feb 19 09:08:13 2011
(r218839)
+++ head/usr.sbin/sysinstall/menus.cSat Feb 19 09:24:24 2011
(r218840)
@@ -1283,8 +1283,6 @@ DMenu MenuStartup = {
   {  SVR4,   This host wants to be able to run SVR4 binaries.,
dmenuVarCheck, dmenuToggleVariable, NULL, svr4_enable=YES },
 #endif
-  {  quotas, This host wishes to check quotas on startup.,
-   dmenuVarCheck, dmenuToggleVariable, NULL, check_quotas=YES },
   { NULL } },
 };
 
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r218841 - head/usr.sbin/sysinstall

2011-02-19 Thread Bruce Cran
Author: brucec
Date: Sat Feb 19 09:33:53 2011
New Revision: 218841
URL: http://svn.freebsd.org/changeset/base/218841

Log:
  Allow users to create ufs1 filesystems via the noninteractive install.cfg
  system.
  
  PR:   bin/113979
  MFC after:3 days

Modified:
  head/usr.sbin/sysinstall/label.c

Modified: head/usr.sbin/sysinstall/label.c
==
--- head/usr.sbin/sysinstall/label.cSat Feb 19 09:24:24 2011
(r218840)
+++ head/usr.sbin/sysinstall/label.cSat Feb 19 09:33:53 2011
(r218841)
@@ -1653,6 +1653,8 @@ diskLabelNonInteractive(Device *dev)
pi = tmp-private_data = new_part(PART_FILESYSTEM, 
mpoint, TRUE);
tmp-private_free = safe_free;
pi-newfs_data.newfs_ufs.softupdates = soft;
+   if (!strcmp(typ, ufs1))
+   pi-newfs_data.newfs_ufs.ufs1 = TRUE;
}
}
}
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r218854 - head/share/examples/pf

2011-02-19 Thread Bruce Cran
Author: brucec
Date: Sat Feb 19 14:57:00 2011
New Revision: 218854
URL: http://svn.freebsd.org/changeset/base/218854

Log:
  Update the icmp example to show allowing only the safe types.
  
  Suggested by: Tom Judge tom at tomjudge.com
  MFC after:3 days

Modified:
  head/share/examples/pf/pf.conf

Modified: head/share/examples/pf/pf.conf
==
--- head/share/examples/pf/pf.conf  Sat Feb 19 14:49:49 2011
(r218853)
+++ head/share/examples/pf/pf.conf  Sat Feb 19 14:57:00 2011
(r218854)
@@ -32,4 +32,4 @@
 #pass in on $ext_if proto tcp to ($ext_if) port ssh
 #pass in log on $ext_if proto tcp to ($ext_if) port smtp
 #pass out log on $ext_if proto tcp from ($ext_if) to port smtp
-#pass in on $ext_if proto icmp to ($ext_if)
+#pass in on $ext_if inet proto icmp from any to ($ext_if) icmp-type { unreach, 
redir, timex }
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


Re: svn commit: r218650 - head/games/fortune/datfiles

2011-02-19 Thread Bruce Cran
On Saturday 19 February 2011 17:25:32 Carlos A. M. dos Santos wrote:

 Did anybody complain about this? If not, would you mid either revert
 this commit or just go ahead and move all potentially offensive
 jokes to fortunes-o? Anything from Grouch Marx or Mark Twain will
 probably qualify.

Yes, someone complained. From  bin/137702:

A coworker pointed out a borderline offensive fortune that appeared in my
email signature which is partially generated from `fortune -s` output.

[...]

I agree that it's probably not appropriate in a professional setting.

-- 
Bruce Cran
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


Re: svn commit: r218650 - head/games/fortune/datfiles

2011-02-19 Thread Bruce Cran
On Saturday 19 February 2011 17:25:32 Carlos A. M. dos Santos wrote:

 Did anybody complain about this? If not, would you mid either revert
 this commit or just go ahead and move all potentially offensive
 jokes to fortunes-o? Anything from Grouch Marx or Mark Twain will
 probably qualify.

I'm happy to revert the checkin if you think the fortune should be in the main 
file, since it appears the PR submitter was complaining just as much about 
being unprofessional as offensive.  Would you like me to go ahead and revert 
the move?

-- 
Bruce Cran
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


Re: svn commit: r218802 - head/usr.sbin/pc-sysinstall/backend-query

2011-02-18 Thread Bruce Cran
On Fri, 18 Feb 2011 15:13:08 + (UTC)
Josh Paetzel jpaet...@freebsd.org wrote:

 +# Display the output, with us English as the first entry
 +echo us U.S. English

If the default has to be US English, would it be possible to select the
entry in the list instead of putting it at the top?

-- 
Bruce Cran
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r218677 - head/sbin/mdconfig

2011-02-14 Thread Bruce Cran
Author: brucec
Date: Mon Feb 14 09:58:47 2011
New Revision: 218677
URL: http://svn.freebsd.org/changeset/base/218677

Log:
  Add a check to make sure the provider name is mdN before printing the
  unit number.
  
  Suggested by: jh
  MFC after:3 days

Modified:
  head/sbin/mdconfig/mdconfig.c

Modified: head/sbin/mdconfig/mdconfig.c
==
--- head/sbin/mdconfig/mdconfig.c   Mon Feb 14 08:14:06 2011
(r218676)
+++ head/sbin/mdconfig/mdconfig.c   Mon Feb 14 09:58:47 2011
(r218677)
@@ -373,7 +373,11 @@ md_list(char *units, int opt)
found = 1;
}
gc = pp-lg_config;
-   printf(%s, nflag ? pp-lg_name + 2 : pp-lg_name);
+   if (nflag  strncmp(pp-lg_name, md, 2) == 0)
+   printf(%s, pp-lg_name + 2);
+   else
+   printf(%s, pp-lg_name);
+
if (opt  OPT_VERBOSE || opt  OPT_UNIT) {
type = geom_config_get(gc, type);
if (strcmp(type, vnode) == 0)
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r218645 - head/lib/libc/gen

2011-02-13 Thread Bruce Cran
Author: brucec
Date: Sun Feb 13 17:43:56 2011
New Revision: 218645
URL: http://svn.freebsd.org/changeset/base/218645

Log:
  Document some more sysconf(3) variables.
  
  MFC after:1 month

Modified:
  head/lib/libc/gen/sysconf.3

Modified: head/lib/libc/gen/sysconf.3
==
--- head/lib/libc/gen/sysconf.3 Sun Feb 13 16:18:22 2011(r218644)
+++ head/lib/libc/gen/sysconf.3 Sun Feb 13 17:43:56 2011(r218645)
@@ -28,7 +28,7 @@
 .\@(#)sysconf.3   8.3 (Berkeley) 4/19/94
 .\ $FreeBSD$
 .\
-.Dd December 14, 2006
+.Dd February 13, 2011
 .Dt SYSCONF 3
 .Os
 .Sh NAME
@@ -85,6 +85,9 @@ The number of processors currently onlin
 The maximum number of open files per user id.
 .It Li _SC_PAGESIZE
 The size of a system page in bytes.
+.It Li _SC_PAGE_SIZE
+Equivalent to
+.Li _SC_PAGESIZE .
 .It Li _SC_STREAM_MAX
 The minimum maximum number of streams that a process may have open
 at any one time.
@@ -160,10 +163,64 @@ otherwise \-1.
 .It Li _SC_2_UPE
 Return 1 if the system supports the User Portability Utilities Option,
 otherwise \-1.
+.It Li _SC_AIO_LISTIO_MAX
+Maximum number of I/O operations in a single list I/O call supported.
+.It Li _SC_AIO_MAX
+Maximum number of outstanding asynchronous I/O operations supported.
+.It Li _SC_AIO_PRIO_DELTA_MAX
+The maximum amount by which a process can decrease its asynchronous I/O
+priority level from its own scheduling priority.
+.It Li _SC_DELAYTIMER_MAX
+Maximum number of timer expiration overruns.
+.It Li _SC_MQ_OPEN_MAX
+The maximum number of open message queue descriptors a process may hold.
+.It Li _SC_RTSIG_MAX
+Maximum number of realtime signals reserved for application use.
+.It Li _SC_SEM_NSEMS_MAX
+Maximum number of semaphores that a process may have.
+.It Li _SC_SEM_VALUE_MAX
+The maximum value a semaphore may have.
+.It Li _SC_SIGQUEUE_MAX
+Maximum number of queued signals that a process may send and have pending at
+the receiver(s) at any time.
+.It Li _SC_TIMER_MAX
+Maximum number of timers per process supported.
+.It Li _SC_GETGR_R_SIZE_MAX
+Suggested initial value for the size of the group entry buffer.
+.It Li _SC_GETPW_R_SIZE_MAX
+Suggested initial value for the size of the password entry buffer.
+.It Li _SC_HOST_NAME_MAX
+Maximum length of a host name (not including the terminating null) as
+returned from the
+.Fn gethostname
+function.
+.It Li _SC_LOGIN_NAME_MAX
+Maximum length of a login name.
+.It Li _SC_THREAD_STACK_MIN
+Minimum size in bytes of thread stack storage.
+.It Li _SC_THREAD_THREADS_MAX
+Maximum number of threads that can be created per process.
+.It Li _SC_TTY_NAME_MAX
+Maximum length of terminal device name.
+.It Li _SC_SYMLOOP_MAX
+Maximum number of symbolic links that can be reliably traversed in the
+resolution of a pathname in the absence of a loop.
+.It Li _SC_ATEXIT_MAX
+Maximum number of functions that may be registered with
+.Fn atexit .
+.It Li _SC_XOPEN_VERSION
+An integer value greater than or equal to 4,
+indicating the version of the X/Open Portability Guide to which this
+system conforms. 
+.It Li _SC_XOPEN_XCU_VERSION
+An integer value indicating the version of the XCU Specification to which
+this system conforms.
 .El
 .Pp
 These values also exist, but may not be standard:
 .Bl -tag -width 6n
+.It Li _SC_CPUSET_SIZE
+Size of the kernel cpuset.
 .It Li _SC_PHYS_PAGES
 The number of pages of physical memory.
 Note that it is possible that the product of this value and the value of
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r218650 - head/games/fortune/datfiles

2011-02-13 Thread Bruce Cran
Author: brucec
Date: Sun Feb 13 18:18:56 2011
New Revision: 218650
URL: http://svn.freebsd.org/changeset/base/218650

Log:
  Move potentially offensive fortune to fortunes-o.
  
  PR:   bin/137702
  MFC after:3 days

Modified:
  head/games/fortune/datfiles/fortunes
  head/games/fortune/datfiles/fortunes-o.real

Modified: head/games/fortune/datfiles/fortunes
==
--- head/games/fortune/datfiles/fortunesSun Feb 13 18:08:53 2011
(r218649)
+++ head/games/fortune/datfiles/fortunesSun Feb 13 18:18:56 2011
(r218650)
@@ -38136,10 +38136,6 @@ couldn't compete successfully with poets
-- Kilgore Trout (Philip J. Farmer) Venus on the Half
   Shell
 %
-PLATONIC FRIENDSHIP:
-   What develops when two people get
-   tired of making love to each other.
-%
 Play Rogue, visit exotic locations, meet strange creatures and kill
 them.
 %

Modified: head/games/fortune/datfiles/fortunes-o.real
==
--- head/games/fortune/datfiles/fortunes-o.real Sun Feb 13 18:08:53 2011
(r218649)
+++ head/games/fortune/datfiles/fortunes-o.real Sun Feb 13 18:18:56 2011
(r218650)
@@ -10487,6 +10487,10 @@ Pile driver, n.:
 Planned Parenthood:
The emission Control Center.
 %
+PLATONIC FRIENDSHIP:
+What develops when two people get
+tired of making love to each other.
+%
 Playing poker with busty Ms. Ware,
 He announced as he folded with flair,
I had four of a kind,
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r218652 - head/sbin/mdconfig

2011-02-13 Thread Bruce Cran
Author: brucec
Date: Sun Feb 13 18:30:17 2011
New Revision: 218652
URL: http://svn.freebsd.org/changeset/base/218652

Log:
  Only print the unit number when invoked with the -n flag.
  
  PR:   bin/144300
  Submitted by: arundel
  MFC after:3 days

Modified:
  head/sbin/mdconfig/mdconfig.c

Modified: head/sbin/mdconfig/mdconfig.c
==
--- head/sbin/mdconfig/mdconfig.c   Sun Feb 13 18:21:41 2011
(r218651)
+++ head/sbin/mdconfig/mdconfig.c   Sun Feb 13 18:30:17 2011
(r218652)
@@ -373,7 +373,7 @@ md_list(char *units, int opt)
found = 1;
}
gc = pp-lg_config;
-   printf(%s, pp-lg_name);
+   printf(%s, nflag ? pp-lg_name + 2 : pp-lg_name);
if (opt  OPT_VERBOSE || opt  OPT_UNIT) {
type = geom_config_get(gc, type);
if (strcmp(type, vnode) == 0)
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r218619 - head/bin/ed

2011-02-12 Thread Bruce Cran
Author: brucec
Date: Sat Feb 12 20:28:15 2011
New Revision: 218619
URL: http://svn.freebsd.org/changeset/base/218619

Log:
  Fix typos.
  
  PR:   docs/131625
  Submitted by: Andrew Wright andrew at qemg.org
  MFC after:1 month

Modified:
  head/bin/ed/ed.1

Modified: head/bin/ed/ed.1
==
--- head/bin/ed/ed.1Sat Feb 12 20:16:25 2011(r218618)
+++ head/bin/ed/ed.1Sat Feb 12 20:28:15 2011(r218619)
@@ -231,7 +231,7 @@ The current line (address) in the buffer
 The last line in the buffer.
 .It n
 The
-.Em n Ns th,
+.Em n Ns th
 line in the buffer
 where
 .Em n
@@ -649,7 +649,7 @@ The mark is not cleared until the line i
 deleted or otherwise modified.
 .It (.,.)l
 Print the addressed lines unambiguously.
-If a single line fills for than one screen (as might be the case
+If a single line fills more than one screen (as might be the case
 when viewing a binary file, for instance), a
 .Dq Li --More--
 prompt is printed on the last line.
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r218620 - head/share/examples/pf

2011-02-12 Thread Bruce Cran
Author: brucec
Date: Sat Feb 12 20:42:53 2011
New Revision: 218620
URL: http://svn.freebsd.org/changeset/base/218620

Log:
  If the pf.conf(5) example file is copied when setting up a firewall it's
  easy to forget about icmp. Update the file to show allowing icmp through
  the firewall.
  
  PR:   docs/144986
  MFC after:1 month

Modified:
  head/share/examples/pf/pf.conf

Modified: head/share/examples/pf/pf.conf
==
--- head/share/examples/pf/pf.conf  Sat Feb 12 20:28:15 2011
(r218619)
+++ head/share/examples/pf/pf.conf  Sat Feb 12 20:42:53 2011
(r218620)
@@ -32,3 +32,4 @@
 #pass in on $ext_if proto tcp to ($ext_if) port ssh
 #pass in log on $ext_if proto tcp to ($ext_if) port smtp
 #pass out log on $ext_if proto tcp from ($ext_if) to port smtp
+#pass in on $ext_if proto icmp to ($ext_if)
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r218264 - head/sys/netinet

2011-02-04 Thread Bruce Cran
Author: brucec
Date: Fri Feb  4 12:03:48 2011
New Revision: 218264
URL: http://svn.freebsd.org/changeset/base/218264

Log:
  Fix typo (Tuneable - Tunable).

Modified:
  head/sys/netinet/sctp_sysctl.h

Modified: head/sys/netinet/sctp_sysctl.h
==
--- head/sys/netinet/sctp_sysctl.h  Fri Feb  4 11:02:58 2011
(r218263)
+++ head/sys/netinet/sctp_sysctl.h  Fri Feb  4 12:03:48 2011
(r218264)
@@ -195,13 +195,13 @@ struct sctp_sysctl {
 #define SCTPCTL_MAXCHUNKS_MAX  0x
 #define SCTPCTL_MAXCHUNKS_DEFAULT  SCTP_ASOC_MAX_CHUNKS_ON_QUEUE
 
-/* tcbhashsize: Tuneable for Hash table sizes */
+/* tcbhashsize: Tunable for Hash table sizes */
 #define SCTPCTL_TCBHASHSIZE_DESC   Tunable for TCB hash table sizes
 #define SCTPCTL_TCBHASHSIZE_MIN1
 #define SCTPCTL_TCBHASHSIZE_MAX0x
 #define SCTPCTL_TCBHASHSIZE_DEFAULTSCTP_TCBHASHSIZE
 
-/* pcbhashsize: Tuneable for PCB Hash table sizes */
+/* pcbhashsize: Tunable for PCB Hash table sizes */
 #define SCTPCTL_PCBHASHSIZE_DESC   Tunable for PCB hash table sizes
 #define SCTPCTL_PCBHASHSIZE_MIN1
 #define SCTPCTL_PCBHASHSIZE_MAX0x
@@ -213,8 +213,8 @@ struct sctp_sysctl {
 #define SCTPCTL_MIN_SPLIT_POINT_MAX0x
 #define SCTPCTL_MIN_SPLIT_POINT_DEFAULTSCTP_DEFAULT_SPLIT_POINT_MIN
 
-/* chunkscale: Tuneable for Scaling of number of chunks and messages */
-#define SCTPCTL_CHUNKSCALE_DESCTuneable for Scaling of number 
of chunks and messages
+/* chunkscale: Tunable for Scaling of number of chunks and messages */
+#define SCTPCTL_CHUNKSCALE_DESCTunable for Scaling of number 
of chunks and messages
 #define SCTPCTL_CHUNKSCALE_MIN 1
 #define SCTPCTL_CHUNKSCALE_MAX 0x
 #define SCTPCTL_CHUNKSCALE_DEFAULT SCTP_CHUNKQUEUE_SCALE
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


Re: svn commit: r218238 - head/sys/dev/ath

2011-02-03 Thread Bruce Cran
On Thu, Feb 03, 2011 at 08:26:26PM +, Adrian Chadd wrote:
   if (ni != NULL) {
 +#if NOTYET
   /* tag AMPDU aggregates for reorder processing */

This seems to have broken the build because NOTYET isn't defined.

-- 
Bruce Cran
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r217491 - head/usr.sbin/sysinstall

2011-01-16 Thread Bruce Cran
Author: brucec
Date: Mon Jan 17 00:08:28 2011
New Revision: 217491
URL: http://svn.freebsd.org/changeset/base/217491

Log:
  Reduce the amount of text users need to read on each screen. Also try and
  make it more relevant to modern systems: for example users will be
  familiar with the MBR but possibly less so with MS-DOS.
  
  After installation has finished don't return to the main menu but exit.

Modified:
  head/usr.sbin/sysinstall/install.c
  head/usr.sbin/sysinstall/menus.c

Modified: head/usr.sbin/sysinstall/install.c
==
--- head/usr.sbin/sysinstall/install.c  Sun Jan 16 23:49:19 2011
(r217490)
+++ head/usr.sbin/sysinstall/install.c  Mon Jan 17 00:08:28 2011
(r217491)
@@ -637,10 +637,10 @@ installStandard(dialogMenuItem *self)
 variable_set2(SYSTEM_STATE, standard, 0);
 dialog_clear_norefresh();
 #ifdef WITH_SLICES
-msgConfirm(In the next menu, you will need to set up a DOS-style 
(\fdisk\) partitioning\n
+msgConfirm(In the next menu, you will need to set up an MBR 
partitioning\n
   scheme for your hard disk.  If you simply wish to devote all 
disk space\n
-  to FreeBSD (overwriting anything else that might be on the 
disk(s) selected)\n
-  then use the (A)ll command to select the default partitioning 
scheme followed\n
+  to FreeBSD (overwriting anything else that might be on the disk 
selected)\n
+  then use the (A)ll command to create a single partition 
followed\n
   by a (Q)uit.  If you wish to allocate only free space to 
FreeBSD, move to a\n
   partition marked \unused\ and use the (C)reate command.);
 
@@ -655,7 +655,7 @@ nodisks:
goto nodisks;
 }
 
-msgConfirm(Now you need to create BSD partitions inside of the fdisk 
partition(s)\n
+msgConfirm(Now you need to create BSD partitions inside of the MBR 
partition(s)\n
   just created.  If you have a reasonable amount of disk space 
(1GB or more)\n
   and don't have any special requirements, simply use the (A)uto 
command to\n
   allocate space automatically.  If you have more specific needs 
or just don't\n
@@ -872,6 +872,9 @@ installConfigure(void)
 if (!msgNoYes(Visit the general configuration menu for a chance to set\n
  any last options?))
dmenuOpenSimple(MenuConfigure, FALSE);
+else
+   dmenuExit(NULL);
+
 configRC_conf();
 sync();
 }

Modified: head/usr.sbin/sysinstall/menus.c
==
--- head/usr.sbin/sysinstall/menus.cSun Jan 16 23:49:19 2011
(r217490)
+++ head/usr.sbin/sysinstall/menus.cMon Jan 17 00:08:28 2011
(r217491)
@@ -174,7 +174,7 @@ DMenu MenuIndex = {
 #ifdef WITH_MICE
   {  Device, Mouse,  The mouse configuration menu.,NULL, 
dmenuSubmenu, NULL, MenuMouse },
 #endif
-  {  Disklabel,  The disk Label editor,NULL, 
diskLabelEditor },
+  {  Disklabel,  The disk label editor,NULL, 
diskLabelEditor },
   {  Dists, All, Root of the distribution tree.,   NULL, 
dmenuSubmenu, NULL, MenuDistributions },
   {  Dists, Basic,   Basic FreeBSD distribution menu., 
NULL, dmenuSubmenu, NULL, MenuSubDistributions },
   {  Dists, Developer,   Select developer's distribution., 
checkDistDeveloper, distSetDeveloper },
@@ -213,7 +213,7 @@ DMenu MenuIndex = {
   {  Media, UFS, Select UFS installation media.,   NULL, 
mediaSetUFS },
   {  Media, FTP, Select FTP installation media.,   NULL, 
mediaSetFTP },
   {  Media, FTP Passive, Select passive FTP installation media., NULL, 
mediaSetFTPPassive },
-  {  Media, HTTP,Select FTP via HTTP proxy installation 
media., NULL, mediaSetHTTP },
+  {  Media, HTTP,Select FTP via HTTP proxy install 
media., NULL, mediaSetHTTP },
   {  Network Interfaces, Configure network interfaces, NULL, 
tcpMenuSelect },
   {  Networking Services,The network services menu.,   
NULL, dmenuSubmenu, NULL, MenuNetworking },
   {  NFS, client,Set NFS client flag., 
dmenuVarCheck, dmenuToggleVariable, NULL, nfs_client_enable=YES },
@@ -222,7 +222,7 @@ DMenu MenuIndex = {
   {  Options,The options editor.,  NULL, 
optionsEditor },
   {  Packages,   The packages collection,  NULL, 
configPackages },
 #ifdef WITH_SLICES
-  {  Partition,  The disk Slice (PC-style partition) Editor,   
NULL, diskPartitionEditor },
+  {  Partition,  The disk slice (PC-style partition) editor,   
NULL, diskPartitionEditor },
 #endif
   {  PCNFSD, Run authentication server for PC-NFS., 
dmenuVarCheck, configPCNFSD, NULL, 

svn commit: r217492 - head/usr.sbin/sysinstall

2011-01-16 Thread Bruce Cran
Author: brucec
Date: Mon Jan 17 00:15:01 2011
New Revision: 217492
URL: http://svn.freebsd.org/changeset/base/217492

Log:
  Add missing comma to unbreak the PC98 build.

Modified:
  head/usr.sbin/sysinstall/menus.c

Modified: head/usr.sbin/sysinstall/menus.c
==
--- head/usr.sbin/sysinstall/menus.cMon Jan 17 00:08:28 2011
(r217491)
+++ head/usr.sbin/sysinstall/menus.cMon Jan 17 00:15:01 2011
(r217492)
@@ -1860,7 +1860,7 @@ DMenu MenuSysconsKeymap = {
 System Console Keymap,
 The system console driver for FreeBSD defaults to a standard\n
 \PC-98x1\ keyboard map.  Users may wish to choose one of the\n
-other keymaps below.\n
+other keymaps below.,
 Choose a keyboard map,
 NULL,
 { { Japanese PC-98x1,Japanese PC-98x1 keymap,  
dmenuVarCheck, dmenuSetKmapVariable, NULL, keymap=jp.pc98 },
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r217316 - head/sbin/geom/class/raid3

2011-01-12 Thread Bruce Cran
Author: brucec
Date: Wed Jan 12 19:20:30 2011
New Revision: 217316
URL: http://svn.freebsd.org/changeset/base/217316

Log:
  Fix cross-reference to gvinum(8).

Modified:
  head/sbin/geom/class/raid3/graid3.8

Modified: head/sbin/geom/class/raid3/graid3.8
==
--- head/sbin/geom/class/raid3/graid3.8 Wed Jan 12 19:11:17 2011
(r217315)
+++ head/sbin/geom/class/raid3/graid3.8 Wed Jan 12 19:20:30 2011
(r217316)
@@ -239,7 +239,7 @@ graid3 insert -n 0 data da5
 .Xr mount 8 ,
 .Xr newfs 8 ,
 .Xr umount 8 ,
-.Xr vinum 8
+.Xr gvinum 8
 .Sh HISTORY
 The
 .Nm
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r217327 - head/sbin/geom/class/raid3

2011-01-12 Thread Bruce Cran
Author: brucec
Date: Wed Jan 12 20:27:14 2011
New Revision: 217327
URL: http://svn.freebsd.org/changeset/base/217327

Log:
  Fix sorting of cross-references.

Modified:
  head/sbin/geom/class/raid3/graid3.8

Modified: head/sbin/geom/class/raid3/graid3.8
==
--- head/sbin/geom/class/raid3/graid3.8 Wed Jan 12 19:54:19 2011
(r217326)
+++ head/sbin/geom/class/raid3/graid3.8 Wed Jan 12 20:27:14 2011
(r217327)
@@ -236,10 +236,10 @@ graid3 insert -n 0 data da5
 .Sh SEE ALSO
 .Xr geom 4 ,
 .Xr geom 8 ,
+.Xr gvinum 8,
 .Xr mount 8 ,
 .Xr newfs 8 ,
 .Xr umount 8 ,
-.Xr gvinum 8
 .Sh HISTORY
 The
 .Nm
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r217334 - head/sbin/geom/class/raid3

2011-01-12 Thread Bruce Cran
Author: brucec
Date: Wed Jan 12 23:31:28 2011
New Revision: 217334
URL: http://svn.freebsd.org/changeset/base/217334

Log:
  Fix formatting of cross-references.

Modified:
  head/sbin/geom/class/raid3/graid3.8

Modified: head/sbin/geom/class/raid3/graid3.8
==
--- head/sbin/geom/class/raid3/graid3.8 Wed Jan 12 23:07:51 2011
(r217333)
+++ head/sbin/geom/class/raid3/graid3.8 Wed Jan 12 23:31:28 2011
(r217334)
@@ -236,10 +236,10 @@ graid3 insert -n 0 data da5
 .Sh SEE ALSO
 .Xr geom 4 ,
 .Xr geom 8 ,
-.Xr gvinum 8,
+.Xr gvinum 8 ,
 .Xr mount 8 ,
 .Xr newfs 8 ,
-.Xr umount 8 ,
+.Xr umount 8
 .Sh HISTORY
 The
 .Nm
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


Re: svn commit: r216954 - head/sys/kern

2011-01-04 Thread Bruce Cran
On Tue, 04 Jan 2011 09:00:12 -0800
Julian Elischer jul...@freebsd.org wrote:
 On 1/4/11 5:16 AM, John Baldwin wrote:
 kproc_exit() is already marked __dead2 so a NOTREACHED comment
  here isn't needed for lint.
 
 yes but it IS good documentation when reading the code.

Shouldn't people know that kproc_exit doesn't return?

-- 
Bruce Cran
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r216873 - head/sys/vm

2011-01-01 Thread Bruce Cran
Author: brucec
Date: Sat Jan  1 16:59:05 2011
New Revision: 216873
URL: http://svn.freebsd.org/changeset/base/216873

Log:
  There can be more than 0x2000 swap meta blocks allocated if a swap-backed
  md(4) device is used. Don't panic when deallocating such a device if swap
  has been used.
  
  PR:   kern/133170
  Discussed with:   kib
  MFC after:3 days

Modified:
  head/sys/vm/swap_pager.c

Modified: head/sys/vm/swap_pager.c
==
--- head/sys/vm/swap_pager.cSat Jan  1 16:47:12 2011(r216872)
+++ head/sys/vm/swap_pager.cSat Jan  1 16:59:05 2011(r216873)
@@ -1679,8 +1679,6 @@ swap_pager_isswapped(vm_object_t object,
}
}
index += SWAP_META_PAGES;
-   if (index  0x2000)
-   panic(swap_pager_isswapped: failed to locate all swap 
meta blocks);
}
mtx_unlock(swhash_mtx);
return (0);
@@ -1995,8 +1993,6 @@ swp_pager_meta_free_all(vm_object_t obje
}
mtx_unlock(swhash_mtx);
index += SWAP_META_PAGES;
-   if (index  0x2000)
-   panic(swp_pager_meta_free_all: failed to locate all 
swap meta blocks);
}
 }
 
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r216651 - head/usr.sbin/sysinstall

2010-12-22 Thread Bruce Cran
Author: brucec
Date: Wed Dec 22 13:06:51 2010
New Revision: 216651
URL: http://svn.freebsd.org/changeset/base/216651

Log:
  Add an option to disable the screensaver.

Modified:
  head/usr.sbin/sysinstall/menus.c

Modified: head/usr.sbin/sysinstall/menus.c
==
--- head/usr.sbin/sysinstall/menus.cWed Dec 22 11:58:31 2010
(r216650)
+++ head/usr.sbin/sysinstall/menus.cWed Dec 22 13:06:51 2010
(r216651)
@@ -1958,7 +1958,7 @@ DMenu MenuSysconsKeyrate = {
   { Normal, \Normal\ keyboard repeat rate,   dmenuVarCheck,  
dmenuSetVariable, NULL, keyrate=normal },
   { Fast,Fast keyboard repeat rate,dmenuVarCheck,  
dmenuSetVariable, NULL, keyrate=fast },
   { Default, Use default keyboard repeat rate, dmenuVarCheck,  
dmenuSetVariable, NULL, keyrate=NO },
-  { NULL } },
+  { NULL } }
 };
 
 DMenu MenuSysconsSaver = {
@@ -1994,9 +1994,11 @@ DMenu MenuSysconsSaver = {
dmenuVarCheck, configSaver, NULL, saver=star },
   { c Warp,  A \stars warping\ effect,
dmenuVarCheck, configSaver, NULL, saver=warp },
+  { d None,  Disable the screensaver,
+dmenuVarCheck, configSaver, NULL, saver=NO },
   { Timeout, Set the screen saver timeout interval,
NULL, configSaverTimeout, NULL, NULL, ' ', ' ', ' ' },
-  { NULL } },
+  { NULL } }
 };
 
 #ifndef PC98
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


Re: svn commit: r212770 - head/usr.bin/script

2010-12-20 Thread Bruce Cran
On Mon, 20 Dec 2010 18:30:36 +0300
Anonymous swel...@gmail.com wrote:

 David E. O'Brien obr...@freebsd.org writes:
  +   if (av[0])
  +   for (k = 0 ; av[k] ; ++k)
  +   fprintf(fscript, %s%s, k ?   : ,
  av[k]);
  +   fprintf(fscript, \r\n);
  +
 
 An indent bug? 2nd fprintf() call is not under if(av[0]).

But the 2nd printf() call isn't in the scope of the if statement.
Personally I prefer braces if a statement is longer than 1 line, even
if not strictly required.

-- 
Bruce Cran
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


Re: svn commit: r216600 - head/usr.sbin/lmcconfig

2010-12-20 Thread Bruce Cran
On Mon, 20 Dec 2010 19:08:15 + (UTC)
Ulrich Spoerlein u...@freebsd.org wrote:
 -u_int32_t read_pci_config(u_int8_t addr)
 -  {
 +static u_int32_t
 +read_pci_config(u_int8_t addr)

It might make sense to switch to the C99 [u]intX_t types at the same
time.

-- 
Bruce Cran
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r216515 - head/lib/libc/sys

2010-12-18 Thread Bruce Cran
Author: brucec
Date: Sat Dec 18 10:09:07 2010
New Revision: 216515
URL: http://svn.freebsd.org/changeset/base/216515

Log:
  Sort cross references by section.
  
  Reported by: pluknet

Modified:
  head/lib/libc/sys/shmget.2

Modified: head/lib/libc/sys/shmget.2
==
--- head/lib/libc/sys/shmget.2  Sat Dec 18 06:51:48 2010(r216514)
+++ head/lib/libc/sys/shmget.2  Sat Dec 18 10:09:07 2010(r216515)
@@ -142,5 +142,5 @@ already exists.
 .Xr shmat 2 ,
 .Xr shmctl 2 ,
 .Xr shmdt 2 ,
-.Xr ftok 3 ,
-.Xr stat 2
+.Xr stat 2 ,
+.Xr ftok 3
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r216508 - head/lib/libc/sys

2010-12-17 Thread Bruce Cran
Author: brucec
Date: Fri Dec 17 21:10:08 2010
New Revision: 216508
URL: http://svn.freebsd.org/changeset/base/216508

Log:
  Update shmget(2) with POSIX access permissions and remove non-standard SHM_R,
  SHM_W and machine/param.h.

Modified:
  head/lib/libc/sys/shmat.2
  head/lib/libc/sys/shmctl.2
  head/lib/libc/sys/shmget.2

Modified: head/lib/libc/sys/shmat.2
==
--- head/lib/libc/sys/shmat.2   Fri Dec 17 21:03:10 2010(r216507)
+++ head/lib/libc/sys/shmat.2   Fri Dec 17 21:10:08 2010(r216508)
@@ -35,7 +35,6 @@
 .Sh LIBRARY
 .Lb libc
 .Sh SYNOPSIS
-.In machine/param.h
 .In sys/types.h
 .In sys/ipc.h
 .In sys/shm.h

Modified: head/lib/libc/sys/shmctl.2
==
--- head/lib/libc/sys/shmctl.2  Fri Dec 17 21:03:10 2010(r216507)
+++ head/lib/libc/sys/shmctl.2  Fri Dec 17 21:10:08 2010(r216508)
@@ -34,7 +34,6 @@
 .Sh LIBRARY
 .Lb libc
 .Sh SYNOPSIS
-.In machine/param.h
 .In sys/types.h
 .In sys/ipc.h
 .In sys/shm.h

Modified: head/lib/libc/sys/shmget.2
==
--- head/lib/libc/sys/shmget.2  Fri Dec 17 21:03:10 2010(r216507)
+++ head/lib/libc/sys/shmget.2  Fri Dec 17 21:10:08 2010(r216508)
@@ -25,7 +25,7 @@
 .\
 .\ $FreeBSD$
 .\
-.Dd July 3, 1995
+.Dd December 17, 2010
 .Dt SHMGET 2
 .Os
 .Sh NAME
@@ -34,7 +34,6 @@
 .Sh LIBRARY
 .Lb libc
 .Sh SYNOPSIS
-.In machine/param.h
 .In sys/types.h
 .In sys/ipc.h
 .In sys/shm.h
@@ -80,17 +79,17 @@ the following constants into the
 .Fa flag
 argument:
 .Bl -tag -width XSHM_WXX6XXX
-.It Dv SHM_R
-Read access for user.
-.It Dv SHM_W
-Write access for user.
-.It Dv ( SHM_R3 )
+.It Dv S_IRUSR
+Read access for owner.
+.It Dv S_IWUSR
+Write access for owner.
+.It Dv S_IRGRP
 Read access for group.
-.It Dv ( SHM_W3 )
+.It Dv S_IWGRP
 Write access for group.
-.It Dv ( SHM_R6 )
+.It Dv S_IROTH
 Read access for other.
-.It Dv ( SHM_W6 )
+.It Dv S_IWOTH
 Write access for other.
 .El
 .\
@@ -143,4 +142,5 @@ already exists.
 .Xr shmat 2 ,
 .Xr shmctl 2 ,
 .Xr shmdt 2 ,
-.Xr ftok 3
+.Xr ftok 3 ,
+.Xr stat 2
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


Re: svn commit: r216422 - head/usr.bin/printf

2010-12-14 Thread Bruce Cran
On Tue, 14 Dec 2010 00:21:35 + (UTC)
Xin LI delp...@freebsd.org wrote:

 Author: delphij
 Date: Tue Dec 14 00:21:34 2010
 New Revision: 216422
 URL: http://svn.freebsd.org/changeset/base/216422
 
 Log:
   Make use of EX_USAGE for usage().

I think returning 1 is actually preferred - sysexits was
removed from style(9) a while ago:
http://svn.freebsd.org/viewvc/base?view=revisionrevision=185362

-- 
Bruce Cran
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r216407 - head/usr.sbin/sysinstall

2010-12-13 Thread Bruce Cran
Author: brucec
Date: Mon Dec 13 13:52:03 2010
New Revision: 216407
URL: http://svn.freebsd.org/changeset/base/216407

Log:
  USB probing often takes a long time and finishes finding devices after init
  has started. In the case of sysinstall, this means that it has already built
  its list of devices before probing finishes. Add a hint for users who have
  booted from a USB stick only to find that sysinstall can't find it.
  
  MFC after:3 days

Modified:
  head/usr.sbin/sysinstall/media.c

Modified: head/usr.sbin/sysinstall/media.c
==
--- head/usr.sbin/sysinstall/media.cMon Dec 13 12:34:35 2010
(r216406)
+++ head/usr.sbin/sysinstall/media.cMon Dec 13 13:52:03 2010
(r216407)
@@ -239,7 +239,7 @@ mediaSetUSB(dialogMenuItem *self)
cnt = deviceCount(devs);
 
if (!cnt) {
-   msgConfirm(No USB devices found!);
+   msgConfirm(No USB devices found (try Options/Re-scan 
Devices));
return DITEM_FAILURE | DITEM_CONTINUE;
}
else if (cnt  1) {
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


Re: svn commit: r216269 - head/sys/geom/part

2010-12-10 Thread Bruce Cran
On Fri, 10 Dec 2010 02:00:23 +0100
Erik Trulsson ertr1...@student.uu.se wrote:

 Modern drives do not really report 'the current CHS geometry'. They
 report a fake geometry that normally do not have anything do with the
 actual geometry.  (As an example just about all modern ATA/SATA drives
 report having 16 heads, while in reality none of them have more than
 10 heads and most of them have fewer heads than that.)

Note that I said 'current', not 'correct' :)
They do continue to report the current CHS geometry that the BIOS has
configured: for example overriding the settings to use a setting of 8H
instead of 16H in the BIOS does get detected by FreeBSD when it reads
the 'current CHS geometry' fields.  And yes, the only thing that's
useful for nowadays is configuring the MBR or BSD disklabel.

-- 
Bruce Cran
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


Re: svn commit: r216269 - head/sys/geom/part

2010-12-10 Thread Bruce Cran
On Fri, 10 Dec 2010 10:12:34 +1100 (EST)
Bruce Evans b...@optusnet.com.au wrote:

 The BIOS has little control over the mode.  It can't enforce LBA if
 the drive supports CHS.  It can't force any particular CHS mode since
 the driver may set any CHS mode.  ata used to reset the drive in the
 probe and in reinit.  I think this is a hard reset which restores the
 default CHS.  I can't see where ata resets now.  It is nicely
 obfuscated using function pointers.  I think it does less resetting.
 It also has a soft reset for at least sata, but sata won't be using
 CHS.  Removing of resets would explain why it now has to use the
 current CHS (since it doesn't change the CHS back to the default).

The BIOS does seem to have complete control over the geometry that
FreeBSD detects. Yes we'll use LBA mode if it's available, but what I'm
talking about is the geometry that gets used for creating disklabels
and the MBR. Since I saw the change in the BIOS reflected in what
FreeBSD detected, it appears the BIOS has control over those values
except when it decides to initially use LBA mode.

 The driver always ignores CHS (except to report it) and uses LBA if
 possible.  If a manufacturer stops supporting CHS, then the driver
 shouldn't notice, but the manufacturer's non-support should include
 setting the obsolete fields to 0 (or possibly other specified magic
 numbers).  It is then up to utilities whether to report these fields
 as simply there value or to decrypt their magic values into a CHS-
 unsupported flag (I don't know of any actual flag for this).  Then
 there is the firmware geometry reported to GEOM.  You could try
 changing this to 0/0/0 and see what breaks.  CAM for SCSI drives still
 invents a geometry to avoid seeing evil here, since SCSI drives have
 only had no geometry for about 30 years now.

But the problem is that we _do_ use CHS: we use it to create the MBR
and disklabel. Linux invents a geometry if it can't create one from the
on-disk data; we don't.

-- 
Bruce Cran
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r216322 - head/usr.sbin

2010-12-09 Thread Bruce Cran
Author: brucec
Date: Thu Dec  9 11:37:40 2010
New Revision: 216322
URL: http://svn.freebsd.org/changeset/base/216322

Log:
  Build sade on amd64 as well as i386 and sparc64.

Modified:
  head/usr.sbin/Makefile.amd64

Modified: head/usr.sbin/Makefile.amd64
==
--- head/usr.sbin/Makefile.amd64Thu Dec  9 08:36:23 2010
(r216321)
+++ head/usr.sbin/Makefile.amd64Thu Dec  9 11:37:40 2010
(r216322)
@@ -27,4 +27,7 @@ SUBDIR+=  ndiscvt
 .endif
 SUBDIR+=   sicontrol
 SUBDIR+=   spkrtest
+.if ${MK_SYSINSTALL} != no
+SUBDIR+=   sade
+.endif
 SUBDIR+=   zzz
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


Re: svn commit: r216269 - head/sys/geom/part

2010-12-09 Thread Bruce Cran
On Thu, 9 Dec 2010 19:58:56 +1100 (EST)
Bruce Evans b...@optusnet.com.au wrote:

 I had understood the ATA_FLAG_54_58 backwards.  It tells us if the
 drive is not so old that it doesn't support IDENTIFY records for
 words 54-58.  I think we rarely get here.  Drives old enough to use
 CHS may be so old that they don't support words 54-58.  Only drives
 manufactured during a few years or months in the 1990's will support
 words 54-58 but not LBA. Maybe I'm misremembering the length of this
 time.

All modern drives (including ATA-8) seem to support reporting the
current CHS geometry, so FreeBSD will use this for the geometry;
however since when the BIOS chooses to use LBA mode the current
geometry words aren't updated I think we use the wrong geometry on
modern drives.

 I don't like this.  If the drive supports CHS, then its geometries for
 this should be reported, if CHS reporting is implemented at all.
 There are many to choose from :-), but only 1 or 2 (if any) to report
 -- the default one and the current one.  Capabilities reporting
 should make it clear if the default one can be changed.  I consider
 CHS features to be unimportant, so they should be reported if the
 capabilites reporting tries to be complete; otherwise they are
 optional.  hdparm for Linux always seemed to report more features
 than atacontrol.

From more testing I've done today it seems that drive manufacturers
have ignored the specifications that say certain fields are obsolete:
on an ATA-7 drive setting the BIOS mode to CHS and the number of
heads to 8 results in word 55 being updated; all the modern (ATA-7 and
ATA-8) drives I've tested report words 54-58 as being valid. So should
we be using an older version of the spec and printing obsolete fields
too? As it is, we don't have a fallback position if a manufacturer does
decide to stop supporting CHS. Should we perhaps be using the LBA mode
settings (65535/255/63) if the disk is over 8GB?

 I don't like removing them depending on the version.  atacontrol is
 about the only place that you can see CHS without it possibly having
 gone through several layers of fakery.

Since it appears that disks are still using the CHS fields despite
having been obsolete since ATA-7 I guess it makes sense to continue
printing them.

 Now I see more clearly that these are only the firmware = default
 parameters.  There are also the current parameters in words 54-58.
 These are not reported here.  One use for reporting them here is
 to make it easy to debug whether the kernel code for using them is
 ever reached :-).  I don't know if a full unfakedparameter struct is
 available here for easy printing.  If it is, then the capabilities
 flag for words 54-58 is in it, and should be used instead of atarev
 for deciding whether to print these words (though setting of
 capability bits for old drives is as unreliable as setting the
 capability words.  The driver seems to trust it).

We should definitely be printing the current geometry, since that's
what the BIOS has configured.

 Risky to change this so late.  Actually, I have too much experience
 with the system generating wrong geometries, and it goes the other
 way.  I normally run older FreeBSDs which generate the BIOS geometry
 of H=255/C=63 which matches all metadata.  When I boot -current it
 generates H=16/C=63. I get annoyed by disk^Wbsdlabel complaining
 about this and more, and can't risk using it to change labels.

I had presumed that since bsdlabel(8) says the geometry values are
historical that they weren't actually used anywhere. However I now see
that it appears that fsck_ffs does interpret the geometry at least for
UFS1.

 So I'd be happy if you changed this, so everyone sees any problems in
 this area :-).  Its main inconsistency seems to be that only CAM ad
 does it.

If I was updating it I'd also update the old ad(4) driver to match.

-- 
Bruce Cran
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


Re: svn commit: r216269 - head/sys/geom/part

2010-12-08 Thread Bruce Cran
On Wed, 8 Dec 2010 16:46:17 +1100 (EST)
Bruce Evans b...@optusnet.com.au wrote:

 - for ATA drives, it uses the firmware geometry supplied by the
 drive firmware.  The ATA standard specifies this to be H=16/S=63 for
 all drives larger than a certain size (IIRC, about 8GB, which is the
 size at which the better default fake of H=255/S=63 generated by
cam_calc_geometry() for drives larger than 1GB, stops working for
systems that can't handle more than 1024 fake cylinders.  The magic
1GB is the size at which the even better default fake of H=64/S=32
stops working with more than 1024 fake cylinders.
 cam_calc_geometry() has no comment about this either).  Since all
 modern ATA drives are larger than 8GB, H=16/S=63 is almost hard-coded
 for ATA.

I've put together a patch which will hopefully improve the reporting of
geometry, though as you say nothing actually uses it nowadays - we
don't even appear to support CHS addressing in the disk drivers.
ata_da.c now calls cam_calc_geometry() which is updated to clip the
number of cylinders to 65535.  This introduces a problem because the
calculated geometry will no longer match the disklabel: however, since
CHS isn't used I don't know if we need to warn if the geometries don't
match? Since it appears superfluous I've removed the warning in the
patch.

atacontrol and camcontrol are updated to only display CHS
parameters from the drive if the disk conforms to ATA-5 or before. 

The patch is also available at
http://www.cran.org.uk/~brucec/freebsd/chs_deprecate.diff.txt in case
the attachment gets lost.

-- 
Bruce CranIndex: sbin/atacontrol/atacontrol.c
===
--- sbin/atacontrol/atacontrol.c(revision 216266)
+++ sbin/atacontrol/atacontrol.c(working copy)
@@ -161,6 +161,7 @@
 static void
 cap_print(struct ata_params *parm)
 {
+   int ataver;
u_int32_t lbasize = (u_int32_t)parm-lba_size_1 |
((u_int32_t)parm-lba_size_2  16);
 
@@ -169,6 +170,8 @@
((u_int64_t)parm-lba_size48_3  32) |
((u_int64_t)parm-lba_size48_4  48);
 
+   ataver = version(parm-version_major);
+
printf(\n);
printf(Protocol  );
if (parm-satacapabilities  parm-satacapabilities != 0x) {
@@ -180,14 +183,16 @@
printf(Unknown SATA revision\n);
}
else
-   printf(ATA/ATAPI revision %d\n, version(parm-version_major));
+   printf(ATA/ATAPI revision %d\n, ataver);
printf(device model  %.40s\n, parm-model);
printf(serial number %.20s\n, parm-serial);
printf(firmware revision %.8s\n, parm-revision);
 
-   printf(cylinders %d\n, parm-cylinders);
-   printf(heads %d\n, parm-heads);
-   printf(sectors/track %d\n, parm-sectors);
+   if (ataver = 5) {
+   printf(cylinders %d\n, parm-cylinders);
+   printf(heads %d\n, parm-heads);
+   printf(sectors/track %d\n, parm-sectors);
+   }
 
if (parm-config == ATA_PROTO_CFA ||
(parm-support.command2  ATA_SUPPORT_CFA))
Index: sbin/camcontrol/camcontrol.c
===
--- sbin/camcontrol/camcontrol.c(revision 216266)
+++ sbin/camcontrol/camcontrol.c(working copy)
@@ -1104,6 +1104,7 @@
 static void
 atacapprint(struct ata_params *parm)
 {
+   int ataver;
u_int32_t lbasize = (u_int32_t)parm-lba_size_1 |
((u_int32_t)parm-lba_size_2  16);
 
@@ -1112,9 +1113,11 @@
((u_int64_t)parm-lba_size48_3  32) |
((u_int64_t)parm-lba_size48_4  48);
 
+   ataver = ata_version(parm-version_major);
+
printf(\n);
printf(protocol  );
-   printf(ATA/ATAPI-%d, ata_version(parm-version_major));
+   printf(ATA/ATAPI-%d, ataver);
if (parm-satacapabilities  parm-satacapabilities != 0x) {
if (parm-satacapabilities  ATA_SATA_GEN3)
printf( SATA 3.x\n);
@@ -1139,9 +1142,11 @@
parm-media_serial);
}
 
-   printf(cylinders %d\n, parm-cylinders);
-   printf(heads %d\n, parm-heads);
-   printf(sectors/track %d\n, parm-sectors);
+   if (ataver = 5) {
+   printf(cylinders %d\n, parm-cylinders);
+   printf(heads %d\n, parm-heads);
+   printf(sectors/track %d\n, parm-sectors);
+   }
printf(sector size   logical %u, physical %lu, offset %lu\n,
ata_logical_sector_size(parm),
(unsigned long)ata_physical_sector_size(parm),
Index: sys/cam/cam.c

Re: svn commit: r216230 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs

2010-12-07 Thread Bruce Cran
On Tue, 7 Dec 2010 10:51:37 +0100
Pawel Jakub Dawidek p...@freebsd.org wrote:

 We can be smarter than that, really. We all know the disk presents 512
 bytes sectors only(?) because most of the software out there
 (including Windows, I guess) will simply break when they see disk
 with 4kB sector.

8 years ago Windows didn't support larger sector sizes; Vista and
Windows 7 do.

-- 
Bruce Cran
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


Re: svn commit: r216230 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs

2010-12-07 Thread Bruce Cran
On Tue, Dec 07, 2010 at 01:31:27PM +0200, Alexander Motin wrote:
 Not necessary. Some places indeed may have some legacy requirements,
 for example, in theory MBR want partition to be aligned to track
 boundary (but I've seen many pre-formatted SD cards with MBR
 violating it to align partition to flash sector). Same time for BSD
 label I see no problem to align partitions any way we want. I also
 see no problems to make FAT cluster, UFS block/fragment, etc, to
 match some sizes.

From a new installation of Windows 7 and FreeBSD CURRENT:

GEOM: ada0: partition 3 does not start on a track boundary.
GEOM: ada0: partition 3 does not end on a track boundary.
GEOM: ada0: partition 2 does not start on a track boundary.
GEOM: ada0: partition 2 does not end on a track bounary.

Partition 2 is the reserved partition while 3 is an NTFS partition, both
created in the Windows setup application.

Since Windows isn't bothering to align partitions do we still need to
warn about it?

-- 
Bruce Cran
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r216269 - head/sys/geom/part

2010-12-07 Thread Bruce Cran
Author: brucec
Date: Tue Dec  7 20:46:11 2010
New Revision: 216269
URL: http://svn.freebsd.org/changeset/base/216269

Log:
  Don't warn if a partition appears not to be aligned on a track boundary.
  Modern disks use LBA and create a fake CHS geometry that doesn't have any
  relation to the on-disk layout of data.

Modified:
  head/sys/geom/part/g_part_mbr.c

Modified: head/sys/geom/part/g_part_mbr.c
==
--- head/sys/geom/part/g_part_mbr.c Tue Dec  7 20:31:04 2010
(r216268)
+++ head/sys/geom/part/g_part_mbr.c Tue Dec  7 20:46:11 2010
(r216269)
@@ -449,12 +449,6 @@ g_part_mbr_read(struct g_part_table *bas
basetable-gpt_heads = heads;
}
}
-   if ((ent.dp_start % basetable-gpt_sectors) != 0)
-   printf(GEOM: %s: partition %d does not start on a 
-   track boundary.\n, pp-name, index + 1);
-   if ((ent.dp_size % basetable-gpt_sectors) != 0)
-   printf(GEOM: %s: partition %d does not end on a 
-   track boundary.\n, pp-name, index + 1);
 
entry = (struct g_part_mbr_entry *)g_part_new_entry(basetable,
index + 1, ent.dp_start, ent.dp_start + ent.dp_size - 1);
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


Re: svn commit: r216269 - head/sys/geom/part

2010-12-07 Thread Bruce Cran
On Tue, 7 Dec 2010 23:06:24 +
Bruce Cran br...@cran.org.uk wrote:
 I guess the fields are still defined to keep old tools happy.

I mean that values are still returned by the drive firmware,
while they could be left zero according to the spec. For example a new
1TB ATA-8 drive returns a geometry of 16H/63S/16383C in those fields.

-- 
Bruce Cran
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r216243 - head/usr.sbin/sysinstall

2010-12-06 Thread Bruce Cran
Author: brucec
Date: Mon Dec  6 20:55:14 2010
New Revision: 216243
URL: http://svn.freebsd.org/changeset/base/216243

Log:
  Ignore any failures with the local distribution since it's not present
  on release CDs and so will normally fail.
  installCommit() returns a DITEM_ value, not a Boolean.
  distExtractAll() returns a Boolean, not a DITEM_ value.
  
  Reported by:  kensmith
  MFC after:3 days

Modified:
  head/usr.sbin/sysinstall/dist.c
  head/usr.sbin/sysinstall/install.c

Modified: head/usr.sbin/sysinstall/dist.c
==
--- head/usr.sbin/sysinstall/dist.c Mon Dec  6 20:54:53 2010
(r216242)
+++ head/usr.sbin/sysinstall/dist.c Mon Dec  6 20:55:14 2010
(r216243)
@@ -757,6 +757,9 @@ distExtract(char *parent, Distribution *
canceled = 1;   
 
status = FALSE;
+   } else {
+   // ignore any failures with DIST_LOCAL
+   status = TRUE;
}
}
break;
@@ -913,7 +916,7 @@ distExtractAll(dialogMenuItem *self)
 restorescr(w);
 
 if (extract_status == FALSE)
-   status = DITEM_FAILURE;
+   status = FALSE;
 
 return status;
 }

Modified: head/usr.sbin/sysinstall/install.c
==
--- head/usr.sbin/sysinstall/install.c  Mon Dec  6 20:54:53 2010
(r216242)
+++ head/usr.sbin/sysinstall/install.c  Mon Dec  6 20:55:14 2010
(r216243)
@@ -855,7 +855,7 @@ try_media:
 i = distExtractAll(self);
 
 if (i == FALSE)
-   return FALSE;
+   return DITEM_FAILURE;
 
 /* When running as init, *now* it's safe to grab the rc.foo vars */
 installEnvironment();
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


Re: svn commit: r216230 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs

2010-12-06 Thread Bruce Cran
On Mon, Dec 06, 2010 at 09:31:39PM +0100, Ivan Voras wrote:
 For what it's worth, apparently linux has the concept of physical
 and logical sector sizes (possibly in addition to stripe size),
 with physical being 4096 and logical 512, for example:
 
 # hdparm -I /dev/sde | grep size
 Logical  Sector size:   512 bytes
 Physical Sector size:  4096 bytes
 device size with M = 1024*1024: 1430799 MBytes
 device size with M = 1000*1000: 1500301 MBytes (1500 GB)

So do we, except they're both the same for Advanced Format drives:

# camcontrol identify /dev/ada1
...
device modelWDC WD10EARS-00Z5B1
...
sector size logical 512, physical 512, offset 0

I don't know if Linux has a quirks list that 'corrects' the physical
sector size?

-- 
Bruce Cran
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


Re: svn commit: r216134 - in head: share/man/man9 sys/amd64/include sys/arm/include sys/i386/include sys/ia64/include sys/mips/include sys/pc98/include sys/powerpc/include sys/sparc64/include sys/sun4

2010-12-03 Thread Bruce Cran
On Fri, 3 Dec 2010 20:45:12 +1100 (EST)
Bruce Evans b...@optusnet.com.au wrote:

 KASSERT() in little inline functions gives a lot of bloat for such an
 unlikely error.  Stupid callers can still pass any garbage count
 except 0.

Yes, this catches a specific case that hps raised a few years ago:
sending zero-length packets/frames would fail by causing the system to
hang. Should we just document the restriction in the man page and not
try and prevent it at runtime?

-- 
Bruce Cran
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


Re: svn commit: r216134 - in head: share/man/man9 sys/amd64/include sys/arm/include sys/i386/include sys/ia64/include sys/mips/include sys/pc98/include sys/powerpc/include sys/sparc64/include sys/sun4

2010-12-03 Thread Bruce Cran
On Fri, 3 Dec 2010 15:27:13 +0100
Ivan Voras ivo...@freebsd.org wrote:

 I'd say it depends on if the specific case that hps raised a few
 years ago sentence part refers to an actual problem; i.e. did it
 happen in practice? If yes, leaving KASSERTs looks like the best
 option.

I've found hps's original email thread, which is at
http://lists.freebsd.org/pipermail/freebsd-hackers/2005-June/012342.html .

The argument for allowing zero-length reads/writes is at
http://lists.freebsd.org/pipermail/freebsd-hackers/2005-June/012348.html .

I suspect the mistake occurred due to a misunderstanding of the API.
NetBSD have documented it in their man page but not added asserts in
the code:

Functions which take a count of bytes have undefined results if the
specified count is zero.

-- 
Bruce Cran
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r216156 - head/share/man/man9

2010-12-03 Thread Bruce Cran
Author: brucec
Date: Fri Dec  3 18:30:55 2010
New Revision: 216156
URL: http://svn.freebsd.org/changeset/base/216156

Log:
  Document the fact that passing in a count of zero to the bus_space functions
  will result in undefined behaviour.
  Taken from NetBSD's bus_space(9).

Modified:
  head/share/man/man9/bus_space.9

Modified: head/share/man/man9/bus_space.9
==
--- head/share/man/man9/bus_space.9 Fri Dec  3 16:40:47 2010
(r216155)
+++ head/share/man/man9/bus_space.9 Fri Dec  3 18:30:55 2010
(r216156)
@@ -719,6 +719,9 @@ or which return data read from bus space
 do not obviously return an error code) do not fail.
 They could only fail
 if given invalid arguments, and in that case their behaviour is undefined.
+Functions which take a count of bytes have undefined results if the specified
+.Fa count
+is zero.
 .Sh TYPES
 Several types are defined in
 .In machine/bus.h
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r216143 - in head: share/man/man9 sys/amd64/include sys/arm/include sys/i386/include sys/ia64/include sys/mips/include sys/pc98/include sys/powerpc/include sys/sparc64/include sys/sun4v...

2010-12-02 Thread Bruce Cran
Author: brucec
Date: Fri Dec  3 07:09:23 2010
New Revision: 216143
URL: http://svn.freebsd.org/changeset/base/216143

Log:
  Revert r216134. This checkin broke platforms where bus_space are macros:
  they need to be a single statement, and do { } while (0) doesn't work in this
  situation so revert until a solution can be devised.

Modified:
  head/share/man/man9/bus_space.9
  head/sys/amd64/include/bus.h
  head/sys/arm/include/bus.h
  head/sys/i386/include/bus.h
  head/sys/ia64/include/bus.h
  head/sys/mips/include/bus.h
  head/sys/pc98/include/bus.h
  head/sys/powerpc/include/bus.h
  head/sys/sparc64/include/bus.h
  head/sys/sun4v/include/bus.h

Modified: head/share/man/man9/bus_space.9
==
--- head/share/man/man9/bus_space.9 Fri Dec  3 07:01:07 2010
(r216142)
+++ head/share/man/man9/bus_space.9 Fri Dec  3 07:09:23 2010
(r216143)
@@ -719,9 +719,6 @@ or which return data read from bus space
 do not obviously return an error code) do not fail.
 They could only fail
 if given invalid arguments, and in that case their behaviour is undefined.
-Functions which take a count of bytes must not pass in a count of zero; 
-doing so will cause a panic if the kernel was compiled with 
-.Cd options INVARIANTS .
 .Sh TYPES
 Several types are defined in
 .In machine/bus.h

Modified: head/sys/amd64/include/bus.h
==
--- head/sys/amd64/include/bus.hFri Dec  3 07:01:07 2010
(r216142)
+++ head/sys/amd64/include/bus.hFri Dec  3 07:09:23 2010
(r216143)
@@ -104,9 +104,6 @@
 #ifndef _AMD64_BUS_H_
 #define _AMD64_BUS_H_
 
-#include sys/param.h
-#include sys/systm.h
-
 #include machine/_bus.h
 #include machine/cpufunc.h
 
@@ -271,7 +268,7 @@ static __inline void
 bus_space_read_multi_1(bus_space_tag_t tag, bus_space_handle_t bsh,
   bus_size_t offset, u_int8_t *addr, size_t count)
 {
-   KASSERT(count != 0, (%s: count == 0, __func__));
+
if (tag == AMD64_BUS_SPACE_IO)
insb(bsh + offset, addr, count);
else {
@@ -292,7 +289,7 @@ static __inline void
 bus_space_read_multi_2(bus_space_tag_t tag, bus_space_handle_t bsh,
   bus_size_t offset, u_int16_t *addr, size_t count)
 {
-   KASSERT(count != 0, (%s: count == 0, __func__));
+
if (tag == AMD64_BUS_SPACE_IO)
insw(bsh + offset, addr, count);
else {
@@ -313,7 +310,7 @@ static __inline void
 bus_space_read_multi_4(bus_space_tag_t tag, bus_space_handle_t bsh,
   bus_size_t offset, u_int32_t *addr, size_t count)
 {
-   KASSERT(count != 0, (%s: count == 0, __func__));
+
if (tag == AMD64_BUS_SPACE_IO)
insl(bsh + offset, addr, count);
else {
@@ -359,7 +356,7 @@ static __inline void
 bus_space_read_region_1(bus_space_tag_t tag, bus_space_handle_t bsh,
bus_size_t offset, u_int8_t *addr, size_t count)
 {
-   KASSERT(count != 0, (%s: count == 0, __func__));
+
if (tag == AMD64_BUS_SPACE_IO) {
int _port_ = bsh + offset;
 #ifdef __GNUCLIKE_ASM
@@ -391,7 +388,7 @@ static __inline void
 bus_space_read_region_2(bus_space_tag_t tag, bus_space_handle_t bsh,
bus_size_t offset, u_int16_t *addr, size_t count)
 {
-   KASSERT(count != 0, (%s: count == 0, __func__));
+
if (tag == AMD64_BUS_SPACE_IO) {
int _port_ = bsh + offset;
 #ifdef __GNUCLIKE_ASM
@@ -423,7 +420,7 @@ static __inline void
 bus_space_read_region_4(bus_space_tag_t tag, bus_space_handle_t bsh,
bus_size_t offset, u_int32_t *addr, size_t count)
 {
-   KASSERT(count != 0, (%s: count == 0, __func__));
+
if (tag == AMD64_BUS_SPACE_IO) {
int _port_ = bsh + offset;
 #ifdef __GNUCLIKE_ASM
@@ -535,7 +532,7 @@ static __inline void
 bus_space_write_multi_1(bus_space_tag_t tag, bus_space_handle_t bsh,
bus_size_t offset, const u_int8_t *addr, size_t count)
 {
-   KASSERT(count != 0, (%s: count == 0, __func__));
+
if (tag == AMD64_BUS_SPACE_IO)
outsb(bsh + offset, addr, count);
else {
@@ -556,7 +553,7 @@ static __inline void
 bus_space_write_multi_2(bus_space_tag_t tag, bus_space_handle_t bsh,
bus_size_t offset, const u_int16_t *addr, size_t count)
 {
-   KASSERT(count != 0, (%s: count == 0, __func__));
+
if (tag == AMD64_BUS_SPACE_IO)
outsw(bsh + offset, addr, count);
else {
@@ -577,7 +574,7 @@ static __inline void
 bus_space_write_multi_4(bus_space_tag_t tag, bus_space_handle_t bsh,
bus_size_t offset, const u_int32_t *addr, size_t count)
 {
-   KASSERT(count != 0, (%s: count == 0, __func__));
+
if (tag == AMD64_BUS_SPACE_IO)
outsl(bsh + offset, addr, count);

svn commit: r215955 - head/usr.bin/netstat

2010-11-27 Thread Bruce Cran
Author: brucec
Date: Sat Nov 27 21:35:16 2010
New Revision: 215955
URL: http://svn.freebsd.org/changeset/base/215955

Log:
  Fix typo.

Modified:
  head/usr.bin/netstat/inet6.c

Modified: head/usr.bin/netstat/inet6.c
==
--- head/usr.bin/netstat/inet6.cSat Nov 27 21:20:51 2010
(r215954)
+++ head/usr.bin/netstat/inet6.cSat Nov 27 21:35:16 2010
(r215955)
@@ -438,7 +438,7 @@ ip6_stats(u_long off, const char *name, 
printf(\t\t%ju two or more ext mbuf\n,
(uintmax_t)ip6stat.ip6s_mext2m);
p(ip6s_exthdrtoolong,
-   \t%ju packet%s whose headers are not continuous\n);
+   \t%ju packet%s whose headers are not contiguous\n);
p(ip6s_nogif, \t%ju tunneling packet%s that can't find gif\n);
p(ip6s_toomanyhdr,
\t%ju packet%s discarded because of too many headers\n);
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r215674 - head/sbin/devd

2010-11-22 Thread Bruce Cran
Author: brucec
Date: Mon Nov 22 12:33:48 2010
New Revision: 215674
URL: http://svn.freebsd.org/changeset/base/215674

Log:
  Don't generate input() since it's not used.

Modified:
  head/sbin/devd/token.l

Modified: head/sbin/devd/token.l
==
--- head/sbin/devd/token.l  Mon Nov 22 12:32:19 2010(r215673)
+++ head/sbin/devd/token.l  Mon Nov 22 12:33:48 2010(r215674)
@@ -38,6 +38,7 @@
 
 int lineno = 1;
 #define YY_NO_UNPUT
+#define YY_NO_INPUT
 
 static void
 update_lineno(const char *cp)
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r215676 - in head: sbin/hastd usr.bin/colldef usr.sbin/apmd usr.sbin/bluetooth/bthidd usr.sbin/bluetooth/hcsecd usr.sbin/config usr.sbin/kbdcontrol

2010-11-22 Thread Bruce Cran
Author: brucec
Date: Mon Nov 22 14:16:22 2010
New Revision: 215676
URL: http://svn.freebsd.org/changeset/base/215676

Log:
  Don't generate input() since it's not used.

Modified:
  head/sbin/hastd/Makefile
  head/usr.bin/colldef/Makefile
  head/usr.sbin/apmd/apmdlex.l
  head/usr.sbin/bluetooth/bthidd/lexer.l
  head/usr.sbin/bluetooth/hcsecd/lexer.l
  head/usr.sbin/config/lang.l
  head/usr.sbin/kbdcontrol/lex.l

Modified: head/sbin/hastd/Makefile
==
--- head/sbin/hastd/MakefileMon Nov 22 12:42:32 2010(r215675)
+++ head/sbin/hastd/MakefileMon Nov 22 14:16:22 2010(r215676)
@@ -25,6 +25,7 @@ CFLAGS+=-DINET6
 .endif
 # This is needed to have WARNS  1.
 CFLAGS+=-DYY_NO_UNPUT
+CFLAGS+=-DYY_NO_INPUT
 
 DPADD= ${LIBGEOM} ${LIBBSDXML} ${LIBSBUF} ${LIBL} ${LIBPTHREAD} ${LIBUTIL}
 LDADD= -lgeom -lbsdxml -lsbuf -ll -lpthread -lutil

Modified: head/usr.bin/colldef/Makefile
==
--- head/usr.bin/colldef/Makefile   Mon Nov 22 12:42:32 2010
(r215675)
+++ head/usr.bin/colldef/Makefile   Mon Nov 22 14:16:22 2010
(r215676)
@@ -4,7 +4,7 @@ PROG=   colldef
 SRCS=  parse.y scan.l y.tab.h
 LFLAGS=-8 -i
 CFLAGS+=-I. -I${.CURDIR} -I${.CURDIR}/../../lib/libc/locale
-CFLAGS+=-DCOLLATE_DEBUG -DYY_NO_UNPUT
+CFLAGS+=-DCOLLATE_DEBUG -DYY_NO_UNPUT -DYY_NO_INPUT
 LDADD= -ll
 DPADD= ${LIBL}
 

Modified: head/usr.sbin/apmd/apmdlex.l
==
--- head/usr.sbin/apmd/apmdlex.lMon Nov 22 12:42:32 2010
(r215675)
+++ head/usr.sbin/apmd/apmdlex.lMon Nov 22 14:16:22 2010
(r215676)
@@ -38,6 +38,7 @@
 
 /* We don't need it, avoid the warning. */
 #define YY_NO_UNPUT
+#define YY_NO_INPUT
 
 int lineno;
 int first_time;

Modified: head/usr.sbin/bluetooth/bthidd/lexer.l
==
--- head/usr.sbin/bluetooth/bthidd/lexer.l  Mon Nov 22 12:42:32 2010
(r215675)
+++ head/usr.sbin/bluetooth/bthidd/lexer.l  Mon Nov 22 14:16:22 2010
(r215676)
@@ -39,7 +39,7 @@
int yylex   (void);
 %}
 
-%option yylineno noyywrap nounput
+%option yylineno noyywrap nounput noinput
 
 delim  [ \t\n]
 ws {delim}+

Modified: head/usr.sbin/bluetooth/hcsecd/lexer.l
==
--- head/usr.sbin/bluetooth/hcsecd/lexer.l  Mon Nov 22 12:42:32 2010
(r215675)
+++ head/usr.sbin/bluetooth/hcsecd/lexer.l  Mon Nov 22 14:16:22 2010
(r215676)
@@ -34,7 +34,7 @@
 #include parser.h
 %}
 
-%option yylineno noyywrap nounput
+%option yylineno noyywrap nounput noinput
 
 delim  [ \t\n]
 ws {delim}+

Modified: head/usr.sbin/config/lang.l
==
--- head/usr.sbin/config/lang.l Mon Nov 22 12:42:32 2010(r215675)
+++ head/usr.sbin/config/lang.l Mon Nov 22 14:16:22 2010(r215676)
@@ -39,6 +39,7 @@
 #include config.h
 
 #define YY_NO_UNPUT
+#define YY_NO_INPUT
 
 /*
  * Data for returning to previous files from include files.

Modified: head/usr.sbin/kbdcontrol/lex.l
==
--- head/usr.sbin/kbdcontrol/lex.l  Mon Nov 22 12:42:32 2010
(r215675)
+++ head/usr.sbin/kbdcontrol/lex.l  Mon Nov 22 14:16:22 2010
(r215676)
@@ -32,6 +32,7 @@
 
 #include lex.h
 #define YY_NO_UNPUT
+#define YY_NO_INPUT
 
 %}
 
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r215283 - head/sys/kern

2010-11-14 Thread Bruce Cran
Author: brucec
Date: Sun Nov 14 08:06:29 2010
New Revision: 215283
URL: http://svn.freebsd.org/changeset/base/215283

Log:
  Fix style(9) issues from r215281 and r215282.
  
  MFC after:1 week

Modified:
  head/sys/kern/kern_proc.c
  head/sys/kern/kern_tc.c
  head/sys/kern/subr_clock.c
  head/sys/kern/vfs_cache.c
  head/sys/kern/vfs_subr.c

Modified: head/sys/kern/kern_proc.c
==
--- head/sys/kern/kern_proc.c   Sun Nov 14 07:38:42 2010(r215282)
+++ head/sys/kern/kern_proc.c   Sun Nov 14 08:06:29 2010(r215283)
@@ -144,7 +144,8 @@ struct mtx ppeers_lock;
 uma_zone_t proc_zone;
 
 int kstack_pages = KSTACK_PAGES;
-SYSCTL_INT(_kern, OID_AUTO, kstack_pages, CTLFLAG_RD, kstack_pages, 0, 
Kernel stack size in pages);
+SYSCTL_INT(_kern, OID_AUTO, kstack_pages, CTLFLAG_RD, kstack_pages, 0,
+   Kernel stack size in pages);
 
 CTASSERT(sizeof(struct kinfo_proc) == KINFO_PROC_SIZE);
 #ifdef COMPAT_FREEBSD32

Modified: head/sys/kern/kern_tc.c
==
--- head/sys/kern/kern_tc.c Sun Nov 14 07:38:42 2010(r215282)
+++ head/sys/kern/kern_tc.c Sun Nov 14 08:06:29 2010(r215283)
@@ -560,7 +560,8 @@ sysctl_kern_timecounter_hardware(SYSCTL_
 }
 
 SYSCTL_PROC(_kern_timecounter, OID_AUTO, hardware, CTLTYPE_STRING | CTLFLAG_RW,
-0, 0, sysctl_kern_timecounter_hardware, A, Timecounter hardware 
selected);
+0, 0, sysctl_kern_timecounter_hardware, A,
+Timecounter hardware selected);
 
 
 /* Report or change the active timecounter hardware. */
@@ -768,7 +769,8 @@ pps_event(struct pps_state *pps, int eve
  */
 
 static int tc_tick;
-SYSCTL_INT(_kern_timecounter, OID_AUTO, tick, CTLFLAG_RD, tc_tick, 0, 
Approximate number of hardclock ticks in a millisecond);
+SYSCTL_INT(_kern_timecounter, OID_AUTO, tick, CTLFLAG_RD, tc_tick, 0,
+   Approximate number of hardclock ticks in a millisecond);
 
 void
 tc_ticktock(int cnt)

Modified: head/sys/kern/subr_clock.c
==
--- head/sys/kern/subr_clock.c  Sun Nov 14 07:38:42 2010(r215282)
+++ head/sys/kern/subr_clock.c  Sun Nov 14 08:06:29 2010(r215283)
@@ -74,7 +74,8 @@ sysctl_machdep_adjkerntz(SYSCTL_HANDLER_
 }
 
 SYSCTL_PROC(_machdep, OID_AUTO, adjkerntz, CTLTYPE_INT|CTLFLAG_RW,
-   adjkerntz, 0, sysctl_machdep_adjkerntz, I, Local offset from UTC in 
seconds);
+   adjkerntz, 0, sysctl_machdep_adjkerntz, I,
+   Local offset from UTC in seconds);
 
 /**
  * Generic routines to convert between a POSIX date

Modified: head/sys/kern/vfs_cache.c
==
--- head/sys/kern/vfs_cache.c   Sun Nov 14 07:38:42 2010(r215282)
+++ head/sys/kern/vfs_cache.c   Sun Nov 14 08:06:29 2010(r215283)
@@ -189,25 +189,38 @@ SYSCTL_INT(_debug_sizeof, OID_AUTO, name
 /*
  * The new name cache statistics
  */
-static SYSCTL_NODE(_vfs, OID_AUTO, cache, CTLFLAG_RW, 0, Name cache 
statistics);
+static SYSCTL_NODE(_vfs, OID_AUTO, cache, CTLFLAG_RW, 0,
+   Name cache statistics);
 #define STATNODE(mode, name, var, descr) \
SYSCTL_ULONG(_vfs_cache, OID_AUTO, name, mode, var, 0, descr);
 STATNODE(CTLFLAG_RD, numneg, numneg, Number of negative cache entries);
 STATNODE(CTLFLAG_RD, numcache, numcache, Number of cache entries);
-static u_long numcalls; STATNODE(CTLFLAG_RD, numcalls, numcalls, Number of 
cache lookups);
-static u_long dothits; STATNODE(CTLFLAG_RD, dothits, dothits, Number of '.' 
hits);
-static u_long dotdothits; STATNODE(CTLFLAG_RD, dotdothits, dotdothits, 
Number of '..' hits);
-static u_long numchecks; STATNODE(CTLFLAG_RD, numchecks, numchecks, Number 
of checks in lookup);
-static u_long nummiss; STATNODE(CTLFLAG_RD, nummiss, nummiss, Number of 
cache misses);
-static u_long nummisszap; STATNODE(CTLFLAG_RD, nummisszap, nummisszap, 
Number of cache misses we do not want to cache);
-static u_long numposzaps; STATNODE(CTLFLAG_RD, numposzaps, numposzaps, 
Number of cache hits (positive) we do not want to cache);
-static u_long numposhits; STATNODE(CTLFLAG_RD, numposhits, numposhits, 
Number of cache hits (positive));
-static u_long numnegzaps; STATNODE(CTLFLAG_RD, numnegzaps, numnegzaps, 
Number of cache hits (negative) we do not want to cache);
-static u_long numneghits; STATNODE(CTLFLAG_RD, numneghits, numneghits, 
Number of cache hits (negative));
-static u_long numupgrades; STATNODE(CTLFLAG_RD, numupgrades, numupgrades, 
Number of updates of the cache after lookup (write lock + retry));
+static u_long numcalls; STATNODE(CTLFLAG_RD, numcalls, numcalls,
+   Number of cache lookups);
+static u_long dothits; STATNODE(CTLFLAG_RD, dothits, dothits,
+   Number of '.' hits);
+static u_long dotdothits; 

svn commit: r215284 - head/sys/boot/i386/boot2

2010-11-14 Thread Bruce Cran
Author: brucec
Date: Sun Nov 14 08:25:27 2010
New Revision: 215284
URL: http://svn.freebsd.org/changeset/base/215284

Log:
  When rebooting the machine jump to 0xf000:fff0 instead of 0x:0x0.
  This is the same change that was made in rev 1.33 of boot/i386/btx/btx/btx.S
  
  PR:   i386/91871
  Submitted by: Bjorn Konig bkoenig at cs.tu-berlin.de
  MFC after:1 week

Modified:
  head/sys/boot/i386/boot2/boot1.S

Modified: head/sys/boot/i386/boot2/boot1.S
==
--- head/sys/boot/i386/boot2/boot1.SSun Nov 14 08:06:29 2010
(r215283)
+++ head/sys/boot/i386/boot2/boot1.SSun Nov 14 08:25:27 2010
(r215284)
@@ -239,7 +239,7 @@ error:  callw putstr# 
Display message
xorb %ah,%ah# BIOS: Get
int $0x16   #  keypress
movw $0x1234, BDA_BOOT  # Do a warm boot
-   ljmp $0x,$0x0   # reboot the machine
+   ljmp $0xf000,$0x0   # reboot the machine
 /*
  * Display a null-terminated string using the BIOS output.
  */
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r215285 - head/sys/boot/i386/boot2

2010-11-14 Thread Bruce Cran
Author: brucec
Date: Sun Nov 14 08:31:02 2010
New Revision: 215285
URL: http://svn.freebsd.org/changeset/base/215285

Log:
  Fix the jump location.

Modified:
  head/sys/boot/i386/boot2/boot1.S

Modified: head/sys/boot/i386/boot2/boot1.S
==
--- head/sys/boot/i386/boot2/boot1.SSun Nov 14 08:25:27 2010
(r215284)
+++ head/sys/boot/i386/boot2/boot1.SSun Nov 14 08:31:02 2010
(r215285)
@@ -239,7 +239,7 @@ error:  callw putstr# 
Display message
xorb %ah,%ah# BIOS: Get
int $0x16   #  keypress
movw $0x1234, BDA_BOOT  # Do a warm boot
-   ljmp $0xf000,$0x0   # reboot the machine
+   ljmp $0xf000,$0xfff0# reboot the machine
 /*
  * Display a null-terminated string using the BIOS output.
  */
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r215286 - head/usr.sbin/sysinstall

2010-11-14 Thread Bruce Cran
Author: brucec
Date: Sun Nov 14 09:03:42 2010
New Revision: 215286
URL: http://svn.freebsd.org/changeset/base/215286

Log:
  Connect to ftp2.tr.freebsd.org when the Turkey #2 mirror is selected.
  
  PR:   bin/128587
  Submitted by: Mehmet Kose mehmet.kose at gmail.com
  MFC after:1 week

Modified:
  head/usr.sbin/sysinstall/menus.c

Modified: head/usr.sbin/sysinstall/menus.c
==
--- head/usr.sbin/sysinstall/menus.cSun Nov 14 08:31:02 2010
(r215285)
+++ head/usr.sbin/sysinstall/menus.cSun Nov 14 09:03:42 2010
(r215286)
@@ -819,7 +819,7 @@ DMenu MenuMediaFTP = {
   { Turkey,  ftp.tr.freebsd.org, NULL, dmenuSetVariable, NULL,
VAR_FTP_PATH =ftp://ftp.tr.freebsd.org; },
   {  Turkey #2,  ftp2.tr.freebsd.org, NULL, dmenuSetVariable, NULL,
-   VAR_FTP_PATH =ftp://ftp.tr.freebsd.org; },
+   VAR_FTP_PATH =ftp://ftp2.tr.freebsd.org; },
 
   { UK,  ftp.uk.freebsd.org, NULL, dmenuSetVariable, NULL,
VAR_FTP_PATH =ftp://ftp.uk.freebsd.org; },
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r215287 - head/usr.sbin/sysinstall

2010-11-14 Thread Bruce Cran
Author: brucec
Date: Sun Nov 14 09:14:17 2010
New Revision: 215287
URL: http://svn.freebsd.org/changeset/base/215287

Log:
  Web should not be all upper-case because it's not an acronym.
  
  PR:   bin/130366
  Submitted by: Royce Williams royce at alaska.net
  MFC after:1 week

Modified:
  head/usr.sbin/sysinstall/install.c

Modified: head/usr.sbin/sysinstall/install.c
==
--- head/usr.sbin/sysinstall/install.c  Sun Nov 14 09:03:42 2010
(r215286)
+++ head/usr.sbin/sysinstall/install.c  Sun Nov 14 09:14:17 2010
(r215287)
@@ -756,7 +756,7 @@ nodisks:
 
 dialog_clear_norefresh();
 if (!msgYesNo(The FreeBSD package collection is a collection of thousands 
of ready-to-run\n
- applications, from text editors to games to WEB servers and 
more.  Would you\n
+ applications, from text editors to games to Web servers and 
more.  Would you\n
  like to browse the collection now?)) {
(void)configPackages(self);
 }
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r215290 - head/usr.sbin/sysinstall

2010-11-14 Thread Bruce Cran
Author: brucec
Date: Sun Nov 14 10:04:48 2010
New Revision: 215290
URL: http://svn.freebsd.org/changeset/base/215290

Log:
  ntpdate(8) hosts are now configured in rc.conf via ntpdate_hosts.
  
  PR:   bin/148350
  Submitted by: Joel FAEDI joel.faedi at gmail.com
  MFC after:1 week

Modified:
  head/usr.sbin/sysinstall/config.c
  head/usr.sbin/sysinstall/menus.c
  head/usr.sbin/sysinstall/sysinstall.8
  head/usr.sbin/sysinstall/sysinstall.h

Modified: head/usr.sbin/sysinstall/config.c
==
--- head/usr.sbin/sysinstall/config.c   Sun Nov 14 09:59:52 2010
(r215289)
+++ head/usr.sbin/sysinstall/config.c   Sun Nov 14 10:04:48 2010
(r215290)
@@ -495,14 +495,14 @@ configNTP(dialogMenuItem *self)
 {
 int status;
 
-status = variable_get_value(VAR_NTPDATE_FLAGS,
+status = variable_get_value(VAR_NTPDATE_HOSTS,
Enter the name of an NTP server, 1)
 ? DITEM_SUCCESS : DITEM_FAILURE;
 if (status == DITEM_SUCCESS) {
static char tmp[255];
 
-   snprintf(tmp, sizeof(tmp), ntpdate_enable=YES,ntpdate_flags=%s,
-variable_get(VAR_NTPDATE_FLAGS));
+   snprintf(tmp, sizeof(tmp), ntpdate_enable=YES,ntpdate_hosts=%s,
+variable_get(VAR_NTPDATE_HOSTS));
self-data = tmp;
dmenuSetVariables(self);
 }

Modified: head/usr.sbin/sysinstall/menus.c
==
--- head/usr.sbin/sysinstall/menus.cSun Nov 14 09:59:52 2010
(r215289)
+++ head/usr.sbin/sysinstall/menus.cSun Nov 14 10:04:48 2010
(r215290)
@@ -1317,7 +1317,7 @@ DMenu MenuNetworking = {
dmenuVarCheck,  dmenuToggleVariable, NULL, nfs_client_enable=YES },
   {  NFS server, This machine will be an NFS server,
dmenuVarCheck,  configNFSServer, NULL, nfs_server_enable=YES },
-  {  Ntpdate,Select a clock-synchronization server,
+  {  Ntpdate,Select a clock synchronization server,
dmenuVarCheck,  dmenuSubmenu, NULL, MenuNTP, '[', 'X', ']',
(uintptr_t)ntpdate_enable=YES },
   {  PCNFSD, Run authentication server for clients with PC-NFS.,
@@ -1376,456 +1376,456 @@ DMenu MenuNTP = {
 NULL,
 { { None,No NTP server,
dmenuVarsCheck, dmenuSetVariables, NULL, 
-   ntpdate_enable=NO,ntpdate_flags=none },
+   ntpdate_enable=NO,ntpdate_hosts=none },
   { Other,   Select a site not on this list,
dmenuVarsCheck, configNTP, NULL, NULL },
   { Worldwide,   pool.ntp.org,
dmenuVarsCheck, dmenuSetVariables, NULL, 
-   ntpdate_enable=YES,ntpdate_flags=pool.ntp.org },
+   ntpdate_enable=YES,ntpdate_hosts=pool.ntp.org },
   { Asia,asia.pool.ntp.org,
dmenuVarsCheck, dmenuSetVariables, NULL, 
-   ntpdate_enable=YES,ntpdate_flags=asia.pool.ntp.org },
+   ntpdate_enable=YES,ntpdate_hosts=asia.pool.ntp.org },
   { Europe,  europe.pool.ntp.org,
dmenuVarsCheck, dmenuSetVariables, NULL, 
-   ntpdate_enable=YES,ntpdate_flags=europe.pool.ntp.org },
+   ntpdate_enable=YES,ntpdate_hosts=europe.pool.ntp.org },
   { Oceania, oceania.pool.ntp.org,
dmenuVarsCheck, dmenuSetVariables, NULL, 
-   ntpdate_enable=YES,ntpdate_flags=oceania.pool.ntp.org },
+   ntpdate_enable=YES,ntpdate_hosts=oceania.pool.ntp.org },
   { North America,   north-america.pool.ntp.org,
dmenuVarsCheck, dmenuSetVariables, NULL, 
-   ntpdate_enable=YES,ntpdate_flags=north-america.pool.ntp.org },
+   ntpdate_enable=YES,ntpdate_hosts=north-america.pool.ntp.org },
   { Argentina,   tick.nap.com.ar,
dmenuVarsCheck, dmenuSetVariables, NULL,
-   ntpdate_enable=YES,ntpdate_flags=tick.nap.com.ar },
+   ntpdate_enable=YES,ntpdate_hosts=tick.nap.com.ar },
   { Argentina #2,time.sinectis.com.ar,
dmenuVarsCheck, dmenuSetVariables, NULL,
-   ntpdate_enable=YES,ntpdate_flags=time.sinectis.com.ar },
+   ntpdate_enable=YES,ntpdate_hosts=time.sinectis.com.ar },
   { Argentina #3,tock.nap.com.ar,
dmenuVarsCheck, dmenuSetVariables, NULL,
-   ntpdate_enable=YES,ntpdate_flags=tock.nap.com.ar },
+   ntpdate_enable=YES,ntpdate_hosts=tock.nap.com.ar },
   { Australia,   au.pool.ntp.org,
dmenuVarsCheck, dmenuSetVariables, NULL, 
-   ntpdate_enable=YES,ntpdate_flags=au.pool.ntp.org },
+   ntpdate_enable=YES,ntpdate_hosts=au.pool.ntp.org },
   { Australia #2,augean.eleceng.adelaide.edu.au,
dmenuVarsCheck, dmenuSetVariables, NULL, 
-   ntpdate_enable=YES,ntpdate_flags=augean.eleceng.adelaide.edu.au },
+   ntpdate_enable=YES,ntpdate_hosts=augean.eleceng.adelaide.edu.au },
   { Australia #3,ntp.adelaide.edu.au,

svn commit: r215291 - in head/usr.sbin/sysinstall: . help

2010-11-14 Thread Bruce Cran
Author: brucec
Date: Sun Nov 14 10:22:09 2010
New Revision: 215291
URL: http://svn.freebsd.org/changeset/base/215291

Log:
  Remove support for cpioVerbose=medium because bsdcpio doesn't support the
  -V flag.
  
  PR:   bin/151821
  Submitted by: Devin Teske dteske at vicor.com
  MFC after:1 week

Modified:
  head/usr.sbin/sysinstall/help/shortcuts.hlp
  head/usr.sbin/sysinstall/media.c
  head/usr.sbin/sysinstall/sysinstall.8

Modified: head/usr.sbin/sysinstall/help/shortcuts.hlp
==
--- head/usr.sbin/sysinstall/help/shortcuts.hlp Sun Nov 14 10:04:48 2010
(r215290)
+++ head/usr.sbin/sysinstall/help/shortcuts.hlp Sun Nov 14 10:22:09 2010
(r215291)
@@ -13,7 +13,7 @@ blanktime   Screen blank tim
 bootManager Select boot manager: booteasy, standard or none
 browserBinary   Which doc browser to use (default: links)
 browserPackage  Which package to get browser from (default: links)
-cpioVerbose How verbose to be with cpio: high, medium or low
+cpioVerbose How verbose to be with cpio: high or low
 debug   Extra debugging?
 defaultrouter   IP address of default route
 diskWhich disk to operate on (ad0, da0, etc).

Modified: head/usr.sbin/sysinstall/media.c
==
--- head/usr.sbin/sysinstall/media.cSun Nov 14 10:04:48 2010
(r215290)
+++ head/usr.sbin/sysinstall/media.cSun Nov 14 10:22:09 2010
(r215291)
@@ -117,8 +117,6 @@ cpioVerbosity()
 
 if (cp  !strcmp(cp, high))
return -v;
-else if (cp  !strcmp(cp, medium))
-   return -V;
 return ;
 }
 
@@ -848,8 +846,6 @@ mediaSetCPIOVerbosity(dialogMenuItem *se
 }
 else {
if (!strcmp(cp, low))
-   variable_set2(VAR_CPIO_VERBOSITY, medium, 0);
-   else if (!strcmp(cp, medium))
variable_set2(VAR_CPIO_VERBOSITY, high, 0);
else /* must be high - wrap around */
variable_set2(VAR_CPIO_VERBOSITY, low, 0);

Modified: head/usr.sbin/sysinstall/sysinstall.8
==
--- head/usr.sbin/sysinstall/sysinstall.8   Sun Nov 14 10:04:48 2010
(r215290)
+++ head/usr.sbin/sysinstall/sysinstall.8   Sun Nov 14 10:22:09 2010
(r215291)
@@ -744,8 +744,7 @@ Default: u...@host
 .Sy Variables :
 .Bl -tag -width indent
 .It cpioVerbose
-Can be used to set the verbosity of cpio extractions to low, medium or
-high.
+Can be used to set the verbosity of cpio extractions to low or high.
 .El
 .It mediaGetType
 Interactively get the user to specify some type of media.
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r215296 - head/usr.sbin/sysinstall

2010-11-14 Thread Bruce Cran
Author: brucec
Date: Sun Nov 14 13:25:01 2010
New Revision: 215296
URL: http://svn.freebsd.org/changeset/base/215296

Log:
  Fix use of CD_VERSION=any in cdrom.inf by calling strcmp instead of
  variable_cmp.
  
  PR:   bin/142960
  Submitted by: G. Paul Ziemba p-fbsd-bugs at ziemba.us
  MFC after:1 week

Modified:
  head/usr.sbin/sysinstall/cdrom.c

Modified: head/usr.sbin/sysinstall/cdrom.c
==
--- head/usr.sbin/sysinstall/cdrom.cSun Nov 14 13:09:32 2010
(r215295)
+++ head/usr.sbin/sysinstall/cdrom.cSun Nov 14 13:25:01 2010
(r215296)
@@ -145,7 +145,7 @@ mediaInitCDROM(Device *dev)
else {
if (variable_cmp(VAR_RELNAME, cp) 
variable_cmp(VAR_RELNAME, any) 
-   variable_cmp(cp, any) 
+   strcmp(cp, any) 
!bogusCDOK) {
msgConfirm(Warning: The version of the FreeBSD disc currently 
in the drive\n
   (%s) does not match the version of the boot 
floppy\n
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r215304 - head/sys/kern

2010-11-14 Thread Bruce Cran
Author: brucec
Date: Sun Nov 14 16:10:15 2010
New Revision: 215304
URL: http://svn.freebsd.org/changeset/base/215304

Log:
  Fix some more style(9) issues.

Modified:
  head/sys/kern/kern_proc.c
  head/sys/kern/kern_tc.c
  head/sys/kern/subr_clock.c
  head/sys/kern/vfs_cache.c
  head/sys/kern/vfs_subr.c

Modified: head/sys/kern/kern_proc.c
==
--- head/sys/kern/kern_proc.c   Sun Nov 14 15:31:59 2010(r215303)
+++ head/sys/kern/kern_proc.c   Sun Nov 14 16:10:15 2010(r215304)
@@ -145,7 +145,7 @@ uma_zone_t proc_zone;
 
 int kstack_pages = KSTACK_PAGES;
 SYSCTL_INT(_kern, OID_AUTO, kstack_pages, CTLFLAG_RD, kstack_pages, 0,
-   Kernel stack size in pages);
+Kernel stack size in pages);
 
 CTASSERT(sizeof(struct kinfo_proc) == KINFO_PROC_SIZE);
 #ifdef COMPAT_FREEBSD32

Modified: head/sys/kern/kern_tc.c
==
--- head/sys/kern/kern_tc.c Sun Nov 14 15:31:59 2010(r215303)
+++ head/sys/kern/kern_tc.c Sun Nov 14 16:10:15 2010(r215304)
@@ -770,7 +770,7 @@ pps_event(struct pps_state *pps, int eve
 
 static int tc_tick;
 SYSCTL_INT(_kern_timecounter, OID_AUTO, tick, CTLFLAG_RD, tc_tick, 0,
-   Approximate number of hardclock ticks in a millisecond);
+Approximate number of hardclock ticks in a millisecond);
 
 void
 tc_ticktock(int cnt)

Modified: head/sys/kern/subr_clock.c
==
--- head/sys/kern/subr_clock.c  Sun Nov 14 15:31:59 2010(r215303)
+++ head/sys/kern/subr_clock.c  Sun Nov 14 16:10:15 2010(r215304)
@@ -61,7 +61,7 @@ int tz_dsttime;
  * kern.
  */
 SYSCTL_INT(_machdep, OID_AUTO, wall_cmos_clock,
-   CTLFLAG_RW, wall_cmos_clock, 0, CMOS clock keeps wall time);
+CTLFLAG_RW, wall_cmos_clock, 0, CMOS clock keeps wall time);
 
 static int
 sysctl_machdep_adjkerntz(SYSCTL_HANDLER_ARGS)
@@ -74,8 +74,8 @@ sysctl_machdep_adjkerntz(SYSCTL_HANDLER_
 }
 
 SYSCTL_PROC(_machdep, OID_AUTO, adjkerntz, CTLTYPE_INT|CTLFLAG_RW,
-   adjkerntz, 0, sysctl_machdep_adjkerntz, I,
-   Local offset from UTC in seconds);
+adjkerntz, 0, sysctl_machdep_adjkerntz, I,
+Local offset from UTC in seconds);
 
 /**
  * Generic routines to convert between a POSIX date

Modified: head/sys/kern/vfs_cache.c
==
--- head/sys/kern/vfs_cache.c   Sun Nov 14 15:31:59 2010(r215303)
+++ head/sys/kern/vfs_cache.c   Sun Nov 14 16:10:15 2010(r215304)
@@ -184,43 +184,43 @@ SYSCTL_INT(_debug, OID_AUTO, vfscache, C
 
 /* Export size information to userland */
 SYSCTL_INT(_debug_sizeof, OID_AUTO, namecache, CTLFLAG_RD, 0,
-   sizeof(struct namecache), sizeof(struct namecache));
+sizeof(struct namecache), sizeof(struct namecache));
 
 /*
  * The new name cache statistics
  */
 static SYSCTL_NODE(_vfs, OID_AUTO, cache, CTLFLAG_RW, 0,
-   Name cache statistics);
+Name cache statistics);
 #define STATNODE(mode, name, var, descr) \
SYSCTL_ULONG(_vfs_cache, OID_AUTO, name, mode, var, 0, descr);
 STATNODE(CTLFLAG_RD, numneg, numneg, Number of negative cache entries);
 STATNODE(CTLFLAG_RD, numcache, numcache, Number of cache entries);
 static u_long numcalls; STATNODE(CTLFLAG_RD, numcalls, numcalls,
-   Number of cache lookups);
+Number of cache lookups);
 static u_long dothits; STATNODE(CTLFLAG_RD, dothits, dothits,
-   Number of '.' hits);
+Number of '.' hits);
 static u_long dotdothits; STATNODE(CTLFLAG_RD, dotdothits, dotdothits,
-   Number of '..' hits);
+Number of '..' hits);
 static u_long numchecks; STATNODE(CTLFLAG_RD, numchecks, numchecks,
-   Number of checks in lookup);
+Number of checks in lookup);
 static u_long nummiss; STATNODE(CTLFLAG_RD, nummiss, nummiss,
-   Number of cache misses);
+Number of cache misses);
 static u_long nummisszap; STATNODE(CTLFLAG_RD, nummisszap, nummisszap,
-   Number of cache misses we do not want to cache);
+Number of cache misses we do not want to cache);
 static u_long numposzaps; STATNODE(CTLFLAG_RD, numposzaps, numposzaps, 
-   Number of cache hits (positive) we do not want to cache);
+Number of cache hits (positive) we do not want to cache);
 static u_long numposhits; STATNODE(CTLFLAG_RD, numposhits, numposhits,
-   Number of cache hits (positive));
+Number of cache hits (positive));
 static u_long numnegzaps; STATNODE(CTLFLAG_RD, numnegzaps, numnegzaps,
-   Number of cache hits (negative) we do not want to cache);
+Number of cache hits (negative) we do not want to cache);
 static u_long numneghits; STATNODE(CTLFLAG_RD, numneghits, numneghits,
-   Number 

svn commit: r215239 - head/usr.bin/top

2010-11-13 Thread Bruce Cran
Author: brucec
Date: Sat Nov 13 11:43:20 2010
New Revision: 215239
URL: http://svn.freebsd.org/changeset/base/215239

Log:
  Memory stats are reported in bytes, not pages.
  
  PR:   docs/151283
  Submitted by: Bas Smeelen b.smeelen at ose.nl
  MFC after: 3 days

Modified:
  head/usr.bin/top/top.local.1

Modified: head/usr.bin/top/top.local.1
==
--- head/usr.bin/top/top.local.1Sat Nov 13 11:11:51 2010
(r215238)
+++ head/usr.bin/top/top.local.1Sat Nov 13 11:43:20 2010
(r215239)
@@ -6,8 +6,8 @@ The '-H' option will toggle the display 
 At runtime the 'H' key will toggle this mode. The default is OFF.
 
 .SH DESCRIPTION OF MEMORY 
-Mem: 9220K Active, 1032K Inact, 3284K Wired, 1MB Cache, 2M Buf, 1320K Free
-Swap:   91M Total, 79M Free, 13% Inuse, 80K In, 104 K Out
+Mem: 9220K Active, 1032K Inact, 3284K Wired, 1M Cache, 2M Buf, 1320K Free
+Swap: 91M Total, 79M Free, 13% Inuse, 80K In, 104K Out
 
 .B K:
 Kilobyte
@@ -19,23 +19,23 @@ Megabyte
 1/100
 .TP
 .B Active:
-number of pages active
+number of bytes active
 .TP
 .B Inact:
-number of pages inactive
+number of bytes inactive
 .TP
 .B Wired:
-number of pages wired down, including cached file data pages
+number of bytes wired down, including cached file data pages
 .TP
 .B Cache:
-number of clean pages caching data that are available for
+number of clean bytes caching data that are available for
 immediate reallocation
 .TP
 .B Buf:
-number of pages used for BIO-level disk caching
+number of bytes used for BIO-level disk caching
 .TP
 .B Free: 
-number of pages free
+number of bytes free
 .TP
 .B Total: 
 total available swap usage
@@ -47,7 +47,7 @@ total free swap usage
 swap usage
 .TP 
 .B In: 
-pages paged in from swap devices (last interval)
+bytes paged in from swap devices (last interval)
 .TP
 .B Out: 
-pages paged out to swap devices (last interval)
+bytes paged out to swap devices (last interval)
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


Re: svn commit: r215239 - head/usr.bin/top

2010-11-13 Thread Bruce Cran
On Sat, 13 Nov 2010 14:56:32 +0300
Sergey Kandaurov pluk...@freebsd.org wrote:

 On 13 November 2010 14:43, Bruce Cran bru...@freebsd.org wrote:
  Author: brucec
  Date: Sat Nov 13 11:43:20 2010
  New Revision: 215239
  URL: http://svn.freebsd.org/changeset/base/215239
 
  Log:
   Memory stats are reported in bytes, not pages.
 
   PR:   docs/151283
   Submitted by: Bas Smeelen b.smeelen at ose.nl
   MFC after: 3 days
 
 
 Hi.
 The downside is that usually active/passive/inactive operations are
 performed over
 pages, not bytes, since a page is usually the minimum unit of memory
 management. The sentences resulted after this change sound now weird
 for me.

I think the wording is better in that it's not so misleading, but could
still be improved.

-- 
Bruce Cran
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r215263 - head/usr.sbin/sysinstall

2010-11-13 Thread Bruce Cran
Author: brucec
Date: Sat Nov 13 21:48:32 2010
New Revision: 215263
URL: http://svn.freebsd.org/changeset/base/215263

Log:
  Add ftp4.se.freebsd.org to the set of mirrors.
  
  PR:   bin/150552
  Submitted by: Niclas Zeising zeising at lysator.liu.se
  MFC after:3 days

Modified:
  head/usr.sbin/sysinstall/menus.c

Modified: head/usr.sbin/sysinstall/menus.c
==
--- head/usr.sbin/sysinstall/menus.cSat Nov 13 21:37:18 2010
(r215262)
+++ head/usr.sbin/sysinstall/menus.cSat Nov 13 21:48:32 2010
(r215263)
@@ -793,6 +793,8 @@ DMenu MenuMediaFTP = {
VAR_FTP_PATH =ftp://ftp2.se.freebsd.org; },
   {  Sweden #3,  ftp3.se.freebsd.org, NULL, dmenuSetVariable, NULL,
VAR_FTP_PATH =ftp://ftp3.se.freebsd.org; },
+  {  Sweden #4,  ftp4.se.freebsd.org, NULL, dmenuSetVariable, NULL,
+   VAR_FTP_PATH =ftp://ftp4.se.freebsd.org; },
   {  Sweden #5,  ftp5.se.freebsd.org, NULL, dmenuSetVariable, NULL,
VAR_FTP_PATH =ftp://ftp5.se.freebsd.org; },
 
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r215281 - head/sys/kern

2010-11-13 Thread Bruce Cran
Author: brucec
Date: Sun Nov 14 06:09:50 2010
New Revision: 215281
URL: http://svn.freebsd.org/changeset/base/215281

Log:
  Add some descriptions to sys/kern sysctls.
  
  PR:   kern/148710
  Tested by:Chip Camden sterling at camdensoftware.com
  MFC after:1 week

Modified:
  head/sys/kern/kern_proc.c
  head/sys/kern/kern_tc.c
  head/sys/kern/subr_clock.c
  head/sys/kern/sysv_sem.c
  head/sys/kern/vfs_cache.c

Modified: head/sys/kern/kern_proc.c
==
--- head/sys/kern/kern_proc.c   Sun Nov 14 05:05:41 2010(r215280)
+++ head/sys/kern/kern_proc.c   Sun Nov 14 06:09:50 2010(r215281)
@@ -144,7 +144,7 @@ struct mtx ppeers_lock;
 uma_zone_t proc_zone;
 
 int kstack_pages = KSTACK_PAGES;
-SYSCTL_INT(_kern, OID_AUTO, kstack_pages, CTLFLAG_RD, kstack_pages, 0, );
+SYSCTL_INT(_kern, OID_AUTO, kstack_pages, CTLFLAG_RD, kstack_pages, 0, 
Kernel stack size in pages);
 
 CTASSERT(sizeof(struct kinfo_proc) == KINFO_PROC_SIZE);
 #ifdef COMPAT_FREEBSD32

Modified: head/sys/kern/kern_tc.c
==
--- head/sys/kern/kern_tc.c Sun Nov 14 05:05:41 2010(r215280)
+++ head/sys/kern/kern_tc.c Sun Nov 14 06:09:50 2010(r215281)
@@ -103,7 +103,7 @@ SYSCTL_NODE(_kern_timecounter, OID_AUTO,
 
 static int timestepwarnings;
 SYSCTL_INT(_kern_timecounter, OID_AUTO, stepwarnings, CTLFLAG_RW,
-timestepwarnings, 0, );
+timestepwarnings, 0, Log time steps);
 
 static void tc_windup(void);
 static void cpu_tick_calibrate(int);
@@ -560,7 +560,7 @@ sysctl_kern_timecounter_hardware(SYSCTL_
 }
 
 SYSCTL_PROC(_kern_timecounter, OID_AUTO, hardware, CTLTYPE_STRING | CTLFLAG_RW,
-0, 0, sysctl_kern_timecounter_hardware, A, );
+0, 0, sysctl_kern_timecounter_hardware, A, Timecounter hardware 
selected);
 
 
 /* Report or change the active timecounter hardware. */
@@ -583,7 +583,7 @@ sysctl_kern_timecounter_choice(SYSCTL_HA
 }
 
 SYSCTL_PROC(_kern_timecounter, OID_AUTO, choice, CTLTYPE_STRING | CTLFLAG_RD,
-0, 0, sysctl_kern_timecounter_choice, A, );
+0, 0, sysctl_kern_timecounter_choice, A, Timecounter hardware 
detected);
 
 /*
  * RFC 2783 PPS-API implementation.
@@ -768,7 +768,7 @@ pps_event(struct pps_state *pps, int eve
  */
 
 static int tc_tick;
-SYSCTL_INT(_kern_timecounter, OID_AUTO, tick, CTLFLAG_RD, tc_tick, 0, );
+SYSCTL_INT(_kern_timecounter, OID_AUTO, tick, CTLFLAG_RD, tc_tick, 0, 
Approximate number of hardclock ticks in a millisecond);
 
 void
 tc_ticktock(int cnt)

Modified: head/sys/kern/subr_clock.c
==
--- head/sys/kern/subr_clock.c  Sun Nov 14 05:05:41 2010(r215280)
+++ head/sys/kern/subr_clock.c  Sun Nov 14 06:09:50 2010(r215281)
@@ -50,7 +50,7 @@ __FBSDID($FreeBSD$);
 #include sys/timetc.h
 
 #define ct_debug bootverbose
-static int adjkerntz;  /* local offset from GMT in seconds */
+static int adjkerntz;  /* local offset from UTC in seconds */
 static int wall_cmos_clock;/* wall CMOS clock assumed if != 0 */
 
 int tz_minuteswest;
@@ -61,7 +61,7 @@ int tz_dsttime;
  * kern.
  */
 SYSCTL_INT(_machdep, OID_AUTO, wall_cmos_clock,
-   CTLFLAG_RW, wall_cmos_clock, 0, );
+   CTLFLAG_RW, wall_cmos_clock, 0, CMOS clock keeps wall time);
 
 static int
 sysctl_machdep_adjkerntz(SYSCTL_HANDLER_ARGS)
@@ -74,7 +74,7 @@ sysctl_machdep_adjkerntz(SYSCTL_HANDLER_
 }
 
 SYSCTL_PROC(_machdep, OID_AUTO, adjkerntz, CTLTYPE_INT|CTLFLAG_RW,
-   adjkerntz, 0, sysctl_machdep_adjkerntz, I, );
+   adjkerntz, 0, sysctl_machdep_adjkerntz, I, Local offset from UTC in 
seconds);
 
 /**
  * Generic routines to convert between a POSIX date

Modified: head/sys/kern/sysv_sem.c
==
--- head/sys/kern/sysv_sem.cSun Nov 14 05:05:41 2010(r215280)
+++ head/sys/kern/sysv_sem.cSun Nov 14 06:09:50 2010(r215281)
@@ -212,7 +212,7 @@ SYSCTL_INT(_kern_ipc, OID_AUTO, semvmx, 
 SYSCTL_INT(_kern_ipc, OID_AUTO, semaem, CTLFLAG_RW, seminfo.semaem, 0,
 Adjust on exit max value);
 SYSCTL_PROC(_kern_ipc, OID_AUTO, sema, CTLFLAG_RD,
-NULL, 0, sysctl_sema, , );
+NULL, 0, sysctl_sema, , Semaphore id pool);
 
 static struct syscall_helper_data sem_syscalls[] = {
SYSCALL_INIT_HELPER(__semctl),

Modified: head/sys/kern/vfs_cache.c
==
--- head/sys/kern/vfs_cache.c   Sun Nov 14 05:05:41 2010(r215280)
+++ head/sys/kern/vfs_cache.c   Sun Nov 14 06:09:50 2010(r215281)
@@ -184,27 +184,27 @@ SYSCTL_INT(_debug, OID_AUTO, vfscache, C
 
 /* Export size information to userland */
 SYSCTL_INT(_debug_sizeof, OID_AUTO, namecache, CTLFLAG_RD, 0,
-   sizeof(struct namecache), );
+   

svn commit: r215282 - head/sys/kern

2010-11-13 Thread Bruce Cran
Author: brucec
Date: Sun Nov 14 07:38:42 2010
New Revision: 215282
URL: http://svn.freebsd.org/changeset/base/215282

Log:
  Add descriptions to some more sysctls.
  
  PR:   kern/148510
  MFC after:1 week

Modified:
  head/sys/kern/vfs_subr.c

Modified: head/sys/kern/vfs_subr.c
==
--- head/sys/kern/vfs_subr.cSun Nov 14 06:09:50 2010(r215281)
+++ head/sys/kern/vfs_subr.cSun Nov 14 07:38:42 2010(r215282)
@@ -121,7 +121,7 @@ static void destroy_vpollinfo(struct vpo
  */
 static unsigned long   numvnodes;
 
-SYSCTL_LONG(_vfs, OID_AUTO, numvnodes, CTLFLAG_RD, numvnodes, 0, );
+SYSCTL_LONG(_vfs, OID_AUTO, numvnodes, CTLFLAG_RD, numvnodes, 0, Number of 
vnodes in existence);
 
 /*
  * Conversion tables for conversion from vnode types to inode formats
@@ -150,7 +150,7 @@ static u_long wantfreevnodes;
 SYSCTL_LONG(_vfs, OID_AUTO, wantfreevnodes, CTLFLAG_RW, wantfreevnodes, 0, 
);
 /* Number of vnodes in the free list. */
 static u_long freevnodes;
-SYSCTL_LONG(_vfs, OID_AUTO, freevnodes, CTLFLAG_RD, freevnodes, 0, );
+SYSCTL_LONG(_vfs, OID_AUTO, freevnodes, CTLFLAG_RD, freevnodes, 0, Number of 
vnodes in the free list);
 
 static int vlru_allow_cache_src;
 SYSCTL_INT(_vfs, OID_AUTO, vlru_allow_cache_src, CTLFLAG_RW,
@@ -162,7 +162,7 @@ SYSCTL_INT(_vfs, OID_AUTO, vlru_allow_ca
  * XXX these are probably of (very) limited utility now.
  */
 static int reassignbufcalls;
-SYSCTL_INT(_vfs, OID_AUTO, reassignbufcalls, CTLFLAG_RW, reassignbufcalls, 0, 
);
+SYSCTL_INT(_vfs, OID_AUTO, reassignbufcalls, CTLFLAG_RW, reassignbufcalls, 0, 
Number of calls to reassignbuf);
 
 /*
  * Cache for the mount type id assigned to NFS.  This is used for
@@ -237,14 +237,14 @@ static struct cv sync_wakeup;
 static int syncer_maxdelay = SYNCER_MAXDELAY;  /* maximum delay time */
 static int syncdelay = 30; /* max time to delay syncing data */
 static int filedelay = 30; /* time to delay syncing files */
-SYSCTL_INT(_kern, OID_AUTO, filedelay, CTLFLAG_RW, filedelay, 0, );
+SYSCTL_INT(_kern, OID_AUTO, filedelay, CTLFLAG_RW, filedelay, 0, Time to 
delay syncing files (in seconds));
 static int dirdelay = 29;  /* time to delay syncing directories */
-SYSCTL_INT(_kern, OID_AUTO, dirdelay, CTLFLAG_RW, dirdelay, 0, );
+SYSCTL_INT(_kern, OID_AUTO, dirdelay, CTLFLAG_RW, dirdelay, 0, Time to delay 
syncing directories (in seconds));
 static int metadelay = 28; /* time to delay syncing metadata */
-SYSCTL_INT(_kern, OID_AUTO, metadelay, CTLFLAG_RW, metadelay, 0, );
+SYSCTL_INT(_kern, OID_AUTO, metadelay, CTLFLAG_RW, metadelay, 0, Time to 
delay syncing metadata (in seconds));
 static int rushjob;/* number of slots to run ASAP */
 static int stat_rush_requests; /* number of times I/O speeded up */
-SYSCTL_INT(_debug, OID_AUTO, rush_requests, CTLFLAG_RW, stat_rush_requests, 
0, );
+SYSCTL_INT(_debug, OID_AUTO, rush_requests, CTLFLAG_RW, stat_rush_requests, 
0, Number of times I/O speeded up (rush requests));
 
 /*
  * When shutting down the syncer, run it at four times normal speed.
@@ -544,7 +544,7 @@ enum { TSP_SEC, TSP_HZ, TSP_USEC, TSP_NS
 
 static int timestamp_precision = TSP_SEC;
 SYSCTL_INT(_vfs, OID_AUTO, timestamp_precision, CTLFLAG_RW,
-timestamp_precision, 0, );
+timestamp_precision, 0, File timestamp precision (0: seconds, 1: sec + 
ns accurate to 1/HZ, 2: sec + ns truncated to ms, 3+: sec + ns (max. 
precision)));
 
 /*
  * Get a current timestamp.
@@ -2376,7 +2376,7 @@ vinactive(struct vnode *vp, struct threa
  */
 #ifdef DIAGNOSTIC
 static int busyprt = 0;/* print out busy vnodes */
-SYSCTL_INT(_debug, OID_AUTO, busyprt, CTLFLAG_RW, busyprt, 0, );
+SYSCTL_INT(_debug, OID_AUTO, busyprt, CTLFLAG_RW, busyprt, 0, Print out busy 
vnodes);
 #endif
 
 int
@@ -3712,17 +3712,17 @@ extattr_check_cred(struct vnode *vp, int
(vp)-v_type == VCHR || (vp)-v_type == VBAD)
 
 int vfs_badlock_ddb = 1;   /* Drop into debugger on violation. */
-SYSCTL_INT(_debug, OID_AUTO, vfs_badlock_ddb, CTLFLAG_RW, vfs_badlock_ddb, 0, 
);
+SYSCTL_INT(_debug, OID_AUTO, vfs_badlock_ddb, CTLFLAG_RW, vfs_badlock_ddb, 0, 
Drop into debugger on lock violation);
 
 int vfs_badlock_mutex = 1; /* Check for interlock across VOPs. */
-SYSCTL_INT(_debug, OID_AUTO, vfs_badlock_mutex, CTLFLAG_RW, 
vfs_badlock_mutex, 0, );
+SYSCTL_INT(_debug, OID_AUTO, vfs_badlock_mutex, CTLFLAG_RW, 
vfs_badlock_mutex, 0, Check for interlock across VOPs);
 
 int vfs_badlock_print = 1; /* Print lock violations. */
-SYSCTL_INT(_debug, OID_AUTO, vfs_badlock_print, CTLFLAG_RW, 
vfs_badlock_print, 0, );
+SYSCTL_INT(_debug, OID_AUTO, vfs_badlock_print, CTLFLAG_RW, 
vfs_badlock_print, 0, Print lock violations);
 
 #ifdef KDB
 int vfs_badlock_backtrace = 1; /* Print backtrace at lock violations. */
-SYSCTL_INT(_debug, OID_AUTO, vfs_badlock_backtrace, CTLFLAG_RW, 
vfs_badlock_backtrace, 0, );

  1   2   >