svn commit: r186213 - head/sys/net

2008-12-17 Thread Kip Macy
Author: kmacy
Date: Wed Dec 17 08:12:50 2008
New Revision: 186213
URL: http://svn.freebsd.org/changeset/base/186213

Log:
  Keep stats in drbr_enqueue
  
  Discussed with: ps

Modified:
  head/sys/net/if_var.h

Modified: head/sys/net/if_var.h
==
--- head/sys/net/if_var.h   Wed Dec 17 06:56:58 2008(r186212)
+++ head/sys/net/if_var.h   Wed Dec 17 08:12:50 2008(r186213)
@@ -550,16 +550,29 @@ do {  
\
 } while (0)
 
 #ifdef _KERNEL
+static __inline void
+drbr_stats_update(struct ifnet *ifp, int len, int mflags)
+{
+
+   ifp->if_obytes += len;
+   if (mflags & M_MCAST)
+   ifp->if_omcasts++;
+}
+
 static __inline int
-drbr_enqueue(struct buf_ring *br, struct mbuf *m)
+drbr_enqueue(struct ifnet *ifp, struct buf_ring *br, struct mbuf *m)
 {  
int error = 0;
+   int len = m->m_pkthdr.len;
+   int mflags = m->m_flags;
 
if ((error = buf_ring_enqueue(br, m)) == ENOBUFS) {
br->br_drops++;
+   _IF_DROP(&ifp->if_snd);
m_freem(m);
-   }
-
+   } else
+   drbr_stats_update(ifp, len, mflags);
+   
return (error);
 }
 
___
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: r186214 - in head/sys: dev/re pci

2008-12-17 Thread Pyun YongHyeon
Author: yongari
Date: Wed Dec 17 08:18:11 2008
New Revision: 186214
URL: http://svn.freebsd.org/changeset/base/186214

Log:
  It seems that RealTek PCIe controllers require an explicit Tx poll
  command whenever Tx completion interrupt is raised. The Tx poll
  bit is cleared when all packets waiting to be transferred have been
  processed. This means the second Tx poll command can be silently
  ignored as the Tx poll bit could be still active while processing
  of previous Tx poll command is in progress.
  To address the issue re(4) used to invoke the Tx poll command in Tx
  completion handler whenever it detects there are pending packets in
  TxQ. However that still does not seem to completely eliminate
  watchdog timeouts seen on RealTek PCIe controllers. To fix the
  issue kick Tx poll command only after Tx completion interrupt is
  raised as this would indicate Tx is now idle state such that it can
  accept new Tx poll command again. While here apply this workaround
  for PCIe based controllers as other controllers does not seem to
  have this limitation.
  
  Tested by:Victor Balada Diaz < victor <> bsdes DOT net >

Modified:
  head/sys/dev/re/if_re.c
  head/sys/pci/if_rlreg.h

Modified: head/sys/dev/re/if_re.c
==
--- head/sys/dev/re/if_re.c Wed Dec 17 08:12:50 2008(r186213)
+++ head/sys/dev/re/if_re.c Wed Dec 17 08:18:11 2008(r186214)
@@ -1157,6 +1157,7 @@ re_attach(device_t dev)
 
