CVS commit: src/usr.bin/ftp

2009-04-24 Thread Luke Mewburn
Module Name:src
Committed By:   lukem
Date:   Fri Apr 24 08:57:26 UTC 2009

Modified Files:
src/usr.bin/ftp: main.c version.h

Log Message:
Revert incorrect change made as part of the WARNS=4.
Fixes ftp host [port] on the CLI.
Noted by Geoff Wing.


To generate a diff of this commit:
cvs rdiff -u -r1.115 -r1.116 src/usr.bin/ftp/main.c
cvs rdiff -u -r1.78 -r1.79 src/usr.bin/ftp/version.h

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

Modified files:

Index: src/usr.bin/ftp/main.c
diff -u src/usr.bin/ftp/main.c:1.115 src/usr.bin/ftp/main.c:1.116
--- src/usr.bin/ftp/main.c:1.115	Sun Apr 12 10:18:52 2009
+++ src/usr.bin/ftp/main.c	Fri Apr 24 08:57:26 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: main.c,v 1.115 2009/04/12 10:18:52 lukem Exp $	*/
+/*	$NetBSD: main.c,v 1.116 2009/04/24 08:57:26 lukem Exp $	*/
 
 /*-
  * Copyright (c) 1996-2009 The NetBSD Foundation, Inc.
@@ -98,7 +98,7 @@
 #if 0
 static char sccsid[] = @(#)main.c	8.6 (Berkeley) 10/9/94;
 #else
-__RCSID($NetBSD: main.c,v 1.115 2009/04/12 10:18:52 lukem Exp $);
+__RCSID($NetBSD: main.c,v 1.116 2009/04/24 08:57:26 lukem Exp $);
 #endif
 #endif /* not lint */
 
@@ -574,7 +574,7 @@
 	anonftp = 0;
 	autologin = 0;
 }
-setpeer(3, xargv);
+setpeer(argc+1, xargv);
 autologin = oautologin;
 if (connected == 1  uuser != NULL)
 	(void)ftp_login(host, uuser, NULL);

Index: src/usr.bin/ftp/version.h
diff -u src/usr.bin/ftp/version.h:1.78 src/usr.bin/ftp/version.h:1.79
--- src/usr.bin/ftp/version.h:1.78	Sun Apr 12 10:18:52 2009
+++ src/usr.bin/ftp/version.h	Fri Apr 24 08:57:26 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: version.h,v 1.78 2009/04/12 10:18:52 lukem Exp $	*/
+/*	$NetBSD: version.h,v 1.79 2009/04/24 08:57:26 lukem Exp $	*/
 
 /*-
  * Copyright (c) 1999-2009 The NetBSD Foundation, Inc.
@@ -34,5 +34,5 @@
 #endif
 
 #ifndef FTP_VERSION
-#define	FTP_VERSION	20090412
+#define	FTP_VERSION	20090424
 #endif



CVS commit: src/etc/rc.d

2009-04-24 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Apr 24 14:26:02 UTC 2009

Modified Files:
src/etc/rc.d: named

Log Message:
PR/41273: Martin Mersberger: missing '/' in /etc/rc.d/named in section
named_migrate


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/etc/rc.d/named

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

Modified files:

Index: src/etc/rc.d/named
diff -u src/etc/rc.d/named:1.19 src/etc/rc.d/named:1.20
--- src/etc/rc.d/named:1.19	Wed Apr 22 14:27:03 2009
+++ src/etc/rc.d/named	Fri Apr 24 10:26:02 2009
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# $NetBSD: named,v 1.19 2009/04/22 18:27:03 christos Exp $
+# $NetBSD: named,v 1.20 2009/04/24 14:26:02 christos Exp $
 #
 
 # PROVIDE: named
@@ -31,7 +31,7 @@
 		f=${f##./}
 		case $f in
 		*/*)
-			d=$dst$(dirname $f)
+			d=$dst/$(dirname $f)
 			;;
 		*)	d=$dst
 			;;



CVS commit: src/dist/pf/usr.sbin/ftp-proxy

2009-04-24 Thread Jeremy C. Reed
Module Name:src
Committed By:   reed
Date:   Fri Apr 24 16:48:58 UTC 2009

Modified Files:
src/dist/pf/usr.sbin/ftp-proxy: ftp-proxy.8

Log Message:
Fix roff formatting for -
by adding an \ such as document in mdoc.7

This was reported in 41276


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/dist/pf/usr.sbin/ftp-proxy/ftp-proxy.8

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

Modified files:

