svn commit: r189758 - head/sys/fs/nullfs

2009-03-13 Thread Attilio Rao
Author: attilio
Date: Fri Mar 13 07:09:20 2009
New Revision: 189758
URL: http://svn.freebsd.org/changeset/base/189758

Log:
  Remove the null_islocked() overloaded vop because the standard one does
  the same.

Modified:
  head/sys/fs/nullfs/null_vnops.c

Modified: head/sys/fs/nullfs/null_vnops.c
==
--- head/sys/fs/nullfs/null_vnops.c Fri Mar 13 06:28:20 2009
(r189757)
+++ head/sys/fs/nullfs/null_vnops.c Fri Mar 13 07:09:20 2009
(r189758)
@@ -614,14 +614,6 @@ null_unlock(struct vop_unlock_args *ap)
return (error);
 }
 
-static int
-null_islocked(struct vop_islocked_args *ap)
-{
-   struct vnode *vp = ap->a_vp;
-
-   return (lockstatus(vp->v_vnlock));
-}
-
 /*
  * There is no way to tell that someone issued remove/rmdir operation
  * on the underlying filesystem. For now we just have to release lowervp
@@ -732,7 +724,6 @@ struct vop_vector null_vnodeops = {
.vop_getattr =  null_getattr,
.vop_getwritemount =null_getwritemount,
.vop_inactive = null_inactive,
-   .vop_islocked = null_islocked,
.vop_lock1 =null_lock,
.vop_lookup =   null_lookup,
.vop_open = null_open,
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r189759 - in head: etc etc/defaults share/man/man5

2009-03-13 Thread Brooks Davis
Author: brooks
Date: Fri Mar 13 07:12:25 2009
New Revision: 189759
URL: http://svn.freebsd.org/changeset/base/189759

Log:
  Add support for setting the debug flags on wlan interfaces after the are
  created using wlandebug_ variables.

Modified:
  head/etc/defaults/rc.conf
  head/etc/network.subr
  head/share/man/man5/rc.conf.5

Modified: head/etc/defaults/rc.conf
==
--- head/etc/defaults/rc.conf   Fri Mar 13 07:09:20 2009(r189758)
+++ head/etc/defaults/rc.conf   Fri Mar 13 07:12:25 2009(r189759)
@@ -197,6 +197,7 @@ ifconfig_lo0="inet 127.0.0.1"   # default 
 #ifconfig_ed0_ipx="ipx 0x00010010" # Sample IPX address family entry.
 #ifconfig_fxp0_name="net0" # Change interface name from fxp0 to net0.
 #wlans_ath0="wlan0"# wlan(4) interfaces for ath0 device
+#wlandebug_wlan0="scan+auth+assoc" # Set debug flags with wlanddebug(8)
 #ipv4_addrs_fxp0="192.168.0.1/24 192.168.1.1-5/28" # example IPv4 address 
entry.
 #
 #autobridge_interfaces="bridge0"   # List of bridges to check 

Modified: head/etc/network.subr
==
--- head/etc/network.subr   Fri Mar 13 07:09:20 2009(r189758)
+++ head/etc/network.subr   Fri Mar 13 07:12:25 2009(r189759)
@@ -499,7 +499,7 @@ clone_down()
 #
 childif_create()
 {
-   local cfg child child_wlans create_args ifn i
+   local cfg child child_wlans create_args debug_flags ifn i
cfg=1
 
ifn=$1
@@ -509,10 +509,18 @@ childif_create()
 
for child in ${child_wlans}; do
create_args="wlandev $ifn `get_if_var $child create_args_IF`"
+   debug_flags="`get_if_var $child wlandebug_IF`"
+
if expr $child : 'wlan[0-9][0-9]*$' >/dev/null 2>&1; then
ifconfig $child create ${create_args} && cfg=0
+   if [ -n "${debug_flags}" ]; then
+   wlandebug -i $child ${debug_flags}
+   fi
else
i=`ifconfig wlan create ${create_args}`
+   if [ -n "${debug_flags}" ]; then
+   wlandebug -i $i ${debug_flags}
+   fi
ifconfig $i name $child && cfg=0
fi
if autoif $child; then

Modified: head/share/man/man5/rc.conf.5
==
--- head/share/man/man5/rc.conf.5   Fri Mar 13 07:09:20 2009
(r189758)
+++ head/share/man/man5/rc.conf.5   Fri Mar 13 07:12:25 2009
(r189759)
@@ -1169,6 +1169,15 @@ One or more
 .Xr wlan 4
 devices must be created for each wireless devices as of
 .Fx 8.0 .
+Debugging flags for
+.Xr wlan 4
+devices as set by
+.Xr wlandebug 8
+may be specified with an
+.Va wlandebug_ Ns Aq Ar interface
+variable.
+The contents of this variable will be passed directly to
+.Xr wlandebug 8 .
 .Pp
 If the
 .Va ifconfig_ Ns Aq Ar interface
@@ -4065,6 +4074,7 @@ Default
 .Xr sysctl 8 ,
 .Xr syslogd 8 ,
 .Xr timed 8 ,
+.Xr wlandebug 8 ,
 .Xr yp 8 ,
 .Xr ypbind 8 ,
 .Xr ypserv 8 ,
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r189760 - head

2009-03-13 Thread Warner Losh
Author: imp
Date: Fri Mar 13 07:23:58 2009
New Revision: 189760
URL: http://svn.freebsd.org/changeset/base/189760

Log:
  Implement the xdev target.  When you define XDEV=arch XDEV_ARCH=arch,
  you can build the cross development tools and install them as
  $XDEV-freebsd-xxx for each tool.  This allows one to use autoconf to
  find the tools for cross building scenarios.

Modified:
  head/Makefile
  head/Makefile.inc1

Modified: head/Makefile
==
--- head/Makefile   Fri Mar 13 07:12:25 2009(r189759)
+++ head/Makefile   Fri Mar 13 07:23:58 2009(r189760)
@@ -88,7 +88,7 @@ TGTS= all all-man buildenv buildenvvars 
obj objlink regress rerelease showconfig tags toolchain update \
_worldtmp _legacy _bootstrap-tools _cleanobj _obj \
_build-tools _cross-tools _includes _libraries _depend \
-   build32 distribute32 install32
+   build32 distribute32 install32 xdev xdev-build xdev-install
 TGTS+= ${SUBDIR_TARGETS}
 
 BITGTS=files includes

Modified: head/Makefile.inc1
==
--- head/Makefile.inc1  Fri Mar 13 07:12:25 2009(r189759)
+++ head/Makefile.inc1  Fri Mar 13 07:23:58 2009(r189760)
@@ -1328,3 +1328,89 @@ check-old: check-old-files check-old-lib
 #
 showconfig:
@${MAKE} -n -f bsd.own.mk -V dummy -dg1 | grep ^MK_ | sort
+
+
+###
+
+.if defined(XDEV) && defined(XDEV_ARCH)
+
+NOFUN=-DNO_FSCHG -DWITHOUT_HTML -DWITHOUT_INFO -DNO_LINT \
+   -DWITHOUT_MAN -DWITHOUT_NLS -DWITHOUT_PROFILE \
+   -DWITHOUT_KERBEROS -DWITHOUT_RESCUE -DNO_WARNS
+
+XDDIR=${XDEV}-freebsd
+XDTP=/usr/${XDDIR}
+CDBENV=MAKEOBJDIRPREFIX=${MAKEOBJDIRPREFIX}/${XDDIR} \
+   TARGET=${XDEV} TARGET_ARCH=${XDEV_ARCH}
+CDENV= ${CDBENV} \
+   _SHLIBDIRPREFIX=${XDTP} \
+   TOOLS_PREFIX=${XDTP}
+CD2ENV=${CDENV} \
+   MACHINE=${XDEV} MACHINE_ARCH=${XDEV_ARCH}
+
+CDTMP= ${MAKEOBJDIRPREFIX}/${XDEV}/${.CURDIR}/tmp
+CDMAKE=${CDENV} ${MAKE} ${NOFUN}
+CD2MAKE=${CD2ENV} PATH=${CDTMP}/usr/bin:${XDTP}/usr/bin:${PATH} ${MAKE} 
${NOFUN}
+XDDESTDIR=${DESTDIR}${XDTP}
+
+.ORDER: xdev-build xdev-install
+xdev: xdev-build xdev-install
+
+.ORDER: _xb-build-tools _xb-cross-tools
+xdev-build: _xb-build-tools _xb-cross-tools
+
+_xb-build-tools:
+   ${_+_}cd ${.CURDIR}; \
+   ${CDBENV} ${MAKE} -f Makefile.inc1 ${NOFUN} build-tools
+
+_xb-cross-tools:
+.for _tool in \
+gnu/usr.bin/binutils \
+gnu/usr.bin/cc
+   ${_...@${echodir} "===> xdev ${_tool} (obj,depend,all)"; \
+   cd ${.CURDIR}/${_tool}; \
+   ${CDMAKE} DIRPRFX=${_tool}/ obj; \
+   ${CDMAKE} DIRPRFX=${_tool}/ depend; \
+   ${CDMAKE} DIRPRFX=${_tool}/ all
+.endfor
+
+_xi-mtree:
+   ${_...@${echodir} "mtree populating ${XDDESTDIR}"
+   mkdir -p ${XDDESTDIR}
+   mtree -deU -f ${.CURDIR}/etc/mtree/BSD.root.dist \
+   -p ${XDDESTDIR} >/dev/null
+   mtree -deU -f ${.CURDIR}/etc/mtree/BSD.usr.dist \
+   -p ${XDDESTDIR}/usr >/dev/null
+   mtree -deU -f ${.CURDIR}/etc/mtree/BSD.include.dist \
+   -p ${XDDESTDIR}/usr/include >/dev/null
+
+.ORDER: _xi-mtree _xi-cross-tools _xi-includes _xi-libraries _xi-links
+xdev-install: _xi-mtree _xi-cross-tools _xi-includes _xi-libraries _xi-links
+
+_xi-cross-tools:
+   @echo "_xi-cross-tools"
+.for _tool in \
+gnu/usr.bin/binutils \
+gnu/usr.bin/cc
+   ${_...@${echodir} "===> xdev ${_tool} (install)"; \
+   cd ${.CURDIR}/${_tool}; \
+   ${CDMAKE} DIRPRFX=${_tool}/ install DESTDIR=${XDDESTDIR}
+.endfor
+
+_xi-includes:
+   ${_+_}cd ${.CURDIR}; ${CD2MAKE} -f Makefile.inc1 par-includes \
+   DESTDIR=${XDDESTDIR}
+
+_xi-libraries:
+   ${_+_}cd ${.CURDIR}; ${CD2MAKE} -f Makefile.inc1 libraries \
+   DESTDIR=${XDDESTDIR}
+
+_xi-links:
+   ${_+_}cd ${XDDESTDIR}/usr/bin; \
+   for i in *; do \
+   ln -sf ../../${XDTP}/usr/bin/$$i \
+   ../../../../usr/bin/${XDDIR}-$$i; \
+   ln -sf ../../${XDTP}/usr/bin/$$i \
+   ../../../../usr/bin/${XDDIR}${OSREL}-$$i; \
+   done
+.endif
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r189761 - head/usr.sbin/mergemaster

2009-03-13 Thread Doug Barton
Author: dougb
Date: Fri Mar 13 07:34:05 2009
New Revision: 189761
URL: http://svn.freebsd.org/changeset/base/189761

Log:
  When using the -D option:
  1. The new mtree file should be created in the "host" system /tmp
  2. The existing mtree file in the "host" system should not be deleted
  
  Submitted by: scf

Modified:
  head/usr.sbin/mergemaster/mergemaster.sh

Modified: head/usr.sbin/mergemaster/mergemaster.sh
==
--- head/usr.sbin/mergemaster/mergemaster.shFri Mar 13 07:23:58 2009
(r189760)
+++ head/usr.sbin/mergemaster/mergemaster.shFri Mar 13 07:34:05 2009
(r189761)
@@ -671,7 +671,7 @@ find ${TEMPROOT} -type f -size 0 -delete
 # Build the mtree database in a temporary location.
 MTREENEW=`mktemp -t mergemaster.mtree`
 case "${PRE_WORLD}" in
-'') mtree -ci -p ${TEMPROOT} -k size,md5digest > ${DESTDIR}${MTREENEW} 
2>/dev/null
+'') mtree -ci -p ${TEMPROOT} -k size,md5digest > ${MTREENEW} 2>/dev/null
 ;;
 *) # We don't want to mess with the mtree database on a pre-world run.
;;
@@ -1037,10 +1037,10 @@ done # This is for the do way up there a
 echo ''
 echo "*** Comparison complete"
 
-if [ -f "${DESTDIR}${MTREENEW}" ]; then
+if [ -f "${MTREENEW}" ]; then
   echo "*** Saving mtree database for future upgrades"
-  test -e "${MTREEFILE}" && unlink ${MTREEFILE}
-  mv ${DESTDIR}${MTREENEW} ${DESTDIR}${MTREEFILE}
+  test -e "${DESTDIR}${MTREEFILE}" && unlink ${DESTDIR}${MTREEFILE}
+  mv ${MTREENEW} ${DESTDIR}${MTREEFILE}
 fi
 
 echo ''
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r189762 - head/sys/geom/eli

2009-03-13 Thread Guido van Rooij
Author: guido
Date: Fri Mar 13 08:13:51 2009
New Revision: 189762
URL: http://svn.freebsd.org/changeset/base/189762

Log:
  Backout this commit whil a better solution is developed

Modified:
  head/sys/geom/eli/g_eli.c

Modified: head/sys/geom/eli/g_eli.c
==
--- head/sys/geom/eli/g_eli.c   Fri Mar 13 07:34:05 2009(r189761)
+++ head/sys/geom/eli/g_eli.c   Fri Mar 13 08:13:51 2009(r189762)
@@ -996,7 +996,6 @@ g_eli_taste(struct g_class *mp, struct g
/*
 * We have correct key, let's attach provider.
 */