msic = 0;
if (pci_find_extcap(dev, PCIY_EXPRESS, ®) == 0) {
+   sc->rl_flags |= RL_FLAG_PCIE;
msic = pci_msi_count(dev);
if (bootverbose)
device_printf(dev, "MSI count : %d\n", msic);
@@ -2042,16 +2043,6 @@ re_txeof(struct rl_softc *sc)
/* No changes made to the TX ring, so no flush needed */
 
if (sc->rl_ldata.rl_tx_free != sc->rl_ldata.rl_tx_desc_cnt) {
-   /*
-* Some chips will ignore a second TX request issued
-* while an existing transmission is in progress. If
-* the transmitter goes idle but there are still
-* packets waiting to be sent, we need to restart the
-* channel here to flush them out. This only seems to
-* be required with the PCIe devices.
-*/
-   CSR_WRITE_1(sc, sc->rl_txstart, RL_TXSTART_START);
-
 #ifdef RE_TX_MODERATION
/*
 * If not all descriptors have been reaped yet, reload
@@ -2115,6 +2106,9 @@ re_poll_locked(struct ifnet *ifp, enum p
return;
if (status)
CSR_WRITE_2(sc, RL_ISR, status);
+   if ((status & (RL_ISR_TX_OK | RL_ISR_TX_DESC_UNAVAIL)) &&
+   (sc->rl_flags & RL_FLAG_PCIE))
+   CSR_WRITE_1(sc, sc->rl_txstart, RL_TXSTART_START);
 
/*
 * XXX check behaviour on receiver stalls.
@@ -2176,6 +2170,17 @@ re_int_task(void *arg, int npending)
if (status & (RL_ISR_RX_OK|RL_ISR_RX_ERR|RL_ISR_FIFO_OFLOW))
rval = re_rxeof(sc);
 
+   /*
+* Some chips will ignore a second TX request issued
+* while an existing transmission is in progress. If
+* the transmitter goes idle but there are still
+* packets waiting to be sent, we need to restart the
+* channel here to flush them out. This only seems to
+* be required with the PCIe devices.
+*/
+   if ((status & (RL_ISR_TX_OK | RL_ISR_TX_DESC_UNAVAIL)) &&
+   (sc->rl_flags & RL_FLAG_PCIE))
+   CSR_WRITE_1(sc, sc->rl_txstart, RL_TXSTART_START);
if (status & (
 #ifdef RE_TX_MODERATION
RL_ISR_TIMEOUT_EXPIRED|

Modified: head/sys/pci/if_rlreg.h
==
--- head/sys/pci/if_rlreg.h Wed Dec 17 08:12:50 2008(r186213)
+++ head/sys/pci/if_rlreg.h Wed Dec 17 08:18:11 2008(r186214)
@@ -891,6 +891,7 @@ struct rl_softc {
 #defineRL_FLAG_PHY8110S0x0800
 #defineRL_FLAG_WOLRXENB0x1000
 #defineRL_FLAG_MACSLEEP0x2000
+#defineRL_FLAG_PCIE0x4000
 #defineRL_FLAG_LINK0x8000
 };
 
___
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: r186057 - head/sys/netinet

2008-12-17 Thread Bjoern A. Zeeb

On Tue, 16 Dec 2008, Peter Wemm wrote:

Hi,

there's multiple things in here, so let me try to address them
separately.



On Sat, Dec 13, 2008 at 1:59 PM, Bjoern A. Zeeb  wrote:

 De-virtualize the MD5 context for TCP initial seq number generation
 and make it a function local variable like we do almost everywhere
 inside the kernel.

[..]

--- head/sys/netinet/vinet.hSat Dec 13 21:17:46 2008(r186056)
+++ head/sys/netinet/vinet.hSat Dec 13 21:59:18 2008(r186057)
@@ -142,7 +142,6 @@ struct vnet_inet {
   int _isn_last_reseed;
   u_int32_t _isn_offset;
   u_int32_t _isn_offset_old;
-   MD5_CTX _isn_ctx;

   struct  inpcbhead _udb;
   struct  inpcbinfo _udbinfo;



BTW; the reason why _isn_ctx was global is because it is a non-trivial
size.  It might only be 88 bytes, but when you've only got a few KB of
stack and lots of nesting, this stuff adds up pretty quickly.  We were
right on the edge of stack overflows for quite some time and had to go
and hunt down this sort of thing.  In this case it is probably
harmless, but we must not get into the habit of casually discarding
previous hard-won space savings.


Ok. I wasn't aware of this but it's good to know as there are some
ip address printings out there that need to be resolved and it's
I'll send it out for broader review before resuming that work.

For the above change silby had confirmed that he initially went with
the global to save stack space.  To decide if I should really change
it I had looked at the kernel how other parts are handling this and
I found cam, ipfilter, pf, safe, usbsec, various geom modules,
the syncache itself, ... to have them on the stack. At that point
I stopped worrying.

For the actual structure change, yeah I missed the freebsd_version
bump most likely because I had done the patch ~2 days before vimage
went in, sent mail to silby, and was distracted by the SYSINIT ordering
problem Marko had found (see that commit) and then got back to this
commit days later after Marko's and my vimage commit.
In short - my fault.

(2nd mail to follow).

--
Bjoern A. Zeeb  The greatest risk is not taking one.
___
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: r186232 - head

2008-12-17 Thread Hajimu UMEMOTO
Author: ume
Date: Wed Dec 17 16:19:33 2008
New Revision: 186232
URL: http://svn.freebsd.org/changeset/base/186232

Log:
  Reflect mergeinfo when importing BIND 9.4.3 resolver.

Modified:
  head/   (props changed)
___
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: r186236 - head/usr.sbin/syslogd

2008-12-17 Thread David E. O'Brien
Author: obrien
Date: Wed Dec 17 16:55:58 2008
New Revision: 186236
URL: http://svn.freebsd.org/changeset/base/186236

Log:
  Use passed parameter rather than the #define.
  (more accurate extraction of Juniper Networks change)

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

Modified: head/usr.sbin/syslogd/syslogd.c
==
--- head/usr.sbin/syslogd/syslogd.c Wed Dec 17 16:54:29 2008
(r186235)
+++ head/usr.sbin/syslogd/syslogd.c Wed Dec 17 16:55:58 2008
(r186236)
@@ -1372,8 +1372,8 @@ wallmsg(struct filed *f, struct iovec *i
break;
if (!strncmp(f->f_un.f_uname[i], ut.ut_name,
UT_NAMESIZE)) {
-   if ((p = ttymsg(iov, IOV_SIZE, line,
-   TTYMSGTIME)) != NULL) {
+   if ((p = ttymsg(iov, iovlen, line, TTYMSGTIME))
+   != NULL) {
errno = 0;  /* already in msg */
logerror(p);
}
___
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: r186237 - head/etc/rc.d

2008-12-17 Thread Brooks Davis
Author: brooks
Date: Wed Dec 17 17:35:14 2008
New Revision: 186237
URL: http://svn.freebsd.org/changeset/base/186237

Log:
  Correct a bug where /etc/rc.d/defaultroute fails to finish by printing a
  newline when it fails to obtain an address via DHCP. This made the next
  rc script begin its output on the same line.
  
  PR:   conf
  Submitted by: Bruce Cran 
  MFC after:3 days

Modified:
  head/etc/rc.d/defaultroute

Modified: head/etc/rc.d/defaultroute
==
--- head/etc/rc.d/defaultroute  Wed Dec 17 16:55:58 2008(r186236)
+++ head/etc/rc.d/defaultroute  Wed Dec 17 17:35:14 2008(r186237)
@@ -30,7 +30,7 @@ defaultroute_start()
defif=`get_default_if -inet`
if [ -n "${defif}" ]; then
if [ ${delay} -ne ${if_up_delay} ]; then
-   echo "($defif)"
+   echo -n "($defif)"
fi
break
fi
@@ -42,6 +42,8 @@ defaultroute_start()
sleep 1
delay=`expr $delay - 1`
done
+
+   echo
 }
 
 load_rc_config $name
___
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: r186238 - in stable/7/sys: . dev/mfi

2008-12-17 Thread Doug Ambrisko
Author: ambrisko
Date: Wed Dec 17 17:37:54 2008
New Revision: 186238
URL: http://svn.freebsd.org/changeset/base/186238

Log:
  MFC: r185584,185994,185999,186132 which updates the strings that identifies
   the new supported HW and bump the driver version number.
  
  Submitted by: LSI
  Approved by:  re (kib)

Modified:
  stable/7/sys/   (props changed)
  stable/7/sys/dev/mfi/mfi.c
  stable/7/sys/dev/mfi/mfi_pci.c

Modified: stable/7/sys/dev/mfi/mfi.c
==
--- stable/7/sys/dev/mfi/mfi.c  Wed Dec 17 17:35:14 2008(r186237)
+++ stable/7/sys/dev/mfi/mfi.c  Wed Dec 17 17:37:54 2008(r186238)
@@ -296,7 +296,8 @@ mfi_attach(struct mfi_softc *sc)
uint32_t status;
int error, commsz, framessz, sensesz;
int frames, unit, max_fw_sge;
-device_printf(sc->mfi_dev, "Megaraid SAS driver Ver 2.00 \n");
+
+   device_printf(sc->mfi_dev, "Megaraid SAS driver Ver 3.00 \n");
 
mtx_init(&sc->mfi_io_lock, "MFI I/O lock", NULL, MTX_DEF);
sx_init(&sc->mfi_config_lock, "MFI config");

Modified: stable/7/sys/dev/mfi/mfi_pci.c
==
--- stable/7/sys/dev/mfi/mfi_pci.c  Wed Dec 17 17:35:14 2008
(r186237)
+++ stable/7/sys/dev/mfi/mfi_pci.c  Wed Dec 17 17:37:54 2008
(r186238)
@@ -114,18 +114,21 @@ struct mfi_ident {
int flags;
const char  *desc;
 } mfi_identifiers[] = {
-   {0x1000, 0x0411, 0x, 0x, MFI_FLAGS_1064R, "LSI MegaSAS 1064R"}, 
/* Brocton IOP */
-   {0x1000, 0x0413, 0x, 0x, MFI_FLAGS_1064R, "LSI MegaSAS 1064R"}, 
/* Verde ZCR */
-   {0x1028, 0x0015, 0x, 0x, MFI_FLAGS_1064R, "Dell PERC 5/i"},
{0x1000, 0x0060, 0x1028, 0x, MFI_FLAGS_1078,  "Dell PERC 6"},
-   {0x1000, 0x0060, 0x, 0x, MFI_FLAGS_1078,  "LSI MegaSAS 1078"},
-   {0x1000, 0x0079, 0x1028, 0x1f15, MFI_FLAGS_GEN2,  "Dell PERC 607E 
Adapter"},
-   {0x1000, 0x0079, 0x1028, 0x1f16, MFI_FLAGS_GEN2,  "Dell PERC 607I 
Adapter"},
-   {0x1000, 0x0079, 0x1028, 0x1f17, MFI_FLAGS_GEN2,  "Dell PERC 607I 
Integrated"},
-   {0x1000, 0x0079, 0x1028, 0x1f18, MFI_FLAGS_GEN2,  "Dell PERC 607I 
Modular"},
+   {0x1000, 0x0060, 0x, 0x, MFI_FLAGS_1078,  "LSI MegaSAS 1078"},
{0x1000, 0x0078, 0x, 0x, MFI_FLAGS_GEN2,  "LSI MegaSAS Gen2"},
+   {0x1000, 0x0079, 0x1028, 0x1f15, MFI_FLAGS_GEN2,  "Dell PERC H800 
Adapter"},
+   {0x1000, 0x0079, 0x1028, 0x1f16, MFI_FLAGS_GEN2,  "Dell PERC H700 
Adapter"},
+   {0x1000, 0x0079, 0x1028, 0x1f17, MFI_FLAGS_GEN2,  "Dell PERC H700 
Integrated"},
+   {0x1000, 0x0079, 0x1028, 0x1f18, MFI_FLAGS_GEN2,  "Dell PERC H700 
Modular"},
+   {0x1000, 0x0079, 0x1028, 0x1f19, MFI_FLAGS_GEN2,  "Dell PERC H700"},
+   {0x1000, 0x0079, 0x1028, 0x1f1b, MFI_FLAGS_GEN2,  "Dell PERC H800"},
+   {0x1000, 0x0079, 0x1028, 0x, MFI_FLAGS_GEN2,  "Dell PERC Gen2"},
{0x1000, 0x0079, 0x, 0x, MFI_FLAGS_GEN2,  "LSI MegaSAS Gen2"},
{0x1000, 0x007c, 0x, 0x, MFI_FLAGS_1078,  "LSI MegaSAS 1078"},
+   {0x1000, 0x0411, 0x, 0x, MFI_FLAGS_1064R, "LSI MegaSAS 1064R"}, 
/* Brocton IOP */
+   {0x1000, 0x0413, 0x, 0x, MFI_FLAGS_1064R, "LSI MegaSAS 1064R"}, 
/* Verde ZCR */
+   {0x1028, 0x0015, 0x, 0x, MFI_FLAGS_1064R, "Dell PERC 5/i"},
{0, 0, 0, 0, 0, NULL}
 };
 
___
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: r186239 - in releng/7.1/sys: . dev/mfi

2008-12-17 Thread Doug Ambrisko
Author: ambrisko
Date: Wed Dec 17 17:39:36 2008
New Revision: 186239
URL: http://svn.freebsd.org/changeset/base/186239

Log:
  MFC: r185584,185994,185999,186132 which updates the strings that identifies
   the new supported HW and bump the driver version number.
  
  Submitted by: LSI
  Approved by:  re (kib)

Modified:
  releng/7.1/sys/   (props changed)
  releng/7.1/sys/dev/mfi/mfi.c
  releng/7.1/sys/dev/mfi/mfi_pci.c

Modified: releng/7.1/sys/dev/mfi/mfi.c
==
--- releng/7.1/sys/dev/mfi/mfi.cWed Dec 17 17:37:54 2008
(r186238)
+++ releng/7.1/sys/dev/mfi/mfi.cWed Dec 17 17:39:36 2008
(r186239)
@@ -296,7 +296,8 @@ mfi_attach(struct mfi_softc *sc)
uint32_t status;
int error, commsz, framessz, sensesz;
int frames, unit, max_fw_sge;
-device_printf(sc->mfi_dev, "Megaraid SAS driver Ver 2.00 \n");
+
+   device_printf(sc->mfi_dev, "Megaraid SAS driver Ver 3.00 \n");
 
mtx_init(&sc->mfi_io_lock, "MFI I/O lock", NULL, MTX_DEF);
sx_init(&sc->mfi_config_lock, "MFI config");

Modified: releng/7.1/sys/dev/mfi/mfi_pci.c
==
--- releng/7.1/sys/dev/mfi/mfi_pci.cWed Dec 17 17:37:54 2008
(r186238)
+++ releng/7.1/sys/dev/mfi/mfi_pci.cWed Dec 17 17:39:36 2008
(r186239)
@@ -114,18 +114,21 @@ struct mfi_ident {
int flags;
const char  *desc;
 } mfi_identifiers[] = {
-   {0x1000, 0x0411, 0x, 0x, MFI_FLAGS_1064R, "LSI MegaSAS 1064R"}, 
/* Brocton IOP */
-   {0x1000, 0x0413, 0x, 0x, MFI_FLAGS_1064R, "LSI MegaSAS 1064R"}, 
/* Verde ZCR */
-   {0x1028, 0x0015, 0x, 0x, MFI_FLAGS_1064R, "Dell PERC 5/i"},
{0x1000, 0x0060, 0x1028, 0x, MFI_FLAGS_1078,  "Dell PERC 6"},
-   {0x1000, 0x0060, 0x, 0x, MFI_FLAGS_1078,  "LSI MegaSAS 1078"},
-   {0x1000, 0x0079, 0x1028, 0x1f15, MFI_FLAGS_GEN2,  "Dell PERC 607E 
Adapter"},
-   {0x1000, 0x0079, 0x1028, 0x1f16, MFI_FLAGS_GEN2,  "Dell PERC 607I 
Adapter"},
-   {0x1000, 0x0079, 0x1028, 0x1f17, MFI_FLAGS_GEN2,  "Dell PERC 607I 
Integrated"},
-   {0x1000, 0x0079, 0x1028, 0x1f18, MFI_FLAGS_GEN2,  "Dell PERC 607I 
Modular"},
+   {0x1000, 0x0060, 0x, 0x, MFI_FLAGS_1078,  "LSI MegaSAS 1078"},
{0x1000, 0x0078, 0x, 0x, MFI_FLAGS_GEN2,  "LSI MegaSAS Gen2"},
+   {0x1000, 0x0079, 0x1028, 0x1f15, MFI_FLAGS_GEN2,  "Dell PERC H800 
Adapter"},
+   {0x1000, 0x0079, 0x1028, 0x1f16, MFI_FLAGS_GEN2,  "Dell PERC H700 
Adapter"},
+   {0x1000, 0x0079, 0x1028, 0x1f17, MFI_FLAGS_GEN2,  "Dell PERC H700 
Integrated"},
+   {0x1000, 0x0079, 0x1028, 0x1f18, MFI_FLAGS_GEN2,  "Dell PERC H700 
Modular"},
+   {0x1000, 0x0079, 0x1028, 0x1f19, MFI_FLAGS_GEN2,  "Dell PERC H700"},
+   {0x1000, 0x0079, 0x1028, 0x1f1b, MFI_FLAGS_GEN2,  "Dell PERC H800"},
+   {0x1000, 0x0079, 0x1028, 0x, MFI_FLAGS_GEN2,  "Dell PERC Gen2"},
{0x1000, 0x0079, 0x, 0x, MFI_FLAGS_GEN2,  "LSI MegaSAS Gen2"},
{0x1000, 0x007c, 0x, 0x, MFI_FLAGS_1078,  "LSI MegaSAS 1078"},
+   {0x1000, 0x0411, 0x, 0x, MFI_FLAGS_1064R, "LSI MegaSAS 1064R"}, 
/* Brocton IOP */
+   {0x1000, 0x0413, 0x, 0x, MFI_FLAGS_1064R, "LSI MegaSAS 1064R"}, 
/* Verde ZCR */
+   {0x1028, 0x0015, 0x, 0x, MFI_FLAGS_1064R, "Dell PERC 5/i"},
{0, 0, 0, 0, 0, NULL}
 };
 
___
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: r186240 - in head/sys: amd64/conf arm/conf i386/conf mips/conf pc98/conf sparc64/conf sun4v/conf

2008-12-17 Thread Marcel Moolenaar
Author: marcel
Date: Wed Dec 17 17:43:22 2008
New Revision: 186240
URL: http://svn.freebsd.org/changeset/base/186240

Log:
  Make gpart the default partitioning class on all platforms.
  Both ia64 and powerpc were using gpart exclusively already
  so there's no change for those two.
  
  Discussed on: arch@

Modified:
  head/sys/amd64/conf/DEFAULTS
  head/sys/arm/conf/DEFAULTS
  head/sys/arm/conf/EP80219
  head/sys/i386/conf/DEFAULTS
  head/sys/mips/conf/DEFAULTS
  head/sys/pc98/conf/DEFAULTS
  head/sys/sparc64/conf/DEFAULTS
  head/sys/sun4v/conf/DEFAULTS

Modified: head/sys/amd64/conf/DEFAULTS
==
--- head/sys/amd64/conf/DEFAULTSWed Dec 17 17:39:36 2008
(r186239)
+++ head/sys/amd64/conf/DEFAULTSWed Dec 17 17:43:22 2008
(r186240)
@@ -16,5 +16,5 @@ deviceio  # I/O device
 device uart_ns8250
 
 # Default partitioning schemes
-optionsGEOM_BSD
-optionsGEOM_MBR
+optionsGEOM_PART_BSD
+optionsGEOM_PART_MBR

Modified: head/sys/arm/conf/DEFAULTS
==
--- head/sys/arm/conf/DEFAULTS  Wed Dec 17 17:39:36 2008(r186239)
+++ head/sys/arm/conf/DEFAULTS  Wed Dec 17 17:43:22 2008(r186240)
@@ -7,5 +7,5 @@ machine arm
 
 device mem
 
-optionsGEOM_BSD
-optionsGEOM_MBR
+optionsGEOM_PART_BSD
+optionsGEOM_PART_MBR

Modified: head/sys/arm/conf/EP80219
==
--- head/sys/arm/conf/EP80219   Wed Dec 17 17:39:36 2008(r186239)
+++ head/sys/arm/conf/EP80219   Wed Dec 17 17:43:22 2008(r186240)
@@ -57,7 +57,6 @@ options   SYSVSEM #SYSV-style semaphore
 options_KPOSIX_PRIORITY_SCHEDULING #Posix P1003_1B real-time extensions
 optionsKBD_INSTALL_CDEV# install a CDEV entry in /dev
 optionsGEOM_PART_GPT# GUID Partition Tables.
-optionsGEOM_MBR# DOS/MBR partitioning
 optionsGEOM_LABEL# Providers labelization.
 
 optionsBOOTP

Modified: head/sys/i386/conf/DEFAULTS
==
--- head/sys/i386/conf/DEFAULTS Wed Dec 17 17:39:36 2008(r186239)
+++ head/sys/i386/conf/DEFAULTS Wed Dec 17 17:43:22 2008(r186240)
@@ -20,8 +20,8 @@ deviceio  # I/O device
 device uart_ns8250
 
 # Default partitioning schemes
-optionsGEOM_BSD
-optionsGEOM_MBR
+optionsGEOM_PART_BSD
+optionsGEOM_PART_MBR
 
 # enable support for native hardware
 optionsNATIVE

Modified: head/sys/mips/conf/DEFAULTS
==
--- head/sys/mips/conf/DEFAULTS Wed Dec 17 17:39:36 2008(r186239)
+++ head/sys/mips/conf/DEFAULTS Wed Dec 17 17:43:22 2008(r186240)
@@ -9,5 +9,5 @@ device  mem
 
 device uart_ns8250
 
-optionsGEOM_BSD
-optionsGEOM_MBR
+optionsGEOM_PART_BSD
+optionsGEOM_PART_MBR

Modified: head/sys/pc98/conf/DEFAULTS
==
--- head/sys/pc98/conf/DEFAULTS Wed Dec 17 17:39:36 2008(r186239)
+++ head/sys/pc98/conf/DEFAULTS Wed Dec 17 17:43:22 2008(r186240)
@@ -22,5 +22,5 @@ deviceuart_ns8250
 #deviceuart_i8251
 
 # Default partitioning schemes
-optionsGEOM_BSD
-optionsGEOM_PC98
+optionsGEOM_PART_BSD
+optionsGEOM_PART_PC98

Modified: head/sys/sparc64/conf/DEFAULTS
==
--- head/sys/sparc64/conf/DEFAULTS  Wed Dec 17 17:39:36 2008
(r186239)
+++ head/sys/sparc64/conf/DEFAULTS  Wed Dec 17 17:43:22 2008
(r186240)
@@ -14,8 +14,8 @@ deviceuart_sab82532
 device uart_z8530
 
 # Default partitioning schemes
-optionsGEOM_BSD
-optionsGEOM_SUNLABEL
+optionsGEOM_PART_BSD
+optionsGEOM_PART_VTOC8
 
 # Let sunkbd emulate an AT keyboard by default.
 optionsSUNKBD_EMULATE_ATKBD

Modified: head/sys/sun4v/conf/DEFAULTS
==
--- head/sys/sun4v/conf/DEFAULTSWed Dec 17 17:39:36 2008
(r186239)
+++ head/sys/sun4v/conf/DEFAULTSWed Dec 17 17:43:22 2008
(r186240)
@@ -9,5 +9,5 @@ machine sun4v
 device mem # Memory and kernel memory devices
 
 # Default partitioning schemes
-optionsGEOM_BSD
-optionsGEOM_SUNLABEL
+optionsGEOM_PART_BSD
+optionsGEOM_PART_VTOC8
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-s

svn commit: r186241 - in head: lib/libfetch usr.bin/fetch

2008-12-17 Thread Murray Stokely
Author: murray
Date: Wed Dec 17 18:00:18 2008
New Revision: 186241
URL: http://svn.freebsd.org/changeset/base/186241

Log:
  1. Update fetch to consistently return 1 on error, as the man page states,
 rather than usually returning 1 but in a few instances using a sysexits(3)
 return value.
  
  2. Remove a few unused variables from libfetch.
  
  PR:   docs/122470  (1, only)
  Reviewed by:  des
  > Description of fields to fill in above: 76 columns --|
  > PR:If a GNATS PR is affected by the change.
  > Submitted by:  If someone else sent in the change.
  > Reviewed by:   If someone else reviewed your modification.
  > Approved by:   If you needed approval for this commit.
  > Obtained from: If the change is from a third party.
  > MFC after: N [day[s]|week[s]|month[s]].  Request a reminder email.
  > Security:  Vulnerability reference (one per line) or description.
  > Empty fields above will be automatically removed.
  
  Musr.bin/fetch/fetch.c
  Mlib/libfetch/fetch.c

Modified:
  head/lib/libfetch/fetch.c
  head/usr.bin/fetch/fetch.c

Modified: head/lib/libfetch/fetch.c
==
--- head/lib/libfetch/fetch.c   Wed Dec 17 17:43:22 2008(r186240)
+++ head/lib/libfetch/fetch.c   Wed Dec 17 18:00:18 2008(r186241)
@@ -74,9 +74,7 @@ static struct fetcherr url_errlist[] = {
 FILE *
 fetchXGet(struct url *URL, struct url_stat *us, const char *flags)
 {
-   int direct;
 
-   direct = CHECK_FLAG('d');
if (us != NULL) {
us->size = -1;
us->atime = us->mtime = 0;
@@ -110,9 +108,7 @@ fetchGet(struct url *URL, const char *fl
 FILE *
 fetchPut(struct url *URL, const char *flags)
 {
-   int direct;
 
-   direct = CHECK_FLAG('d');
if (strcasecmp(URL->scheme, SCHEME_FILE) == 0)
return (fetchPutFile(URL, flags));
else if (strcasecmp(URL->scheme, SCHEME_FTP) == 0)
@@ -132,9 +128,7 @@ fetchPut(struct url *URL, const char *fl
 int
 fetchStat(struct url *URL, struct url_stat *us, const char *flags)
 {
-   int direct;
 
-   direct = CHECK_FLAG('d');
if (us != NULL) {
us->size = -1;
us->atime = us->mtime = 0;
@@ -158,9 +152,7 @@ fetchStat(struct url *URL, struct url_st
 struct url_ent *
 fetchList(struct url *URL, const char *flags)
 {
-   int direct;
 
-   direct = CHECK_FLAG('d');
if (strcasecmp(URL->scheme, SCHEME_FILE) == 0)
return (fetchListFile(URL, flags));
else if (strcasecmp(URL->scheme, SCHEME_FTP) == 0)

Modified: head/usr.bin/fetch/fetch.c
==
--- head/usr.bin/fetch/fetch.c  Wed Dec 17 17:43:22 2008(r186240)
+++ head/usr.bin/fetch/fetch.c  Wed Dec 17 18:00:18 2008(r186241)
@@ -42,7 +42,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 
@@ -865,7 +864,7 @@ main(int argc, char *argv[])
break;
default:
usage();
-   exit(EX_USAGE);
+   exit(1);
}
 
argc -= optind;
@@ -874,7 +873,7 @@ main(int argc, char *argv[])
if (h_hostname || f_filename || c_dirname) {
if (!h_hostname || !f_filename || argc) {
usage();
-   exit(EX_USAGE);
+   exit(1);
}
/* XXX this is a hack. */
if (strcspn(h_hostname, "@:/") != strlen(h_hostname))
@@ -887,7 +886,7 @@ main(int argc, char *argv[])
 
if (!argc) {
usage();
-   exit(EX_USAGE);
+   exit(1);
}
 
/* allocate buffer */
@@ -928,10 +927,10 @@ main(int argc, char *argv[])
} else if (stat(o_filename, &sb) == -1) {
if (errno == ENOENT) {
if (argc > 1)
-   errx(EX_USAGE, "%s is not a directory",
+   errx(1, "%s is not a directory",
o_filename);
} else {
-   err(EX_IOERR, "%s", o_filename);
+   err(1, "%s", o_filename);
}
} else {
if (sb.st_mode & S_IFDIR)
___
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: r186242 - head/release/doc/en_US.ISO8859-1/hardware

2008-12-17 Thread Murray Stokely
Author: murray
Date: Wed Dec 17 18:05:30 2008
New Revision: 186242
URL: http://svn.freebsd.org/changeset/base/186242

Log:
  Increase maximum memory configuration that is reported as stable for
  FreeBSD/amd64 to 64GB.
  
  Submitted by: Matt Olander (m...@ixsystems.net)

Modified:
  head/release/doc/en_US.ISO8859-1/hardware/article.sgml

Modified: head/release/doc/en_US.ISO8859-1/hardware/article.sgml
==
--- head/release/doc/en_US.ISO8859-1/hardware/article.sgml  Wed Dec 17 
18:00:18 2008(r186241)
+++ head/release/doc/en_US.ISO8859-1/hardware/article.sgml  Wed Dec 17 
18:05:30 2008(r186242)
@@ -132,7 +132,7 @@
to &intel; EM64T as 64-bit extension technology
or IA-32e.
 
-  The largest tested memory configuration to date is 32GB.
+  The largest tested memory configuration to date is 64GB.
SMP support has been recently completed and is reasonably
robust.
 
___
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: r186204 - head/release/doc/en_US.ISO8859-1/hardware

2008-12-17 Thread Murray Stokely
I've got a report now of FreeBSD/amd64 working fine with 64GB, so we
can increase this limit to at least that amount.  The 8GB dimms
required for 128GB configurations are, I understand, harder to come by
until recently.

This page you provided appears to be the specs for a hardware system
with many operating systems (but not FreeBSD) listed.  I'm aware of
such systems, but I want to make sure we have a report of FreeBSD
actually working well on such hardware.  Do you know of FreeBSD
working on this system you provided?

Thanks,

 - Murray

On Tue, Dec 16, 2008 at 11:31 PM, pluknet  wrote:
> The largest tested memory configuration I ever heard was with 128GB
> running on current :p.
> Link to conf (in russian): http://www.etegro.com/rus/items/24/2.html
>
> --
> wbr,
> pluknet
>
___
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: r186243 - in head/sys/boot: i386/gptzfsboot i386/zfsboot zfs

2008-12-17 Thread Doug Rabson
Author: dfr
Date: Wed Dec 17 18:12:01 2008
New Revision: 186243
URL: http://svn.freebsd.org/changeset/base/186243

Log:
  Use full 64bit arithmetic when converting file offsets to block numbers - 
fixes
  booting on filesystems with inode numbers with values above 4194304.
  
  Submitted by: ps

Modified:
  head/sys/boot/i386/gptzfsboot/Makefile
  head/sys/boot/i386/zfsboot/Makefile
  head/sys/boot/zfs/zfsimpl.c

Modified: head/sys/boot/i386/gptzfsboot/Makefile
==
--- head/sys/boot/i386/gptzfsboot/Makefile  Wed Dec 17 18:05:30 2008
(r186242)
+++ head/sys/boot/i386/gptzfsboot/Makefile  Wed Dec 17 18:12:01 2008
(r186243)
@@ -60,7 +60,7 @@ gptzfsboot.bin: gptzfsboot.out
objcopy -S -O binary gptzfsboot.out ${.TARGET}
 
 gptzfsboot.out: ${BTXCRT} zfsboot.o sio.o
-   ${LD} ${LDFLAGS} -Ttext ${ORG2} -o ${.TARGET} ${.ALLSRC}
+   ${LD} ${LDFLAGS} -Ttext ${ORG2} -o ${.TARGET} ${.ALLSRC} ${LIBSTAND}
 
 zfsboot.o: ${.CURDIR}/../../zfs/zfsimpl.c
 

Modified: head/sys/boot/i386/zfsboot/Makefile
==
--- head/sys/boot/i386/zfsboot/Makefile Wed Dec 17 18:05:30 2008
(r186242)
+++ head/sys/boot/i386/zfsboot/Makefile Wed Dec 17 18:12:01 2008
(r186243)
@@ -80,7 +80,7 @@ zfsboot.bin: zfsboot.out
objcopy -S -O binary zfsboot.out ${.TARGET}
 
 zfsboot.out: ${BTXCRT} zfsboot.o sio.o
-   ${LD} ${LDFLAGS} -Ttext ${ORG2} -o ${.TARGET} ${.ALLSRC}
+   ${LD} ${LDFLAGS} -Ttext ${ORG2} -o ${.TARGET} ${.ALLSRC} ${LIBSTAND}
 
 zfsboot.o: zfsboot.s
 

Modified: head/sys/boot/zfs/zfsimpl.c
==
--- head/sys/boot/zfs/zfsimpl.c Wed Dec 17 18:05:30 2008(r186242)
+++ head/sys/boot/zfs/zfsimpl.c Wed Dec 17 18:12:01 2008(r186243)
@@ -873,17 +873,12 @@ dnode_read(spa_t *spa, const dnode_phys_
int i, rc;
 
/*
-* We truncate the offset to 32bits, mainly so that I don't
-* have to find a copy of __divdi3 to put into the bootstrap.
-* I don't think the bootstrap needs to access anything bigger
-* than 2G anyway. Note that block addresses are still 64bit
-* so it doesn't affect the possible size of the media.
-* We still use 64bit block numbers so that the bitshifts
-* work correctly. Note: bsize may not be a power of two here.
+* Note: bsize may not be a power of two here so we need to do an
+* actual divide rather than a bitshift.
 */
while (buflen > 0) {
-   uint64_t bn = ((int) offset) / bsize;
-   int boff = ((int) offset) % bsize;
+   uint64_t bn = offset / bsize;
+   int boff = offset % bsize;
int ibn;
const blkptr_t *indbp;
blkptr_t bp;
___
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"


HEADS UP: vimage ABI constraints on container structs [was: Re: svn commit: r186057 - head/sys/netinet]

2008-12-17 Thread Bjoern A. Zeeb

On Tue, 16 Dec 2008, Peter Wemm wrote:

Hi,

let me Cc: virtualization and current@ for this reply (to have the
explicit HEADS UP) for what Peter pointed out.

The first to reply may want to trim the Cc: list again; possibly to
only virtualization.



On Sat, Dec 13, 2008 at 1:59 PM, Bjoern A. Zeeb  wrote:

 De-virtualize the MD5 context for TCP initial seq number generation
 and make it a function local variable like we do almost everywhere
 inside the kernel.

[..]

--- head/sys/netinet/vinet.hSat Dec 13 21:17:46 2008(r186056)
+++ head/sys/netinet/vinet.hSat Dec 13 21:59:18 2008(r186057)
@@ -142,7 +142,6 @@ struct vnet_inet {
   int _isn_last_reseed;
   u_int32_t _isn_offset;
   u_int32_t _isn_offset_old;
-   MD5_CTX _isn_ctx;

   struct  inpcbhead _udb;
   struct  inpcbinfo _udbinfo;


I'm bitterly unhappy with this.  Every time these structs are touched,
either directly or indirectly, there is a guaranteed ABI breakage with
kernel modules.

There needs to be a __FreeBSD_version bump (or something similar)
every time any of these structures change, and any kernel modules
*must* be prevented from loading.  It can't be a >= some version, it
has to be an exact match.

With the global variable method the linker calculates the offsets at
load time.  With this abomination, the knowledge of the structure
layout is compiled into the generated code with no chance of a fixup.
There are no sanity checks.  If a module that referenced _isn_ctx is
loaded the old way, there would be a link error.  The new way will
have it silently trash _udb instead.

There is a whole world of hurt being unleashed here.  I suspect that
we might even be possible to run out of digits in our
__FreeBSD_version numbering scheme.

I know we've talked about ABI-stable alternatives after the
infrastructure is done, but it needs to be absolutely clear that
touching this structure in the current form is a guaranteed ABI break,
and is currently undetected.  If you boot kernel.old, you're hosed.
(Again, with -current, this might be ok for a while, but this scheme
won't wash with ports or other 3rd party modules)

...

In the mean time, I'd like to see some compile-time asserts in there
to make sure there are no accidental size changes of this structure.


Ok, there are multiple things here:

Size changes:


* I think catching pure size changes alone are not enough; any
  changes to the structs matter.
  Think of removing an int and adding an int (even at the same
  place). Something working on this will trash it.

* The size changes of course would guard about non-obvious, indirect
  struct changes like (just an example) a change to struct inpcbinfo
  that make me worry even more (like they seem to worry you).


More on structure changes:


* While this is on HEAD (refering to "Again, with -current, this might
  be ok for a while ..") I expected the following (major) changes
  coming with the continuing integration and testing:

  1) Final passthrough on the set of virtualized variables. That might
 happen after Step #3 when people can actually test of SVN.

  2) During Benchmarking - this would be about the same time - there
 might be shuffling.

  3) Before we turn to a STABLE branch. *fear*

* Again it's the indirect changes as said above (which are very
  worryingly).


ABI problem:


* I agree that there are unaddressed challenges here.

* Ideally we want version checking - at least at load time for modules -
  per container struct, as people do not want to change and recompile
  everything if say something in gif or ipsec changes which might not
  affect them. netgraph has done something like this but my feeling is
  that that would be the wrong way to go, especially wrt to
  vinet/vinet6.

* I am not sure if padding as we had it before will work for stable
  branches. We need to think of this problem as well. To my
  understanding MAC has another really large structure with sufficient
  padding but it's a subsystem more or less living on its own on the
  side, not as heavily changes between branches and MFCed as the
  netstack and it's (function) pointers there and less direct members.

* If you have suggestions or solutions, please share them.

* ..


Misc:


* I was aware of the problem and failed on two fronts here:
  1) Doing my commit after Marko and forgetting about it going from
 the p4 branches to SVN.
  2) Forgetting to mention this in the HEADs UP:(

* The http://wiki.freebsd.org/Image/BeginnersGuideFAQ had a (somewhat
  hidden) "A single change would require complete recompiliation."
  I factored it out but will need to be more explicit there or refer
  to this thread.

* Thanks a lot for sending this out to comitters and making them aware
  of the problem. I Cc:ed current@ and virtualization@ in the reply
 

Re: svn commit: r186204 - head/release/doc/en_US.ISO8859-1/hardware

2008-12-17 Thread pluknet
2008/12/17 Murray Stokely :
> I've got a report now of FreeBSD/amd64 working fine with 64GB, so we
> can increase this limit to at least that amount.  The 8GB dimms
> required for 128GB configurations are, I understand, harder to come by
> until recently.
>
> This page you provided appears to be the specs for a hardware system
> with many operating systems (but not FreeBSD) listed.  I'm aware of
> such systems, but I want to make sure we have a report of FreeBSD
> actually working well on such hardware.  Do you know of FreeBSD
> working on this system you provided?
>
> Thanks,
>
> - Murray
>

I know the guy (he works in that company) who installed FreeBSD
on such configuration. I will try to ask him to extract dmesg messages.

-- 
wbr,
pluknet
___
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: r186194 - in head: share/man/man9 sys/fs/hpfs sys/fs/msdosfs sys/fs/ntfs sys/fs/nwfs sys/fs/smbfs sys/gnu/fs/ext2fs sys/gnu/fs/reiserfs sys/gnu/fs/xfs/FreeBSD sys/ufs/ufs

2008-12-17 Thread Ulrich Spoerlein
On Tue, 16.12.2008 at 21:13:12 +, Edward Tomasz Napierala wrote:
> Author: trasz
> Date: Tue Dec 16 21:13:11 2008
> New Revision: 186194
> URL: http://svn.freebsd.org/changeset/base/186194
> 
> Log:
>   According to phk@, VOP_STRATEGY should never, _ever_, return
>   anything other than 0.  Make it so.  This fixes
>   "panic: VOP_STRATEGY failed bp=0xc320dd90 vp=0xc3b9f648",
>   encountered when writing to an orphaned filesystem.  Reason
>   for the panic was the following assert:
>   KASSERT(i == 0, ("VOP_STRATEGY failed bp=%p vp=%p", bp, bp->b_vp));
>   at vfs_bio:bufstrategy().

Is such a change also needed/recommended for the FUSE port?

Cheers,
Ulrich Spoerlein
-- 
It is better to remain silent and be thought a fool,
than to speak, and remove all doubt.
___
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: r186240 - in head/sys: amd64/conf arm/conf i386/conf mips/conf pc98/conf sparc64/conf sun4v/conf

2008-12-17 Thread Nathan Whitehorn

Marcel Moolenaar wrote:

Author: marcel
Date: Wed Dec 17 17:43:22 2008
New Revision: 186240
URL: http://svn.freebsd.org/changeset/base/186240
  

[snip]


Modified: head/sys/arm/conf/EP80219
==
--- head/sys/arm/conf/EP80219   Wed Dec 17 17:39:36 2008(r186239)
+++ head/sys/arm/conf/EP80219   Wed Dec 17 17:43:22 2008(r186240)
@@ -57,7 +57,6 @@ options   SYSVSEM #SYSV-style semaphore
 options_KPOSIX_PRIORITY_SCHEDULING #Posix P1003_1B real-time extensions
 optionsKBD_INSTALL_CDEV# install a CDEV entry in /dev
 optionsGEOM_PART_GPT# GUID Partition Tables.
-optionsGEOM_MBR# DOS/MBR partitioning
 optionsGEOM_LABEL# Providers labelization.
 

Should this have picked up a

options GEOM_PART_MBR

as well?
-Nathan

___
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: r186240 - in head/sys: amd64/conf arm/conf i386/conf mips/conf pc98/conf sparc64/conf sun4v/conf

2008-12-17 Thread Marcel Moolenaar


On Dec 17, 2008, at 10:21 AM, Nathan Whitehorn wrote:


Marcel Moolenaar wrote:

Author: marcel
Date: Wed Dec 17 17:43:22 2008
New Revision: 186240
URL: http://svn.freebsd.org/changeset/base/186240


[snip]


Modified: head/sys/arm/conf/EP80219
=
=
=
=
=
=
=
=
=
=
--- head/sys/arm/conf/EP80219   Wed Dec 17 17:39:36 2008(r186239)
+++ head/sys/arm/conf/EP80219   Wed Dec 17 17:43:22 2008(r186240)
@@ -57,7 +57,6 @@ options   SYSVSEM #SYSV-style semaphore
options 	_KPOSIX_PRIORITY_SCHEDULING #Posix P1003_1B real-time  
extensions

options KBD_INSTALL_CDEV# install a CDEV entry in /dev
options GEOM_PART_GPT# GUID Partition Tables.
-optionsGEOM_MBR# DOS/MBR partitioning
options GEOM_LABEL# Providers labelization.


Should this have picked up a

options GEOM_PART_MBR

as well?


No, it was redundant (see DEFAULTS).

--
Marcel Moolenaar
xcl...@mac.com



___
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: r186224 - head/share/man/man9

2008-12-17 Thread Dag-Erling Smorgrav
Author: des
Date: Wed Dec 17 13:01:19 2008
New Revision: 186224
URL: http://svn.freebsd.org/changeset/base/186224

Log:
  Boot out  once and for all.
  
  MFC after:1 week

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

Modified: head/share/man/man9/style.9
==
--- head/share/man/man9/style.9 Wed Dec 17 13:00:18 2008(r186223)
+++ head/share/man/man9/style.9 Wed Dec 17 13:01:19 2008(r186224)
@@ -26,7 +26,7 @@
 .\"From: @(#)style 1.14 (Berkeley) 4/28/95
 .\" $FreeBSD$
 .\"
-.Dd February 10, 2005
+.Dd December 17, 2008
 .Dt STYLE 9
 .Os
 .Sh NAME
@@ -602,11 +602,9 @@ Do YOU understand the following?
k = !(l & FLAGS);
 .Ed
 .Pp
-Exits should be 0 on success, or according to the predefined
-values in
-.Xr sysexits 3 .
+Exits should be 0 on success, or 1 on failure.
 .Bd -literal
-   exit(EX_OK);/*
+   exit(0);/*
 * Avoid obvious comments such as
 * "Exit 0 on success."
 */
@@ -806,7 +804,7 @@ placed in a single set of brackets.
 .Ed
 .Bd -literal
(void)fprintf(stderr, "usage: f [-ab]\en");
-   exit(EX_USAGE);
+   exit(1);
 }
 .Ed
 .Pp
@@ -840,7 +838,6 @@ and produce minimal warnings.
 .Xr indent 1 ,
 .Xr lint 1 ,
 .Xr err 3 ,
-.Xr sysexits 3 ,
 .Xr warn 3 ,
 .Xr style.Makefile 5
 .Sh HISTORY
___
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: r186187 - head/sys/net

2008-12-17 Thread Dag-Erling Smørgrav
Robert Watson  writes:
> I used to comment a bit more gratuitously along those lines, but bde
> seems to have (at least partially) broken me of the habit.  I felt
> sure there was a note in style(9) on not commenting on obvious things,
> but the closest I found was this:
>
>  exit(EX_OK);/*
>   * Avoid obvious comments such as
>   * "Exit 0 on success."
>   */

Umm, didn't we agree *not* to use sysexits?

DES
-- 
Dag-Erling Smørgrav - d...@des.no
___
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: r186244 - head/lib/libarchive

2008-12-17 Thread Tim Kientzle
Author: kientzle
Date: Wed Dec 17 19:02:42 2008
New Revision: 186244
URL: http://svn.freebsd.org/changeset/base/186244

Log:
  Clarify an 'ar' error message.

Modified:
  head/lib/libarchive/archive_read_support_format_ar.c

Modified: head/lib/libarchive/archive_read_support_format_ar.c
==
--- head/lib/libarchive/archive_read_support_format_ar.cWed Dec 17 
18:12:01 2008(r186243)
+++ head/lib/libarchive/archive_read_support_format_ar.cWed Dec 17 
19:02:42 2008(r186244)
@@ -192,7 +192,7 @@ archive_read_format_ar_read_header(struc
/* Verify the magic signature on the file header. */
if (strncmp(h + AR_fmag_offset, "`\n", 2) != 0) {
archive_set_error(&a->archive, EINVAL,
-   "Consistency check failed");
+   "Incorrect file header signature");
return (ARCHIVE_WARN);
}
 
___
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: r186245 - head/lib/libarchive/test

2008-12-17 Thread Tim Kientzle
Author: kientzle
Date: Wed Dec 17 19:03:44 2008
New Revision: 186245
URL: http://svn.freebsd.org/changeset/base/186245

Log:
  Update the ar write test to give more detailed information about failures.

Modified:
  head/lib/libarchive/test/test_write_format_ar.c

Modified: head/lib/libarchive/test/test_write_format_ar.c
==
--- head/lib/libarchive/test/test_write_format_ar.c Wed Dec 17 19:02:42 
2008(r186244)
+++ head/lib/libarchive/test/test_write_format_ar.c Wed Dec 17 19:03:44 
2008(r186245)
@@ -73,8 +73,8 @@ DEFINE_TEST(test_write_format_ar)
archive_entry_copy_pathname(ae, "ggghhhjjjrrrttt.o");
archive_entry_set_filetype(ae, AE_IFREG);
archive_entry_set_size(ae, 7);
-   assertA(0 == archive_write_header(a, ae));
-   assertA(7 == archive_write_data(a, "777", 7));
+   assertEqualIntA(a, ARCHIVE_OK, archive_write_header(a, ae));
+   assertEqualIntA(a, 7, archive_write_data(a, "777", 7));
archive_entry_free(ae);
 
/* test full pathname */
@@ -82,8 +82,8 @@ DEFINE_TEST(test_write_format_ar)
archive_entry_copy_pathname(ae, "/usr/home/xx/iiijjjdddsssppp.o");
archive_entry_set_mode(ae, S_IFREG | 0755);
archive_entry_set_size(ae, 8);
-   assertA(0 == archive_write_header(a, ae));
-   assertA(8 == archive_write_data(a, "88877766", 8));
+   assertEqualIntA(a, ARCHIVE_OK, archive_write_header(a, ae));
+   assertEqualIntA(a, 8, archive_write_data(a, "88877766", 8));
archive_entry_free(ae);
 
/* trailing "/" should be rejected */
@@ -105,46 +105,46 @@ DEFINE_TEST(test_write_format_ar)
 #if ARCHIVE_VERSION_NUMBER < 200
archive_write_finish(a);
 #else
-   assert(0 == archive_write_finish(a));
+   assertEqualInt(0, archive_write_finish(a));
 #endif
 
/*
 * Now, read the data back.
 */
assert((a = archive_read_new()) != NULL);
-   assertA(0 == archive_read_support_format_all(a));
-   assertA(0 == archive_read_support_compression_all(a));
-   assertA(0 == archive_read_open_memory(a, buff, used));
+   assertEqualIntA(a, ARCHIVE_OK, archive_read_support_format_all(a));
+   assertEqualIntA(a, ARCHIVE_OK, archive_read_support_compression_all(a));
+   assertEqualIntA(a, ARCHIVE_OK, archive_read_open_memory(a, buff, used));
 
-   assertA(0 == archive_read_next_header(a, &ae));
+   assertEqualIntA(a, ARCHIVE_OK, archive_read_next_header(a, &ae));
assertEqualInt(0, archive_entry_mtime(ae));
assertEqualString("//", archive_entry_pathname(ae));
assertEqualInt(0, archive_entry_size(ae));
 
-   assertA(0 == archive_read_next_header(a, &ae));
-   assert(1 == archive_entry_mtime(ae));
+   assertEqualIntA(a, ARCHIVE_OK, archive_read_next_header(a, &ae));
+   assertEqualInt(1, archive_entry_mtime(ae));
assertEqualString("abcdefghijklmn.o", archive_entry_pathname(ae));
-   assert(8 == archive_entry_size(ae));
-   assertA(8 == archive_read_data(a, buff2, 10));
-   assert(0 == memcmp(buff2, "87654321", 8));
+   assertEqualInt(8, archive_entry_size(ae));
+   assertEqualIntA(a, 8, archive_read_data(a, buff2, 10));
+   assertEqualMem(buff2, "87654321", 8);
 
-   assert(0 == archive_read_next_header(a, &ae));
+   assertEqualInt(ARCHIVE_OK, archive_read_next_header(a, &ae));
assertEqualString("ggghhhjjjrrrttt.o", archive_entry_pathname(ae));
-   assert(7 == archive_entry_size(ae));
-   assertA(7 == archive_read_data(a, buff2, 11));
-   assert(0 == memcmp(buff2, "777", 7));
+   assertEqualInt(7, archive_entry_size(ae));
+   assertEqualIntA(a, 7, archive_read_data(a, buff2, 11));
+   assertEqualMem(buff2, "777", 7);
 
-   assert(0 == archive_read_next_header(a, &ae));
+   assertEqualIntA(a, 0, archive_read_next_header(a, &ae));
assertEqualString("iiijjjdddsssppp.o", archive_entry_pathname(ae));
-   assert(8 == archive_entry_size(ae));
-   assertA(8 == archive_read_data(a, buff2, 17));
-   assert(0 == memcmp(buff2, "88877766", 8));
+   assertEqualInt(8, archive_entry_size(ae));
+   assertEqualIntA(a, 8, archive_read_data(a, buff2, 17));
+   assertEqualMem(buff2, "88877766", 8);
 
-   assert(0 == archive_read_close(a));
+   assertEqualIntA(a, 0, archive_read_close(a));
 #if ARCHIVE_VERSION_NUMBER < 200
archive_read_finish(a);
 #else
-   assert(0 == archive_read_finish(a));
+   assertEqualInt(0, archive_read_finish(a));
 #endif
 
/*
@@ -152,18 +152,18 @@ DEFINE_TEST(test_write_format_ar)
 */
memset(buff, 0, sizeof(buff));
assert((a = archive_write_new()) != NULL);
-   assertA(0 == archive_write_set_format_ar_bsd(a));
-   assertA(0 == archive_write_set_compression_bzip2(a));
-   assertA(0 == archive_write_open_memory(a, buff,

svn commit: r186246 - head/lib/libarchive/test

2008-12-17 Thread Tim Kientzle
Author: kientzle
Date: Wed Dec 17 19:05:00 2008
New Revision: 186246
URL: http://svn.freebsd.org/changeset/base/186246

Log:
  Once the test has failed, exit before the segfault.

Modified:
  head/lib/libarchive/test/test_compat_gtar.c

Modified: head/lib/libarchive/test/test_compat_gtar.c
==
--- head/lib/libarchive/test/test_compat_gtar.c Wed Dec 17 19:03:44 2008
(r186245)
+++ head/lib/libarchive/test/test_compat_gtar.c Wed Dec 17 19:05:00 2008
(r186246)
@@ -43,6 +43,7 @@ test_compat_gtar_1(void)
char name[] = "test_compat_gtar_1.tgz";
struct archive_entry *ae;
struct archive *a;
+   int r;
 
assert((a = archive_read_new()) != NULL);
assertEqualIntA(a, ARCHIVE_OK, archive_read_support_compression_all(a));
@@ -51,7 +52,11 @@ test_compat_gtar_1(void)
assertEqualIntA(a, ARCHIVE_OK, archive_read_open_filename(a, name, 
10240));
 
/* Read first entry. */
-   assertEqualIntA(a, ARCHIVE_OK, archive_read_next_header(a, &ae));
+   assertEqualIntA(a, ARCHIVE_OK, r = archive_read_next_header(a, &ae));
+   if (r != ARCHIVE_OK) {
+   archive_read_finish(a);
+   return;
+   }
assertEqualString(
"12345678901234567890123456789012345678901234567890"
"12345678901234567890123456789012345678901234567890"
@@ -66,7 +71,11 @@ test_compat_gtar_1(void)
assertEqualInt(0100644, archive_entry_mode(ae));
 
/* Read second entry. */
-   assertEqualIntA(a, ARCHIVE_OK, archive_read_next_header(a, &ae));
+   assertEqualIntA(a, ARCHIVE_OK, r = archive_read_next_header(a, &ae));
+   if (r != ARCHIVE_OK) {
+   archive_read_finish(a);
+   return;
+   }
assertEqualString(
"abcdefghijabcdefghijabcdefghijabcdefghijabcdefghij"
"abcdefghijabcdefghijabcdefghijabcdefghijabcdefghij"
___
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: r186247 - head/lib/libarchive/test

2008-12-17 Thread Tim Kientzle
Author: kientzle
Date: Wed Dec 17 19:05:25 2008
New Revision: 186247
URL: http://svn.freebsd.org/changeset/base/186247

Log:
  Exit earlier on failure in this test.

Modified:
  head/lib/libarchive/test/test_write_compress.c

Modified: head/lib/libarchive/test/test_write_compress.c
==
--- head/lib/libarchive/test/test_write_compress.c  Wed Dec 17 19:05:00 
2008(r186246)
+++ head/lib/libarchive/test/test_write_compress.c  Wed Dec 17 19:05:25 
2008(r186247)
@@ -85,11 +85,11 @@ DEFINE_TEST(test_write_compress)
 
for (i = 0; i < 100; i++) {
sprintf(path, "file%03d", i);
-   assertEqualInt(0, archive_read_next_header(a, &ae));
+   if (!assertEqualInt(0, archive_read_next_header(a, &ae)))
+   break;
assertEqualString(path, archive_entry_pathname(ae));
assertEqualInt(datasize, archive_entry_size(ae));
}
-
assert(0 == archive_read_close(a));
 #if ARCHIVE_VERSION_NUMBER < 200
archive_read_finish(a);
___
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: r186248 - head/lib/libarchive/test

2008-12-17 Thread Tim Kientzle
Author: kientzle
Date: Wed Dec 17 19:05:58 2008
New Revision: 186248
URL: http://svn.freebsd.org/changeset/base/186248

Log:
  Fill in a missing const

Modified:
  head/lib/libarchive/test/main.c

Modified: head/lib/libarchive/test/main.c
==
--- head/lib/libarchive/test/main.c Wed Dec 17 19:05:25 2008
(r186247)
+++ head/lib/libarchive/test/main.c Wed Dec 17 19:05:58 2008
(r186248)
@@ -897,7 +897,7 @@ int main(int argc, char **argv)
time_t now;
char *refdir_alloc = NULL;
char *progname, *p;
-   char *tmp;
+   const char *tmp;
char tmpdir[256];
char tmpdir_timestamp[256];
 
___
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: r186228 - in head/sys/powerpc: booke mpc85xx

2008-12-17 Thread Rafal Jaworowski
Author: raj
Date: Wed Dec 17 15:31:15 2008
New Revision: 186228
URL: http://svn.freebsd.org/changeset/base/186228

Log:
  Minor clean up of BookE/MPC85XX: iprove naming and style(9).

Modified:
  head/sys/powerpc/booke/interrupt.c
  head/sys/powerpc/booke/machdep.c
  head/sys/powerpc/mpc85xx/nexus.c

Modified: head/sys/powerpc/booke/interrupt.c
==
--- head/sys/powerpc/booke/interrupt.c  Wed Dec 17 15:27:49 2008
(r186227)
+++ head/sys/powerpc/booke/interrupt.c  Wed Dec 17 15:31:15 2008
(r186228)
@@ -93,7 +93,6 @@ dump_frame(struct trapframe *frame)
printf("\n");
 }
 
-
 void powerpc_crit_interrupt(struct trapframe *framep)
 {
 

Modified: head/sys/powerpc/booke/machdep.c
==
--- head/sys/powerpc/booke/machdep.cWed Dec 17 15:27:49 2008
(r186227)
+++ head/sys/powerpc/booke/machdep.cWed Dec 17 15:31:15 2008
(r186228)
@@ -10,8 +10,6 @@
  * 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.
- * 3. The name of the author may not be used to endorse or promote products
- *derived from this software without specific prior written permission.
  *
  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
@@ -88,7 +86,6 @@ __FBSDID("$FreeBSD$");
 
 #include 
 #include 
-
 #include 
 #include 
 #include 
@@ -137,6 +134,9 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 
+#include 
+#include 
+
 #ifdef  DEBUG
 #define debugf(fmt, args...) printf(fmt, ##args)
 #else
@@ -180,8 +180,8 @@ static void cpu_e500_startup(void *);
 SYSINIT(cpu, SI_SUB_CPU, SI_ORDER_FIRST, cpu_e500_startup, NULL);
 
 void print_kernel_section_addr(void);
-void dump_bootinfo(void);
-void dump_kenv(void);
+void print_bootinfo(void);
+void print_kenv(void);
 u_int e500_init(u_int32_t, u_int32_t, void *);
 
 static void
@@ -204,16 +204,17 @@ cpu_e500_startup(void *dummy)
printf("Physical memory chunk(s):\n");
for (indx = 0; phys_avail[indx + 1] != 0; indx += 2) {
size = phys_avail[indx + 1] - phys_avail[indx];
+
printf("0x%08x - 0x%08x, %d bytes (%d pages)\n",
-   phys_avail[indx], phys_avail[indx + 1] - 1, size,
-   size / PAGE_SIZE);
+   phys_avail[indx], phys_avail[indx + 1] - 1,
+   size, size / PAGE_SIZE);
}
}
 
vm_ksubmap_init(&kmi);
 
printf("avail memory = %ld (%ld MB)\n", ptoa(cnt.v_free_count),
-   ptoa(cnt.v_free_count) / 1048576);
+   ptoa(cnt.v_free_count) / 1048576);
 
/* Set up buffers, so they can be used to read disk labels. */
bufinit();
@@ -235,7 +236,7 @@ kenv_next(char *cp)
 }
 
 void
-dump_kenv(void)
+print_kenv(void)
 {
int len;
char *cp;
@@ -253,7 +254,7 @@ dump_kenv(void)
 }
 
 void
-dump_bootinfo(void)
+print_bootinfo(void)
 {
struct bi_mem_region *mr;
struct bi_eth_addr *eth;
@@ -291,20 +292,20 @@ print_kernel_section_addr(void)
 {
 
debugf("kernel image addresses:\n");
-   debugf(" kernel_text= 0x%08x\n", (u_int32_t)kernel_text);
-   debugf(" _etext (sdata) = 0x%08x\n", (u_int32_t)_etext);
-   debugf(" _edata = 0x%08x\n", (u_int32_t)_edata);
-   debugf(" __sbss_start   = 0x%08x\n", (u_int32_t)__sbss_start);
-   debugf(" __sbss_end = 0x%08x\n", (u_int32_t)__sbss_end);
-   debugf(" __sbss_start   = 0x%08x\n", (u_int32_t)__bss_start);
-   debugf(" _end   = 0x%08x\n", (u_int32_t)_end);
+   debugf(" kernel_text= 0x%08x\n", (uint32_t)kernel_text);
+   debugf(" _etext (sdata) = 0x%08x\n", (uint32_t)_etext);
+   debugf(" _edata = 0x%08x\n", (uint32_t)_edata);
+   debugf(" __sbss_start   = 0x%08x\n", (uint32_t)__sbss_start);
+   debugf(" __sbss_end = 0x%08x\n", (uint32_t)__sbss_end);
+   debugf(" __sbss_start   = 0x%08x\n", (uint32_t)__bss_start);
+   debugf(" _end   = 0x%08x\n", (uint32_t)_end);
 }
 
 struct bi_mem_region *
 bootinfo_mr(void)
 {
 
-   return((struct bi_mem_region *)bootinfo->bi_data);
+   return ((struct bi_mem_region *)bootinfo->bi_data);
 }
 
 struct bi_eth_addr *
@@ -346,7 +347,7 @@ e500_init(u_int32_t startkernel, u_int32
kmdp = preload_search_by_type("elf kernel");
if (kmdp != NULL) {
bootinfo = (struct bootinfo *)preload_search_info(kmdp,
-   MODINFO_METADATA|MODINFOMD_BOOTINFO);
+   MODINFO_METADATA | MODINFOMD_BOOTINFO);
 
  

svn commit: r186249 - in head/etc: . devd mtree

2008-12-17 Thread Andrew Thompson
Author: thompsa
Date: Wed Dec 17 19:12:30 2008
New Revision: 186249
URL: http://svn.freebsd.org/changeset/base/186249

Log:
  Add /etc/devd/ and move hardware specific configuration there. This makes it
  easier to maintain custom rules for non-system things like ACPI hotkeys.
  
  /etc/devd.conf is already set up to check this directory, no change needed 
there.

Added:
  head/etc/devd/
  head/etc/devd/Makefile   (contents, props changed)
  head/etc/devd/asus.conf   (contents, props changed)
Modified:
  head/etc/Makefile
  head/etc/devd.conf
  head/etc/mtree/BSD.root.dist

Modified: head/etc/Makefile
==
--- head/etc/Makefile   Wed Dec 17 19:05:58 2008(r186248)
+++ head/etc/Makefile   Wed Dec 17 19:12:30 2008(r186249)
@@ -162,6 +162,7 @@ distribution:
${_+_}cd ${.CURDIR}/bluetooth; ${MAKE} install
 .endif
${_+_}cd ${.CURDIR}/defaults; ${MAKE} install
+   ${_+_}cd ${.CURDIR}/devd; ${MAKE} install
${_+_}cd ${.CURDIR}/gss; ${MAKE} install
${_+_}cd ${.CURDIR}/periodic; ${MAKE} install
${_+_}cd ${.CURDIR}/rc.d; ${MAKE} install

Modified: head/etc/devd.conf
==
--- head/etc/devd.conf  Wed Dec 17 19:05:58 2008(r186248)
+++ head/etc/devd.conf  Wed Dec 17 19:12:30 2008(r186249)
@@ -277,29 +277,6 @@ notify 0 {
action  "mixer vol +10";
 };
 
-# The next blocks enable volume hotkeys that can be found on the Asus EeePC
-# The four keys above the keyboard notify 0x1a through to 0x1d respectively
-notify 0 {
-match "system"  "ACPI";
-match "subsystem"   "ASUS-Eee";
-match "notify"  "0x13";
-action  "mixer 0";
-};
-
-notify 0 {
-match "system"  "ACPI";
-match "subsystem"   "ASUS-Eee";
-match "notify"  "0x14";
-action  "mixer vol -10";
-};
-
-notify 0 {
-match "system"  "ACPI";
-match "subsystem"   "ASUS-Eee";
-match "notify"  "0x15";
-action  "mixer vol +10";
-};
-
 /* EXAMPLES TO END OF FILE
 
 # The following might be an example of something that a vendor might

Added: head/etc/devd/Makefile
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/etc/devd/Makefile  Wed Dec 17 19:12:30 2008(r186249)
@@ -0,0 +1,9 @@
+# $FreeBSD$
+
+FILES= asus.conf
+
+NO_OBJ=
+FILESDIR=  /etc/devd
+FILESMODE= 644
+
+.include 

Added: head/etc/devd/asus.conf
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/etc/devd/asus.conf Wed Dec 17 19:12:30 2008(r186249)
@@ -0,0 +1,52 @@
+# $FreeBSD$
+#
+# ASUS specific devd events
+
+# The next blocks enable volume hotkeys that can be found on the Asus EeePC
+notify 0 {
+match "system"  "ACPI";
+match "subsystem"   "ASUS-Eee";
+match "notify"  "0x13";
+action  "mixer 0";
+};
+
+notify 0 {
+match "system"  "ACPI";
+match "subsystem"   "ASUS-Eee";
+match "notify"  "0x14";
+action  "mixer vol -10";
+};
+
+notify 0 {
+match "system"  "ACPI";
+match "subsystem"   "ASUS-Eee";
+match "notify"  "0x15";
+action  "mixer vol +10";
+};
+
+# Enable user hotkeys that can be found on the Asus EeePC
+# The four keys above the keyboard notify 0x1a through to 0x1d respectively
+#notify 0 {
+#match "system"  "ACPI";
+#match "subsystem"   "ASUS-Eee";
+#match "notify"  "0x1a";
+#action  "";
+#};
+#notify 0 {
+#match "system"  "ACPI";
+#match "subsystem"   "ASUS-Eee";
+#match "notify"  "0x1b";
+#action  "";
+#};
+#notify 0 {
+#match "system"  "ACPI";
+#match "subsystem"   "ASUS-Eee";
+#match "notify"  "0x1c";
+#action  "";
+#};
+#notify 0 {
+#match "system"  "ACPI";
+#match "subsystem"   "ASUS-Eee";
+#match "notify"  "0x1d";
+#action  "";
+#};

Modified: head/etc/mtree/BSD.root.dist
==
--- head/etc/mtree/BSD.root.distWed Dec 17 19:05:58 2008
(r186248)
+++ head/etc/mtree/BSD.root.distWed Dec 17 19:12:30 2008
(r186249)
@@ -28,6 +28,8 @@
 ..
 defaults
 ..
+devd
+..
 gnats
 ..
 gss
___

svn commit: r186250 - head/sys/dev/ata/chipsets

2008-12-17 Thread Alexander Motin
Author: mav
Date: Wed Dec 17 19:17:58 2008
New Revision: 186250
URL: http://svn.freebsd.org/changeset/base/186250

Log:
  Improve error handling at ata_ahci_chipinit().
  
  Submitted by: Andrey V. Elsukov

Modified:
  head/sys/dev/ata/chipsets/ata-ahci.c

Modified: head/sys/dev/ata/chipsets/ata-ahci.c
==
--- head/sys/dev/ata/chipsets/ata-ahci.cWed Dec 17 19:12:30 2008
(r186249)
+++ head/sys/dev/ata/chipsets/ata-ahci.cWed Dec 17 19:17:58 2008
(r186250)
@@ -94,6 +94,7 @@ int
 ata_ahci_chipinit(device_t dev)
 {
 struct ata_pci_controller *ctlr = device_get_softc(dev);
+interror;
 u_int32_t version;
 
 /* if we have a memory BAR(5) we are likely on an AHCI part */
@@ -105,14 +106,19 @@ ata_ahci_chipinit(device_t dev)
 
 /* setup interrupt delivery if not done allready by a vendor driver */
 if (!ctlr->r_irq) {
-   if (ata_setup_interrupt(dev, ata_generic_intr))
+   if (ata_setup_interrupt(dev, ata_generic_intr)) {
+   bus_release_resource(dev, ctlr->r_type2, ctlr->r_rid2, 
ctlr->r_res2);
return ENXIO;
+   }
 }
 else
device_printf(dev, "AHCI called from vendor specific driver\n");
 
 /* reset controller */
-ata_ahci_ctlr_reset(dev);
+if ((error = ata_ahci_ctlr_reset(dev)) != 0) {
+   bus_release_resource(dev, ctlr->r_type2, ctlr->r_rid2, ctlr->r_res2);
+   return (error);
+};
 
 /* get the number of HW channels */
 ctlr->channels =
@@ -154,7 +160,6 @@ ata_ahci_ctlr_reset(device_t dev)
 ATA_OUTL(ctlr->r_res2, ATA_AHCI_GHC, ATA_AHCI_GHC_HR);
 DELAY(100);
 if (ATA_INL(ctlr->r_res2, ATA_AHCI_GHC) & ATA_AHCI_GHC_HR) {
-   bus_release_resource(dev, ctlr->r_type2, ctlr->r_rid2, ctlr->r_res2);
device_printf(dev, "AHCI controller reset failure\n");
return ENXIO;
 }
___
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: r186225 - in head/sys: compat/svr4 kern

2008-12-17 Thread Konstantin Belousov
Author: kib
Date: Wed Dec 17 13:13:35 2008
New Revision: 186225
URL: http://svn.freebsd.org/changeset/base/186225

Log:
  Remove two remnant uses of AT_DEBUG.

Modified:
  head/sys/compat/svr4/svr4_sysvec.c
  head/sys/kern/imgact_elf.c

Modified: head/sys/compat/svr4/svr4_sysvec.c
==
--- head/sys/compat/svr4/svr4_sysvec.c  Wed Dec 17 13:01:19 2008
(r186224)
+++ head/sys/compat/svr4/svr4_sysvec.c  Wed Dec 17 13:13:35 2008
(r186225)
@@ -218,8 +218,6 @@ svr4_fixup(register_t **stack_base, stru
args = (Elf32_Auxargs *)imgp->auxargs;
pos = *stack_base + (imgp->args->argc + imgp->args->envc + 2);  
 
-   if (args->trace)
-   AUXARGS_ENTRY(pos, AT_DEBUG, 1);
if (args->execfd != -1)
AUXARGS_ENTRY(pos, AT_EXECFD, args->execfd);
AUXARGS_ENTRY(pos, AT_PHDR, args->phdr);

Modified: head/sys/kern/imgact_elf.c
==
--- head/sys/kern/imgact_elf.c  Wed Dec 17 13:01:19 2008(r186224)
+++ head/sys/kern/imgact_elf.c  Wed Dec 17 13:13:35 2008(r186225)
@@ -894,9 +894,6 @@ __elfN(freebsd_fixup)(register_t **stack
base = (Elf_Addr *)*stack_base;
pos = base + (imgp->args->argc + imgp->args->envc + 2);
 
-   if (args->trace) {
-   AUXARGS_ENTRY(pos, AT_DEBUG, 1);
-   }
if (args->execfd != -1) {
AUXARGS_ENTRY(pos, AT_EXECFD, args->execfd);
}
___
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: r186187 - head/sys/net

2008-12-17 Thread Bruce Evans

On Wed, 17 Dec 2008, Robert Watson wrote:


On Wed, 17 Dec 2008, Dag-Erling Sm??rgrav wrote:


Robert Watson  writes:

 exit(EX_OK);/*
  * Avoid obvious comments such as
  * "Exit 0 on success."
  */


Umm, didn't we agree *not* to use sysexits?


Dunno, that one is not mine:

Annotations for style.9
***
1.5  (joerg31-Mar-96):  exit(EX_OK);/*
1.38 (alex 28-Oct-00):  exit(EX_USAGE);


1.5 is the original commit that added sysexits to style.9.

It also broke the comment -- it is no longer obvious that exit(EX_OK)
exits with status 0 on success.

Also, reformatting the comment gave the bad example of a block comment
to the right of the code.  The original code instead gave an example
of abnormally indenting the comment so as to fit it in 80 columns:

%%%
exit(0);/* Avoid obvious comments such as "Exit 0 on success." */
%%%

The comment is indented to column 20 instead of the usual 40 or 32.

The reformatting is part of another bug suite -- to coerce
/usr/src/admin/style/style into a man page, 5 leading spaces had to
be added for man page indentation.  This required reformatting to keep
fitting in 80 columns and messes up tabs.

Bruce___
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: r186223 - in head/sys: netinet netinet6

2008-12-17 Thread Bjoern A. Zeeb
Author: bz
Date: Wed Dec 17 13:00:18 2008
New Revision: 186223
URL: http://svn.freebsd.org/changeset/base/186223

Log:
  Another step assimilating IPv[46] PCB code:
  normalize IN6P_* compat flags usage to their equialent
  INP_* counterpart.
  
  Discussed with:   rwatson
  Reviewed by:  rwatson
  MFC after:4 weeks

Modified:
  head/sys/netinet/in_pcb.h
  head/sys/netinet6/icmp6.c
  head/sys/netinet6/ip6_output.c
  head/sys/netinet6/raw_ip6.c
  head/sys/netinet6/udp6_usrreq.c

Modified: head/sys/netinet/in_pcb.h
==
--- head/sys/netinet/in_pcb.h   Wed Dec 17 12:52:34 2008(r186222)
+++ head/sys/netinet/in_pcb.h   Wed Dec 17 13:00:18 2008(r186223)
@@ -441,7 +441,7 @@ voidinp_4tuple_get(struct inpcb *inp, 
 #defineIN6P_RECVIF INP_RECVIF
 #defineIN6P_MTUDISCINP_MTUDISC
 #defineIN6P_FAITH  INP_FAITH
-#defineIN6P_CONTROLOPTS INP_CONTROLOPTS
+#defineIN6P_CONTROLOPTSINP_CONTROLOPTS
/*
 * socket AF version is {newer than,or include}
 * actual datagram AF version

Modified: head/sys/netinet6/icmp6.c
==
--- head/sys/netinet6/icmp6.c   Wed Dec 17 12:52:34 2008(r186222)
+++ head/sys/netinet6/icmp6.c   Wed Dec 17 13:00:18 2008(r186223)
@@ -1983,7 +1983,7 @@ icmp6_rip6_input(struct mbuf **mp, int o
}
if (n != NULL ||
(n = m_copy(m, 0, (int)M_COPYALL)) != NULL) {
-   if (last->inp_flags & IN6P_CONTROLOPTS)
+   if (last->inp_flags & INP_CONTROLOPTS)
ip6_savecontrol(last, n, &opts);
/* strip intermediate headers */
m_adj(n, off);
@@ -2009,7 +2009,7 @@ icmp6_rip6_input(struct mbuf **mp, int o
}
INP_INFO_RUNLOCK(&V_ripcbinfo);
if (last != NULL) {
-   if (last->inp_flags & IN6P_CONTROLOPTS)
+   if (last->inp_flags & INP_CONTROLOPTS)
ip6_savecontrol(last, m, &opts);
/* strip intermediate headers */
m_adj(m, off);

Modified: head/sys/netinet6/ip6_output.c
==
--- head/sys/netinet6/ip6_output.c  Wed Dec 17 12:52:34 2008
(r186222)
+++ head/sys/netinet6/ip6_output.c  Wed Dec 17 13:00:18 2008
(r186223)
@@ -1558,7 +1558,7 @@ do { \
break;
 
case IPV6_FAITH:
-   OPTSET(IN6P_FAITH);
+   OPTSET(INP_FAITH);
break;
 
case IPV6_RECVPATHMTU:
@@ -1768,18 +1768,18 @@ do { \
 
switch (optval) {
case IPV6_PORTRANGE_DEFAULT:
-   in6p->inp_flags &= ~(IN6P_LOWPORT);
-   in6p->inp_flags &= ~(IN6P_HIGHPORT);
+   in6p->inp_flags &= ~(INP_LOWPORT);
+   in6p->inp_flags &= ~(INP_HIGHPORT);
break;
 
case IPV6_PORTRANGE_HIGH:
-   in6p->inp_flags &= ~(IN6P_LOWPORT);
-   in6p->inp_flags |= IN6P_HIGHPORT;
+   in6p->inp_flags &= ~(INP_LOWPORT);
+   in6p->inp_flags |= INP_HIGHPORT;
break;
 
case IPV6_PORTRANGE_LOW:
-   in6p->inp_flags &= ~(IN6P_HIGHPORT);
-   in6p->inp_flags |= IN6P_LOWPORT;
+   in6p->inp_flags &= ~(INP_HIGHPORT);
+   in6p->inp_flags |= INP_LOWPORT;
break;
 
default:
@@ -1881,7 +1881,7 @@ do { \
break;
 
case IPV6_FAITH:
-   optval = OPTBIT(IN6P_FAITH);
+   optval = OPTBIT(INP_FAITH);
break;
 
case IPV6_V6ONLY:
@@ -1892,9 +1892,9 @@ do { \
{
int flags;
flags = in6p->inp_flags;
-   if (flags & IN6P_HIGHPORT)
+

svn commit: r186219 - in head/sys/cam: . scsi

2008-12-17 Thread Edward Tomasz Napierala
Author: trasz
Date: Wed Dec 17 10:49:03 2008
New Revision: 186219
URL: http://svn.freebsd.org/changeset/base/186219

Log:
  Revert r186186 for now; it breaks stuff.
  
  Approved by:  rwatson (mentor)

Modified:
  head/sys/cam/cam_periph.c
  head/sys/cam/cam_xpt.c
  head/sys/cam/scsi/scsi_da.c

Modified: head/sys/cam/cam_periph.c
==
--- head/sys/cam/cam_periph.c   Wed Dec 17 10:42:53 2008(r186218)
+++ head/sys/cam/cam_periph.c   Wed Dec 17 10:49:03 2008(r186219)
@@ -311,6 +311,8 @@ cam_periph_hold(struct cam_periph *perip
struct mtx *mtx;
int error;
 
+   mtx_assert(periph->sim->mtx, MA_OWNED);
+
/*
 * Increment the reference count on the peripheral
 * while we wait for our lock attempt to succeed
@@ -322,8 +324,6 @@ cam_periph_hold(struct cam_periph *perip
return (ENXIO);
 
mtx = periph->sim->mtx;
-   mtx_assert(mtx, MA_OWNED);
-
if (mtx == &Giant)
mtx = NULL;
 

Modified: head/sys/cam/cam_xpt.c
==
--- head/sys/cam/cam_xpt.c  Wed Dec 17 10:42:53 2008(r186218)
+++ head/sys/cam/cam_xpt.c  Wed Dec 17 10:49:03 2008(r186219)
@@ -1595,7 +1595,7 @@ xpt_remove_periph(struct cam_periph *per
 {
struct cam_ed *device;
 
-   cam_periph_lock(periph);
+   mtx_assert(periph->sim->mtx, MA_OWNED);
 
device = periph->path->device;
 
@@ -1615,7 +1615,6 @@ xpt_remove_periph(struct cam_periph *per
mtx_lock(&xsoftc.xpt_topo_lock);
xsoftc.xpt_generation++;
mtx_unlock(&xsoftc.xpt_topo_lock);
-   cam_periph_unlock(periph);
 }
 
 

Modified: head/sys/cam/scsi/scsi_da.c
==
--- head/sys/cam/scsi/scsi_da.c Wed Dec 17 10:42:53 2008(r186218)
+++ head/sys/cam/scsi/scsi_da.c Wed Dec 17 10:49:03 2008(r186219)
@@ -772,8 +772,8 @@ daclose(struct disk *dp)
 
softc->flags &= ~DA_FLAG_OPEN;
cam_periph_unhold(periph);
-   cam_periph_unlock(periph);
cam_periph_release(periph);
+   cam_periph_unlock(periph);
return (0); 
 }
 
@@ -995,8 +995,10 @@ dacleanup(struct cam_periph *periph)
xpt_print(periph->path, "can't remove sysctl context\n");
}
 
+   cam_periph_unlock(periph);
disk_destroy(softc->disk);
callout_drain(&softc->sendordered_c);
+   cam_periph_lock(periph);
free(softc, M_DEVBUF);
 }
 
___
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: r186194 - in head: share/man/man9 sys/fs/hpfs sys/fs/msdosfs sys/fs/ntfs sys/fs/nwfs sys/fs/smbfs sys/gnu/fs/ext2fs sys/gnu/fs/reiserfs sys/gnu/fs/xfs/FreeBSD sys/ufs/ufs

2008-12-17 Thread Ivan Voras
2008/12/17 Ulrich Spoerlein :
> On Tue, 16.12.2008 at 21:13:12 +, Edward Tomasz Napierala wrote:
>> Author: trasz
>> Date: Tue Dec 16 21:13:11 2008
>> New Revision: 186194
>> URL: http://svn.freebsd.org/changeset/base/186194
>>
>> Log:
>>   According to phk@, VOP_STRATEGY should never, _ever_, return
>>   anything other than 0.  Make it so.  This fixes
>>   "panic: VOP_STRATEGY failed bp=0xc320dd90 vp=0xc3b9f648",
>>   encountered when writing to an orphaned filesystem.  Reason
>>   for the panic was the following assert:
>>   KASSERT(i == 0, ("VOP_STRATEGY failed bp=%p vp=%p", bp, bp->b_vp));
>>   at vfs_bio:bufstrategy().
>
> Is such a change also needed/recommended for the FUSE port?

While at the topic again, is there a kind VFS-minded soul in need of
beer that can import and maintain the VFS kld in base? :)
___
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: r186233 - head/sys/kern

2008-12-17 Thread Warner Losh
Author: imp
Date: Wed Dec 17 16:25:20 2008
New Revision: 186233
URL: http://svn.freebsd.org/changeset/base/186233

Log:
  Minor style(9) nit.

Modified:
  head/sys/kern/imgact_elf.c

Modified: head/sys/kern/imgact_elf.c
==
--- head/sys/kern/imgact_elf.c  Wed Dec 17 16:19:33 2008(r186232)
+++ head/sys/kern/imgact_elf.c  Wed Dec 17 16:25:20 2008(r186233)
@@ -894,9 +894,8 @@ __elfN(freebsd_fixup)(register_t **stack
base = (Elf_Addr *)*stack_base;
pos = base + (imgp->args->argc + imgp->args->envc + 2);
 
-   if (args->execfd != -1) {
+   if (args->execfd != -1)
AUXARGS_ENTRY(pos, AT_EXECFD, args->execfd);
-   }
AUXARGS_ENTRY(pos, AT_PHDR, args->phdr);
AUXARGS_ENTRY(pos, AT_PHENT, args->phent);
AUXARGS_ENTRY(pos, AT_PHNUM, args->phnum);
___
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: r186252 - head/sys/kern

2008-12-17 Thread Ivan Voras
Author: ivoras
Date: Wed Dec 17 19:57:12 2008
New Revision: 186252
URL: http://svn.freebsd.org/changeset/base/186252

Log:
  Introduce a sysctl kern.vm_guest that reflects what the kernel knows about
  it running under a virtual environment. This also introduces a globally
  accessible variable vm_guest that can be used where appropriate in the
  kernel to inspect this environment.
  
  To make it easier for the long run, an enum VM_GUEST is also introduced,
  which could possibly be factored out in a header somewhere (but the
  question is where - vm/vm_param.h? sys/param.h?) so it eventually becomes
  a part of the standard KPI. In any case, it's a start.
  
  The purpose of all this isn't to absolutely detect that the OS is running
  under a virtual environment (cf. "redpill") but to allow the parts of the
  kernel and the userland that care about this particular aspect and can do
  something useful depending on it to have a standardised interface. Reducing
  kern.hz is one example but there are other things that could be done like
  avoiding context switches, not using CPU instructions that are known to be
  slow in emulation, possibly different strategies in VM (memory) allocation,
  CPU scheduling, etc.
  
  It isn't clear if the JAILS/VIMAGE functionality should also be exposed
  by this particular mechanism (probably not since they're not "full"
  virtual hardware environments). Sometime in the future another sysctl and
  a variable could be introduced to reflect if the kernel supports any kind
  of virtual hosting (e.g. VMWare VMI, Xen dom0).
  
  Reviewed by:  silence from src-commiters@, virtualization@, kmacy@
  Approved by:  gnn (mentor)
  Security: Obscurity doesn't help.

Modified:
  head/sys/kern/subr_param.c

Modified: head/sys/kern/subr_param.c
==
--- head/sys/kern/subr_param.c  Wed Dec 17 19:19:14 2008(r186251)
+++ head/sys/kern/subr_param.c  Wed Dec 17 19:57:12 2008(r186252)
@@ -73,6 +73,8 @@ __FBSDID("$FreeBSD$");
 #defineMAXFILES (maxproc * 2)
 #endif
 
+enum VM_GUEST { VM_GUEST_NO, VM_GUEST_VM, VM_GUEST_XEN };
+
 inthz;
 inttick;
 intmaxusers;   /* base tunable */
@@ -86,6 +88,7 @@ int   nswbuf;
 intmaxswzone;  /* max swmeta KVA storage */
 intmaxbcache;  /* max buffer cache KVA storage */
 intmaxpipekva; /* Limit on pipe KVA */
+intvm_guest;   /* Running as virtual machine guest? */
 u_long maxtsiz;/* max text size */
 u_long dfldsiz;/* initial data size limit */
 u_long maxdsiz;/* max data size */
@@ -110,6 +113,8 @@ SYSCTL_ULONG(_kern, OID_AUTO, maxssiz, C
 "max stack size");
 SYSCTL_ULONG(_kern, OID_AUTO, sgrowsiz, CTLFLAG_RDTUN, &sgrowsiz, 0,
 "amount to grow stack");
+SYSCTL_INT(_kern, OID_AUTO, vm_guest, CTLFLAG_RD, &vm_guest, 0,
+"Running under a virtual machine?");
 
 /*
  * These have to be allocated somewhere; allocating
@@ -133,7 +138,7 @@ static const char *const vm_pnames[] = {
NULL
 };
 
-static int
+static enum VM_GUEST
 detect_virtual(void)
 {
char *sysenv;
@@ -144,7 +149,7 @@ detect_virtual(void)
for (i = 0; vm_bnames[i] != NULL; i++)
if (strcmp(sysenv, vm_bnames[i]) == 0) {
freeenv(sysenv);
-   return (1);
+   return (VM_GUEST_VM);
}
freeenv(sysenv);
}
@@ -153,11 +158,11 @@ detect_virtual(void)
for (i = 0; vm_pnames[i] != NULL; i++)
if (strcmp(sysenv, vm_pnames[i]) == 0) {
freeenv(sysenv);
-   return (1);
+   return (VM_GUEST_VM);
}
freeenv(sysenv);
}
-   return (0);
+   return (VM_GUEST_NO);
 }
 
 /*
@@ -166,11 +171,15 @@ detect_virtual(void)
 void
 init_param1(void)
 {
-
+#ifndef XEN
+   vm_guest = detect_virtual();
+#else
+   vm_guest = VM_GUEST_XEN;
+#endif
hz = -1;
TUNABLE_INT_FETCH("kern.hz", &hz);
if (hz == -1)
-   hz = detect_virtual() ? HZ_VM : HZ;
+   hz = vm_guest > VM_GUEST_NO ? HZ_VM : HZ;
tick = 100 / hz;
 
 #ifdef VM_SWZONE_SIZE_MAX
___
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: r186222 - in head/sys: dev/cxgb/ulp/tom netinet netinet6

2008-12-17 Thread Bjoern A. Zeeb
Author: bz
Date: Wed Dec 17 12:52:34 2008
New Revision: 186222
URL: http://svn.freebsd.org/changeset/base/186222

Log:
  Use inc_flags instead of the inc_isipv6 alias which so far
  had been the only flag with random usage patterns.
  Switch inc_flags to be used as a real bit field by using
  INC_ISIPV6 with bitops to check for the 'isipv6' condition.
  
  While here fix a place or two where in case of v4 inc_flags
  were not properly initialized before.[1]
  
  Found by: rwatson during review [1]
  Discussed with:   rwatson
  Reviewed by:  rwatson
  MFC after:4 weeks

Modified:
  head/sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c
  head/sys/netinet/in_pcb.c
  head/sys/netinet/in_pcb.h
  head/sys/netinet/tcp_hostcache.c
  head/sys/netinet/tcp_input.c
  head/sys/netinet/tcp_subr.c
  head/sys/netinet/tcp_syncache.c
  head/sys/netinet/tcp_timewait.c
  head/sys/netinet/tcp_usrreq.c
  head/sys/netinet6/icmp6.c
  head/sys/netinet6/ip6_output.c

Modified: head/sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c
==
--- head/sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c Wed Dec 17 12:33:39 2008
(r186221)
+++ head/sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c Wed Dec 17 12:52:34 2008
(r186222)
@@ -3269,8 +3269,6 @@ syncache_add_accept_req(struct cpl_pass_
 
toep->tp_iss = toep->tp_delack_seq = toep->tp_rcv_wup = 
toep->tp_copied_seq = rcv_isn + 1;
 
-   
-   inc.inc_isipv6 = 0;
inc.inc_len = 0;
inc.inc_faddr.s_addr = req->peer_ip;
inc.inc_laddr.s_addr = req->local_ip;
@@ -3610,7 +3608,6 @@ syncache_expand_establish_req(struct cpl
th.th_seq = req->rcv_isn;
th.th_flags = TH_ACK;

-   inc.inc_isipv6 = 0;
inc.inc_len = 0;
inc.inc_faddr.s_addr = req->peer_ip;
inc.inc_laddr.s_addr = req->local_ip;

Modified: head/sys/netinet/in_pcb.c
==
--- head/sys/netinet/in_pcb.c   Wed Dec 17 12:33:39 2008(r186221)
+++ head/sys/netinet/in_pcb.c   Wed Dec 17 12:52:34 2008(r186222)
@@ -1700,7 +1700,7 @@ db_print_inconninfo(struct in_conninfo *
indent += 2;
 
 #ifdef INET6
-   if (inc->inc_flags == 1) {
+   if (inc->inc_flags & INC_ISIPV6) {
/* IPv6. */
ip6_sprintf(laddr_str, &inc->inc6_laddr);
ip6_sprintf(faddr_str, &inc->inc6_faddr);

Modified: head/sys/netinet/in_pcb.h
==
--- head/sys/netinet/in_pcb.h   Wed Dec 17 12:33:39 2008(r186221)
+++ head/sys/netinet/in_pcb.h   Wed Dec 17 12:52:34 2008(r186222)
@@ -106,6 +106,12 @@ struct in_conninfo {
/* protocol dependent part */
struct  in_endpoints inc_ie;
 };
+
+/*
+ * Flags for inc_flags.
+ */
+#defineINC_ISIPV6  0x01
+
 #define inc_isipv6 inc_flags   /* temp compatability */
 #defineinc_fport   inc_ie.ie_fport
 #defineinc_lport   inc_ie.ie_lport

Modified: head/sys/netinet/tcp_hostcache.c
==
--- head/sys/netinet/tcp_hostcache.cWed Dec 17 12:33:39 2008
(r186221)
+++ head/sys/netinet/tcp_hostcache.cWed Dec 17 12:52:34 2008
(r186222)
@@ -249,7 +249,7 @@ tcp_hc_lookup(struct in_conninfo *inc)
/*
 * Hash the foreign ip address.
 */
-   if (inc->inc_isipv6)
+   if (inc->inc_flags & INC_ISIPV6)
hash = HOSTCACHE_HASH6(&inc->inc6_faddr);
else
hash = HOSTCACHE_HASH(&inc->inc_faddr);
@@ -267,7 +267,7 @@ tcp_hc_lookup(struct in_conninfo *inc)
 * Iterate through entries in bucket row looking for a match.
 */
TAILQ_FOREACH(hc_entry, &hc_head->hch_bucket, rmx_q) {
-   if (inc->inc_isipv6) {
+   if (inc->inc_flags & INC_ISIPV6) {
if (memcmp(&inc->inc6_faddr, &hc_entry->ip6,
sizeof(inc->inc6_faddr)) == 0)
return hc_entry;
@@ -305,7 +305,7 @@ tcp_hc_insert(struct in_conninfo *inc)
/*
 * Hash the foreign ip address.
 */
-   if (inc->inc_isipv6)
+   if (inc->inc_flags & INC_ISIPV6)
hash = HOSTCACHE_HASH6(&inc->inc6_faddr);
else
hash = HOSTCACHE_HASH(&inc->inc_faddr);
@@ -360,7 +360,7 @@ tcp_hc_insert(struct in_conninfo *inc)
 * Initialize basic information of hostcache entry.
 */
bzero(hc_entry, sizeof(*hc_entry));
-   if (inc->inc_isipv6)
+   if (inc->inc_flags & INC_ISIPV6)
bcopy(&inc->inc6_faddr, &hc_entry->ip6, sizeof(hc_entry->ip6));
else
hc_entry->ip4 = inc->inc_faddr;

Modified: head/sys/netinet/tcp_input.c
==
--- head/sys/netinet/tcp

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

2008-12-17 Thread Andrew Thompson
On Wed, Dec 17, 2008 at 07:57:12PM +, Ivan Voras wrote:
> Author: ivoras
> Date: Wed Dec 17 19:57:12 2008
> New Revision: 186252
> URL: http://svn.freebsd.org/changeset/base/186252
> 
> Log:
>   Introduce a sysctl kern.vm_guest that reflects what the kernel knows about
>   it running under a virtual environment. This also introduces a globally
>   accessible variable vm_guest that can be used where appropriate in the
>   kernel to inspect this environment.
>   
>   To make it easier for the long run, an enum VM_GUEST is also introduced,
>   which could possibly be factored out in a header somewhere (but the
>   question is where - vm/vm_param.h? sys/param.h?) so it eventually becomes
>   a part of the standard KPI. In any case, it's a start.
>   
>   The purpose of all this isn't to absolutely detect that the OS is running
>   under a virtual environment (cf. "redpill") but to allow the parts of the
>   kernel and the userland that care about this particular aspect and can do
>   something useful depending on it to have a standardised interface. Reducing
>   kern.hz is one example but there are other things that could be done like
>   avoiding context switches, not using CPU instructions that are known to be
>   slow in emulation, possibly different strategies in VM (memory) allocation,
>   CPU scheduling, etc.
>   
>   It isn't clear if the JAILS/VIMAGE functionality should also be exposed
>   by this particular mechanism (probably not since they're not "full"
>   virtual hardware environments). Sometime in the future another sysctl and
>   a variable could be introduced to reflect if the kernel supports any kind
>   of virtual hosting (e.g. VMWare VMI, Xen dom0).
>   
>   Reviewed by:silence from src-commiters@, virtualization@, kmacy@
>   Approved by:gnn (mentor)
>   Security:   Obscurity doesn't help.
> 
> Modified:
>   head/sys/kern/subr_param.c

Sorry for chiming in late but should the sysctl be a string? 1,2,3 arent
all that useful.


Andrew
___
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: r186235 - in head/sys: kern sys

2008-12-17 Thread Peter Wemm
Author: peter
Date: Wed Dec 17 16:54:29 2008
New Revision: 186235
URL: http://svn.freebsd.org/changeset/base/186235

Log:
  Remove sysctl debug.elf_trace and the trace field in auxargs.  They go
  nowhere.  It used to be the equivalent of $LD_DEBUG in rtld-elf.
  Elf_Auxargs is an internal structure.

Modified:
  head/sys/kern/imgact_elf.c
  head/sys/sys/imgact_elf.h

Modified: head/sys/kern/imgact_elf.c
==
--- head/sys/kern/imgact_elf.c  Wed Dec 17 16:51:40 2008(r186234)
+++ head/sys/kern/imgact_elf.c  Wed Dec 17 16:54:29 2008(r186235)
@@ -97,9 +97,6 @@ SYSCTL_INT(__CONCAT(_kern_elf, __ELF_WOR
 TUNABLE_INT("kern.elf" __XSTRING(__ELF_WORD_SIZE) ".fallback_brand",
 &__elfN(fallback_brand));
 
-static int elf_trace = 0;
-SYSCTL_INT(_debug, OID_AUTO, __elfN(trace), CTLFLAG_RW, &elf_trace, 0, "");
-
 static int elf_legacy_coredump = 0;
 SYSCTL_INT(_debug, OID_AUTO, __elfN(legacy_coredump), CTLFLAG_RW, 
 &elf_legacy_coredump, 0, "");
@@ -839,7 +836,6 @@ __CONCAT(exec_, __elfN(imgact))(struct i
elf_auxargs->base = addr;
elf_auxargs->flags = 0;
elf_auxargs->entry = entry;
-   elf_auxargs->trace = elf_trace;
 
imgp->auxargs = elf_auxargs;
imgp->interpreted = 0;

Modified: head/sys/sys/imgact_elf.h
==
--- head/sys/sys/imgact_elf.h   Wed Dec 17 16:51:40 2008(r186234)
+++ head/sys/sys/imgact_elf.h   Wed Dec 17 16:54:29 2008(r186235)
@@ -52,7 +52,6 @@ typedef struct {
Elf_Sizebase;
Elf_Sizeflags;
Elf_Sizeentry;
-   Elf_Sizetrace;
 } __ElfN(Auxargs);
 
 typedef struct {
___
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: r186220 - in stable/7: include include/arpa lib/libc lib/libc/include/isc lib/libc/inet lib/libc/resolv

2008-12-17 Thread Hajimu UMEMOTO
Author: ume
Date: Wed Dec 17 12:31:04 2008
New Revision: 186220
URL: http://svn.freebsd.org/changeset/base/186220

Log:
  MFC 186090
  
  Update our resolver to BIND 9.4.3.
  
  Merge the resolver part of BIND 9.4.3 into HEAD.
  It includes the following fix:
  
2426.   [bug]   libbind: inet_net_pton() can sometimes return the
wrong value if excessively large netmasks are
supplied. [RT #18512]
  
  Reported by:  Maksymilian Arciemowicz 
  Approved by:  re (kib)

Added:
  stable/7/lib/libc/include/isc/platform.h
 - copied unchanged from r186090, head/lib/libc/include/isc/platform.h
Modified:
  stable/7/include/   (props changed)
  stable/7/include/arpa/nameser.h
  stable/7/include/resolv.h
  stable/7/lib/libc/   (props changed)
  stable/7/lib/libc/include/isc/eventlib.h   (contents, props changed)
  stable/7/lib/libc/inet/inet_net_pton.c
  stable/7/lib/libc/resolv/res_debug.c
  stable/7/lib/libc/resolv/res_mkquery.c
  stable/7/lib/libc/resolv/res_query.c
  stable/7/lib/libc/resolv/res_send.c

Modified: stable/7/include/arpa/nameser.h
==
--- stable/7/include/arpa/nameser.h Wed Dec 17 10:49:03 2008
(r186219)
+++ stable/7/include/arpa/nameser.h Wed Dec 17 12:31:04 2008
(r186220)
@@ -49,7 +49,7 @@
  */
 
 /*
- * $Id: nameser.h,v 1.7.18.1 2005/04/27 05:00:50 sra Exp $
+ * $Id: nameser.h,v 1.7.18.2 2008/04/03 23:15:15 marka Exp $
  * $FreeBSD$
  */
 
@@ -424,9 +424,10 @@ typedef enum __ns_cert_types {
 #define NS_NXT_MAX 127
 
 /*%
- * EDNS0 extended flags, host order.
+ * EDNS0 extended flags and option codes, host order.
  */
 #define NS_OPT_DNSSEC_OK   0x8000U
+#define NS_OPT_NSID 3
 
 /*%
  * Inline versions of get/put short/long.  Pointer is advanced.

Modified: stable/7/include/resolv.h
==
--- stable/7/include/resolv.h   Wed Dec 17 10:49:03 2008(r186219)
+++ stable/7/include/resolv.h   Wed Dec 17 12:31:04 2008(r186220)
@@ -50,7 +50,7 @@
 
 /*%
  * @(#)resolv.h8.1 (Berkeley) 6/2/93
- * $Id: resolv.h,v 1.19.18.3 2005/08/25 04:43:51 marka Exp $
+ * $Id: resolv.h,v 1.19.18.4 2008/04/03 23:15:15 marka Exp $
  * $FreeBSD$
  */
 
@@ -245,6 +245,7 @@ union res_sockaddr_union {
 #defineRES_NOCHECKNAME 0x8000  /*%< do not check names for 
sanity. */
 #defineRES_KEEPTSIG0x0001  /*%< do not strip TSIG records 
*/
 #defineRES_BLAST   0x0002  /*%< blast all recursive 
servers */
+#define RES_NSID   0x0004  /*%< request name server ID */
 #define RES_NOTLDQUERY 0x0010  /*%< don't unqualified name as a tld */
 #define RES_USE_DNSSEC 0x0020  /*%< use DNSSEC using OK bit in OPT */
 /* #define RES_DEBUG2  0x0040 */   /* nslookup internal */
@@ -386,6 +387,7 @@ extern const struct res_sym __p_rcode_sy
 #define sym_ntos   __sym_ntos
 #define sym_ston   __sym_ston
 #define res_nopt   __res_nopt
+#define res_nopt_rdata __res_nopt_rdata
 #define res_ndestroy   __res_ndestroy
 #defineres_nametoclass __res_nametoclass
 #defineres_nametotype  __res_nametotype
@@ -474,6 +476,8 @@ int res_findzonecut2(res_state, const c
 union res_sockaddr_union *, int);
 void   res_nclose(res_state);
 intres_nopt(res_state, int, u_char *, int, int);
+intres_nopt_rdata(res_state, int, u_char *, int, u_char *,
+  u_short, u_short, u_char *);
 void   res_send_setqhook(res_send_qhook);
 void   res_send_setrhook(res_send_rhook);
 int__res_vinit(res_state, int);

Modified: stable/7/lib/libc/include/isc/eventlib.h
==
--- stable/7/lib/libc/include/isc/eventlib.hWed Dec 17 10:49:03 2008
(r186219)
+++ stable/7/lib/libc/include/isc/eventlib.hWed Dec 17 12:31:04 2008
(r186220)
@@ -18,7 +18,7 @@
 /* eventlib.h - exported interfaces for eventlib
  * vix 09sep95 [initial]
  *
- * $Id: eventlib.h,v 1.3.18.2 2005/07/28 07:38:07 marka Exp $
+ * $Id: eventlib.h,v 1.3.18.3 2008/01/23 02:12:01 marka Exp $
  */
 
 #ifndef _EVENTLIB_H
@@ -29,6 +29,8 @@
 #include 
 #include 
 
+#include 
+
 #ifndef __P
 # define __EVENTLIB_P_DEFINED
 # ifdef __STDC__

Copied: stable/7/lib/libc/include/isc/platform.h (from r186090, 
head/lib/libc/include/isc/platform.h)
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ stable/7/lib/libc/include/isc/platform.hWed Dec 17 12:31:04 2008
(r186220, copy of r186090, head/lib/libc/include/isc/platform.h)
@@ -0,0 +1,37 @@
+/*
+ * Copyright (C) 2008 

svn commit: r186215 - head/sys/netinet6

2008-12-17 Thread Qing Li
Author: qingli
Date: Wed Dec 17 10:03:49 2008
New Revision: 186215
URL: http://svn.freebsd.org/changeset/base/186215

Log:
  in6_clsroute() was applied to prefix routes causing some
  of them to expire. in6_clsroute() was only applied to
  cloned routes that are no longer applicable after the
  arp-v2 commit.

Modified:
  head/sys/netinet6/in6.c
  head/sys/netinet6/in6_rmx.c
  head/sys/netinet6/nd6.c
  head/sys/netinet6/nd6.h
  head/sys/netinet6/nd6_rtr.c

Modified: head/sys/netinet6/in6.c
==
--- head/sys/netinet6/in6.c Wed Dec 17 08:18:11 2008(r186214)
+++ head/sys/netinet6/in6.c Wed Dec 17 10:03:49 2008(r186215)
@@ -987,6 +987,13 @@ in6_update_ifa(struct ifnet *ifp, struct
}
}
if (!rt) {
+
+ printf("in6_update_ifa #1: addr= %s, mask= %s, ia= %s, ifp = 
%s\n", 
+ ip6_sprintf(ip6buf, &mltaddr.sin6_addr),
+ ip6_sprintf(ip6buf, &mltmask.sin6_addr),
+ ip6_sprintf(ip6buf, &ia->ia_addr.sin6_addr),
+ if_name(ifp));
+
error = rtrequest(RTM_ADD, (struct sockaddr *)&mltaddr,
(struct sockaddr *)&ia->ia_addr,
(struct sockaddr *)&mltmask, RTF_UP,
@@ -1061,6 +1068,12 @@ in6_update_ifa(struct ifnet *ifp, struct
}
}
if (!rt) {
+ printf("in6_update_ifa #2: addr= %s, mask= %s, ia= %s, ifp = 
%s\n", 
+ ip6_sprintf(ip6buf, &mltaddr.sin6_addr),
+ ip6_sprintf(ip6buf, &mltmask.sin6_addr),
+ ip6_sprintf(ip6buf, &ia->ia_addr.sin6_addr),
+ if_name(ifp));
+
error = rtrequest(RTM_ADD, (struct sockaddr *)&mltaddr,
(struct sockaddr *)&ia->ia_addr,
(struct sockaddr *)&mltmask, RTF_UP,

Modified: head/sys/netinet6/in6_rmx.c
==
--- head/sys/netinet6/in6_rmx.c Wed Dec 17 08:18:11 2008(r186214)
+++ head/sys/netinet6/in6_rmx.c Wed Dec 17 10:03:49 2008(r186215)
@@ -220,33 +220,6 @@ SYSCTL_V_INT(V_NET, vnet_inet6, _net_ine
 rtmaxcache, CTLFLAG_RW, rtq_toomany6 , 0, "");
 
 
-/*
- * On last reference drop, mark the route as belong to us so that it can be
- * timed out.
- */
-static void
-in6_clsroute(struct radix_node *rn, struct radix_node_head *head)
-{
-   INIT_VNET_INET6(curvnet);
-   struct rtentry *rt = (struct rtentry *)rn;
-
-   RT_LOCK_ASSERT(rt);
-
-   if (!(rt->rt_flags & RTF_UP))
-   return; /* prophylactic measures */
-
-   /*
-* As requested by David Greenman:
-* If rtq_reallyold6 is 0, just delete the route without
-* waiting for a timeout cycle to kill it.
-*/
-   if (V_rtq_reallyold6 != 0) {
-   rt->rt_flags |= RTPRF_OURS;
-   rt->rt_rmx.rmx_expire = time_uptime + V_rtq_reallyold6;
-   } else {
-   rtexpunge(rt);
-   }
-}
 
 struct rtqk_arg {
struct radix_node_head *rnh;
@@ -469,7 +442,6 @@ in6_inithead(void **head, int off)
rnh = *head;
rnh->rnh_addaddr = in6_addroute;
rnh->rnh_matchaddr = in6_matroute;
-   rnh->rnh_close = in6_clsroute;
callout_init(&V_rtq_timer6, CALLOUT_MPSAFE);
in6_rtqtimo(rnh);   /* kick off timeout first time */
callout_init(&V_rtq_mtutimer, CALLOUT_MPSAFE);

Modified: head/sys/netinet6/nd6.c
==
--- head/sys/netinet6/nd6.c Wed Dec 17 08:18:11 2008(r186214)
+++ head/sys/netinet6/nd6.c Wed Dec 17 10:03:49 2008(r186215)
@@ -1713,7 +1713,6 @@ nd6_output_lle(struct ifnet *ifp, struct
 {
INIT_VNET_INET6(curvnet);
struct mbuf *m = m0;
-   struct rtentry *rt = rt0;
struct llentry *ln = lle;
int error = 0;
int flags = 0;
@@ -1746,9 +1745,9 @@ nd6_output_lle(struct ifnet *ifp, struct
flags = ((m != NULL) || (lle != NULL)) ? LLE_EXCLUSIVE : 0;
if (ln == NULL) {
retry:
-   IF_AFDATA_LOCK(rt->rt_ifp);
+   IF_AFDATA_LOCK(ifp);
ln = lla_lookup(LLTABLE6(ifp), flags, (struct sockaddr *)dst);
-   IF_AFDATA_UNLOCK(rt->rt_ifp);
+   IF_AFDATA_UNLOCK(ifp);
if ((ln == NULL) && nd6_is_addr_neighbor(dst, ifp))  {
/*
 * Since nd6_is_addr_neighbor() internally calls 
nd6_lookup(),
@@ -1756,9 +1755,9 @@ nd6_output_lle(struct ifnet *ifp, struct
 * it is tolerable, because this should be a rare case.
 */
flags = ND6_CREATE | (m ? ND6_EXCLUSIVE 

Re: svn commit: r186187 - head/sys/net

2008-12-17 Thread Robert Watson

On Wed, 17 Dec 2008, Dag-Erling Smørgrav wrote:


Robert Watson  writes:

I used to comment a bit more gratuitously along those lines, but bde
seems to have (at least partially) broken me of the habit.  I felt
sure there was a note in style(9) on not commenting on obvious things,
but the closest I found was this:

 exit(EX_OK);/*
  * Avoid obvious comments such as
  * "Exit 0 on success."
  */


Umm, didn't we agree *not* to use sysexits?


Dunno, that one is not mine:

Annotations for style.9
***
1.5  (joerg31-Mar-96):  exit(EX_OK);/*
1.38 (alex 28-Oct-00):  exit(EX_USAGE);

Robert N M Watson
Computer Laboratory
University of Cambridge___
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: r186187 - head/sys/net

2008-12-17 Thread Max Laier
As the upper half of this thread has turned into a style(9) bikeshed, let me 
replay the lower half and add more locking folks.

The change in question is here: 
http://svn.freebsd.org/viewvc/base/head/sys/net/pfil.c?r1=173904&r2=186187 

On Tuesday 16 December 2008 19:20:40 Robert Watson wrote:
> On Tue, 16 Dec 2008, Max Laier wrote:
...
> >>   - Don't lock the hook during registration, since it's not yet in use.
> >
> > Shouldn't the WLOCK be obtained regardless in order to obtain a memory
> > barrier for the reading threads?  pfil_run_hooks doesn't interact with
> > the LIST_LOCK so it's unclear in what state the hook head will be when
> > the hook head is first read.
>
> Hmm.  Interesting observation.  However, that approach is not consistent
> with lots of other code, so possibly that other code needs to change as
> well.  For example, ip_init() initializes lots of other global data
> structures, including the fragment reassembly queue and protocol switch,
> without acquiring locks in such a way as to force visibility on other CPUs.
>
> I've CC'd John Baldwin, who might be able to comment on this issue more
> generally.  Should we be, for example, calling { IPQ_LOCK(); IPQ_UNLOCK();
> } after initializing the IP reassembly queues to make sure that
> initialization is visible to other CPUs that will be calling IPQ_LOCK()
> before using it?
>
...
> >>   - Don't write-lock hooks during removal because they are assumed
> >> quiesced.
> >
> > Again, this lock also ensures that we see all the changes done in other
> > threads to the pfil head recently - otherwise we might leak a hook
> > function pointer or even fault due to list inconsistencies.  Again,
> > add/del_hook don't interact with the LIST_LOCK.
>
> We may run into similar problems with VIMAGE destructors now that we are
> interested in tearing down network stacks.  Again, perhaps jhb can opine
> some.

-- 
/"\  Best regards,  | mla...@freebsd.org
\ /  Max Laier  | ICQ #67774661
 X   http://pf4freebsd.love2party.net/  | mla...@efnet
/ \  ASCII Ribbon Campaign  | Against HTML Mail and News
___
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: r186226 - stable/6/lib/libc/inet

2008-12-17 Thread Hajimu UMEMOTO
Author: ume
Date: Wed Dec 17 14:21:49 2008
New Revision: 186226
URL: http://svn.freebsd.org/changeset/base/186226

Log:
  MFC 186090
  
  inet_net_pton() can sometimes return the wrong value if excessively
  large netmasks are supplied. [RT #18512]
  
  Reported by:  Maksymilian Arciemowicz 
  Obtained from:BIND 9.4.3

Modified:
  stable/6/lib/libc/inet/inet_net_pton.c   (contents, props changed)

Modified: stable/6/lib/libc/inet/inet_net_pton.c
==
--- stable/6/lib/libc/inet/inet_net_pton.c  Wed Dec 17 13:13:35 2008
(r186225)
+++ stable/6/lib/libc/inet/inet_net_pton.c  Wed Dec 17 14:21:49 2008
(r186226)
@@ -135,11 +135,11 @@ inet_net_pton_ipv4(const char *src, u_ch
assert(n >= 0 && n <= 9);
bits *= 10;
bits += n;
+   if (bits > 32)
+   goto enoent;
} while ((ch = *src++) != '\0' && isascii(ch) && isdigit(ch));
if (ch != '\0')
goto enoent;
-   if (bits > 32)
-   goto emsgsize;
}
 
/* Firey death and destruction unless we prefetched EOS. */
___
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: r186252 - head/sys/kern

2008-12-17 Thread Ivan Voras
2008/12/17 Andrew Thompson :

> Sorry for chiming in late but should the sysctl be a string? 1,2,3 arent
> all that useful.

I don't think it's unusual as an integer but I'm ambivalent about it -
if more people want it, I'll stringify it.
___
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: r186227 - in head/sys/powerpc: include mpc85xx

2008-12-17 Thread Rafal Jaworowski
Author: raj
Date: Wed Dec 17 15:27:49 2008
New Revision: 186227
URL: http://svn.freebsd.org/changeset/base/186227

Log:
  Improve MPC85XX helper routines.
  
  - Move CCSR accessors to the shared MPC85XX area
  - Simplify SVR version subfield handling
  - Adjust OCP

Added:
  head/sys/powerpc/mpc85xx/mpc85xx.h   (contents, props changed)
Modified:
  head/sys/powerpc/include/spr.h
  head/sys/powerpc/mpc85xx/mpc85xx.c
  head/sys/powerpc/mpc85xx/ocpbus.c

Modified: head/sys/powerpc/include/spr.h
==
--- head/sys/powerpc/include/spr.h  Wed Dec 17 14:21:49 2008
(r186226)
+++ head/sys/powerpc/include/spr.h  Wed Dec 17 15:27:49 2008
(r186227)
@@ -560,14 +560,15 @@
 #defineSPR_MCSRR1  0x23b   /* ..8 571 Machine check SRR1 */
 
 #defineSPR_SVR 0x3ff   /* ..8 1023 System Version 
Register */
-#define  SVR_MPC8533 0x803c0010
-#define  SVR_MPC8533E0x80340010
-#define  SVR_MPC8541 0x80720011
-#define  SVR_MPC8541E0x807a0011
-#define  SVR_MPC8555 0x80710011
-#define  SVR_MPC8555E0x80790011
-#define  SVR_MPC8572 0x80e00010
-#define  SVR_MPC8572E0x80e80010
+#define  SVR_MPC8533 0x803c
+#define  SVR_MPC8533E0x8034
+#define  SVR_MPC8541 0x8072
+#define  SVR_MPC8541E0x807a
+#define  SVR_MPC8555 0x8071
+#define  SVR_MPC8555E0x8079
+#define  SVR_MPC8572 0x80e0
+#define  SVR_MPC8572E0x80e8
+#defineSVR_VER(svr)(((svr) >> 16) & 0x)
 
 #defineSPR_PID00x030   /* ..8 Process ID Register 0 */
 #defineSPR_PID10x279   /* ..8 Process ID Register 1 */
@@ -623,5 +624,4 @@
 
 #endif /* #elif defined(E500) */
 
-
 #endif /* !_POWERPC_SPR_H_ */

Modified: head/sys/powerpc/mpc85xx/mpc85xx.c
==
--- head/sys/powerpc/mpc85xx/mpc85xx.c  Wed Dec 17 14:21:49 2008
(r186226)
+++ head/sys/powerpc/mpc85xx/mpc85xx.c  Wed Dec 17 15:27:49 2008
(r186227)
@@ -38,33 +38,51 @@ __FBSDID("$FreeBSD$");
 
 #include 
 #include 
-#include 
 #include 
 
 #include 
+#include 
 
 /*
  * MPC85xx system specific routines
  */
 
+uint32_t
+ccsr_read4(uintptr_t addr)
+{
+   volatile uint32_t *ptr = (void *)addr;
+
+   return (*ptr);
+}
+
+void
+ccsr_write4(uintptr_t addr, uint32_t val)
+{
+   volatile uint32_t *ptr = (void *)addr;
+
+   *ptr = val;
+   __asm __volatile("eieio; sync");
+}
+
 void
-cpu_reset()
+cpu_reset(void)
 {
-   uint32_t svr = mfspr(SPR_SVR);
+   uint32_t ver = SVR_VER(mfspr(SPR_SVR));
 
-   if (svr == SVR_MPC8572E || svr == SVR_MPC8572)
+   if (ver == SVR_MPC8572E || ver == SVR_MPC8572)
/* Systems with dedicated reset register */
-   out32(OCP85XX_RSTCR, 2);
+   ccsr_write4(OCP85XX_RSTCR, 2);
else {
/* Clear DBCR0, disables debug interrupts and events. */
mtspr(SPR_DBCR0, 0);
-   __asm volatile("isync");
+   __asm __volatile("isync");
 
/* Enable Debug Interrupts in MSR. */
mtmsr(mfmsr() | PSL_DE);
 
/* Enable debug interrupts and issue reset. */
-   mtspr(SPR_DBCR0, mfspr(SPR_DBCR0) | DBCR0_IDM | 
DBCR0_RST_SYSTEM);
+   mtspr(SPR_DBCR0, mfspr(SPR_DBCR0) | DBCR0_IDM |
+   DBCR0_RST_SYSTEM);
}
 
printf("Reset failed...\n");

Added: head/sys/powerpc/mpc85xx/mpc85xx.h
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/sys/powerpc/mpc85xx/mpc85xx.h  Wed Dec 17 15:27:49 2008
(r186227)
@@ -0,0 +1,35 @@
+/*-
+ * Copyright (C) 2008 Semihalf, Rafal Jaworowski
+ * 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 AUTHOR OR CONTRIBUTORS BE LIABLE

Re: svn commit: r186215 - head/sys/netinet6

2008-12-17 Thread Bjoern A. Zeeb

On Wed, 17 Dec 2008, Qing Li wrote:


Author: qingli
Date: Wed Dec 17 10:03:49 2008
New Revision: 186215
URL: http://svn.freebsd.org/changeset/base/186215

Log:
 in6_clsroute() was applied to prefix routes causing some
 of them to expire. in6_clsroute() was only applied to
 cloned routes that are no longer applicable after the
 arp-v2 commit.

Modified:
 head/sys/netinet6/in6.c
 head/sys/netinet6/in6_rmx.c
 head/sys/netinet6/nd6.c
 head/sys/netinet6/nd6.h
 head/sys/netinet6/nd6_rtr.c

Modified: head/sys/netinet6/in6.c
==
--- head/sys/netinet6/in6.c Wed Dec 17 08:18:11 2008(r186214)
+++ head/sys/netinet6/in6.c Wed Dec 17 10:03:49 2008(r186215)
@@ -987,6 +987,13 @@ in6_update_ifa(struct ifnet *ifp, struct
}
}
if (!rt) {
+
+ printf("in6_update_ifa #1: addr= %s, mask= %s, ia= %s, ifp = 
%s\n",
+ ip6_sprintf(ip6buf, &mltaddr.sin6_addr),
+ ip6_sprintf(ip6buf, &mltmask.sin6_addr),
+ ip6_sprintf(ip6buf, &ia->ia_addr.sin6_addr),


You cannot use the same buffer for all three ... (not only here)


--
Bjoern A. Zeeb  The greatest risk is not taking one.
___
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: r186253 - head/share/man/man4

2008-12-17 Thread Andrew Thompson
Author: thompsa
Date: Wed Dec 17 20:24:34 2008
New Revision: 186253
URL: http://svn.freebsd.org/changeset/base/186253

Log:
  Document that the devd config is in /etc/devd/asus.conf

Modified:
  head/share/man/man4/acpi_asus.4

Modified: head/share/man/man4/acpi_asus.4
==
--- head/share/man/man4/acpi_asus.4 Wed Dec 17 19:57:12 2008
(r186252)
+++ head/share/man/man4/acpi_asus.4 Wed Dec 17 20:24:34 2008
(r186253)
@@ -25,7 +25,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd August 20, 2008
+.Dd December 17, 2008
 .Dt ACPI_ASUS 4 i386
 .Os
 .Sh NAME
@@ -56,7 +56,8 @@ interface to manipulate the brightness o
 state.
 Hotkey events are passed to
 .Xr devd 8
-for easy handling in userspace.
+for easy handling in userspace with the default configuration in
+.Pa /etc/devd/asus.conf .
 .Pp
 Currently, the following Asus laptops are fully supported:
 .Pp
___
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: r186217 - in head/sys: net netinet6

2008-12-17 Thread Qing Li
Author: qingli
Date: Wed Dec 17 10:27:34 2008
New Revision: 186217
URL: http://svn.freebsd.org/changeset/base/186217

Log:
  Remove the rt argument from nd6_storelladdr() because
  rt is no longer accessed.

Modified:
  head/sys/net/if_arcsubr.c
  head/sys/net/if_ethersubr.c
  head/sys/net/if_fddisubr.c
  head/sys/net/if_fwsubr.c
  head/sys/net/if_iso88025subr.c
  head/sys/netinet6/nd6_rtr.c

Modified: head/sys/net/if_arcsubr.c
==
--- head/sys/net/if_arcsubr.c   Wed Dec 17 10:19:53 2008(r186216)
+++ head/sys/net/if_arcsubr.c   Wed Dec 17 10:27:34 2008(r186217)
@@ -167,7 +167,7 @@ arc_output(struct ifnet *ifp, struct mbu
 #endif
 #ifdef INET6
case AF_INET6:
-   error = nd6_storelladdr(ifp, rt0, m, dst, (u_char *)&adst, 
&lle);
+   error = nd6_storelladdr(ifp, m, dst, (u_char *)&adst, &lle);
if (error)
return (error);
atype = ARCTYPE_INET6;

Modified: head/sys/net/if_ethersubr.c
==
--- head/sys/net/if_ethersubr.c Wed Dec 17 10:19:53 2008(r186216)
+++ head/sys/net/if_ethersubr.c Wed Dec 17 10:27:34 2008(r186217)
@@ -225,7 +225,7 @@ ether_output(struct ifnet *ifp, struct m
 #endif
 #ifdef INET6
case AF_INET6:
-   error = nd6_storelladdr(ifp, rt0, m, dst, (u_char *)edst, &lle);
+   error = nd6_storelladdr(ifp, m, dst, (u_char *)edst, &lle);
if (error)
return error;
type = htons(ETHERTYPE_IPV6);

Modified: head/sys/net/if_fddisubr.c
==
--- head/sys/net/if_fddisubr.c  Wed Dec 17 10:19:53 2008(r186216)
+++ head/sys/net/if_fddisubr.c  Wed Dec 17 10:27:34 2008(r186217)
@@ -175,7 +175,7 @@ fddi_output(ifp, m, dst, rt0)
 #endif /* INET */
 #ifdef INET6
case AF_INET6:
-   error = nd6_storelladdr(ifp, rt0, m, dst, (u_char *)edst, &lle);
+   error = nd6_storelladdr(ifp, m, dst, (u_char *)edst, &lle);
if (error)
return (error); /* Something bad happened */
type = htons(ETHERTYPE_IPV6);

Modified: head/sys/net/if_fwsubr.c
==
--- head/sys/net/if_fwsubr.cWed Dec 17 10:19:53 2008(r186216)
+++ head/sys/net/if_fwsubr.cWed Dec 17 10:27:34 2008(r186217)
@@ -167,7 +167,7 @@ firewire_output(struct ifnet *ifp, struc
 #ifdef INET6
case AF_INET6:
if (unicast) {
-   error = nd6_storelladdr(fc->fc_ifp, rt0, m, dst,
+   error = nd6_storelladdr(fc->fc_ifp, m, dst,
(u_char *) destfw, &lle);
if (error)
return (error);

Modified: head/sys/net/if_iso88025subr.c
==
--- head/sys/net/if_iso88025subr.c  Wed Dec 17 10:19:53 2008
(r186216)
+++ head/sys/net/if_iso88025subr.c  Wed Dec 17 10:27:34 2008
(r186217)
@@ -319,7 +319,7 @@ iso88025_output(ifp, m, dst, rt0)
 #endif /* INET */
 #ifdef INET6
case AF_INET6:
-   error = nd6_storelladdr(ifp, rt0, m, dst, (u_char *)edst, &lle);
+   error = nd6_storelladdr(ifp, m, dst, (u_char *)edst, &lle);
if (error)
return (error);
snap_type = ETHERTYPE_IPV6;

Modified: head/sys/netinet6/nd6_rtr.c
==
--- head/sys/netinet6/nd6_rtr.c Wed Dec 17 10:19:53 2008(r186216)
+++ head/sys/netinet6/nd6_rtr.c Wed Dec 17 10:27:34 2008(r186217)
@@ -1554,7 +1554,6 @@ nd6_prefix_onlink(struct nd_prefix *pr)
char ip6buf[INET6_ADDRSTRLEN];
struct sockaddr_dl null_sdl = {sizeof(null_sdl), AF_LINK};
 
-
/* sanity check */
if ((pr->ndpr_stateflags & NDPRF_ONLINK) != 0) {
nd6log((LOG_ERR,
@@ -1623,7 +1622,6 @@ nd6_prefix_onlink(struct nd_prefix *pr)
rtflags = ifa->ifa_flags | RTF_UP;
error = rtrequest(RTM_ADD, (struct sockaddr *)&pr->ndpr_prefix,
ifa->ifa_addr, (struct sockaddr *)&mask6, rtflags, &rt);
-
if (error == 0) {
if (rt != NULL) /* this should be non NULL, though */ {
rnh = V_rt_tables[rt->rt_fibnum][AF_INET6];
___
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: r186231 - in head/sys/boot: powerpc/uboot uboot/common uboot/lib

2008-12-17 Thread Rafal Jaworowski
Author: raj
Date: Wed Dec 17 15:58:07 2008
New Revision: 186231
URL: http://svn.freebsd.org/changeset/base/186231

Log:
  Improve style(9) in PowerPC U-Boot support lib.

Modified:
  head/sys/boot/powerpc/uboot/conf.c
  head/sys/boot/uboot/common/main.c
  head/sys/boot/uboot/lib/devicename.c

Modified: head/sys/boot/powerpc/uboot/conf.c
==
--- head/sys/boot/powerpc/uboot/conf.c  Wed Dec 17 15:54:25 2008
(r186230)
+++ head/sys/boot/powerpc/uboot/conf.c  Wed Dec 17 15:58:07 2008
(r186231)
@@ -94,8 +94,8 @@ struct netif_driver *netif_drivers[] = {
  */
 
 struct file_format *file_formats[] = {
-&uboot_elf,
-NULL
+   &uboot_elf,
+   NULL
 };
 
 /* 
@@ -104,6 +104,6 @@ struct file_format *file_formats[] = {
 extern struct console uboot_console;
 
 struct console *consoles[] = {
-&uboot_console,
-NULL
+   &uboot_console,
+   NULL
 };

Modified: head/sys/boot/uboot/common/main.c
==
--- head/sys/boot/uboot/common/main.c   Wed Dec 17 15:54:25 2008
(r186230)
+++ head/sys/boot/uboot/common/main.c   Wed Dec 17 15:58:07 2008
(r186231)
@@ -216,6 +216,7 @@ COMMAND_SET(reboot, "reboot", "reboot th
 static int
 command_reboot(int argc, char *argv[])
 {
+
printf("Resetting...\n");
ub_reset();
 

Modified: head/sys/boot/uboot/lib/devicename.c
==
--- head/sys/boot/uboot/lib/devicename.cWed Dec 17 15:54:25 2008
(r186230)
+++ head/sys/boot/uboot/lib/devicename.cWed Dec 17 15:58:07 2008
(r186231)
@@ -35,7 +35,8 @@ __FBSDID("$FreeBSD$");
 #include "bootstrap.h"
 #include "libuboot.h"
 
-static int uboot_parsedev(struct uboot_devdesc **dev, const char *devspec, 
const char **path);
+static int uboot_parsedev(struct uboot_devdesc **dev, const char *devspec,
+const char **path);
 
 /*
  * Point (dev) at an allocated device specifier for the device matching the
@@ -178,11 +179,11 @@ uboot_parsedev(struct uboot_devdesc **de
} else {
*dev = idev;
}
-   return(0);
+   return (0);
 
 fail:
free(idev);
-   return(err);
+   return (err);
 }
 
 
@@ -191,7 +192,7 @@ uboot_fmtdev(void *vdev)
 {
struct uboot_devdesc *dev = (struct uboot_devdesc *)vdev;
char *cp;
-   static char buf[128];   /* XXX device length constant? */
+   static char buf[128];
 
switch(dev->d_type) {
case DEVT_NONE:
@@ -220,12 +221,12 @@ uboot_fmtdev(void *vdev)
 int
 uboot_setcurrdev(struct env_var *ev, int flags, const void *value)
 {
-   struct uboot_devdesc*ncurr;
-   int  rv;
+   struct uboot_devdesc *ncurr;
+   int rv;
 
if ((rv = uboot_parsedev(&ncurr, value, NULL)) != 0)
-   return(rv);
+   return (rv);
free(ncurr);
env_setenv(ev->ev_name, flags | EV_NOHOOK, value, NULL, NULL);
-   return(0);
+   return (0);
 }
___
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: r186216 - head/sys/netinet6

2008-12-17 Thread Qing Li
Author: qingli
Date: Wed Dec 17 10:19:53 2008
New Revision: 186216
URL: http://svn.freebsd.org/changeset/base/186216

Log:
  A couple of files were not meant to be committed.

Modified:
  head/sys/netinet6/in6.c
  head/sys/netinet6/nd6_rtr.c

Modified: head/sys/netinet6/in6.c
==
--- head/sys/netinet6/in6.c Wed Dec 17 10:03:49 2008(r186215)
+++ head/sys/netinet6/in6.c Wed Dec 17 10:19:53 2008(r186216)
@@ -987,13 +987,6 @@ in6_update_ifa(struct ifnet *ifp, struct
}
}
if (!rt) {
-
- printf("in6_update_ifa #1: addr= %s, mask= %s, ia= %s, ifp = 
%s\n", 
- ip6_sprintf(ip6buf, &mltaddr.sin6_addr),
- ip6_sprintf(ip6buf, &mltmask.sin6_addr),
- ip6_sprintf(ip6buf, &ia->ia_addr.sin6_addr),
- if_name(ifp));
-
error = rtrequest(RTM_ADD, (struct sockaddr *)&mltaddr,
(struct sockaddr *)&ia->ia_addr,
(struct sockaddr *)&mltmask, RTF_UP,
@@ -1068,12 +1061,6 @@ in6_update_ifa(struct ifnet *ifp, struct
}
}
if (!rt) {
- printf("in6_update_ifa #2: addr= %s, mask= %s, ia= %s, ifp = 
%s\n", 
- ip6_sprintf(ip6buf, &mltaddr.sin6_addr),
- ip6_sprintf(ip6buf, &mltmask.sin6_addr),
- ip6_sprintf(ip6buf, &ia->ia_addr.sin6_addr),
- if_name(ifp));
-
error = rtrequest(RTM_ADD, (struct sockaddr *)&mltaddr,
(struct sockaddr *)&ia->ia_addr,
(struct sockaddr *)&mltmask, RTF_UP,

Modified: head/sys/netinet6/nd6_rtr.c
==
--- head/sys/netinet6/nd6_rtr.c Wed Dec 17 10:03:49 2008(r186215)
+++ head/sys/netinet6/nd6_rtr.c Wed Dec 17 10:19:53 2008(r186216)
@@ -1555,11 +1555,6 @@ nd6_prefix_onlink(struct nd_prefix *pr)
struct sockaddr_dl null_sdl = {sizeof(null_sdl), AF_LINK};
 
 
-   log(LOG_DEBUG, "##1 nd6_prefix_onlink: %s, vltime = %x, pltime = %x\n", 
-   ip6_sprintf(ip6buf, &pr->ndpr_prefix.sin6_addr),
-   pr->ndpr_vltime, pr->ndpr_pltime);
-
-
/* sanity check */
if ((pr->ndpr_stateflags & NDPRF_ONLINK) != 0) {
nd6log((LOG_ERR,
@@ -1629,11 +1624,6 @@ nd6_prefix_onlink(struct nd_prefix *pr)
error = rtrequest(RTM_ADD, (struct sockaddr *)&pr->ndpr_prefix,
ifa->ifa_addr, (struct sockaddr *)&mask6, rtflags, &rt);
 
-   log(LOG_DEBUG, "##2 nd6_prefix_onlink: %s, vltime = %x, pltime = %x\n", 
-   ip6_sprintf(ip6buf, &pr->ndpr_prefix.sin6_addr),
-   pr->ndpr_vltime, pr->ndpr_pltime);
-
-
if (error == 0) {
if (rt != NULL) /* this should be non NULL, though */ {
rnh = V_rt_tables[rt->rt_fibnum][AF_INET6];
___
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: r186254 - head/sys/net

2008-12-17 Thread Andrew Thompson
Author: thompsa
Date: Wed Dec 17 20:58:10 2008
New Revision: 186254
URL: http://svn.freebsd.org/changeset/base/186254

Log:
  Update the interface baudrate taking into account the max speed for the
  different aggregation protocols.

Modified:
  head/sys/net/ieee8023ad_lacp.c
  head/sys/net/if_lagg.c

Modified: head/sys/net/ieee8023ad_lacp.c
==
--- head/sys/net/ieee8023ad_lacp.c  Wed Dec 17 20:24:34 2008
(r186253)
+++ head/sys/net/ieee8023ad_lacp.c  Wed Dec 17 20:58:10 2008
(r186254)
@@ -901,6 +901,7 @@ lacp_aggregator_bandwidth(struct lacp_ag
 static void
 lacp_select_active_aggregator(struct lacp_softc *lsc)
 {
+   struct lagg_softc *sc = lsc->lsc_softc;
struct lacp_aggregator *la;
struct lacp_aggregator *best_la = NULL;
uint64_t best_speed = 0;
@@ -956,6 +957,7 @@ lacp_select_active_aggregator(struct lac
 #endif /* defined(LACP_DEBUG) */
 
if (lsc->lsc_active_aggregator != best_la) {
+   sc->sc_ifp->if_baudrate = best_speed;
lsc->lsc_active_aggregator = best_la;
lacp_update_portmap(lsc);
if (best_la) {

Modified: head/sys/net/if_lagg.c
==
--- head/sys/net/if_lagg.c  Wed Dec 17 20:24:34 2008(r186253)
+++ head/sys/net/if_lagg.c  Wed Dec 17 20:58:10 2008(r186254)
@@ -1211,6 +1211,7 @@ lagg_linkstate(struct lagg_softc *sc)
 {
struct lagg_port *lp;
int new_link = LINK_STATE_DOWN;
+   uint64_t speed = 0;
 
/* Our link is considered up if at least one of our ports is active */
SLIST_FOREACH(lp, &sc->sc_ports, lp_entries) {
@@ -1220,6 +1221,24 @@ lagg_linkstate(struct lagg_softc *sc)
}
}
if_link_state_change(sc->sc_ifp, new_link);
+
+   /* Update if_baudrate to reflect the max possible speed */
+   switch (sc->sc_proto) {
+   case LAGG_PROTO_FAILOVER:
+   sc->sc_ifp->if_baudrate =
+   sc->sc_primary->lp_ifp->if_baudrate;
+   break;
+   case LAGG_PROTO_ROUNDROBIN:
+   case LAGG_PROTO_LOADBALANCE:
+   case LAGG_PROTO_ETHERCHANNEL:
+   SLIST_FOREACH(lp, &sc->sc_ports, lp_entries)
+   speed += lp->lp_ifp->if_baudrate;
+   sc->sc_ifp->if_baudrate = speed;
+   break;
+   case LAGG_PROTO_LACP:
+   /* LACP updates if_baudrate itself */
+   break;
+   }
 }
 
 static void
___
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: r186255 - head/sys/net

2008-12-17 Thread Andrew Thompson
Author: thompsa
Date: Wed Dec 17 21:04:43 2008
New Revision: 186255
URL: http://svn.freebsd.org/changeset/base/186255

Log:
  - Protect against sc->sc_primary being null
  - Initialise speed where its used

Modified:
  head/sys/net/if_lagg.c

Modified: head/sys/net/if_lagg.c
==
--- head/sys/net/if_lagg.c  Wed Dec 17 20:58:10 2008(r186254)
+++ head/sys/net/if_lagg.c  Wed Dec 17 21:04:43 2008(r186255)
@@ -1211,7 +1211,7 @@ lagg_linkstate(struct lagg_softc *sc)
 {
struct lagg_port *lp;
int new_link = LINK_STATE_DOWN;
-   uint64_t speed = 0;
+   uint64_t speed;
 
/* Our link is considered up if at least one of our ports is active */
SLIST_FOREACH(lp, &sc->sc_ports, lp_entries) {
@@ -1225,12 +1225,13 @@ lagg_linkstate(struct lagg_softc *sc)
/* Update if_baudrate to reflect the max possible speed */
switch (sc->sc_proto) {
case LAGG_PROTO_FAILOVER:
-   sc->sc_ifp->if_baudrate =
-   sc->sc_primary->lp_ifp->if_baudrate;
+   sc->sc_ifp->if_baudrate = sc->sc_primary != NULL ?
+   sc->sc_primary->lp_ifp->if_baudrate : 0;
break;
case LAGG_PROTO_ROUNDROBIN:
case LAGG_PROTO_LOADBALANCE:
case LAGG_PROTO_ETHERCHANNEL:
+   speed = 0;
SLIST_FOREACH(lp, &sc->sc_ports, lp_entries)
speed += lp->lp_ifp->if_baudrate;
sc->sc_ifp->if_baudrate = speed;
___
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: r186218 - head/sys/dev/atkbdc

2008-12-17 Thread Jean-Sebastien Pedron
Author: dumbbell
Date: Wed Dec 17 10:42:53 2008
New Revision: 186218
URL: http://svn.freebsd.org/changeset/base/186218

Log:
  Synaptics touchpads must be reinitialized after suspend/resume.
  
  This fixes touchpad resume on Asus EeePC among others.
  
  Submitted by: rpaulo

Modified:
  head/sys/dev/atkbdc/psm.c

Modified: head/sys/dev/atkbdc/psm.c
==
--- head/sys/dev/atkbdc/psm.c   Wed Dec 17 10:27:34 2008(r186217)
+++ head/sys/dev/atkbdc/psm.c   Wed Dec 17 10:42:53 2008(r186218)
@@ -3956,6 +3956,9 @@ static void
 synaptics_sysctl_create_tree(struct psm_softc *sc)
 {
 
+   if (sc->syninfo.sysctl_tree != NULL)
+   return;
+
/* Attach extra synaptics sysctl nodes under hw.psm.synaptics */
sysctl_ctx_init(&sc->syninfo.sysctl_ctx);
sc->syninfo.sysctl_tree = SYSCTL_ADD_NODE(&sc->syninfo.sysctl_ctx,
@@ -4263,7 +4266,6 @@ enable_synaptics(struct psm_softc *sc)
 
kbdc = sc->kbdc;
VLOG(3, (LOG_DEBUG, "synaptics: BEGIN init\n"));
-   disable_aux_dev(kbdc);
sc->hw.buttons = 3;
sc->squelch = 0;
 
@@ -4419,6 +4421,12 @@ enable_synaptics(struct psm_softc *sc)
/* Create sysctl tree. */
synaptics_sysctl_create_tree(sc);
 
+   /*
+* The touchpad will have to be reinitialized after
+* suspend/resume.
+*/
+   sc->config |= PSM_CONFIG_HOOKRESUME | PSM_CONFIG_INITAFTERSUSPEND;
+
return (TRUE);
 }
 
___
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: r186218 - head/sys/dev/atkbdc

2008-12-17 Thread Rui Paulo


On 17 Dec 2008, at 10:42, Jean-Sebastien Pedron wrote:


Author: dumbbell
Date: Wed Dec 17 10:42:53 2008
New Revision: 186218
URL: http://svn.freebsd.org/changeset/base/186218

Log:
 Synaptics touchpads must be reinitialized after suspend/resume.

 This fixes touchpad resume on Asus EeePC among others.

 Submitted by:  rpaulo


Well, I didn't submit it, I only tested it ;-)

--
Rui Paulo

___
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: r186229 - head/sys/powerpc/booke

2008-12-17 Thread Rafal Jaworowski
Author: raj
Date: Wed Dec 17 15:44:34 2008
New Revision: 186229
URL: http://svn.freebsd.org/changeset/base/186229

Log:
  Rework E500 locore.
  
  - split bootstrap code into more modular routines, which will also be used for
the non-booting cores
  - clean up registers usage
  - improve comments to better reflect reality
  - eliminate dead or redundant code
  - other minor fixes
  
  This refactoring is a preliminary step before importing dual-core (MPC8572)
  support.
  
  Obtained from:Freescale, Semihalf

Modified:
  head/sys/powerpc/booke/locore.S

Modified: head/sys/powerpc/booke/locore.S
==
--- head/sys/powerpc/booke/locore.S Wed Dec 17 15:31:15 2008
(r186228)
+++ head/sys/powerpc/booke/locore.S Wed Dec 17 15:44:34 2008
(r186229)
@@ -1,4 +1,5 @@
 /*-
+ * Copyright (C) 2007-2008 Semihalf, Rafal Jaworowski 
  * Copyright (C) 2006 Semihalf, Marian Balakowicz 
  * All rights reserved.
  *
@@ -10,8 +11,6 @@
  * 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.
- * 3. The name of the author may not be used to endorse or promote products
- *derived from this software without specific prior written permission.
  *
  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
@@ -29,8 +28,8 @@
 
 #include "assym.s"
 
-#include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -60,207 +59,140 @@ kernel_text:
 __start:
 
 /*
- * Assumption on a boot loader:
+ * Assumptions on the boot loader:
  *  - system memory starts from physical address 0
- *  - kernel is loaded at 16MB boundary
  *  - it's mapped by a single TBL1 entry
  *  - TLB1 mapping is 1:1 pa to va
+ *  - kernel is loaded at 16MB boundary
  *  - all PID registers are set to the same value
+ *  - CPU is running in AS=0
  *
- * Loader register use:
+ * Registers contents provided by the loader(8):
  * r1  : stack pointer
  * r3  : metadata pointer
  *
  * We rearrange the TLB1 layout as follows:
- *  - find AS and entry kernel started in
+ *  - find TLB1 entry we started in
  *  - make sure it's protected, ivalidate other entries
- *  - create temp entry in the second AS (make sure it's not TLB[15])
+ *  - create temp entry in the second AS (make sure it's not TLB[1])
  *  - switch to temp mapping
- *  - map 16MB of RAM in TLB1[15]
+ *  - map 16MB of RAM in TLB1[1]
  *  - use AS=1, set EPN to KERNBASE and RPN to kernel load address
- *  - switch to to TLB1[15] mapping
+ *  - switch to to TLB1[1] mapping
  *  - invalidate temp mapping
  *
- * locore register use:
+ * locore registers use:
  * r1  : stack pointer
- * r2  : unused
- * r3  : kernel_text
- * r4  : _end
- * r5  : metadata pointer
- * r6-r9   : unused
- * r10 : entry we started in
- * r11 : temp entry
- * r12 : AS we started in
- * r13-r31 : auxiliary registers
+ * r2  : trace pointer (AP only, for early diagnostics)
+ * r3-r27  : scratch registers
+ * r28 : kernload
+ * r29 : temp TLB1 entry
+ * r30 : initial TLB1 entry we started in
+ * r31 : metadata pointer
  */
 
 /*
- * Move metadata ptr to r5
+ * Keep metadata ptr in r31 for later use.
  */
-   mr  %r5, %r3
+   mr  %r31, %r3
 
 /*
  * Initial cleanup
  */
-   li  %r16, 0x200 /* Keep debug exceptions for 
CodeWarrior. */
-   mtmsr   %r16
-   isync
-#if 0
-   mtspr   SPR_HID0, %r16
-   isync
-   msync
-   mtspr   SPR_HID1, %r16
+   li  %r3, PSL_DE /* Keep debug exceptions for CodeWarrior. */
+   mtmsr   %r3
isync
-#endif
 
-   /* Issue INV_ALL Invalidate on TLB0 */
-   li  %r16, 0x04
-   tlbivax 0, %r16
-   isync
-   msync
+   /* Invalidate all entries in TLB0 */
+   li  %r3, 0
+   bl  tlb_inval_all
 
 /*
- * Use tblsx to locate the TLB1 entry that maps kernel code
+ * Locate the TLB1 entry that maps this code
  */
-   bl  1f  /* Current address */
-1: mflr%r15
-
-   /* Find entry that maps current address */
-   mfspr   %r17, SPR_PID0
-   slwi%r17, %r17, MAS6_SPID0_SHIFT
-   mtspr   SPR_MAS6, %r17
-   isync
-   tlbsx   0, %r15
-
-   /* Copy entry number to r10 */
-   mfspr   %r17, SPR_MAS0
-   rlwinm  %r10, %r17, 16, 28, 31
-
-   /* Invalidate TLB1, skipping our entry. */
-   mfspr   %r17, SPR_TLB1CFG   /* Get number of entries */
-   andi.   %r17, %r17, tlbcfg_nentry_m...@l
-   li  %r16, 0 /* Start from Entry 0 */
-
-2: lis %r15, mas0_tlbs...@h/* Select TLB1 */
-   rlwimi 

Re: svn commit: r186209 - head/sys/net

2008-12-17 Thread Kip Macy

Yes.

On Dec 17, 2008, at 6:49, Robert Watson  wrote:



On Wed, 17 Dec 2008, Kip Macy wrote:


Author: kmacy
Date: Wed Dec 17 04:33:52 2008
New Revision: 186209
URL: http://svn.freebsd.org/changeset/base/186209

Log:
avoid trying to acquire a shared lock while holding an exclusive lock
by making the ifnet lock acquisition exclusive


This seems unfortunate as the ifindex arrays get dereferenced a  
moderate amount; perhaps ifnet_byindex_locked() and  
ifaddr_byindex_locked() should be added for those special-case  
callers that are aware of ifnet locking?


Robert N M Watson
Computer Laboratory
University of Cambridge



Modified:
head/sys/net/if.c

Modified: head/sys/net/if.c
=== 
=== 
=== 
=

--- head/sys/net/if.cWed Dec 17 04:15:38 2008(r186208)
+++ head/sys/net/if.cWed Dec 17 04:33:52 2008(r186209)
@@ -197,9 +197,9 @@ ifnet_byindex(u_short idx)
   INIT_VNET_NET(curvnet);
   struct ifnet *ifp;

-IFNET_RLOCK();
+IFNET_WLOCK();
   ifp = V_ifindex_table[idx].ife_ifnet;
-IFNET_RUNLOCK();
+IFNET_WUNLOCK();
   return (ifp);
}

@@ -218,9 +218,9 @@ ifaddr_byindex(u_short idx)
{
   struct ifaddr *ifa;

-IFNET_RLOCK();
+IFNET_WLOCK();
   ifa = ifnet_byindex(idx)->if_addr;
-IFNET_RUNLOCK();
+IFNET_WUNLOCK();
   return (ifa);
}



___
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: r186234 - head/usr.sbin/syslogd

2008-12-17 Thread David E. O'Brien
Author: obrien
Date: Wed Dec 17 16:51:40 2008
New Revision: 186234
URL: http://svn.freebsd.org/changeset/base/186234

Log:
  Rather than hardcode the 'struct iovec iov' array size, use a #define.
  While I'm here bump WARNS to 3.
  
  Obtained from:Juniper Networks

Modified:
  head/usr.sbin/syslogd/Makefile
  head/usr.sbin/syslogd/syslogd.c

Modified: head/usr.sbin/syslogd/Makefile
==
--- head/usr.sbin/syslogd/Makefile  Wed Dec 17 16:25:20 2008
(r186233)
+++ head/usr.sbin/syslogd/Makefile  Wed Dec 17 16:51:40 2008
(r186234)
@@ -12,7 +12,7 @@ SRCS= syslogd.c ttymsg.c
 DPADD= ${LIBUTIL}
 LDADD= -lutil
 
-WARNS?=1
+WARNS?=3
 
 .if ${MK_INET6_SUPPORT} != "no"
 CFLAGS+= -DINET6

Modified: head/usr.sbin/syslogd/syslogd.c
==
--- head/usr.sbin/syslogd/syslogd.c Wed Dec 17 16:25:20 2008
(r186233)
+++ head/usr.sbin/syslogd/syslogd.c Wed Dec 17 16:51:40 2008
(r186234)
@@ -331,7 +331,7 @@ static void reapchild(int);
 static voidusage(void);
 static int validate(struct sockaddr *, const char *);
 static voidunmapped(struct sockaddr *);
-static voidwallmsg(struct filed *, struct iovec *);
+static voidwallmsg(struct filed *, struct iovec *, const int iovlen);
 static int waitdaemon(int, int, int);
 static voidtimedout(int);
 static voiddouble_rbuf(int);
@@ -1065,10 +1065,11 @@ dofsync(void)
}
 }
 
+#define IOV_SIZE 7
 static void
 fprintlog(struct filed *f, int flags, const char *msg)
 {
-   struct iovec iov[7];
+   struct iovec iov[IOV_SIZE];
struct iovec *v;
struct addrinfo *r;
int i, l, lsent = 0;
@@ -1253,7 +1254,7 @@ fprintlog(struct filed *f, int flags, co
dprintf(" %s\n", f->f_un.f_fname);
v->iov_base = lf;
v->iov_len = 1;
-   if (writev(f->f_file, iov, 7) < 0) {
+   if (writev(f->f_file, iov, IOV_SIZE) < 0) {
/*
 * If writev(2) fails for potentially transient errors
 * like the filesystem being full, ignore it.
@@ -1284,7 +1285,7 @@ fprintlog(struct filed *f, int flags, co
break;
}
}
-   if (writev(f->f_file, iov, 7) < 0) {
+   if (writev(f->f_file, iov, IOV_SIZE) < 0) {
int e = errno;
(void)close(f->f_file);
if (f->f_un.f_pipe.f_pid > 0)
@@ -1309,7 +1310,7 @@ fprintlog(struct filed *f, int flags, co
v->iov_len = 2;
 
errno = 0;  /* ttymsg() only sometimes returns an errno */
-   if ((msgret = ttymsg(iov, 7, f->f_un.f_fname, 10))) {
+   if ((msgret = ttymsg(iov, IOV_SIZE, f->f_un.f_fname, 10))) {
f->f_type = F_UNUSED;
logerror(msgret);
}
@@ -1320,7 +1321,7 @@ fprintlog(struct filed *f, int flags, co
dprintf("\n");
v->iov_base = crlf;
v->iov_len = 2;
-   wallmsg(f, iov);
+   wallmsg(f, iov, IOV_SIZE);
break;
}
f->f_prevcount = 0;
@@ -1334,7 +1335,7 @@ fprintlog(struct filed *f, int flags, co
  * world, or a list of approved users.
  */
 static void
-wallmsg(struct filed *f, struct iovec *iov)
+wallmsg(struct filed *f, struct iovec *iov, const int iovlen)
 {
static int reenter; /* avoid calling ourselves */
FILE *uf;
@@ -1358,7 +1359,8 @@ wallmsg(struct filed *f, struct iovec *i
strncpy(line, ut.ut_line, sizeof(line) - 1);
line[sizeof(line) - 1] = '\0';
if (f->f_type == F_WALL) {
-   if ((p = ttymsg(iov, 7, line, TTYMSGTIME)) != NULL) {
+   if ((p = ttymsg(iov, iovlen, line, TTYMSGTIME)) !=
+   NULL) {
errno = 0;  /* already in msg */
logerror(p);
}
@@ -1370,8 +1372,8 @@ wallmsg(struct filed *f, struct iovec *i
break;
if (!strncmp(f->f_un.f_uname[i], ut.ut_name,
UT_NAMESIZE)) {
-   if ((p = ttymsg(iov, 7, line, TTYMSGTIME))
-   != NULL) {
+   if ((p = ttymsg(iov, IOV_SIZE, line,
+   TTYMSGTIME)) != NULL) {
errno = 0;  /* already in msg */
logerror(p);
}
___
svn-src-all@f

svn commit: r186230 - head/sys/powerpc/booke

2008-12-17 Thread Rafal Jaworowski
Author: raj
Date: Wed Dec 17 15:54:25 2008
New Revision: 186230
URL: http://svn.freebsd.org/changeset/base/186230

Log:
  Fix E500 cache invalidation routines.
  
  When invalidating the i/d-cache we need to wait until the core complex is
  really finished with the operation.
  
  Obtained from:Semihalf

Modified:
  head/sys/powerpc/booke/locore.S

Modified: head/sys/powerpc/booke/locore.S
==
--- head/sys/powerpc/booke/locore.S Wed Dec 17 15:44:34 2008
(r186229)
+++ head/sys/powerpc/booke/locore.S Wed Dec 17 15:54:25 2008
(r186230)
@@ -411,6 +411,9 @@ ENTRY(dcache_inval)
isync
mtspr   SPR_L1CSR0, %r3
isync
+1: mfspr   %r3, SPR_L1CSR0
+   andi.   %r3, %r3, L1CSR0_DCFI
+   bne 1b
blr
 
 ENTRY(dcache_disable)
@@ -443,6 +446,9 @@ ENTRY(icache_inval)
isync
mtspr   SPR_L1CSR1, %r3
isync
+1: mfspr   %r3, SPR_L1CSR1
+   andi.   %r3, %r3, L1CSR1_ICFI
+   bne 1b
blr
 
 ENTRY(icache_disable)
___
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: r186221 - in releng/7.1: include include/arpa lib/libc lib/libc/include/isc lib/libc/inet lib/libc/resolv

2008-12-17 Thread Hajimu UMEMOTO
Author: ume
Date: Wed Dec 17 12:33:39 2008
New Revision: 186221
URL: http://svn.freebsd.org/changeset/base/186221

Log:
  MFC 186090
  
  Update our resolver to BIND 9.4.3.
  It includes the following fix:
  
2426.   [bug]   libbind: inet_net_pton() can sometimes return the
wrong value if excessively large netmasks are
supplied. [RT #18512]
  
  Reported by:  Maksymilian Arciemowicz 
  Approved by:  re (kib)

Added:
  releng/7.1/lib/libc/include/isc/platform.h
 - copied unchanged from r186090, head/lib/libc/include/isc/platform.h
Modified:
  releng/7.1/include/   (props changed)
  releng/7.1/include/arpa/nameser.h
  releng/7.1/include/resolv.h
  releng/7.1/lib/libc/   (props changed)
  releng/7.1/lib/libc/include/isc/eventlib.h   (contents, props changed)
  releng/7.1/lib/libc/inet/inet_net_pton.c
  releng/7.1/lib/libc/resolv/res_debug.c
  releng/7.1/lib/libc/resolv/res_mkquery.c
  releng/7.1/lib/libc/resolv/res_query.c
  releng/7.1/lib/libc/resolv/res_send.c

Modified: releng/7.1/include/arpa/nameser.h
==
--- releng/7.1/include/arpa/nameser.h   Wed Dec 17 12:31:04 2008
(r186220)
+++ releng/7.1/include/arpa/nameser.h   Wed Dec 17 12:33:39 2008
(r186221)
@@ -49,7 +49,7 @@
  */
 
 /*
- * $Id: nameser.h,v 1.7.18.1 2005/04/27 05:00:50 sra Exp $
+ * $Id: nameser.h,v 1.7.18.2 2008/04/03 23:15:15 marka Exp $
  * $FreeBSD$
  */
 
@@ -424,9 +424,10 @@ typedef enum __ns_cert_types {
 #define NS_NXT_MAX 127
 
 /*%
- * EDNS0 extended flags, host order.
+ * EDNS0 extended flags and option codes, host order.
  */
 #define NS_OPT_DNSSEC_OK   0x8000U
+#define NS_OPT_NSID 3
 
 /*%
  * Inline versions of get/put short/long.  Pointer is advanced.

Modified: releng/7.1/include/resolv.h
==
--- releng/7.1/include/resolv.h Wed Dec 17 12:31:04 2008(r186220)
+++ releng/7.1/include/resolv.h Wed Dec 17 12:33:39 2008(r186221)
@@ -50,7 +50,7 @@
 
 /*%
  * @(#)resolv.h8.1 (Berkeley) 6/2/93
- * $Id: resolv.h,v 1.19.18.3 2005/08/25 04:43:51 marka Exp $
+ * $Id: resolv.h,v 1.19.18.4 2008/04/03 23:15:15 marka Exp $
  * $FreeBSD$
  */
 
@@ -245,6 +245,7 @@ union res_sockaddr_union {
 #defineRES_NOCHECKNAME 0x8000  /*%< do not check names for 
sanity. */
 #defineRES_KEEPTSIG0x0001  /*%< do not strip TSIG records 
*/
 #defineRES_BLAST   0x0002  /*%< blast all recursive 
servers */
+#define RES_NSID   0x0004  /*%< request name server ID */
 #define RES_NOTLDQUERY 0x0010  /*%< don't unqualified name as a tld */
 #define RES_USE_DNSSEC 0x0020  /*%< use DNSSEC using OK bit in OPT */
 /* #define RES_DEBUG2  0x0040 */   /* nslookup internal */
@@ -386,6 +387,7 @@ extern const struct res_sym __p_rcode_sy
 #define sym_ntos   __sym_ntos
 #define sym_ston   __sym_ston
 #define res_nopt   __res_nopt
+#define res_nopt_rdata __res_nopt_rdata
 #define res_ndestroy   __res_ndestroy
 #defineres_nametoclass __res_nametoclass
 #defineres_nametotype  __res_nametotype
@@ -474,6 +476,8 @@ int res_findzonecut2(res_state, const c
 union res_sockaddr_union *, int);
 void   res_nclose(res_state);
 intres_nopt(res_state, int, u_char *, int, int);
+intres_nopt_rdata(res_state, int, u_char *, int, u_char *,
+  u_short, u_short, u_char *);
 void   res_send_setqhook(res_send_qhook);
 void   res_send_setrhook(res_send_rhook);
 int__res_vinit(res_state, int);

Modified: releng/7.1/lib/libc/include/isc/eventlib.h
==
--- releng/7.1/lib/libc/include/isc/eventlib.h  Wed Dec 17 12:31:04 2008
(r186220)
+++ releng/7.1/lib/libc/include/isc/eventlib.h  Wed Dec 17 12:33:39 2008
(r186221)
@@ -18,7 +18,7 @@
 /* eventlib.h - exported interfaces for eventlib
  * vix 09sep95 [initial]
  *
- * $Id: eventlib.h,v 1.3.18.2 2005/07/28 07:38:07 marka Exp $
+ * $Id: eventlib.h,v 1.3.18.3 2008/01/23 02:12:01 marka Exp $
  */
 
 #ifndef _EVENTLIB_H
@@ -29,6 +29,8 @@
 #include 
 #include 
 
+#include 
+
 #ifndef __P
 # define __EVENTLIB_P_DEFINED
 # ifdef __STDC__

Copied: releng/7.1/lib/libc/include/isc/platform.h (from r186090, 
head/lib/libc/include/isc/platform.h)
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ releng/7.1/lib/libc/include/isc/platform.h  Wed Dec 17 12:33:39 2008
(r186221, copy of r186090, head/lib/libc/include/isc/platform.h)
@@ -0,0 +1,37 @@
+/*
+ * Copyright (C) 2008  Internet Systems Consor

Re: svn commit: r186209 - head/sys/net

2008-12-17 Thread Robert Watson


On Wed, 17 Dec 2008, Kip Macy wrote:


Author: kmacy
Date: Wed Dec 17 04:33:52 2008
New Revision: 186209
URL: http://svn.freebsd.org/changeset/base/186209

Log:
 avoid trying to acquire a shared lock while holding an exclusive lock
 by making the ifnet lock acquisition exclusive


This seems unfortunate as the ifindex arrays get dereferenced a moderate 
amount; perhaps ifnet_byindex_locked() and ifaddr_byindex_locked() should be 
added for those special-case callers that are aware of ifnet locking?


Robert N M Watson
Computer Laboratory
University of Cambridge



Modified:
 head/sys/net/if.c

Modified: head/sys/net/if.c
==
--- head/sys/net/if.c   Wed Dec 17 04:15:38 2008(r186208)
+++ head/sys/net/if.c   Wed Dec 17 04:33:52 2008(r186209)
@@ -197,9 +197,9 @@ ifnet_byindex(u_short idx)
INIT_VNET_NET(curvnet);
struct ifnet *ifp;

-   IFNET_RLOCK();
+   IFNET_WLOCK();
ifp = V_ifindex_table[idx].ife_ifnet;
-   IFNET_RUNLOCK();
+   IFNET_WUNLOCK();
return (ifp);
}

@@ -218,9 +218,9 @@ ifaddr_byindex(u_short idx)
{
struct ifaddr *ifa;

-   IFNET_RLOCK();
+   IFNET_WLOCK();
ifa = ifnet_byindex(idx)->if_addr;
-   IFNET_RUNLOCK();
+   IFNET_WUNLOCK();
return (ifa);
}



___
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: r186252 - head/sys/kern

2008-12-17 Thread Brooks Davis
On Wed, Dec 17, 2008 at 09:15:21PM +0100, Ivan Voras wrote:
> 2008/12/17 Andrew Thompson :
> 
> > Sorry for chiming in late but should the sysctl be a string? 1,2,3 arent
> > all that useful.
> 
> I don't think it's unusual as an integer but I'm ambivalent about it -
> if more people want it, I'll stringify it.

A short self documenting string seems like it would be informative.
Documentation listing known values would also be helpful.

-- Brooks


pgpg6AB2veeO7.pgp
Description: PGP signature


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

2008-12-17 Thread Sam Leffler

Ivan Voras wrote:

2008/12/17 Andrew Thompson :

  

Sorry for chiming in late but should the sysctl be a string? 1,2,3 arent
all that useful.



I don't think it's unusual as an integer but I'm ambivalent about it -
if more people want it, I'll stringify it.


  

string please
___
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: r186260 - head/sys/net

2008-12-17 Thread George V. Neville-Neil
Author: gnn
Date: Wed Dec 17 22:59:29 2008
New Revision: 186260
URL: http://svn.freebsd.org/changeset/base/186260

Log:
  Add TWINAX (Twin Axial Copper for 10G networking) media types.
  
  Add code to the Chelsio driver so that it can recognize different
  module types which may be plugged into it, including SR, LR lasers
  and TWINAX copper cables.
  
  Obtained from:Chelsio Inc.
  MFC after:1 week

Modified:
  head/sys/net/if_media.h

Modified: head/sys/net/if_media.h
==
--- head/sys/net/if_media.h Wed Dec 17 22:07:44 2008(r186259)
+++ head/sys/net/if_media.h Wed Dec 17 22:59:29 2008(r186260)
@@ -145,6 +145,11 @@ uint64_t   ifmedia_baudrate(int);
 #defineIFM_10G_SR  19  /* 10GBase-SR 850nm Multi-mode 
*/
 #defineIFM_10G_CX4 20  /* 10GBase CX4 copper */
 #define IFM_2500_SX21  /* 2500BaseSX - multi-mode fiber */
+#define IFM_10G_TWINAX 22   /* 10GBase Twinax copper */
+#define IFM_10G_TWINAX_LONG 23 /* 10GBase Twinax Long copper */
+#define IFM_10G_LRM 24  /* 10GBase-LRM 850nm Multi-mode */
+#define IFM_UNKNOWN 25  /* New media types that have not been defined yet 
*/
+
 
 /* note 31 is the max! */
 
@@ -349,6 +354,10 @@ struct ifmedia_description {
{ IFM_10G_SR,   "10Gbase-SR" }, \
{ IFM_10G_CX4,  "10Gbase-CX4" },\
{ IFM_2500_SX,  "2500BaseSX" }, \
+   { IFM_10G_LRM,  "10Gbase-LRM" },\
+   { IFM_10G_TWINAX,   "10Gbase-Twinax" }, \
+   { IFM_10G_TWINAX_LONG, "10Gbase-Twinax-Long" }, \
+   { IFM_UNKNOWN,  "Unknown" },\
{ 0, NULL },\
 }
 
@@ -603,6 +612,9 @@ struct ifmedia_baudrate {
{ IFM_ETHER | IFM_10G_SR,   IF_Gbps(10ULL) },   \
{ IFM_ETHER | IFM_10G_CX4,  IF_Gbps(10ULL) },   \
{ IFM_ETHER | IFM_2500_SX,  IF_Mbps(2500ULL) }, \
+   { IFM_ETHER | IFM_10G_TWINAX,   IF_Gbps(10ULL) },   \
+   { IFM_ETHER | IFM_10G_TWINAX_LONG,  IF_Gbps(10ULL) },   
\
+   { IFM_ETHER | IFM_10G_LRM,  IF_Gbps(10ULL) },   \
\
{ IFM_TOKEN | IFM_TOK_STP4, IF_Mbps(4) },   \
{ IFM_TOKEN | IFM_TOK_STP16,IF_Mbps(16) },  \
___
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: r186194 - in head: share/man/man9 sys/fs/hpfs sys/fs/msdosfs sys/fs/ntfs sys/fs/nwfs sys/fs/smbfs sys/gnu/fs/ext2fs sys/gnu/fs/reiserfs sys/gnu/fs/xfs/FreeBSD sys/ufs/ufs

2008-12-17 Thread Edward Tomasz Napierala
On 1217T1857, Ulrich Spoerlein wrote:
> > Author: trasz
> > Date: Tue Dec 16 21:13:11 2008
> > New Revision: 186194
> > URL: http://svn.freebsd.org/changeset/base/186194
> > 
> > Log:
> >   According to phk@, VOP_STRATEGY should never, _ever_, return
> >   anything other than 0.  Make it so.  This fixes
> >   "panic: VOP_STRATEGY failed bp=0xc320dd90 vp=0xc3b9f648",
> >   encountered when writing to an orphaned filesystem.  Reason
> >   for the panic was the following assert:
> >   KASSERT(i == 0, ("VOP_STRATEGY failed bp=%p vp=%p", bp, bp->b_vp));
> >   at vfs_bio:bufstrategy().
> 
> Is such a change also needed/recommended for the FUSE port?

It seems fusefs-kmod already does the right thing by always
returning 0.

-- 
If you cut off my head, what would I say?  Me and my head, or me and my body?

___
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: r186262 - head/sys/dev/fxp

2008-12-17 Thread Pyun YongHyeon
Author: yongari
Date: Thu Dec 18 01:36:46 2008
New Revision: 186262
URL: http://svn.freebsd.org/changeset/base/186262

Log:
  It seems that we don't need to reserve a TBD to set total TCP
  payload length in TSO case. Leaving unused TBD also seem to cause
  SCB timeouts under certain conditions when TSO/non-TSO traffics
  are active at the same time.

Modified:
  head/sys/dev/fxp/if_fxp.c

Modified: head/sys/dev/fxp/if_fxp.c
==
--- head/sys/dev/fxp/if_fxp.c   Thu Dec 18 00:54:15 2008(r186261)
+++ head/sys/dev/fxp/if_fxp.c   Thu Dec 18 01:36:46 2008(r186262)
@@ -1540,8 +1540,8 @@ fxp_encap(struct fxp_softc *sc, struct m
 * the chip is an 82550/82551 or not.
 */
if (sc->flags & FXP_FLAG_EXT_RFA) {
-   cbp->tbd[i + 2].tb_addr = htole32(segs[i].ds_addr);
-   cbp->tbd[i + 2].tb_size = htole32(segs[i].ds_len);
+   cbp->tbd[i + 1].tb_addr = htole32(segs[i].ds_addr);
+   cbp->tbd[i + 1].tb_size = htole32(segs[i].ds_len);
} else {
cbp->tbd[i].tb_addr = htole32(segs[i].ds_addr);
cbp->tbd[i].tb_size = htole32(segs[i].ds_len);
@@ -1550,13 +1550,13 @@ fxp_encap(struct fxp_softc *sc, struct m
if (sc->flags & FXP_FLAG_EXT_RFA) {
/* Configure dynamic TBD for 82550/82551. */
cbp->tbd_number = 0xFF;
-   cbp->tbd[nseg + 1].tb_size |= htole32(0x8000);
+   cbp->tbd[nseg].tb_size |= htole32(0x8000);
} else
cbp->tbd_number = nseg;
/* Configure TSO. */
if (m->m_pkthdr.csum_flags & CSUM_TSO) {
cbp->tbd[-1].tb_size = htole32(m->m_pkthdr.tso_segsz << 16);
-   cbp->tbd[1].tb_size = htole32(tcp_payload << 16);
+   cbp->tbd[1].tb_size |= htole32(tcp_payload << 16);
cbp->ipcb_ip_schedule |= FXP_IPCB_LARGESEND_ENABLE |
FXP_IPCB_IP_CHECKSUM_ENABLE |
FXP_IPCB_TCP_PACKET |
___
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: r186263 - head/usr.sbin/syslogd

2008-12-17 Thread Tai-hwa Liang
Author: avatar
Date: Thu Dec 18 04:03:29 2008
New Revision: 186263
URL: http://svn.freebsd.org/changeset/base/186263

Log:
  Fixing !INET6 builds after bumping WARNS to 3.

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

Modified: head/usr.sbin/syslogd/syslogd.c
==
--- head/usr.sbin/syslogd/syslogd.c Thu Dec 18 01:36:46 2008
(r186262)
+++ head/usr.sbin/syslogd/syslogd.c Thu Dec 18 04:03:29 2008
(r186263)
@@ -2185,10 +2185,13 @@ allowaddr(char *s)
char *cp1, *cp2;
struct allowedpeer ap;
struct servent *se;
-   int masklen = -1, i;
+   int masklen = -1;
struct addrinfo hints, *res;
struct in_addr *addrp, *maskp;
+#ifdef INET6
+   int i;
u_int32_t *addr6p, *mask6p;
+#endif
char ip[NI_MAXHOST];
 
 #ifdef INET6
@@ -2344,12 +2347,15 @@ allowaddr(char *s)
 static int
 validate(struct sockaddr *sa, const char *hname)
 {
-   int i, j, reject;
+   int i;
size_t l1, l2;
char *cp, name[NI_MAXHOST], ip[NI_MAXHOST], port[NI_MAXSERV];
struct allowedpeer *ap;
struct sockaddr_in *sin4, *a4p = NULL, *m4p = NULL;
+#ifdef INET6
+   int j, reject;
struct sockaddr_in6 *sin6, *a6p = NULL, *m6p = NULL;
+#endif
struct addrinfo hints, *res;
u_short sport;
 
___
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: r186266 - head/sys/net

2008-12-17 Thread Kip Macy
Author: kmacy
Date: Thu Dec 18 04:50:44 2008
New Revision: 186266
URL: http://svn.freebsd.org/changeset/base/186266

Log:
  add ifnet_byindex_locked to allow for use of IFNET_RLOCK

Modified:
  head/sys/net/if.c

Modified: head/sys/net/if.c
==
--- head/sys/net/if.c   Thu Dec 18 04:38:47 2008(r186265)
+++ head/sys/net/if.c   Thu Dec 18 04:50:44 2008(r186266)
@@ -191,15 +191,24 @@ MALLOC_DEFINE(M_IFNET, "ifnet", "interfa
 MALLOC_DEFINE(M_IFADDR, "ifaddr", "interface address");
 MALLOC_DEFINE(M_IFMADDR, "ether_multi", "link-level multicast address");
 
-struct ifnet *
-ifnet_byindex(u_short idx)
+static struct ifnet *
+ifnet_byindex_locked(u_short idx)
 {
INIT_VNET_NET(curvnet);
struct ifnet *ifp;
 
-   IFNET_WLOCK();
ifp = V_ifindex_table[idx].ife_ifnet;
-   IFNET_WUNLOCK();
+   return (ifp);
+}
+
+struct ifnet *
+ifnet_byindex(u_short idx)
+{
+   struct ifnet *ifp;
+
+   IFNET_RLOCK();
+   ifp = ifnet_byindex_locked(idx);
+   IFNET_RUNLOCK();
return (ifp);
 }
 
@@ -218,9 +227,9 @@ ifaddr_byindex(u_short idx)
 {
struct ifaddr *ifa;
 
-   IFNET_WLOCK();
-   ifa = ifnet_byindex(idx)->if_addr;
-   IFNET_WUNLOCK();
+   IFNET_RLOCK();
+   ifa = ifnet_byindex_locked(idx)->if_addr;
+   IFNET_RUNLOCK();
return (ifa);
 }
 
@@ -499,7 +508,7 @@ if_free_type(struct ifnet *ifp, u_char t
ifnet_setbyindex(ifp->if_index, NULL);
 
/* XXX: should be locked with if_findindex() */
-   while (V_if_index > 0 && ifnet_byindex(V_if_index) == NULL)
+   while (V_if_index > 0 && ifnet_byindex_locked(V_if_index) == NULL)
V_if_index--;
IFNET_WUNLOCK();
 
___
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: r186267 - stable/6/usr.sbin/fwcontrol

2008-12-17 Thread Sean Bruno
Author: sbruno
Date: Thu Dec 18 04:58:22 2008
New Revision: 186267
URL: http://svn.freebsd.org/changeset/base/186267

Log:
  Approved by:slong (sco...@samsco.org)
  
  Merge and fixups from -current to cleanup fwcontrol
  handling and reporting.
  
  The following changesets were already merged. I have noted
  the corresponding changeset where the merge by hand occured.
  165628 --> 165820
  170878 --> 170959
  173195 --> 173328
  176810 --> 178718
  
  These two changes were not propagated back to stable/6 and are
  cosmetic.
  173196 white space
  173214 dup .Pp sort SEE ALSO
  
  The following checkins implement:
  182911
 fixups for fwcontrol for multiple firewire boards
 add commandline ability to parse multiple arguments
  182048
 man page cleanups and usage() display updates
  185996
 add NetBSD compatibility in compile

Modified:
  stable/6/usr.sbin/fwcontrol/   (props changed)
  stable/6/usr.sbin/fwcontrol/fwcontrol.8
  stable/6/usr.sbin/fwcontrol/fwcontrol.c
  stable/6/usr.sbin/fwcontrol/fwmpegts.c

Modified: stable/6/usr.sbin/fwcontrol/fwcontrol.8
==
--- stable/6/usr.sbin/fwcontrol/fwcontrol.8 Thu Dec 18 04:50:44 2008
(r186266)
+++ stable/6/usr.sbin/fwcontrol/fwcontrol.8 Thu Dec 18 04:58:22 2008
(r186267)
@@ -24,7 +24,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd October 30, 2007
+.Dd September 12, 2008
 .Dt FWCONTROL 8
 .Os
 .Sh NAME
@@ -60,6 +60,7 @@ The following options are available:
 .Bl -tag -width indent
 .It Fl u Ar bus_num
 Specify the FireWire bus number to be operated on.
+The default is bus 0.
 .It Fl r
 Initiate bus reset.
 .It Fl t
@@ -81,11 +82,14 @@ Load hex dump file of the configuration 
 .It Fl f Ar node
 Force specified
 .Ar node
-to be the root node on the next bus reset.
+to be the root node on the next bus reset by sending a PHY config packet.
+Valid values are 0 - 63.
 .It Fl g Ar gap_count
-Broadcast
+Broadcast new
 .Ar gap_count
-by phy_config packet.
+by sending a PHY_config packet.
+By default this value is 63 on all nodes.
+Valid values are 0 - 63.
 .It Fl i Ar pri_req
 Set the
 .Dv PRIORITY_BUDGET
@@ -98,13 +102,18 @@ or
 mode for the incoming stream.
 Only meaningful in case of and must precede the
 .Fl R
-option. If not specified, the program will try to guess. If you get
-an error complaining about "format 0x20", try to force the "mpeg" mode.
+option.
+If not specified, the program will try to guess.
+In case of
+.Dq format 0x20
+error, try to force the
+.Dq mpeg
+mode.
 .It Fl R Ar filename
 Receive DV or MPEG TS stream and dump it to a file.
-Use Ctrl-C to stop the receiving.
+Use ^C to stop the receiving.
 Some DV cameras seem not to send the stream if a bus manager exists.
-If you cannot get the stream, try the following commands:
+If it is impossible to get the stream, try the following commands:
 .Bd -literal -offset indent
 sysctl hw.firewire.try_bmr=0
 fwcontrol -r
@@ -116,14 +125,17 @@ It can be handled by
 .Nm libdv
 in the
 .Fx
-Ports Collection. Resulting MPEG TS stream can be played and sent over a
+Ports Collection.
+Resulting MPEG TS stream can be played and sent over a
 network using the VideoLAN
 .Nm vlc
-tool in the 
+tool in the
 .Fx
-Ports Collection. The stream can be piped directly to
+Ports Collection.
+The stream can be piped directly to
 .Nm vlc,
-see EXAMPLES.
+see
+.Sx EXAMPLES .
 .It Fl S Ar filename
 Send a DV file as isochronous stream.
 .It Fl m Ar EUI64 | hostname
@@ -161,38 +173,38 @@ with
 .Pp
 .Dl "fwcontrol -R file.m2t
 .Pp
-Receive an MPEG TS stream from a camera producing MPEG transport stream.  This
-has been tested with SONY HDR-FX1E camera that produces HD MPEG-2 stream at
-25 Mbps bandwidth.
+Receive an MPEG TS stream from a camera producing MPEG transport stream.
+This has been tested with SONY HDR-FX1E camera that produces HD MPEG-2
+stream at 25 Mbps bandwidth.
 .Pp
-To send the stream from the camera over the network using TCP (which 
supprisingly works better with vlc), you can use
+To send the stream from the camera over the network using TCP (which
+supprisingly works better with vlc), you can use
 .Dl "fwcontrol -R - | nc 192.168.10.11 9000
 with
 .Nm netcat
 from ports and to receive the stream, use
 .Dl nc -l -p 9000 | vlc -
 .Pp
-To netcast via UDP, you need to use 
-.Nm buffer 
+To netcast via UDP, you need to use
+.Nm buffer
 program from ports, since vlc is not fast enough to read UDP packets from
-buffers and thus it experiences dropouts when run directly. The sending side
-can use
+buffers and thus it experiences dropouts when run directly.
+The sending side can use
 .Dl "fwcontrol -R - | nc 192.168.10.11 9000
 and to receive the stream, use
 .Dl nc -l -u -p 9000 | buffer -s 10k -b 1000 -m 20m -p 5 | vlc -
 .Pp
-.Pp
 For more information on how to work with
 .Nm vlc
 see its docs.
 .Sh SEE ALSO
+.Xr mplayer 1 ,
+.Xr vlc 1 ,
 .Xr firewire 4 ,
 .Xr fwe 4 ,
 .Xr fwip 4 ,
 .Xr fwohci 4 

svn commit: r186268 - stable/6/usr.sbin/fwcontrol

2008-12-17 Thread Sean Bruno
Author: sbruno
Date: Thu Dec 18 05:05:07 2008
New Revision: 186268
URL: http://svn.freebsd.org/changeset/base/186268

Log:
  Approved by:  slong (sco...@samsco.org)
  
  Clear r163712 as it was merged by hand in changeset 165820

Modified:
  stable/6/usr.sbin/fwcontrol/   (props changed)
___
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: r186274 - head/usr.sbin/sysinstall

2008-12-17 Thread Maxim Konovalov
Author: maxim
Date: Thu Dec 18 06:38:11 2008
New Revision: 186274
URL: http://svn.freebsd.org/changeset/base/186274

Log:
  o Synchronize comment and example.  Add missed comma.
  
  PR:   misc/129699
  Submitted by: Glen Barber [1]
  MFC after:2 weeks

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

Modified: head/usr.sbin/sysinstall/config.c
==
--- head/usr.sbin/sysinstall/config.c   Thu Dec 18 06:10:26 2008
(r186273)
+++ head/usr.sbin/sysinstall/config.c   Thu Dec 18 06:38:11 2008
(r186274)
@@ -817,7 +817,7 @@ configNFSServer(dialogMenuItem *self)
   "kinds of access to your local file systems.\n"
   "Press [ENTER] now to invoke an editor on 
/etc/exports\n");
vsystem("echo '#The following examples export /usr to 3 machines 
named after ducks,' > /etc/exports");
-   vsystem("echo '#/usr/src and /usr/ports read-only to machines named 
after trouble makers' >> /etc/exports");
+   vsystem("echo '#/usr/src and /usr/obj read-only to machines named 
after trouble makers,' >> /etc/exports");
vsystem("echo '#/home and all directories under it to machines 
named after dead rock stars' >> /etc/exports");
vsystem("echo '#and, /a to a network of privileged machines allowed 
to write on it as root.' >> /etc/exports");
vsystem("echo '#/usr   huey louie dewie' >> 
/etc/exports");
___
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"