Index: src/dist/pf/usr.sbin/ftp-proxy/ftp-proxy.8
diff -u src/dist/pf/usr.sbin/ftp-proxy/ftp-proxy.8:1.4 src/dist/pf/usr.sbin/ftp-proxy/ftp-proxy.8:1.5
--- src/dist/pf/usr.sbin/ftp-proxy/ftp-proxy.8:1.4	Sun Mar 22 14:29:35 2009
+++ src/dist/pf/usr.sbin/ftp-proxy/ftp-proxy.8	Fri Apr 24 16:48:58 2009
@@ -1,4 +1,4 @@
-.\	$NetBSD: ftp-proxy.8,v 1.4 2009/03/22 14:29:35 perry Exp $
+.\	$NetBSD: ftp-proxy.8,v 1.5 2009/04/24 16:48:58 reed Exp $
 .\	$OpenBSD: ftp-proxy.8,v 1.10 2007/08/01 15:45:41 jmc Exp $
 .\
 .\ Copyright (c) 2004, 2005 Camiel Dobbelaar, c...@sentia.nl
@@ -73,14 +73,14 @@
 .Pp
 In case of active mode (PORT or EPRT):
 .Bd -literal -offset 2n
-rdr from $server to $proxy port $port -*[Gt] $client
+rdr from $server to $proxy port $port -\*[Gt] $client
 pass quick inet proto tcp \e
 from $server to $client port $port
 .Ed
 .Pp
 In case of passive mode (PASV or EPSV):
 .Bd -literal -offset 2n
-nat from $client to $server port $port -*[Gt] $proxy
+nat from $client to $server port $port -\*[Gt] $proxy
 pass in quick inet proto tcp \e
 from $client to $server port $port
 pass out quick inet proto tcp \e
@@ -174,7 +174,7 @@
 .Bd -literal -offset 2n
 nat-anchor ftp-proxy/*
 rdr-anchor ftp-proxy/*
-rdr pass on $int_if proto tcp from $lan to any port 21 -*[Gt] \e
+rdr pass on $int_if proto tcp from $lan to any port 21 -\*[Gt] \e
 127.0.0.1 port 8021
 .Ed
 .Pp
@@ -189,7 +189,7 @@
 .Xr ipnat.conf 5
 need the following rule:
 .Bd -literal -offset 2n
-rdr $int_if any port 21 -*[Gt] 127.0.0.1 port 8021 tcp
+rdr $int_if any port 21 -\*[Gt] 127.0.0.1 port 8021 tcp
 .Ed
 .Sh SEE ALSO
 .Xr ftp 1 ,



CVS commit: src/sys/arch/x86/x86

2009-04-24 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Fri Apr 24 17:42:03 UTC 2009

Modified Files:
src/sys/arch/x86/x86: ipmi.c

Log Message:
- Attach via the kthread so boot is not so slow on some systems with IPMI.
- NOWAIT - WAITOK


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/sys/arch/x86/x86/ipmi.c

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

Modified files:

Index: src/sys/arch/x86/x86/ipmi.c
diff -u src/sys/arch/x86/x86/ipmi.c:1.32 src/sys/arch/x86/x86/ipmi.c:1.33
--- src/sys/arch/x86/x86/ipmi.c:1.32	Tue Apr  7 21:47:58 2009
+++ src/sys/arch/x86/x86/ipmi.c	Fri Apr 24 17:42:03 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: ipmi.c,v 1.32 2009/04/07 21:47:58 dyoung Exp $ */
+/*	$NetBSD: ipmi.c,v 1.33 2009/04/24 17:42:03 ad Exp $ */
 
 /*
  * Copyright (c) 2006 Manuel Bouyer.
@@ -57,7 +57,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: ipmi.c,v 1.32 2009/04/07 21:47:58 dyoung Exp $);
+__KERNEL_RCSID(0, $NetBSD: ipmi.c,v 1.33 2009/04/24 17:42:03 ad Exp $);
 
 #include sys/types.h
 #include sys/param.h
@@ -975,7 +975,7 @@
 
 	/* Block transfer needs 4 extra bytes: length/netfn/seq/cmd + data */
 	*txlen = len + 4;
-	buf = malloc(*txlen, M_DEVBUF, M_NOWAIT|M_CANFAIL);
+	buf = malloc(*txlen, M_DEVBUF, M_WAITOK|M_CANFAIL);
 	if (buf == NULL)
 		return (NULL);
 
@@ -1004,7 +1004,7 @@
 
 	/* Common needs two extra bytes: nfLun/cmd + data */
 	*txlen = len + 2;
-	buf = malloc(*txlen, M_DEVBUF, M_NOWAIT|M_CANFAIL);
+	buf = malloc(*txlen, M_DEVBUF, M_WAITOK|M_CANFAIL);
 	if (buf == NULL)
 		return (NULL);
 
@@ -1071,7 +1071,7 @@
 	int		rawlen;
 
 	/* Need three extra bytes: netfn/cmd/ccode + data */