-   md.md_flags |= G_ELI_FLAG_WO_DETACH;
gp = g_eli_create(NULL, mp, pp, &md, mkey, nkey);
bzero(mkey, sizeof(mkey));
bzero(&md, sizeof(md));
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r189763 - head/usr.sbin/mergemaster

2009-03-13 Thread Doug Barton
Author: dougb
Date: Fri Mar 13 08:48:33 2009
New Revision: 189763
URL: http://svn.freebsd.org/changeset/base/189763

Log:
  1. Clean up usage() output a bit by grouping options that take an argument
  2. Fix a comment to refer to the right loop

Modified:
  head/usr.sbin/mergemaster/mergemaster.sh

Modified: head/usr.sbin/mergemaster/mergemaster.sh
==
--- head/usr.sbin/mergemaster/mergemaster.shFri Mar 13 08:13:51 2009
(r189762)
+++ head/usr.sbin/mergemaster/mergemaster.shFri Mar 13 08:48:33 2009
(r189763)
@@ -15,8 +15,8 @@ PATH=/bin:/usr/bin:/usr/sbin
 display_usage () {
   VERSION_NUMBER=`grep "[$]FreeBSD:" $0 | cut -d ' ' -f 4`
   echo "mergemaster version ${VERSION_NUMBER}"
-  echo 'Usage: mergemaster [-scrvahipCP] [-m /path]'
-  echo ' [-t /path] [-d] [-u N] [-w N] [-D /path]'
+  echo 'Usage: mergemaster [-scrvahipCPU]'
+  echo '[-m /path] [-t /path] [-d] [-u N] [-w N] [-A arch] [-D /path]'
   echo "Options:"
   echo "  -s  Strict comparison (diff every pair of files)"
   echo "  -c  Use context diff instead of unified diff"
@@ -28,6 +28,8 @@ display_usage () {
   echo '  -p  Pre-buildworld mode, only compares crucial files'
   echo '  -C  Compare local rc.conf variables to the defaults'
   echo '  -P  Preserve files that are overwritten'
+  echo "  -U  Attempt to auto upgrade files that have not been user modified"
+  echo ''
   echo "  -m /path/directory  Specify location of source to do the make in"
   echo "  -t /path/directory  Specify temp root directory"
   echo "  -d  Add date and time to directory name (e.g., 
/var/tmp/temproot.`date +%m%d.%H.%M`)"
@@ -35,7 +37,6 @@ display_usage () {
   echo "  -w N  Specify a screen width in columns to sdiff"
   echo "  -A architecture  Alternative architecture name to pass to make"
   echo '  -D /path/directory  Specify the destination directory to install 
files to'
-  echo "  -U Attempt to auto upgrade files that have not been user modified."
   echo ''
 }
 
@@ -1032,7 +1033,7 @@ for COMPFILE in `find . -type f -size +0
   esac # Auto run test
 fi # Yes, the files are different
   fi # Yes, the file still remains to be checked
-done # This is for the do way up there at the beginning of the comparison
+done # This is for the for way up there at the beginning of the comparison
 
 echo ''
 echo "*** Comparison complete"
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r189764 - head

2009-03-13 Thread Ruslan Ermilov
Author: ru
Date: Fri Mar 13 10:09:08 2009
New Revision: 189764
URL: http://svn.freebsd.org/changeset/base/189764

Log:
  Don't put "install-info" to the list of install-tools if we're
  installing with -DWITHOUT_INFO, otherwise one can experience a
  failure trying to installworld on a system that is built with
  -DWITHOUT_INFO (i.e., without /usr/bin/install-info).
  
  Reported by:  bland
  MFC after:3 days

Modified:
  head/Makefile.inc1

Modified: head/Makefile.inc1
==
--- head/Makefile.inc1  Fri Mar 13 08:48:33 2009(r189763)
+++ head/Makefile.inc1  Fri Mar 13 10:09:08 2009(r189764)
@@ -612,8 +612,12 @@ installcheck_UGID:
 #
 # Required install tools to be saved in a scratch dir for safety.
 #
+.if ${MK_INFO} != "no"
+_install-info= install-info
+.endif
+
 ITOOLS=[ awk cap_mkdb cat chflags chmod chown \
-   date echo egrep find grep install-info \
+   date echo egrep find grep ${_install-info} \
ln lockf make mkdir mtree mv pwd_mkdb rm sed sh sysctl \
test true uname wc zic
 
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r189765 - in head: . lib/libc lib/libc/nls

2009-03-13 Thread Gabor Kovesdan
Author: gabor (doc,ports committer)
Date: Fri Mar 13 10:40:38 2009
New Revision: 189765
URL: http://svn.freebsd.org/changeset/base/189765

Log:
  - Reenable Native Language Support in libc.  This feature was disabled due
to possible breakages in the catalog handling code.  Since then, that
code has been replaced by the secure code from NetBSD but NLS in libc
remained turned off.  Tests have shown that the feature is stable and
working so we can now turn it on again.
  
  - Add several new catalog files:
- ca_ES.ISO8859-1
- de_DE.ISO8859-1
- el_GR.ISO8859-7  (by manolis@ and keramida@)
- es_ES.ISO8859-1  (kern/123179, by carvay@)
- fi_FI.ISO8859-1
- fr_FR.ISO8859-1  (kern/78756, by thierry@)
- hu_HU.ISO8859-2  (by gabor@)
- it_IT.ISO8859-15
- nl_NL.ISO8859-1  (corrections by rene@)
- no_NO.ISO8859-1
- mn_MN.UTF-8  (by ganbold@)
- sk_SK.ISO8859-2
- sv_SE.ISO8859-1
(The catalogs without explicit source has been obtained from NetBSD.)
  
  Approved by:  attilio

Added:
  head/lib/libc/nls/ca_ES.ISO8859-1.msg   (contents, props changed)
  head/lib/libc/nls/de_DE.ISO8859-1.msg   (contents, props changed)
  head/lib/libc/nls/el_GR.ISO8859-7.msg   (contents, props changed)
  head/lib/libc/nls/es_ES.ISO8859-1.msg   (contents, props changed)
  head/lib/libc/nls/fi_FI.ISO8859-1.msg   (contents, props changed)
  head/lib/libc/nls/fr_FR.ISO8859-1.msg   (contents, props changed)
  head/lib/libc/nls/hu_HU.ISO8859-2.msg   (contents, props changed)
  head/lib/libc/nls/it_IT.ISO8859-15.msg   (contents, props changed)
  head/lib/libc/nls/mn_MN.UTF-8.msg   (contents, props changed)
  head/lib/libc/nls/nl_NL.ISO8859-1.msg   (contents, props changed)
  head/lib/libc/nls/no_NO.ISO8859-1.msg   (contents, props changed)
  head/lib/libc/nls/sk_SK.ISO8859-2.msg   (contents, props changed)
  head/lib/libc/nls/sv_SE.ISO8859-1.msg   (contents, props changed)
Modified:
  head/Makefile.inc1
  head/lib/libc/Makefile
  head/lib/libc/nls/Makefile.inc

Modified: head/Makefile.inc1
==
--- head/Makefile.inc1  Fri Mar 13 10:09:08 2009(r189764)
+++ head/Makefile.inc1  Fri Mar 13 10:40:38 2009(r189765)
@@ -232,7 +232,7 @@ BMAKE=  MAKEOBJDIRPREFIX=${WORLDTMP} \
BOOTSTRAPPING=${OSRELDATE} \
SSP_CFLAGS= \
-DWITHOUT_HTML -DWITHOUT_INFO -DNO_LINT -DWITHOUT_MAN \
-   -DWITHOUT_NLS -DNO_PIC -DWITHOUT_PROFILE -DNO_SHARED \
+   -DNO_PIC -DWITHOUT_PROFILE -DNO_SHARED \
-DNO_CPU_CFLAGS -DNO_WARNS -DNO_CTF
 
 # build-tools stage
@@ -291,7 +291,7 @@ LIB32WMAKEENV=  MAKEOBJDIRPREFIX=${OBJTRE
SHLIBDIR=/usr/lib32
 
 LIB32WMAKE=${LIB32WMAKEENV} ${MAKE} -DNO_CPU_CFLAGS -DCOMPAT_32BIT \
-   -DWITHOUT_BIND -DWITHOUT_MAN -DWITHOUT_NLS -DWITHOUT_INFO \
+   -DWITHOUT_BIND -DWITHOUT_MAN -DWITHOUT_INFO \
-DWITHOUT_HTML -DNO_CTF DESTDIR=${LIB32TMP}
 LIB32IMAKE=${LIB32WMAKE:NINSTALL=*:NDESTDIR=*} -DNO_INCS
 .endif
@@ -429,7 +429,7 @@ _libraries:
@echo "--"
${_+_}cd ${.CURDIR}; \
${WMAKE} -DNO_FSCHG -DWITHOUT_HTML -DWITHOUT_INFO -DNO_LINT \
-   -DWITHOUT_MAN -DWITHOUT_NLS -DWITHOUT_PROFILE libraries
+   -DWITHOUT_MAN -DWITHOUT_PROFILE libraries
 _depend:
@echo
@echo "--"

Modified: head/lib/libc/Makefile
==
--- head/lib/libc/Makefile  Fri Mar 13 10:09:08 2009(r189764)
+++ head/lib/libc/Makefile  Fri Mar 13 10:40:38 2009(r189765)
@@ -16,6 +16,7 @@ SHLIB_MAJOR= 7
 WARNS?=2
 CFLAGS+=-I${.CURDIR}/include -I${.CURDIR}/../../include
 CFLAGS+=-I${.CURDIR}/${MACHINE_ARCH}
+CFLAGS+=-DNLS
 CLEANFILES+=tags
 INSTALL_PIC_ARCHIVE=
 PRECIOUSLIB=

Modified: head/lib/libc/nls/Makefile.inc
==
--- head/lib/libc/nls/Makefile.inc  Fri Mar 13 10:09:08 2009
(r189764)
+++ head/lib/libc/nls/Makefile.inc  Fri Mar 13 10:40:38 2009
(r189765)
@@ -8,3 +8,31 @@ SRCS+= msgcat.c
 SYM_MAPS+=${.CURDIR}/nls/Symbol.map
 
 MAN+=  catclose.3 catgets.3 catopen.3
+
+# NOTE: C.msg should not be processed here, it's used as a template
+#   for translators.
+
+NLSNAME=   libc
+NLS+=  ca_ES.ISO8859-1
+NLS+=  de_DE.ISO8859-1
+NLS+=  el_GR.ISO8859-7
+NLS+=  es_ES.ISO8859-1
+NLS+=  fi_FI.ISO8859-1
+NLS+=  fr_FR.ISO8859-1
+NLS+=  hu_HU.ISO8859-2
+NLS+=  it_IT.ISO8859-15
+NLS+=  ko_KR.UTF-8
+NLS+=  ko_KR.eucKR
+NLS+=  mn_MN.UTF-8
+NLS+=  nl_NL.ISO8859-1
+NLS+=  no_NO.ISO8859-1
+NLS+=  pl_PL.ISO8859-2
+NLS+=  ru_RU.KOI8-R
+NLS+=  sk_SK.ISO8859-2
+NLS+=  sv_SE.ISO8859-1
+
+beforeinstall:
+.for c in ${NLS}

svn commit: r189766 - in stable/7/sys: . contrib/pf dev/ath/ath_hal dev/cxgb fs/devfs kern sys

2009-03-13 Thread Konstantin Belousov
Author: kib
Date: Fri Mar 13 10:52:22 2009
New Revision: 189766
URL: http://svn.freebsd.org/changeset/base/189766

Log:
  MFC r189450:
  Extract the no_poll() and vop_nopoll() code into the common routine
  poll_no_poll().
  Return a poll_no_poll() result from devfs_poll_f() when
  filedescriptor does not reference the live cdev, instead of ENXIO.

Modified:
  stable/7/sys/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)
  stable/7/sys/dev/ath/ath_hal/   (props changed)
  stable/7/sys/dev/cxgb/   (props changed)
  stable/7/sys/fs/devfs/devfs_vnops.c
  stable/7/sys/kern/kern_conf.c
  stable/7/sys/kern/sys_generic.c
  stable/7/sys/kern/vfs_default.c
  stable/7/sys/sys/systm.h

Modified: stable/7/sys/fs/devfs/devfs_vnops.c
==
--- stable/7/sys/fs/devfs/devfs_vnops.c Fri Mar 13 10:40:38 2009
(r189765)
+++ stable/7/sys/fs/devfs/devfs_vnops.c Fri Mar 13 10:52:22 2009
(r189766)
@@ -973,7 +973,7 @@ devfs_poll_f(struct file *fp, int events
fpop = td->td_fpop;
error = devfs_fp_check(fp, &dev, &dsw);
if (error)
-   return (error);
+   return (poll_no_poll(events));
error = dsw->d_poll(dev, events, td);
td->td_fpop = fpop;
dev_relthread(dev);

Modified: stable/7/sys/kern/kern_conf.c
==
--- stable/7/sys/kern/kern_conf.c   Fri Mar 13 10:40:38 2009
(r189765)
+++ stable/7/sys/kern/kern_conf.c   Fri Mar 13 10:52:22 2009
(r189766)
@@ -313,18 +313,8 @@ no_strategy(struct bio *bp)
 static int
 no_poll(struct cdev *dev __unused, int events, struct thread *td __unused)
 {
-   /*
-* Return true for read/write.  If the user asked for something
-* special, return POLLNVAL, so that clients have a way of
-* determining reliably whether or not the extended
-* functionality is present without hard-coding knowledge
-* of specific filesystem implementations.
-* Stay in sync with vop_nopoll().
-*/
-   if (events & ~POLLSTANDARD)
-   return (POLLNVAL);
 
-   return (events & (POLLIN | POLLOUT | POLLRDNORM | POLLWRNORM));
+   return (poll_no_poll(events));
 }
 
 #define no_dump(dumper_t *)enodev

Modified: stable/7/sys/kern/sys_generic.c
==
--- stable/7/sys/kern/sys_generic.c Fri Mar 13 10:40:38 2009
(r189765)
+++ stable/7/sys/kern/sys_generic.c Fri Mar 13 10:52:22 2009
(r189766)
@@ -637,6 +637,22 @@ struct cv  selwait;
 u_int  nselcoll;   /* Select collisions since boot */
 SYSCTL_UINT(_kern, OID_AUTO, nselcoll, CTLFLAG_RD, &nselcoll, 0, "");
 
+int
+poll_no_poll(int events)
+{
+   /*
+* Return true for read/write.  If the user asked for something
+* special, return POLLNVAL, so that clients have a way of
+* determining reliably whether or not the extended
+* functionality is present without hard-coding knowledge
+* of specific filesystem implementations.
+*/
+   if (events & ~POLLSTANDARD)
+   return (POLLNVAL);
+
+   return (events & (POLLIN | POLLOUT | POLLRDNORM | POLLWRNORM));
+}
+
 #ifndef _SYS_SYSPROTO_H_
 struct select_args {
int nd;

Modified: stable/7/sys/kern/vfs_default.c
==
--- stable/7/sys/kern/vfs_default.c Fri Mar 13 10:40:38 2009
(r189765)
+++ stable/7/sys/kern/vfs_default.c Fri Mar 13 10:52:22 2009
(r189766)
@@ -344,18 +344,8 @@ vop_nopoll(ap)
struct thread *a_td;
} */ *ap;
 {
-   /*
-* Return true for read/write.  If the user asked for something
-* special, return POLLNVAL, so that clients have a way of
-* determining reliably whether or not the extended
-* functionality is present without hard-coding knowledge
-* of specific filesystem implementations.
-* Stay in sync with kern_conf.c::no_poll().
-*/
-   if (ap->a_events & ~POLLSTANDARD)
-   return (POLLNVAL);
 
-   return (ap->a_events & (POLLIN | POLLOUT | POLLRDNORM | POLLWRNORM));
+   return (poll_no_poll(ap->a_events));
 }
 
 /*

Modified: stable/7/sys/sys/systm.h
==
--- stable/7/sys/sys/systm.hFri Mar 13 10:40:38 2009(r189765)
+++ stable/7/sys/sys/systm.hFri Mar 13 10:52:22 2009(r189766)
@@ -321,6 +321,8 @@ int uminor(dev_t dev);
 int umajor(dev_t dev);
 const char *devtoname(struct cdev *cdev);
 
+int poll_no_poll(int events);
+
 /* XXX: Should be void nanodelay(u_int nsec); */
 void   DELAY(int usec);
 
___
svn-src-all@freebsd.org mailing list
http://li

Re: svn commit: r189765 - in head: . lib/libc lib/libc/nls

2009-03-13 Thread Robert Watson


On Fri, 13 Mar 2009, Gabor Kovesdan wrote:


 - Reenable Native Language Support in libc.  This feature was disabled due
   to possible breakages in the catalog handling code.  Since then, that
   code has been replaced by the secure code from NetBSD but NLS in libc
   remained turned off.  Tests have shown that the feature is stable and
   working so we can now turn it on again.


Do we have a nice tutorialish document somewhere on what people writing new 
command line tools or libraries should do in order to address localization 
requirements, or at least, make it easier for other people to do so?  I'm 
afraid I, at least, live in a world without catalogues, but a quick and 
practical guide to what The Right Thing Is for FreeBSD would make it much 
easier for me to do something a bit more mature.


Thanks,

Robert N M Watson
Computer Laboratory
University of Cambridge



 - Add several new catalog files:
   - ca_ES.ISO8859-1
   - de_DE.ISO8859-1
   - el_GR.ISO8859-7  (by manolis@ and keramida@)
   - es_ES.ISO8859-1  (kern/123179, by carvay@)
   - fi_FI.ISO8859-1
   - fr_FR.ISO8859-1  (kern/78756, by thierry@)
   - hu_HU.ISO8859-2  (by gabor@)
   - it_IT.ISO8859-15
   - nl_NL.ISO8859-1  (corrections by rene@)
   - no_NO.ISO8859-1
   - mn_MN.UTF-8  (by ganbold@)
   - sk_SK.ISO8859-2
   - sv_SE.ISO8859-1
   (The catalogs without explicit source has been obtained from NetBSD.)

 Approved by:   attilio

Added:
 head/lib/libc/nls/ca_ES.ISO8859-1.msg   (contents, props changed)
 head/lib/libc/nls/de_DE.ISO8859-1.msg   (contents, props changed)
 head/lib/libc/nls/el_GR.ISO8859-7.msg   (contents, props changed)
 head/lib/libc/nls/es_ES.ISO8859-1.msg   (contents, props changed)
 head/lib/libc/nls/fi_FI.ISO8859-1.msg   (contents, props changed)
 head/lib/libc/nls/fr_FR.ISO8859-1.msg   (contents, props changed)
 head/lib/libc/nls/hu_HU.ISO8859-2.msg   (contents, props changed)
 head/lib/libc/nls/it_IT.ISO8859-15.msg   (contents, props changed)
 head/lib/libc/nls/mn_MN.UTF-8.msg   (contents, props changed)
 head/lib/libc/nls/nl_NL.ISO8859-1.msg   (contents, props changed)
 head/lib/libc/nls/no_NO.ISO8859-1.msg   (contents, props changed)
 head/lib/libc/nls/sk_SK.ISO8859-2.msg   (contents, props changed)
 head/lib/libc/nls/sv_SE.ISO8859-1.msg   (contents, props changed)
Modified:
 head/Makefile.inc1
 head/lib/libc/Makefile
 head/lib/libc/nls/Makefile.inc

Modified: head/Makefile.inc1
==
--- head/Makefile.inc1  Fri Mar 13 10:09:08 2009(r189764)
+++ head/Makefile.inc1  Fri Mar 13 10:40:38 2009(r189765)
@@ -232,7 +232,7 @@ BMAKE=  MAKEOBJDIRPREFIX=${WORLDTMP} \
BOOTSTRAPPING=${OSRELDATE} \
SSP_CFLAGS= \
-DWITHOUT_HTML -DWITHOUT_INFO -DNO_LINT -DWITHOUT_MAN \
-   -DWITHOUT_NLS -DNO_PIC -DWITHOUT_PROFILE -DNO_SHARED \
+   -DNO_PIC -DWITHOUT_PROFILE -DNO_SHARED \
-DNO_CPU_CFLAGS -DNO_WARNS -DNO_CTF

# build-tools stage
@@ -291,7 +291,7 @@ LIB32WMAKEENV=  MAKEOBJDIRPREFIX=${OBJTRE
SHLIBDIR=/usr/lib32

LIB32WMAKE= ${LIB32WMAKEENV} ${MAKE} -DNO_CPU_CFLAGS -DCOMPAT_32BIT \
-   -DWITHOUT_BIND -DWITHOUT_MAN -DWITHOUT_NLS -DWITHOUT_INFO \
+   -DWITHOUT_BIND -DWITHOUT_MAN -DWITHOUT_INFO \
-DWITHOUT_HTML -DNO_CTF DESTDIR=${LIB32TMP}
LIB32IMAKE= ${LIB32WMAKE:NINSTALL=*:NDESTDIR=*} -DNO_INCS
.endif
@@ -429,7 +429,7 @@ _libraries:
@echo "--"
${_+_}cd ${.CURDIR}; \
${WMAKE} -DNO_FSCHG -DWITHOUT_HTML -DWITHOUT_INFO -DNO_LINT \
-   -DWITHOUT_MAN -DWITHOUT_NLS -DWITHOUT_PROFILE libraries
+   -DWITHOUT_MAN -DWITHOUT_PROFILE libraries
_depend:
@echo
@echo "--"

Modified: head/lib/libc/Makefile
==
--- head/lib/libc/Makefile  Fri Mar 13 10:09:08 2009(r189764)
+++ head/lib/libc/Makefile  Fri Mar 13 10:40:38 2009(r189765)
@@ -16,6 +16,7 @@ SHLIB_MAJOR= 7
WARNS?= 2
CFLAGS+=-I${.CURDIR}/include -I${.CURDIR}/../../include
CFLAGS+=-I${.CURDIR}/${MACHINE_ARCH}
+CFLAGS+=-DNLS
CLEANFILES+=tags
INSTALL_PIC_ARCHIVE=
PRECIOUSLIB=

Modified: head/lib/libc/nls/Makefile.inc
==
--- head/lib/libc/nls/Makefile.inc  Fri Mar 13 10:09:08 2009
(r189764)
+++ head/lib/libc/nls/Makefile.inc  Fri Mar 13 10:40:38 2009
(r189765)
@@ -8,3 +8,31 @@ SRCS+= msgcat.c
SYM_MAPS+=${.CURDIR}/nls/Symbol.map

MAN+=   catclose.3 catgets.3 catopen.3
+
+# NOTE: C.msg should not be processed here, it's used as a template
+#   for translators.
+
+NLSNAME=   libc
+NLS+=  ca_ES.ISO8859-1
+NLS+=  de_DE.ISO8859-1
+NLS+=  el_GR.ISO8859-7
+NLS+=  es_ES

Re: svn commit: r189761 - head/usr.sbin/mergemaster

2009-03-13 Thread Sean C. Farley

On Fri, 13 Mar 2009, Doug Barton wrote:


Author: dougb
Date: Fri Mar 13 07:34:05 2009
New Revision: 189761
URL: http://svn.freebsd.org/changeset/base/189761

Log:
 When using the -D option:
 1. The new mtree file should be created in the "host" system /tmp
 2. The existing mtree file in the "host" system should not be deleted

 Submitted by:  scf


Thank you!

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


svn commit: r189767 - head/share/misc

2009-03-13 Thread Ruslan Ermilov
Author: ru
Date: Fri Mar 13 14:35:58 2009
New Revision: 189767
URL: http://svn.freebsd.org/changeset/base/189767

Log:
  Switch to using official English short country names.

Modified:
  head/share/misc/iso3166

Modified: head/share/misc/iso3166
==
--- head/share/misc/iso3166 Fri Mar 13 10:52:22 2009(r189766)
+++ head/share/misc/iso3166 Fri Mar 13 14:35:58 2009(r189767)
@@ -13,7 +13,7 @@
 # been deleted unless necessary to distinguish two countries.
 #
 # The ISO3166 Maintenance Agency can be found at:
-#  http://www.iso.ch/iso/en/prods-services/iso3166ma/index.html
+#  http://www.iso.org/iso/country_codes.htm
 #
 # two  three   number  name
 AF AFG 004 Afghanistan
@@ -43,7 +43,7 @@ BJBEN 204 Benin
 BM BMU 060 Bermuda
 BT BTN 064 Bhutan
 BO BOL 068 Bolivia
-BA BIH 070 Bosnia and Herzegowina
+BA BIH 070 Bosnia and Herzegovina
 BW BWA 072 Botswana
 BV BVT 074 Bouvet Island
 BR BRA 076 Brazil
@@ -65,8 +65,8 @@ CXCXR 162 Christmas Island
 CC CCK 166 Cocos (Keeling) Islands
 CO COL 170 Colombia
 KM COM 174 Comoros
-CG COG 178 Congo (Rep.)
-CD COD 180 Congo (Dem. Rep.)
+CG COG 178 Congo
+CD COD 180 Congo, the Democratic Republic of the
 CK COK 184 Cook Islands
 CR CRI 188 Costa Rica
 CI CIV 384 Cote d'Ivoire
@@ -86,7 +86,7 @@ GQGNQ 226 Equatorial Guinea
 ER ERI 232 Eritrea
 EE EST 233 Estonia
 ET ETH 231 Ethiopia
-FK FLK 238 Falkland Islands
+FK FLK 238 Falkland Islands (Malvinas)
 FO FRO 234 Faroe Islands
 FJ FJI 242 Fiji
 FI FIN 246 Finland
@@ -111,14 +111,14 @@ GNGIN 324 Guinea
 GW GNB 624 Guinea-Bissau
 GY GUY 328 Guyana
 HT HTI 332 Haiti
-HM HMD 334 Heard and McDonald Islands
+HM HMD 334 Heard Island and McDonald Islands
 HN HND 340 Honduras
 HK HKG 344 Hong Kong
 HU HUN 348 Hungary
 IS ISL 352 Iceland
 IN IND 356 India
 ID IDN 360 Indonesia
-IR IRN 364 Iran
+IR IRN 364 Iran, Islamic Republic of
 IQ IRQ 368 Iraq
 IE IRL 372 Ireland
 IM IMN 833 Isle of Man
@@ -131,8 +131,8 @@ JO  JOR 400 Jordan
 KZ KAZ 398 Kazakhstan
 KE KEN 404 Kenya
 KI KIR 296 Kiribati
-KP PRK 408 Korea (Democratic People's Republic of)
-KR KOR 410 Korea (Republic of)
+KP PRK 408 Korea, Democratic People's Republic of
+KR KOR 410 Korea, Republic of
 KW KWT 414 Kuwait
 KG KGZ 417 Kyrgyzstan
 LA LAO 418 Lao People's Democratic Republic
@@ -145,7 +145,7 @@ LI  LIE 438 Liechtenstein
 LT LTU 440 Lithuania
 LU LUX 442 Luxembourg
 MO MAC 446 Macao
-MK MKD 807 Macedonia (The Former Yugoslav Republic of)
+MK MKD 807 Macedonia, the Former Yugoslav Republic of
 MG MDG 450 Madagascar
 MW MWI 454 Malawi
 MY MYS 458 Malaysia
@@ -158,8 +158,8 @@ MR  MRT 478 Mauritania
 MU MUS 480 Mauritius
 YT MYT 175 Mayotte
 MX MEX 484 Mexico
-FM FSM 583 Micronesia (Federated States of)
-MD MDA 498 Moldova
+FM FSM 583 Micronesia, Federated States of
+MD MDA 498 Moldova, Republic of
 MC MCO 492 Monaco
 MN MNG 496 Mongolia
 ME MNE 499 Montenegro
@@ -184,9 +184,9 @@ NO  NOR 578 Norway
 OM OMN 512 Oman
 PK PAK 586 Pakistan
 PW PLW 585 Palau
-PS PSE 275 Occupied Palestinian Territory
+PS PSE 275 Palestinian Territory, Occupied
 PA PAN 591 Panama
-PG PNG 598 Papua-New Guinea
+PG PNG 598 Papua New Guinea
 PY PRY 600 Paraguay
 PE PER 604 Peru
 PH PHL 608 Philippines
@@ -202,7 +202,7 @@ RW  RWA 646 Rwanda
 BL BLM 652 Saint Barthelemy
 KN KNA 659 Saint Kitts and Nevis
 LC LCA 662 Saint Lucia
-MF MAF 663 Saint Martin (French part)
+MF MAF 663 Saint Martin
 VC VCT 670 Saint Vincent and the Grenadines
 WS WSM 882 Samoa
 SM SMR 674 San Marino
@@ -221,18 +221,18 @@ ZAZAF 710 South Africa
 GS SGS 239 South Georgia and the South Sandwich Islands
 ES ESP 724 Spain
 LK LKA 144 Sri Lanka
-SH SHN 654 St. Helena
-PM SPM 666 St. Pierre and Miquelon
+SH SHN

Re: svn commit: r189765 - in head: . lib/libc lib/libc/nls

2009-03-13 Thread Sean C. Farley

On Fri, 13 Mar 2009, Gabor Kovesdan wrote:


Author: gabor (doc,ports committer)
Date: Fri Mar 13 10:40:38 2009
New Revision: 189765
URL: http://svn.freebsd.org/changeset/base/189765

Log:
 - Reenable Native Language Support in libc.  This feature was disabled due
   to possible breakages in the catalog handling code.  Since then, that
   code has been replaced by the secure code from NetBSD but NLS in libc
   remained turned off.  Tests have shown that the feature is stable and
   working so we can now turn it on again.

 - Add several new catalog files:
   - ca_ES.ISO8859-1
   - de_DE.ISO8859-1
   - el_GR.ISO8859-7  (by manolis@ and keramida@)
   - es_ES.ISO8859-1  (kern/123179, by carvay@)
   - fi_FI.ISO8859-1
   - fr_FR.ISO8859-1  (kern/78756, by thierry@)
   - hu_HU.ISO8859-2  (by gabor@)
   - it_IT.ISO8859-15
   - nl_NL.ISO8859-1  (corrections by rene@)
   - no_NO.ISO8859-1
   - mn_MN.UTF-8  (by ganbold@)
   - sk_SK.ISO8859-2
   - sv_SE.ISO8859-1
   (The catalogs without explicit source has been obtained from NetBSD.)


Nice!  I need to find some time to learn how to use NLS.

Now, you only need to revive the BSD-licensed libiconv[1].  :)  I am 
kidding;  I do not want to start adding more stuff to your plate.  Thank 
you for strengthening FreeBSD's i18n support.


Out of curiosity, how does enabling NLS in libc interact with the 
devel/gettext port?


Sean
  1. http://people.freebsd.org/~bland/iconv-2.1.tar.gz
--
s...@freebsd.org
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r189765 - in head: . lib/libc lib/libc/nls

2009-03-13 Thread Gábor Kövesdán

Robert Watson escribió:


On Fri, 13 Mar 2009, Gabor Kovesdan wrote:

 - Reenable Native Language Support in libc.  This feature was 
disabled due

   to possible breakages in the catalog handling code.  Since then, that
   code has been replaced by the secure code from NetBSD but NLS in libc
   remained turned off.  Tests have shown that the feature is stable and
   working so we can now turn it on again.


Do we have a nice tutorialish document somewhere on what people 
writing new command line tools or libraries should do in order to 
address localization requirements, or at least, make it easier for 
other people to do so?  I'm afraid I, at least, live in a world 
without catalogues, but a quick and practical guide to what The Right 
Thing Is for FreeBSD would make it much easier for me to do something 
a bit more mature.
I don't know about any documentation, but I can add some snippets to 
developers-handbook if I can find some time. I added catalog support to 
BSD grep (my SoC 2008 project), so I found out how to deal with 
catalogs. For the meantime, BSD grep can be used as a quick reference, 
the code snippets in grep.c are quite clear.
Oh, and the best thing is that if you use err(), which reads errno to 
exit with an error message, you have localized messages out of the box. 
E.g., for BSD grep there are 10 more messages, but the rest is done via 
err().


--
Gabor Kovesdan
FreeBSD Volunteer

EMAIL: ga...@freebsd.org .:|:. ga...@kovesdan.org
WEB:   http://people.FreeBSD.org/~gabor .:|:. http://kovesdan.org

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


Re: svn commit: r189765 - in head: . lib/libc lib/libc/nls

2009-03-13 Thread Gábor Kövesdán



Nice!  I need to find some time to learn how to use NLS.

Now, you only need to revive the BSD-licensed libiconv[1].  :)  I am 
kidding;  I do not want to start adding more stuff to your plate.  
Thank you for strengthening FreeBSD's i18n support.


Out of curiosity, how does enabling NLS in libc interact with the 
devel/gettext port?
Well, it's not a bad idea, actually I'm thinking of generating some more 
catalogs automatically but the problem is that we don't have iconv in 
the base system. For example, we could easily make a hu_HU.UTF-8 catalog 
from hu_HU.ISO8859-2 by just converting the encoding of the catalog 
file. And the same applies to a bunch of locales...


I don't really know gettext so I don't know how they can interact. 
Afaik, gettext is based on some text replacement, while in POSIX.1 NLS, 
you arrange strings into sets and you identify them with a number inside 
the sets. Some people think gettext is easier to use but I suspect that 
it uses a more complex process of building the application itself to 
process its catalogs. POSIX.1 NLS only needs some additional lines. Here 
are some code snippets from BSD grep, which uses a single set with 10 
messages:


grep.h:

#ifdef WITHOUT_NLS
#define getstr(n)errstr[n]
#else
#include 

extern nl_catd   catalog;
#define getstr(n)catgets(catalog, 1, n, errstr[n])
#endif

extern char *errstr[];

grep.c:


#ifndef WITHOUT_NLS
#include 
nl_catd  catalog;
#endif

/*
* Default messags to use when NLS is disabled or no catalogue
* is found.
*/
char*errstr[] = {
   "",
/* 1*/  "(standard input)",
/* 2*/  "cannot read bzip2 compressed file",
/* 3*/  "unknown --color option",
/* 4*/  "usage: %s [-abcDEFGHhIiJLlmnOoPqRSsUVvwxZ] [-A num] [-B num] 
[-C[num]]\n",

/* 5*/  "\t[-e pattern] [-f file] [--binary-files=value] [--color=when]\n",
/* 6*/  "\t[--context[=num]] [--directories=action] [--label] 
[--line-buffered]\n",

/* 7*/  "\t[--null] [pattern] [file ...]\n",
/* 8*/  "unknown --binary-files option",
/* 9*/  "Binary file %s matches\n"
/*10*/  "%s (BSD grep) %s\n",
};


And then you can simply use getstr(n), where n is the number of the 
string you want to use. It will work with catalogs and with NLS 
disables, as well.


--
Gabor Kovesdan
FreeBSD Volunteer

EMAIL: ga...@freebsd.org .:|:. ga...@kovesdan.org
WEB:   http://people.FreeBSD.org/~gabor .:|:. http://kovesdan.org

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


svn commit: r189768 - in head/sys: conf dev/amdtemp dev/k8temp modules modules/amdtemp modules/k8temp

2009-03-13 Thread Rui Paulo
Author: rpaulo
Date: Fri Mar 13 16:08:08 2009
New Revision: 189768
URL: http://svn.freebsd.org/changeset/base/189768

Log:
  Rename the k8temp driver to amdtemp.
  
  MFC after:2 weeks

Added:
  head/sys/dev/amdtemp/
 - copied from r189489, head/sys/dev/k8temp/
  head/sys/dev/amdtemp/amdtemp.c
 - copied unchanged from r189489, head/sys/dev/k8temp/k8temp.c
  head/sys/modules/amdtemp/
 - copied from r189489, head/sys/modules/k8temp/
Deleted:
  head/sys/dev/amdtemp/k8temp.c
  head/sys/dev/k8temp/
  head/sys/modules/k8temp/
Modified:
  head/sys/conf/files.amd64
  head/sys/conf/files.i386
  head/sys/modules/Makefile
  head/sys/modules/amdtemp/Makefile

Modified: head/sys/conf/files.amd64
==
--- head/sys/conf/files.amd64   Fri Mar 13 14:35:58 2009(r189767)
+++ head/sys/conf/files.amd64   Fri Mar 13 16:08:08 2009(r189768)
@@ -136,6 +136,7 @@ dev/agp/agp_amd64.c optionalagp
 dev/agp/agp_i810.c optionalagp
 dev/agp/agp_intel.coptionalagp
 dev/agp/agp_via.c  optionalagp
+dev/amdtemp/amdtemp.c  optionalamdtemp
 dev/arcmsr/arcmsr.coptionalarcmsr pci
 dev/asmc/asmc.coptionalasmc isa
 dev/atkbdc/atkbd.c optionalatkbd atkbdc
@@ -187,7 +188,6 @@ dev/hwpmc/hwpmc_core.c  optionalhwpmc
 dev/hwpmc/hwpmc_piv.c  optionalhwpmc
 dev/hwpmc/hwpmc_tsc.c  optionalhwpmc
 dev/hwpmc/hwpmc_x86.c  optionalhwpmc
-dev/k8temp/k8temp.coptionalk8temp
 dev/kbd/kbd.c  optionalatkbd | sc | ukbd | 
usb2_input_kbd
 dev/mem/memutil.c  optionalmem
 dev/nfe/if_nfe.c   optionalnfe pci

Modified: head/sys/conf/files.i386
==
--- head/sys/conf/files.i386Fri Mar 13 14:35:58 2009(r189767)
+++ head/sys/conf/files.i386Fri Mar 13 16:08:08 2009(r189768)
@@ -128,6 +128,7 @@ dev/agp/agp_nvidia.coptional agp
 dev/agp/agp_sis.c  optional agp
 dev/agp/agp_via.c  optional agp
 dev/aic/aic_isa.c  optional aic isa
+dev/amdtemp/amdtemp.c  optional amdtemp
 dev/arcmsr/arcmsr.coptional arcmsr pci
 dev/ar/if_ar.c optional ar
 dev/ar/if_ar_isa.c optional ar isa
@@ -198,7 +199,6 @@ dev/ipmi/ipmi_smbus.c   optional ipmi smb
 dev/ipmi/ipmi_smbios.c optional ipmi
 dev/ipmi/ipmi_ssif.c   optional ipmi smbus
 dev/ipmi/ipmi_pci.coptional ipmi pci
-dev/k8temp/k8temp.coptional k8temp
 dev/kbd/kbd.c  optional atkbd | sc | ukbd | usb2_input_kbd
 dev/le/if_le_isa.c optional le isa
 dev/mem/memutil.c  optional mem

Copied: head/sys/dev/amdtemp/amdtemp.c (from r189489, 
head/sys/dev/k8temp/k8temp.c)
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/sys/dev/amdtemp/amdtemp.c  Fri Mar 13 16:08:08 2009
(r189768, copy of r189489, head/sys/dev/k8temp/k8temp.c)
@@ -0,0 +1,342 @@
+/*-
+ * Copyright (c) 2008 Rui Paulo 
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
+ * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/*
+ * Driver for the AMD K8 thermal sensors. Based on a Linux driver by the
+ * same name.
+ */
+
+#include 
+__FBSDID("$FreeBSD$");
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+#include 
+#include 
+
+#include 
+#includ

svn commit: r189769 - head/sys/dev/amdtemp

2009-03-13 Thread Rui Paulo
Author: rpaulo
Date: Fri Mar 13 16:28:25 2009
New Revision: 189769
URL: http://svn.freebsd.org/changeset/base/189769

Log:
  Rename all the variables/function names/structs/etc. to reflect the
  driver name change.
  While there, update copyright.
  
  MFC after:2 weeks

Modified:
  head/sys/dev/amdtemp/amdtemp.c

Modified: head/sys/dev/amdtemp/amdtemp.c
==
--- head/sys/dev/amdtemp/amdtemp.c  Fri Mar 13 16:08:08 2009
(r189768)
+++ head/sys/dev/amdtemp/amdtemp.c  Fri Mar 13 16:28:25 2009
(r189769)
@@ -1,5 +1,6 @@
 /*-
- * Copyright (c) 2008 Rui Paulo 
+ * Copyright (c) 2008, 2009 Rui Paulo 
+ * Copyright (c) 2009 Norikatsu Shigemura 
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -25,8 +26,8 @@
  */
 
 /*
- * Driver for the AMD K8 thermal sensors. Based on a Linux driver by the
- * same name.
+ * Driver for the AMD K8/K10/K11 thermal sensors. Initially based on the
+ * amdtemp Linux driver.
  */
 
 #include 
@@ -48,77 +49,92 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 
-struct k8temp_softc {
+typedef enum {
+   SENSOR0_CORE0,
+   SENSOR0_CORE1,
+   SENSOR1_CORE0,
+   SENSOR1_CORE1,
+   CORE0,
+   CORE1
+} amdsensor_t;
+
+struct amdtemp_softc {
device_tsc_dev;
int sc_temps[4];
int sc_ntemps;
struct sysctl_oid *sc_oid;
struct sysctl_oid *sc_sysctl_cpu[2];
struct intr_config_hook sc_ich;
+   int32_t (*sc_gettemp)(device_t, amdsensor_t);
 };
 
 #define VENDORID_AMD   0x1022
-#define DEVICEID_AMD_MISC  0x1103
-
-static struct k8temp_product {
-   uint16_tk8temp_vendorid;
-   uint16_tk8temp_deviceid;
-} k8temp_products[] = {
-   { VENDORID_AMD, DEVICEID_AMD_MISC },
+#define DEVICEID_AMD_MISC0F0x1103
+#define DEVICEID_AMD_MISC100x1203
+#define DEVICEID_AMD_MISC110x1303
+
+static struct amdtemp_product {
+   uint16_tamdtemp_vendorid;
+   uint16_tamdtemp_deviceid;
+} amdtemp_products[] = {
+   { VENDORID_AMD, DEVICEID_AMD_MISC0F },
+   { VENDORID_AMD, DEVICEID_AMD_MISC10 },
+   { VENDORID_AMD, DEVICEID_AMD_MISC11 },
{ 0, 0 }
 };
 
 /*
- * Register control
+ * Register control (K8 family)
  */
-#defineK8TEMP_REG  0xe4
-#defineK8TEMP_REG_SELSENSOR0x40
-#defineK8TEMP_REG_SELCORE  0x04
+#defineAMDTEMP_REG0F   0xe4
+#defineAMDTEMP_REG_SELSENSOR   0x40
+#defineAMDTEMP_REG_SELCORE 0x04
 
-#define K8TEMP_MINTEMP 49  /* -49 C is the mininum temperature */
+/*
+ * Register control (K10 & K11) family
+ */
+#defineAMDTEMP_REG 0xa4
 
-typedef enum {
-   SENSOR0_CORE0,
-   SENSOR0_CORE1,
-   SENSOR1_CORE0,
-   SENSOR1_CORE1,
-   CORE0,
-   CORE1
-} k8sensor_t;
+#defineTZ_ZEROC2732
+
+   /* -49 C is the mininum temperature */
+#defineAMDTEMP_OFFSET0F(TZ_ZEROC-490)
+#defineAMDTEMP_OFFSET  (TZ_ZEROC)
 
 /*
  * Device methods.
  */
-static voidk8temp_identify(driver_t *driver, device_t parent);
-static int k8temp_probe(device_t dev);
-static int k8temp_attach(device_t dev);
-static voidk8temp_intrhook(void *arg);
-static int k8temp_detach(device_t dev);
-static int k8temp_match(device_t dev);
-static int32_t k8temp_gettemp(device_t dev, k8sensor_t sensor);
-static int k8temp_sysctl(SYSCTL_HANDLER_ARGS);
+static voidamdtemp_identify(driver_t *driver, device_t parent);
+static int amdtemp_probe(device_t dev);
+static int amdtemp_attach(device_t dev);
+static voidamdtemp_intrhook(void *arg);
+static int amdtemp_detach(device_t dev);
+static int amdtemp_match(device_t dev);
+static int32_t amdtemp_gettemp0f(device_t dev, amdsensor_t sensor);
+static int32_t amdtemp_gettemp(device_t dev, amdsensor_t sensor);
+static int amdtemp_sysctl(SYSCTL_HANDLER_ARGS);
 
-static device_method_t k8temp_methods[] = {
+static device_method_t amdtemp_methods[] = {
/* Device interface */
-   DEVMETHOD(device_identify,  k8temp_identify),
-   DEVMETHOD(device_probe, k8temp_probe),
-   DEVMETHOD(device_attach,k8temp_attach),
-   DEVMETHOD(device_detach,k8temp_detach),
+   DEVMETHOD(device_identify,  amdtemp_identify),
+   DEVMETHOD(device_probe, amdtemp_probe),
+   DEVMETHOD(device_attach,amdtemp_attach),
+   DEVMETHOD(device_detach,amdtemp_detach),
 
{0, 0}
 };
 
-static driver_t k8temp_driver = {
-   "k8temp",
-   k8temp_methods,
-   sizeof(struct k8temp_softc),
+static driver_t amdtemp_driver = {
+   "amdtemp",
+   amdtemp_methods,
+   sizeof(struct amdtemp_softc),
 };
 
-static devclass_t 

svn commit: r189770 - head

2009-03-13 Thread Rui Paulo
Author: rpaulo
Date: Fri Mar 13 16:30:33 2009
New Revision: 189770
URL: http://svn.freebsd.org/changeset/base/189770

Log:
  Mention k8temp -> amdtemp rename.
  
  MFC after:2 weeks

Modified:
  head/UPDATING

Modified: head/UPDATING
==
--- head/UPDATING   Fri Mar 13 16:28:25 2009(r189769)
+++ head/UPDATING   Fri Mar 13 16:30:33 2009(r189770)
@@ -22,6 +22,10 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 8.
to maximize performance.  (To disable malloc debugging, run
ln -s aj /etc/malloc.conf.)
 
+20090313:
+   The k8temp(4) driver has been renamed to amdtemp(4) since
+   support for K10 and K11 CPU families was added.
+
 20090309:
IGMPv3 and Source-Specific Multicast (SSM) have been merged
to the IPv4 stack. VIMAGE hooks are in but not yet used.
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r189771 - in head/sys: amd64/amd64 amd64/linux32 arm/arm compat/ia32 compat/svr4 i386/i386 i386/linux ia64/ia64 kern mips/mips powerpc/powerpc sparc64/sparc64 sys

2009-03-13 Thread Dmitry Chagin
Author: dchagin
Date: Fri Mar 13 16:40:51 2009
New Revision: 189771
URL: http://svn.freebsd.org/changeset/base/189771

Log:
  Implement new way of branding ELF binaries by looking to a
  ".note.ABI-tag" section.
  
  The search order of a brand is changed, now first of all the
  ".note.ABI-tag" is looked through.
  
  Move code which fetch osreldate for ELF binary to check_note() handler.
  
  PR:   118473
  Approved by:  kib (mentor)

Modified:
  head/sys/amd64/amd64/elf_machdep.c
  head/sys/amd64/linux32/linux32_sysvec.c
  head/sys/arm/arm/elf_machdep.c
  head/sys/compat/ia32/ia32_sysvec.c
  head/sys/compat/svr4/svr4_sysvec.c
  head/sys/i386/i386/elf_machdep.c
  head/sys/i386/linux/linux_sysvec.c
  head/sys/ia64/ia64/elf_machdep.c
  head/sys/kern/imgact_elf.c
  head/sys/mips/mips/elf64_machdep.c
  head/sys/mips/mips/elf_machdep.c
  head/sys/powerpc/powerpc/elf_machdep.c
  head/sys/sparc64/sparc64/elf_machdep.c
  head/sys/sys/imgact_elf.h

Modified: head/sys/amd64/amd64/elf_machdep.c
==
--- head/sys/amd64/amd64/elf_machdep.c  Fri Mar 13 16:30:33 2009
(r189770)
+++ head/sys/amd64/amd64/elf_machdep.c  Fri Mar 13 16:40:51 2009
(r189771)
@@ -84,7 +84,8 @@ static Elf64_Brandinfo freebsd_brand_inf
.interp_path= "/libexec/ld-elf.so.1",
.sysvec = &elf64_freebsd_sysvec,
.interp_newpath = NULL,
-   .flags  = BI_CAN_EXEC_DYN,
+   .brand_note = &elf64_freebsd_brandnote,
+   .flags  = BI_CAN_EXEC_DYN
 };
 
 SYSINIT(elf64, SI_SUB_EXEC, SI_ORDER_ANY,
@@ -99,7 +100,8 @@ static Elf64_Brandinfo freebsd_brand_oin
.interp_path= "/usr/libexec/ld-elf.so.1",
.sysvec = &elf64_freebsd_sysvec,
.interp_newpath = NULL,
-   .flags  = BI_CAN_EXEC_DYN,
+   .brand_note = &elf64_freebsd_brandnote,
+   .flags  = BI_CAN_EXEC_DYN
 };
 
 SYSINIT(oelf64, SI_SUB_EXEC, SI_ORDER_ANY,

Modified: head/sys/amd64/linux32/linux32_sysvec.c
==
--- head/sys/amd64/linux32/linux32_sysvec.c Fri Mar 13 16:30:33 2009
(r189770)
+++ head/sys/amd64/linux32/linux32_sysvec.c Fri Mar 13 16:40:51 2009
(r189771)
@@ -1047,6 +1047,16 @@ struct sysentvec elf_linux_sysvec = {
.sv_flags   = SV_ABI_LINUX | SV_ILP32 | SV_IA32
 };
 
+static char GNULINUX_ABI_VENDOR[] = "GNU";
+
+static Elf_Brandnote linux32_brandnote = {
+   .hdr.n_namesz   = sizeof(GNULINUX_ABI_VENDOR),
+   .hdr.n_descsz   = 16,
+   .hdr.n_type = 1,
+   .vendor = GNULINUX_ABI_VENDOR,
+   .flags  = 0
+};
+
 static Elf32_Brandinfo linux_brand = {
.brand  = ELFOSABI_LINUX,
.machine= EM_386,
@@ -1055,7 +1065,8 @@ static Elf32_Brandinfo linux_brand = {
.interp_path= "/lib/ld-linux.so.1",
.sysvec = &elf_linux_sysvec,
.interp_newpath = NULL,
-   .flags  = BI_CAN_EXEC_DYN,
+   .brand_note = &linux32_brandnote,
+   .flags  = BI_CAN_EXEC_DYN
 };
 
 static Elf32_Brandinfo linux_glibc2brand = {
@@ -1066,7 +1077,8 @@ static Elf32_Brandinfo linux_glibc2brand
.interp_path= "/lib/ld-linux.so.2",
.sysvec = &elf_linux_sysvec,
.interp_newpath = NULL,
-   .flags  = BI_CAN_EXEC_DYN,
+   .brand_note = &linux32_brandnote,
+   .flags  = BI_CAN_EXEC_DYN
 };
 
 Elf32_Brandinfo *linux_brandlist[] = {

Modified: head/sys/arm/arm/elf_machdep.c
==
--- head/sys/arm/arm/elf_machdep.c  Fri Mar 13 16:30:33 2009
(r189770)
+++ head/sys/arm/arm/elf_machdep.c  Fri Mar 13 16:40:51 2009
(r189771)
@@ -84,7 +84,8 @@ static Elf32_Brandinfo freebsd_brand_inf
.interp_path= "/libexec/ld-elf.so.1",
.sysvec = &elf32_freebsd_sysvec,
.interp_newpath = NULL,
-   .flags  = BI_CAN_EXEC_DYN,
+   .brand_note = &elf32_freebsd_brandnote,
+   .flags  = BI_CAN_EXEC_DYN
 };
 
 SYSINIT(elf32, SI_SUB_EXEC, SI_ORDER_ANY,
@@ -99,7 +100,8 @@ static Elf32_Brandinfo freebsd_brand_oin
.interp_path= "/usr/libexec/ld-elf.so.1",
.sysvec = &elf32_freebsd_sysvec,
.interp_newpath = NULL,
-   .flags  = BI_CAN_EXEC_DYN,
+   .brand_note = &elf32_freebsd_brandnote,
+   .flags  = BI_CAN_EXEC_DYN
 };
 
 SYSINIT(oelf32, SI_SUB_EXEC, SI_ORDER_ANY,

Modified: head/sys/compat/ia32/ia32_sysvec.c
==
--- head/sys/compat/ia32/ia32_sysvec.c  Fri Mar 13 16:30:33 2009
(r189770)
+++ head/sys/compat/ia32/ia32_sysvec.c  Fri Mar 13 16:40:51 2009
(r189771)
@@ -148,6 +148,7 @@ static Elf32_Brandinfo ia32_brand_info =
.interp_p

svn commit: r189772 - head

2009-03-13 Thread Gabor Kovesdan
Author: gabor (doc,ports committer)
Date: Fri Mar 13 16:40:56 2009
New Revision: 189772
URL: http://svn.freebsd.org/changeset/base/189772

Log:
  - Add an entry about enabling libc NLS support

Modified:
  head/UPDATING

Modified: head/UPDATING
==
--- head/UPDATING   Fri Mar 13 16:40:51 2009(r189771)
+++ head/UPDATING   Fri Mar 13 16:40:56 2009(r189772)
@@ -23,6 +23,12 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 8.
ln -s aj /etc/malloc.conf.)
 
 20090313:
+   POSIX.1 Native Language Support (NLS) has been enabled in libc and
+   a bunch of new language catalog files have also been added.
+   This means that some common libc messages are now localized and
+   they depend on the LC_MESSAGES environmental variable.
+
+20090313:
The k8temp(4) driver has been renamed to amdtemp(4) since
support for K10 and K11 CPU families was added.
 
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r189773 - head/share/man/man4

2009-03-13 Thread Rui Paulo
Author: rpaulo
Date: Fri Mar 13 16:42:24 2009
New Revision: 189773
URL: http://svn.freebsd.org/changeset/base/189773

Log:
  Rename the k8temp(4) man page to amdtemp(4) and update its contents for
  the new families.
  
  MFC after:2 weeks

Added:
  head/share/man/man4/amdtemp.4
 - copied, changed from r189768, head/share/man/man4/k8temp.4
Deleted:
  head/share/man/man4/k8temp.4
Modified:
  head/share/man/man4/Makefile

Modified: head/share/man/man4/Makefile
==
--- head/share/man/man4/MakefileFri Mar 13 16:40:56 2009
(r189772)
+++ head/share/man/man4/MakefileFri Mar 13 16:42:24 2009
(r189773)
@@ -26,6 +26,7 @@ MAN=  aac.4 \
ale.4 \
altq.4 \
amd.4 \
+   ${_amdtemp.4} \
${_amdsmb.4} \
amr.4 \
an.4 \
@@ -155,7 +156,6 @@ MAN=aac.4 \
ixgbe.4 \
jme.4 \
joy.4 \
-   ${_k8temp.4} \
kbdmux.4 \
keyboard.4 \
kld.4 \
@@ -593,6 +593,7 @@ _acpi_panasonic.4=acpi_panasonic.4
 _acpi_sony.4=  acpi_sony.4
 _acpi_toshiba.4=acpi_toshiba.4
 _amdsmb.4= amdsmb.4
+_amdtemp.4=amdtemp.4
 _asmc.4=   asmc.4
 _coretemp.4=   coretemp.4
 _cpuctl.4= cpuctl.4
@@ -610,7 +611,6 @@ _ipmi.4=ipmi.4
 _io.4= io.4
 _linux.4=  linux.4
 _ndis.4=   ndis.4
-_k8temp.4= k8temp.4
 _nfe.4=nfe.4
 _nfsmb.4=  nfsmb.4
 _nve.4=nve.4

Copied and modified: head/share/man/man4/amdtemp.4 (from r189768, 
head/share/man/man4/k8temp.4)
==
--- head/share/man/man4/k8temp.4Fri Mar 13 16:08:08 2009
(r189768, copy source)
+++ head/share/man/man4/amdtemp.4   Fri Mar 13 16:42:24 2009
(r189773)
@@ -26,39 +26,47 @@
 .\" $FreeBSD$
 .\"
 .Dd April 8, 2008
-.Dt K8TEMP 4
+.Dt AMDTEMP 4
 .Os
 .Sh NAME
-.Nm k8temp
-.Nd device driver for AMD K8 on-die digital thermal sensor
+.Nm amdtemp
+.Nd device driver for AMD K8, K10 and K11 on-die digital thermal sensor
 .Sh SYNOPSIS
 To compile this driver into the kernel,
 place the following line in your
 kernel configuration file:
 .Bd -ragged -offset indent
-.Cd "device k8temp"
+.Cd "device amdtemp"
 .Ed
 .Pp
 Alternatively, to load the driver as a
 module at boot time, place the following line in
 .Xr loader.conf 5 :
 .Bd -literal -offset indent
-k8temp_load="YES"
+amdtemp_load="YES"
 .Ed
 .Sh DESCRIPTION
 The
 .Nm
 driver provides support for the on-die digital thermal sensor present
-in AMD K8 processors.
+in AMD K8, K10 and K11 processors.
 .Pp
-The
+For the K8 family, the
 .Nm
 driver reports each cores' temperature through a sysctl node in the
 corresponding CPU devices's sysctl tree, named
-.Va dev.k8temp.%d.sensor{0,1}.core{0,1} .
+.Va dev.amdtemp.%d.sensor{0,1}.core{0,1} .
+The driver also creates
 .Va dev.cpu.%d.temperature
-is also created and it displays the maximum temperature of the two sensors
+displaying the maximum temperature of the two sensors 
 located in each CPU core.
+.Pp
+For the K10 and K11 families, the driver creates
+.Va dev.cpu.%d.temperature
+with the temperature of each core.
+.Sh BUGS
+AMD K9 is not supported because temperature reporting has been replaced
+by Maltese.
 .Sh SEE ALSO
 .Xr sysctl 8
 .Sh HISTORY
@@ -69,3 +77,4 @@ driver first appeared in
 .Sh AUTHORS
 .An
 .An Rui Paulo Aq rpa...@freebsd.org
+.An Norikatsu Shigemura Aq n...@freebsd.org
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r189774 - head/sys/dev/amdtemp

2009-03-13 Thread Rui Paulo
Author: rpaulo
Date: Fri Mar 13 16:43:31 2009
New Revision: 189774
URL: http://svn.freebsd.org/changeset/base/189774

Log:
  Fix comment explaining where this driver came from.
  
  MFC after:2 weeks

Modified:
  head/sys/dev/amdtemp/amdtemp.c

Modified: head/sys/dev/amdtemp/amdtemp.c
==
--- head/sys/dev/amdtemp/amdtemp.c  Fri Mar 13 16:42:24 2009
(r189773)
+++ head/sys/dev/amdtemp/amdtemp.c  Fri Mar 13 16:43:31 2009
(r189774)
@@ -27,7 +27,7 @@
 
 /*
  * Driver for the AMD K8/K10/K11 thermal sensors. Initially based on the
- * amdtemp Linux driver.
+ * k8temp Linux driver.
  */
 
 #include 
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


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

2009-03-13 Thread John Baldwin

Konstantin Belousov wrote:

Author: kib
Date: Thu Dec 18 11:58:12 2008
New Revision: 186276
URL: http://svn.freebsd.org/changeset/base/186276

Log:
  Do not return success and doomed vnode from lookup. LK_UPGRADE allows
  the vnode to be reclaimed.
  
  Tested by:	pho

  MFC after:1 month


Would EBADF be more appropriate?  That is what other places that check 
VI_DOOMED return for this type of check (e.g. in cache_lookup()).


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


Re: svn commit: r189765 - in head: . lib/libc lib/libc/nls

2009-03-13 Thread David Schultz
On Fri, Mar 13, 2009, Sean C. Farley wrote:
> Now, you only need to revive the BSD-licensed libiconv[1].  :)
[...]
>   1. http://people.freebsd.org/~bland/iconv-2.1.tar.gz

I asked a few weeks ago on standards@ why we weren't using Citrus
iconv, which is what NetBSD uses, and seems to be in a somewhat
better state than this. It also provides various wide character
conversion routines that overlap with what tjr@ has already done
in FreeBSD, so we'd have to sort that out. And we'd have to sort
out a gazillion ports that want -liconv.
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r189765 - in head: . lib/libc lib/libc/nls

2009-03-13 Thread Sean C. Farley

On Fri, 13 Mar 2009, David Schultz wrote:


On Fri, Mar 13, 2009, Sean C. Farley wrote:

Now, you only need to revive the BSD-licensed libiconv[1].  :)

[...]

  1. http://people.freebsd.org/~bland/iconv-2.1.tar.gz


I asked a few weeks ago on standards@ why we weren't using Citrus
iconv, which is what NetBSD uses, and seems to be in a somewhat
better state than this. It also provides various wide character
conversion routines that overlap with what tjr@ has already done
in FreeBSD, so we'd have to sort that out. And we'd have to sort
out a gazillion ports that want -liconv.


I have not explored either.  The Citrus version appears to have more 
functionality, however, the Citrus website is ambiguous about the 
license.


Note to self:  register with standards@; arch@ is not enough.  :)

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


svn commit: r189775 - head/contrib/wpa/wpa_supplicant

2009-03-13 Thread Sam Leffler
Author: sam
Date: Fri Mar 13 19:05:34 2009
New Revision: 189775
URL: http://svn.freebsd.org/changeset/base/189775

Log:
  fix portability; linux does not have sa_len/sun_len

Modified:
  head/contrib/wpa/wpa_supplicant/ctrl_iface_unix.c

Modified: head/contrib/wpa/wpa_supplicant/ctrl_iface_unix.c
==
--- head/contrib/wpa/wpa_supplicant/ctrl_iface_unix.c   Fri Mar 13 16:43:31 
2009(r189774)
+++ head/contrib/wpa/wpa_supplicant/ctrl_iface_unix.c   Fri Mar 13 19:05:34 
2009(r189775)
@@ -16,6 +16,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include "common.h"
 #include "eloop.h"
@@ -69,7 +70,8 @@ static int wpa_supplicant_ctrl_iface_att
dst->next = priv->ctrl_dst;
priv->ctrl_dst = dst;
wpa_hexdump(MSG_DEBUG, "CTRL_IFACE monitor attached",
-   (u8 *) from->sun_path, fromlen - sizeof(from->sun_family));
+   (u8 *) from->sun_path,
+   fromlen - offsetof(struct sockaddr_un, sun_path));
return 0;
 }
 
@@ -84,7 +86,7 @@ static int wpa_supplicant_ctrl_iface_det
while (dst) {
if (fromlen == dst->addrlen &&
os_memcmp(from->sun_path, dst->addr.sun_path,
- fromlen - sizeof(from->sun_family)) == 0) {
+ fromlen - offsetof(struct sockaddr_un, sun_path)) 
== 0) {
if (prev == NULL)
priv->ctrl_dst = dst->next;
else
@@ -92,7 +94,7 @@ static int wpa_supplicant_ctrl_iface_det
os_free(dst);
wpa_hexdump(MSG_DEBUG, "CTRL_IFACE monitor detached",
(u8 *) from->sun_path,
-   fromlen - sizeof(from->sun_family));
+   fromlen - offsetof(struct sockaddr_un, 
sun_path));
return 0;
}
prev = dst;
@@ -115,10 +117,10 @@ static int wpa_supplicant_ctrl_iface_lev
while (dst) {
if (fromlen == dst->addrlen &&
os_memcmp(from->sun_path, dst->addr.sun_path,
- fromlen - sizeof(from->sun_family)) == 0) {
+ fromlen - offsetof(struct sockaddr_un, sun_path)) 
== 0) {
wpa_hexdump(MSG_DEBUG, "CTRL_IFACE changed monitor "
"level", (u8 *) from->sun_path,
-   fromlen - sizeof(from->sun_family));
+   fromlen - offsetof(struct sockaddr_un, 
sun_path));
dst->debug_level = atoi(level);
return 0;
}
@@ -339,6 +341,8 @@ wpa_supplicant_ctrl_iface_init(struct wp
}
 
os_memset(&addr, 0, sizeof(addr));
+   /* XXX #ifdef */
+   addr.sun_len = sizeof(addr);
addr.sun_family = AF_UNIX;
fname = wpa_supplicant_ctrl_iface_path(wpa_s);
if (fname == NULL)
@@ -509,8 +513,8 @@ static void wpa_supplicant_ctrl_iface_se
next = dst->next;
if (level >= dst->debug_level) {
wpa_hexdump(MSG_DEBUG, "CTRL_IFACE monitor send",
-   (u8 *) dst->addr.sun_path, dst->addrlen -
-   sizeof(dst->addr.sun_family));
+   (u8 *) dst->addr.sun_path,
+   dst->addrlen - offsetof(struct sockaddr_un, 
sun_path));
msg.msg_name = (void *) &dst->addr;
msg.msg_namelen = dst->addrlen;
if (sendmsg(priv->sock, &msg, 0) < 0) {
@@ -637,6 +641,8 @@ wpa_supplicant_global_ctrl_iface_init(st
}
 
os_memset(&addr, 0, sizeof(addr));
+   /* XXX #ifdef */
+   addr.sun_len = sizeof(addr);
addr.sun_family = AF_UNIX;
os_strlcpy(addr.sun_path, global->params.ctrl_interface,
   sizeof(addr.sun_path));
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r189765 - in head: . lib/libc lib/libc/nls

2009-03-13 Thread Ivan Voras
2009/3/13 Gábor Kövesdán :
>
>> Nice!  I need to find some time to learn how to use NLS.
>>
>> Now, you only need to revive the BSD-licensed libiconv[1].  :)  I am
>> kidding;  I do not want to start adding more stuff to your plate.  Thank you
>> for strengthening FreeBSD's i18n support.
>>
>> Out of curiosity, how does enabling NLS in libc interact with the
>> devel/gettext port?
>
> Well, it's not a bad idea, actually I'm thinking of generating some more
> catalogs automatically but the problem is that we don't have iconv in the
> base system. For example, we could easily make a hu_HU.UTF-8 catalog from
> hu_HU.ISO8859-2 by just converting the encoding of the catalog file. And the
> same applies to a bunch of locales...

This only glances the original topic, but Konrad (konrad@,
konrad.jankow...@bluemedia.pl) was doing UTF-8 collation support and
it appears that the project is very close to completion but for a few
months now Konrad is busy with RL stuff and has postponed it. Maybe
you could benefit from his work and also bring it in?
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r189765 - in head: . lib/libc lib/libc/nls

2009-03-13 Thread Gábor Kövesdán

Ivan Voras escribió:

2009/3/13 Gábor Kövesdán :
  

Nice!  I need to find some time to learn how to use NLS.

Now, you only need to revive the BSD-licensed libiconv[1].  :)  I am
kidding;  I do not want to start adding more stuff to your plate.  Thank you
for strengthening FreeBSD's i18n support.

Out of curiosity, how does enabling NLS in libc interact with the
devel/gettext port?
  

Well, it's not a bad idea, actually I'm thinking of generating some more
catalogs automatically but the problem is that we don't have iconv in the
base system. For example, we could easily make a hu_HU.UTF-8 catalog from
hu_HU.ISO8859-2 by just converting the encoding of the catalog file. And the
same applies to a bunch of locales...



This only glances the original topic, but Konrad (konrad@,
konrad.jankow...@bluemedia.pl) was doing UTF-8 collation support and
it appears that the project is very close to completion but for a few
months now Konrad is busy with RL stuff and has postponed it. Maybe
you could benefit from his work and also bring it in?
  
I can gladly review it but I'm not more competent in this area than 
Konrad, actually I'm not even a src committer, so my review won't be 
sufficient...


--
Gabor Kovesdan
FreeBSD Volunteer

EMAIL: ga...@freebsd.org .:|:. ga...@kovesdan.org
WEB:   http://people.FreeBSD.org/~gabor .:|:. http://kovesdan.org

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


Re: svn commit: r189765 - in head: . lib/libc lib/libc/nls

2009-03-13 Thread Norikatsu Shigemura
Hi Sean!

On Fri, 13 Mar 2009 13:36:07 -0500 (CDT)
"Sean C. Farley"  wrote:
> functionality, however, the Citrus website is ambiguous about the 
> license.

Really? > ambigous 
Citrus is licensed under BSD License or variant (like
Perl or MIT).  It can use with (L)GPL.

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


Re: svn commit: r189765 - in head: . lib/libc lib/libc/nls

2009-03-13 Thread Sean C. Farley

On Sat, 14 Mar 2009, Norikatsu Shigemura wrote:


Hi Sean!


Hi Norikatsu,


On Fri, 13 Mar 2009 13:36:07 -0500 (CDT)
"Sean C. Farley"  wrote:

functionality, however, the Citrus website is ambiguous about the
license.


Really? > ambigous
Citrus is licensed under BSD License or variant (like
Perl or MIT).  It can use with (L)GPL.

WWW: http://citrus.bsdclub.org/


OK.  Technically, the website is not ambiguous.  It is the license that 
is ambiguous.  :)  At least, they claim it is:


The license is still ambiguous at this point, but it will be either
a BSD Style License or use perl's model. In addition, "the license
must allow for BSD/MIT/(L)GPL uses of the code". This allows the
possibility that it will be picked up by X or glib. However, it is
only a "possibility". To be honest, so far there is not schedule to
do port to glibc strictly. The X Consortium may be interested in
iconv for its X-TT or Unicode support.

A person offering code for this project must agree to it being
distributed with this license condition. In addition, copyright of
this project is added to the source code. Of course the original
copyright is left in place as well.

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


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

2009-03-13 Thread Kostik Belousov
On Fri, Mar 13, 2009 at 02:15:34PM -0400, John Baldwin wrote:
> Konstantin Belousov wrote:
> >Author: kib
> >Date: Thu Dec 18 11:58:12 2008
> >New Revision: 186276
> >URL: http://svn.freebsd.org/changeset/base/186276
> >
> >Log:
> >  Do not return success and doomed vnode from lookup. LK_UPGRADE allows
> >  the vnode to be reclaimed.
> >  
> >  Tested by: pho
> >  MFC after: 1 month
> 
> Would EBADF be more appropriate?  That is what other places that check 
> VI_DOOMED return for this type of check (e.g. in cache_lookup()).

I do not think so. When we do namei lookup, there is actually no
file descriptor to be invalid. The fact the we lost the race with
forced unmount actually means that there is no more node with
supplied name.


pgpOry125033E.pgp
Description: PGP signature


Re: svn commit: r189765 - in head: . lib/libc lib/libc/nls

2009-03-13 Thread Norikatsu Shigemura
Hi Sean!

On Fri, 13 Mar 2009 16:12:00 -0500 (CDT)
"Sean C. Farley"  wrote:
> >> functionality, however, the Citrus website is ambiguous about the
> >> license.
> > Really? > ambigous
> > Citrus is licensed under BSD License or variant (like
> > Perl or MIT).  It can use with (L)GPL.
> > WWW: http://citrus.bsdclub.org/
> OK.  Technically, the website is not ambiguous.  It is the license that 
> is ambiguous.  :)  At least, they claim it is:

Ah, OK.  They, Citrus developers, consider that it is licensed
under BSD License on *BSD, at least.  In fact, on NetBSD/OpenBSD,
it is licensed under BSD License, and we can use it under BSD
License.

But it may be used on other environment like X.  So it is licensed
under dual(multiple?) license.
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r189765 - in head: . lib/libc lib/libc/nls

2009-03-13 Thread Xin LI
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Sean C. Farley wrote:
> On Sat, 14 Mar 2009, Norikatsu Shigemura wrote:
> 
>> Hi Sean!
> 
> Hi Norikatsu,
> 
>> On Fri, 13 Mar 2009 13:36:07 -0500 (CDT)
>> "Sean C. Farley"  wrote:
>>> functionality, however, the Citrus website is ambiguous about the
>>> license.
>>
>> Really? > ambigous
>> Citrus is licensed under BSD License or variant (like
>> Perl or MIT).  It can use with (L)GPL.
>>
>> WWW: http://citrus.bsdclub.org/
> 
> OK.  Technically, the website is not ambiguous.  It is the license that
> is ambiguous.  :)  At least, they claim it is:
> 
> The license is still ambiguous at this point, but it will be either
> a BSD Style License or use perl's model. In addition, "the license
> must allow for BSD/MIT/(L)GPL uses of the code". This allows the
> possibility that it will be picked up by X or glib. However, it is
> only a "possibility". To be honest, so far there is not schedule to
> do port to glibc strictly. The X Consortium may be interested in
> iconv for its X-TT or Unicode support.
> 
> A person offering code for this project must agree to it being
> distributed with this license condition. In addition, copyright of
> this project is added to the source code. Of course the original
> copyright is left in place as well.

IANAL but the code already included in NetBSD says. for example:

/*-
 * Copyright (c)2008 Citrus Project,
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *notice, this list of conditions and the following disclaimer in the
 *documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE
 * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL
 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
STRICT
 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 * SUCH DAMAGE.
 */

So my understanding is that, at least these code are released under a
2-clause BSD code and we are supposed to be able to use these code under
such license?

Cheers,
- --
Xin LI http://www.delphij.net/
FreeBSD - The Power to Serve!
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.11 (FreeBSD)

iEYEARECAAYFAkm62voACgkQi+vbBBjt66C7uwCfdQoe2ZaTVN+pvrw6KfAJCfYg
+9gAoJKkQgBvIoMf3TsPaL8+fzeq7hIc
=sJKd
-END PGP SIGNATURE-
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r189765 - in head: . lib/libc lib/libc/nls

2009-03-13 Thread Coleman Kane
On Sat, 2009-03-14 at 06:59 +0900, Norikatsu Shigemura wrote:
> Hi Sean!
> 
> On Fri, 13 Mar 2009 16:12:00 -0500 (CDT)
> "Sean C. Farley"  wrote:
> > >> functionality, however, the Citrus website is ambiguous about the
> > >> license.
> > >   Really? > ambigous
> > >   Citrus is licensed under BSD License or variant (like
> > >   Perl or MIT).  It can use with (L)GPL.
> > >   WWW: http://citrus.bsdclub.org/
> > OK.  Technically, the website is not ambiguous.  It is the license that 
> > is ambiguous.  :)  At least, they claim it is:
> 
>   Ah, OK.  They, Citrus developers, consider that it is licensed
>   under BSD License on *BSD, at least.  In fact, on NetBSD/OpenBSD,
>   it is licensed under BSD License, and we can use it under BSD
>   License.
> 
>   But it may be used on other environment like X.  So it is licensed
>   under dual(multiple?) license.
> 

I thought that X.org was MIT/X11 licensed (which was very very similar
to BSD).

-- 
Coleman Kane


signature.asc
Description: This is a digitally signed message part


svn commit: r189776 - head/sys/dev/usb

2009-03-13 Thread Andrew Thompson
Author: thompsa
Date: Fri Mar 13 22:28:37 2009
New Revision: 189776
URL: http://svn.freebsd.org/changeset/base/189776

Log:
  HID usage minimum can be equal to the maximum.
  
  Submitted by: Hans Petter Selasky
  Tested by:Andreas Tobler

Modified:
  head/sys/dev/usb/usb_hid.c

Modified: head/sys/dev/usb/usb_hid.c
==
--- head/sys/dev/usb/usb_hid.c  Fri Mar 13 19:05:34 2009(r189775)
+++ head/sys/dev/usb/usb_hid.c  Fri Mar 13 22:28:37 2009(r189776)
@@ -441,7 +441,7 @@ hid_get_item(struct hid_data *s, struct 
 
/* sanity check */
if ((s->nusage < MAXUSAGE) &&
-   (c->usage_minimum < c->usage_maximum)) {
+   (c->usage_minimum <= c->usage_maximum)) {
/* add usage range */
s->usages_min[s->nusage] = 
c->usage_minimum;
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r189777 - head/lib/libc/nls

2009-03-13 Thread Gabor Kovesdan
Author: gabor (doc,ports committer)
Date: Fri Mar 13 22:41:30 2009
New Revision: 189777
URL: http://svn.freebsd.org/changeset/base/189777

Log:
  - Fix object directory creation when running threaded buildworld

Modified:
  head/lib/libc/nls/Makefile.inc

Modified: head/lib/libc/nls/Makefile.inc
==
--- head/lib/libc/nls/Makefile.inc  Fri Mar 13 22:28:37 2009
(r189776)
+++ head/lib/libc/nls/Makefile.inc  Fri Mar 13 22:41:30 2009
(r189777)
@@ -31,7 +31,7 @@ NLS+= ru_RU.KOI8-R
 NLS+=  sk_SK.ISO8859-2
 NLS+=  sv_SE.ISO8859-1
 
-beforeinstall:
+.BEGIN:
 .for c in ${NLS}
mkdir -p ${CANONICALOBJDIR}/../../lib32/usr/share/nls/${c}
mkdir -p ${CANONICALOBJDIR}/../../tmp/usr/share/nls/${c}
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r189765 - in head: . lib/libc lib/libc/nls

2009-03-13 Thread Sean C. Farley

On Fri, 13 Mar 2009, Xin LI wrote:


Sean C. Farley wrote:

On Sat, 14 Mar 2009, Norikatsu Shigemura wrote:

On Fri, 13 Mar 2009 13:36:07 -0500 (CDT) "Sean C. Farley"  
wrote:
functionality, however, the Citrus website is ambiguous about the 
license.


Really? > ambigous
Citrus is licensed under BSD License or variant (like
Perl or MIT).  It can use with (L)GPL.

WWW: http://citrus.bsdclub.org/


OK.  Technically, the website is not ambiguous.  It is the license 
that is ambiguous.  :)  At least, they claim it is:


The license is still ambiguous at this point, but it will be either
a BSD Style License or use perl's model. In addition, "the license
must allow for BSD/MIT/(L)GPL uses of the code". This allows the
possibility that it will be picked up by X or glib. However, it is
only a "possibility". To be honest, so far there is not schedule to
do port to glibc strictly. The X Consortium may be interested in
iconv for its X-TT or Unicode support.

A person offering code for this project must agree to it being
distributed with this license condition. In addition, copyright of
this project is added to the source code. Of course the original
copyright is left in place as well.


IANAL but the code already included in NetBSD says. for example:


*snip BSD license*

So my understanding is that, at least these code are released under a 
2-clause BSD code and we are supposed to be able to use these code 
under such license?


If that is the case, then that is great.  I was only going by what the 
website said about the source.


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


svn commit: r189778 - head/share/man/man8

2009-03-13 Thread Robert Watson
Author: rwatson
Date: Fri Mar 13 23:42:34 2009
New Revision: 189778
URL: http://svn.freebsd.org/changeset/base/189778

Log:
  Don't suggest mounting procfs in diskless configurations.
  
  MFC after:3 days

Modified:
  head/share/man/man8/diskless.8

Modified: head/share/man/man8/diskless.8
==
--- head/share/man/man8/diskless.8  Fri Mar 13 22:41:30 2009
(r189777)
+++ head/share/man/man8/diskless.8  Fri Mar 13 23:42:34 2009
(r189778)
@@ -376,7 +376,6 @@ As a minimum, you normally need to have 
 .Bd -literal -offset indent
 : / nfsro 0 0
 :/usr   /usr  nfsro 0 0
-proc/proc procfs rw 0 0
 .Ed
 .Pp
 You also need to create a customized version of
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r189781 - stable/7/sys/kern

2009-03-13 Thread Bruce M Simpson
Author: bms
Date: Sat Mar 14 01:12:35 2009
New Revision: 189781
URL: http://svn.freebsd.org/changeset/base/189781

Log:
  MFC rev: 189736
Ensure that the semaphore value is re-checked after sem_lock
is re-acquired, after the condition variable is signalled.
  
  Early MFC, as the test case in the PR is fairly complete and the
  submitter also re-ran test case on -STABLE. It also bites Python
  fairly hard, which will otherwise try to use POSIX sems for its
  internal thread synchronization; this needs more in-depth testing.
  
  PR:   http://www.freebsd.org/cgi/query-pr.cgi?pr=kern/127545
  Reviewed by:  attilio

Modified:
  stable/7/sys/kern/uipc_sem.c

Modified: stable/7/sys/kern/uipc_sem.c
==
--- stable/7/sys/kern/uipc_sem.cSat Mar 14 00:33:08 2009
(r189780)
+++ stable/7/sys/kern/uipc_sem.cSat Mar 14 01:12:35 2009
(r189781)
@@ -722,7 +722,7 @@ kern_sem_wait(struct thread *td, semid_t
 #endif
DP(("kern_sem_wait value = %d, tryflag %d\n", ks->ks_value, tryflag));
vfs_timestamp(&ks->ks_atime);
-   if (ks->ks_value == 0) {
+   while (ks->ks_value == 0) {
ks->ks_waiters++;
if (tryflag != 0)
error = EAGAIN;
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r189781 - stable/7/sys/kern

2009-03-13 Thread Bruce Simpson

Bruce M Simpson wrote:

  Early MFC, as the test case in the PR is fairly complete and the
  submitter also re-ran test case on -STABLE. It also bites Python
  fairly hard, which will otherwise try to use POSIX sems for its
  internal thread synchronization; this needs more in-depth testing.
 


Note: FreeBSD's build of Python does NOT attempt to use POSIX sems by 
default, it
will only do this if explicitly patched to do so. It defaults to using 
condvars + mutexes

to build Python's internal thread locks.

I'd encourage folk to try the patch which does this,
I only posted the 'side-step' patch (i.e. use GNU Pth, needs to be 
explicitly

enabled in OPTIONS) but the changes needed are in here too:
   http://people.freebsd.org/~bms/dump/python26-fbsd-pth.patch

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


Re: svn commit: r189781 - stable/7/sys/kern

2009-03-13 Thread Bruce Simpson
A big thanks to jhb@ for pushing much of the housekeeping around 
semaphores into the file descriptor layer, btw;
without his major help, the fix for the logic wouldn't have been a one 
line diff.

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


svn commit: r189782 - head/include

2009-03-13 Thread David Schultz
Author: das
Date: Sat Mar 14 02:31:48 2009
New Revision: 189782
URL: http://svn.freebsd.org/changeset/base/189782

Log:
  r189349 removed mktemp() from the XSI namespace when
  __XOPEN_SOURCE >= 700, since mktemp() was withdrawn
  from the standard. However, __XSI_VISIBLE is set to
  700 in the default BSD envrionment, where mktemp()
  should still exist; hence, check for this.

Modified:
  head/include/stdlib.h

Modified: head/include/stdlib.h
==
--- head/include/stdlib.h   Sat Mar 14 01:12:35 2009(r189781)
+++ head/include/stdlib.h   Sat Mar 14 02:31:48 2009(r189782)
@@ -196,7 +196,7 @@ long jrand48(unsigned short[3]);
 char   *l64a(long);
 voidlcong48(unsigned short[7]);
 longlrand48(void);
-#if !defined(_MKTEMP_DECLARED) && __XSI_VISIBLE <= 600
+#if !defined(_MKTEMP_DECLARED) && (__BSD_VISIBLE || __XSI_VISIBLE <= 600)
 char   *mktemp(char *);
 #define_MKTEMP_DECLARED
 #endif
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r189782 - head/include

2009-03-13 Thread David Schultz
On Sat, Mar 14, 2009, David Schultz wrote:
> Author: das
> Date: Sat Mar 14 02:31:48 2009
> New Revision: 189782
> URL: http://svn.freebsd.org/changeset/base/189782
> 
> Log:
>   r189349 removed mktemp() from the XSI namespace when
>   __XOPEN_SOURCE >= 700, since mktemp() was withdrawn
>   from the standard. However, __XSI_VISIBLE is set to
>   700 in the default BSD envrionment, where mktemp()
>   should still exist; hence, check for this.

Forgot to mention...

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


svn commit: r189783 - head/sys/amd64/amd64

2009-03-13 Thread Alan Cox
Author: alc
Date: Sat Mar 14 05:33:09 2009
New Revision: 189783
URL: http://svn.freebsd.org/changeset/base/189783

Log:
  Correct accounting errors in _pmap_allocpte().  Specifically, the pmap's
  resident page count and the global wired page count were not correctly
  maintained when page table page allocation failed.
  
  MFC after:6 weeks

Modified:
  head/sys/amd64/amd64/pmap.c

Modified: head/sys/amd64/amd64/pmap.c
==
--- head/sys/amd64/amd64/pmap.c Sat Mar 14 02:31:48 2009(r189782)
+++ head/sys/amd64/amd64/pmap.c Sat Mar 14 05:33:09 2009(r189783)
@@ -1442,8 +1442,6 @@ _pmap_allocpte(pmap_t pmap, vm_pindex_t 
 * it isn't already there.
 */
 
-   pmap->pm_stats.resident_count++;
-
if (ptepindex >= (NUPDE + NUPDPE)) {
pml4_entry_t *pml4;
vm_pindex_t pml4index;
@@ -1469,7 +1467,8 @@ _pmap_allocpte(pmap_t pmap, vm_pindex_t 
if (_pmap_allocpte(pmap, NUPDE + NUPDPE + pml4index,
flags) == NULL) {
--m->wire_count;
-   vm_page_free(m);
+   atomic_subtract_int(&cnt.v_wire_count, 1);
+   vm_page_free_zero(m);
return (NULL);
}
} else {
@@ -1501,7 +1500,8 @@ _pmap_allocpte(pmap_t pmap, vm_pindex_t 
if (_pmap_allocpte(pmap, NUPDE + pdpindex,
flags) == NULL) {
--m->wire_count;
-   vm_page_free(m);
+   atomic_subtract_int(&cnt.v_wire_count, 1);
+   vm_page_free_zero(m);
return (NULL);
}
pdp = (pdp_entry_t *)PHYS_TO_DMAP(*pml4 & PG_FRAME);
@@ -1514,7 +1514,9 @@ _pmap_allocpte(pmap_t pmap, vm_pindex_t 
if (_pmap_allocpte(pmap, NUPDE + pdpindex,
flags) == NULL) {
--m->wire_count;
-   vm_page_free(m);
+   atomic_subtract_int(&cnt.v_wire_count,
+   1);
+   vm_page_free_zero(m);
return (NULL);
}
} else {
@@ -1530,6 +1532,8 @@ _pmap_allocpte(pmap_t pmap, vm_pindex_t 
*pd = VM_PAGE_TO_PHYS(m) | PG_U | PG_RW | PG_V | PG_A | PG_M;
}
 
+   pmap->pm_stats.resident_count++;
+
return m;
 }
 
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r189783 - head/sys/amd64/amd64

2009-03-13 Thread Alan Cox

Alan Cox wrote:

Author: alc
Date: Sat Mar 14 05:33:09 2009
New Revision: 189783
URL: http://svn.freebsd.org/changeset/base/189783

Log:
  Correct accounting errors in _pmap_allocpte().  Specifically, the pmap's
  resident page count and the global wired page count were not correctly
  maintained when page table page allocation failed.
  
  MFC after:	6 weeks
  


I should have also said:

Reviewed by: kib
Tested by: pho



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


Re: svn commit: r189777 - head/lib/libc/nls

2009-03-13 Thread Ed Schouten
* Gabor Kovesdan  wrote:
>   - Fix object directory creation when running threaded buildworld

Isn't this normally done by the mtrees?

-- 
 Ed Schouten 
 WWW: http://80386.nl/


pgpK3O6S4oj1x.pgp
Description: PGP signature