-	buf = malloc(maxlen + 3, M_DEVBUF, M_NOWAIT|M_CANFAIL);
+	buf = malloc(maxlen + 3, M_DEVBUF, M_WAITOK|M_CANFAIL);
 	if (buf == NULL) {
 		printf(ipmi: ipmi_recvcmd: malloc fails\n);
 		return (-1);
@@ -1164,7 +1164,7 @@
 	/* Allocate space for entire SDR Length of SDR in header does not
 	 * include header length */
 	sdrlen = sizeof(shdr) + shdr.record_length;
-	psdr = malloc(sdrlen, M_DEVBUF, M_NOWAIT|M_CANFAIL);
+	psdr = malloc(sdrlen, M_DEVBUF, M_WAITOK|M_CANFAIL);
 	if (psdr == NULL)
 		return -1;
 
@@ -1419,9 +1419,7 @@
 	int		rxlen, rv = -1;
 	envsys_data_t *edata = sc-sc_sensor[psensor-i_envnum];
 
-	if (!cold)
-		mutex_enter(sc-sc_lock);
-
+	mutex_enter(sc-sc_lock);
 	memset(data, 0, sizeof(data));
 	data[0] = psensor-i_num;
 	if (ipmi_sendcmd(sc, s1-owner_id, s1-owner_lun, SE_NETFN,
@@ -1440,8 +1438,7 @@
 	}
 	rv = 0;
 done:
-	if (!cold)
-		mutex_exit(sc-sc_lock);
+	mutex_exit(sc-sc_lock);
 	return (rv);
 }
 
@@ -1534,7 +1531,7 @@
 	sc-sc_nsensors_typ[typ] += count;
 	for (idx = 0; idx  count; idx++) {
 		psensor = malloc(sizeof(struct ipmi_sensor), M_DEVBUF,
-		M_NOWAIT|M_CANFAIL);
+		M_WAITOK|M_CANFAIL);
 		if (psensor == NULL)
 			break;
 
@@ -1662,19 +1659,6 @@
 	sc-sc_if-nregs * sc-sc_if_iospacing);
 }
 
-void
-ipmi_poll_thread(void *arg)
-{
-	struct ipmi_softc  *sc = arg;
-
-	while (sc-sc_thread_running) {
-		ipmi_refresh_sensors(sc);
-		tsleep(sc-sc_thread_running, PWAIT, ipmi_poll,
-		SENSOR_REFRESH_RATE);
-	}
-	kthread_exit(0);
-}
-
 int
 ipmi_probe(struct ipmi_attach_args *ia)
 {
@@ -1738,8 +1722,9 @@
 }
 
 static void
-ipmi_attach2(device_t self)
+ipmi_thread(void *cookie)
 {
+	device_t		self = cookie;
 	struct ipmi_softc	*sc = device_private(self);
 	struct ipmi_attach_args *ia = sc-sc_ia;
 	uint16_t		rec;
@@ -1778,10 +1763,10 @@
 	/* allocate and fill sensor arrays */
 	sc-sc_sensor =
 	malloc(sizeof(envsys_data_t) * sc-sc_nsensors,
-	M_DEVBUF, M_NOWAIT | M_ZERO);
+	M_DEVBUF, M_WAITOK | M_ZERO);
 	if (sc-sc_sensor == NULL) {
 		aprint_error(ipmi: can't allocate envsys_data_t\n);
-		return;
+		kthread_exit(0);
 	}
 
 	sc-sc_envsys = sysmon_envsys_create();
@@ -1803,7 +1788,7 @@
 		(void)strlcpy(sc-sc_sensor[i].desc, ipmi_s-i_envdesc,
 		sizeof(sc-sc_sensor[i].desc));
 		if (sysmon_envsys_sensor_attach(sc-sc_envsys,
-		sc-sc_sensor[i]))
+		sc-sc_sensor[i]))
 			continue;
 	}
 
@@ -1811,7 +1796,7 @@
 	sc-sc_envsys-sme_flags = SME_DISABLE_REFRESH;
 
 	if (sysmon_envsys_register(sc-sc_envsys)) {
-		printf(ipmi: unable to register with sysmon\n);
+		aprint_error(ipmi: unable to register with sysmon\n);
 		sysmon_envsys_destroy(sc-sc_envsys);
 	}
 
@@ -1820,13 +1805,12 @@
 		sc-current_sensor = SLIST_FIRST(ipmi_sensor_list);
 
 	aprint_verbose_dev(self, version %d.%d interface %s %sbase 
-	0x%x/%x spacing %d,
+	0x%x/%x spacing %d\n,
 	ia-iaa_if_rev  4, ia-iaa_if_rev  0xF, sc-sc_if-name,
 	ia-iaa_if_iotype == 'i' ? io : mem, ia-iaa_if_iobase,
 	ia-iaa_if_iospacing * sc-sc_if-nregs, ia-iaa_if_iospacing);
 	if (ia-iaa_if_irq != -1)
-		aprint_normal( irq %d, ia-iaa_if_irq);
-	aprint_normal(\n);
+		aprint_verbose_dev(self,  irq %d\n, ia-iaa_if_irq);
 
 	/* setup flag to exclude iic */
 	ipmi_enabled = 1;
@@ -1838,11 +1822,12 @@