PERFORCE change 171042 for review
Alexander Motin
mav at FreeBSD.org
Thu Nov 26 08:22:03 UTC 2009
http://p4web.freebsd.org/chv.cgi?CH=171042
Change 171042 by mav at mav_mavbook on 2009/11/26 08:21:34
IFC
Affected files ...
.. //depot/projects/scottl-camlock/src/crypto/openssh/sshd.c#4 integrate
.. //depot/projects/scottl-camlock/src/games/factor/factor.c#2 integrate
.. //depot/projects/scottl-camlock/src/lib/libc/gen/getcap.c#3 integrate
.. //depot/projects/scottl-camlock/src/lib/libc/gen/getusershell.c#2 integrate
.. //depot/projects/scottl-camlock/src/lib/libc/gen/wordexp.c#3 integrate
.. //depot/projects/scottl-camlock/src/lib/libc/rpc/clnt_raw.c#2 integrate
.. //depot/projects/scottl-camlock/src/lib/libc/rpc/getnetconfig.c#4 integrate
.. //depot/projects/scottl-camlock/src/lib/libc/rpc/getrpcent.c#3 integrate
.. //depot/projects/scottl-camlock/src/lib/libc/rpc/key_call.c#2 integrate
.. //depot/projects/scottl-camlock/src/lib/libc/rpc/svc_raw.c#3 integrate
.. //depot/projects/scottl-camlock/src/lib/libc/stdio/fgetws.c#3 integrate
.. //depot/projects/scottl-camlock/src/lib/libc/stdio/fvwrite.c#2 integrate
.. //depot/projects/scottl-camlock/src/lib/libc/stdio/vfwprintf.c#3 integrate
.. //depot/projects/scottl-camlock/src/lib/libc/stdio/xprintf_time.c#2 integrate
.. //depot/projects/scottl-camlock/src/lib/libc/yp/yplib.c#3 integrate
.. //depot/projects/scottl-camlock/src/lib/libfetch/ftp.c#3 integrate
.. //depot/projects/scottl-camlock/src/lib/libtacplus/taclib.c#2 integrate
.. //depot/projects/scottl-camlock/src/sbin/ifconfig/ifconfig.c#6 integrate
.. //depot/projects/scottl-camlock/src/share/man/man4/ada.4#2 integrate
.. //depot/projects/scottl-camlock/src/sys/boot/i386/libi386/elf32_freebsd.c#5 integrate
.. //depot/projects/scottl-camlock/src/sys/boot/i386/libi386/elf64_freebsd.c#4 integrate
.. //depot/projects/scottl-camlock/src/sys/cam/ata/ata_xpt.c#62 integrate
.. //depot/projects/scottl-camlock/src/sys/dev/an/if_an.c#13 integrate
.. //depot/projects/scottl-camlock/src/sys/dev/an/if_an_isa.c#6 integrate
.. //depot/projects/scottl-camlock/src/sys/dev/an/if_an_pccard.c#8 integrate
.. //depot/projects/scottl-camlock/src/sys/dev/an/if_an_pci.c#6 integrate
.. //depot/projects/scottl-camlock/src/sys/dev/an/if_anreg.h#8 integrate
.. //depot/projects/scottl-camlock/src/sys/dev/ata/ata-disk.c#22 integrate
.. //depot/projects/scottl-camlock/src/sys/dev/bge/if_bge.c#29 integrate
.. //depot/projects/scottl-camlock/src/sys/dev/fe/if_fe_pccard.c#7 integrate
.. //depot/projects/scottl-camlock/src/sys/dev/hwpmc/hwpmc_logging.c#8 integrate
.. //depot/projects/scottl-camlock/src/sys/dev/pci/pci.c#28 integrate
.. //depot/projects/scottl-camlock/src/sys/dev/usb/controller/atmegadci.c#11 integrate
.. //depot/projects/scottl-camlock/src/sys/dev/usb/controller/avr32dci.c#8 integrate
.. //depot/projects/scottl-camlock/src/sys/dev/usb/controller/musb_otg.c#10 integrate
.. //depot/projects/scottl-camlock/src/sys/dev/usb/controller/uhci_pci.c#8 integrate
.. //depot/projects/scottl-camlock/src/sys/dev/usb/controller/uhcireg.h#2 integrate
.. //depot/projects/scottl-camlock/src/sys/dev/usb/controller/usb_controller.c#11 integrate
.. //depot/projects/scottl-camlock/src/sys/dev/usb/input/ukbd.c#13 integrate
.. //depot/projects/scottl-camlock/src/sys/dev/usb/net/if_aue.c#9 integrate
.. //depot/projects/scottl-camlock/src/sys/dev/usb/net/if_axe.c#9 integrate
.. //depot/projects/scottl-camlock/src/sys/dev/usb/net/if_cdce.c#11 integrate
.. //depot/projects/scottl-camlock/src/sys/dev/usb/net/if_cue.c#8 integrate
.. //depot/projects/scottl-camlock/src/sys/dev/usb/net/if_kue.c#8 integrate
.. //depot/projects/scottl-camlock/src/sys/dev/usb/net/if_rue.c#8 integrate
.. //depot/projects/scottl-camlock/src/sys/dev/usb/net/if_udav.c#8 integrate
.. //depot/projects/scottl-camlock/src/sys/dev/usb/serial/u3g.c#10 integrate
.. //depot/projects/scottl-camlock/src/sys/dev/usb/serial/uark.c#8 integrate
.. //depot/projects/scottl-camlock/src/sys/dev/usb/serial/ubser.c#8 integrate
.. //depot/projects/scottl-camlock/src/sys/dev/usb/serial/ucycom.c#8 integrate
.. //depot/projects/scottl-camlock/src/sys/dev/usb/serial/ufoma.c#8 integrate
.. //depot/projects/scottl-camlock/src/sys/dev/usb/serial/uftdi.c#8 integrate
.. //depot/projects/scottl-camlock/src/sys/dev/usb/serial/ugensa.c#8 integrate
.. //depot/projects/scottl-camlock/src/sys/dev/usb/serial/umct.c#8 integrate
.. //depot/projects/scottl-camlock/src/sys/dev/usb/serial/umodem.c#8 integrate
.. //depot/projects/scottl-camlock/src/sys/dev/usb/serial/uplcom.c#8 integrate
.. //depot/projects/scottl-camlock/src/sys/dev/usb/storage/umass.c#14 integrate
.. //depot/projects/scottl-camlock/src/sys/dev/usb/template/usb_template.c#7 integrate
.. //depot/projects/scottl-camlock/src/sys/dev/usb/usb_busdma.c#9 integrate
.. //depot/projects/scottl-camlock/src/sys/dev/usb/usb_debug.h#6 integrate
.. //depot/projects/scottl-camlock/src/sys/dev/usb/usb_dev.c#11 integrate
.. //depot/projects/scottl-camlock/src/sys/dev/usb/usb_device.c#12 integrate
.. //depot/projects/scottl-camlock/src/sys/dev/usb/usb_hid.c#8 integrate
.. //depot/projects/scottl-camlock/src/sys/dev/usb/usb_hub.c#12 integrate
.. //depot/projects/scottl-camlock/src/sys/dev/usb/usb_msctest.c#6 integrate
.. //depot/projects/scottl-camlock/src/sys/dev/usb/usb_process.c#9 integrate
.. //depot/projects/scottl-camlock/src/sys/dev/usb/usb_request.c#8 integrate
.. //depot/projects/scottl-camlock/src/sys/dev/usb/usb_transfer.c#14 integrate
.. //depot/projects/scottl-camlock/src/sys/dev/usb/wlan/if_upgt.c#10 integrate
.. //depot/projects/scottl-camlock/src/sys/kern/sched_ule.c#25 integrate
.. //depot/projects/scottl-camlock/src/sys/kern/sys_process.c#19 integrate
.. //depot/projects/scottl-camlock/src/sys/mips/adm5120/if_admsw.c#4 integrate
.. //depot/projects/scottl-camlock/src/sys/mips/adm5120/if_admswvar.h#2 integrate
.. //depot/projects/scottl-camlock/src/sys/vm/vm.h#12 integrate
.. //depot/projects/scottl-camlock/src/sys/vm/vm_fault.c#28 integrate
.. //depot/projects/scottl-camlock/src/sys/vm/vm_map.c#27 integrate
.. //depot/projects/scottl-camlock/src/tools/tools/tinybsd/tinybsd#4 integrate
.. //depot/projects/scottl-camlock/src/usr.bin/gcore/Makefile#2 integrate
.. //depot/projects/scottl-camlock/src/usr.bin/gcore/elfcore.c#5 integrate
.. //depot/projects/scottl-camlock/src/usr.bin/gcore/gcore.1#2 integrate
.. //depot/projects/scottl-camlock/src/usr.bin/gcore/gcore.c#2 integrate
.. //depot/projects/scottl-camlock/src/usr.bin/netstat/if.c#3 integrate
.. //depot/projects/scottl-camlock/src/usr.bin/unifdef/unifdef.1#3 integrate
.. //depot/projects/scottl-camlock/src/usr.bin/unifdef/unifdef.c#3 integrate
.. //depot/projects/scottl-camlock/src/usr.bin/unifdef/unifdefall.sh#2 integrate
.. //depot/projects/scottl-camlock/src/usr.sbin/cron/cron/cron.c#3 integrate
.. //depot/projects/scottl-camlock/src/usr.sbin/inetd/inetd.c#3 integrate
.. //depot/projects/scottl-camlock/src/usr.sbin/jail/jail.8#9 integrate
.. //depot/projects/scottl-camlock/src/usr.sbin/syslogd/syslogd.c#3 integrate
Differences ...
==== //depot/projects/scottl-camlock/src/crypto/openssh/sshd.c#4 (text+ko) ====
@@ -43,10 +43,11 @@
*/
#include "includes.h"
-__RCSID("$FreeBSD: src/crypto/openssh/sshd.c,v 1.49 2009/10/01 17:12:52 des Exp $");
+__RCSID("$FreeBSD: src/crypto/openssh/sshd.c,v 1.50 2009/11/25 15:12:24 attilio Exp $");
#include <sys/types.h>
#include <sys/ioctl.h>
+#include <sys/mman.h>
#include <sys/socket.h>
#ifdef HAVE_SYS_STAT_H
# include <sys/stat.h>
@@ -1293,6 +1294,10 @@
/* Initialize configuration options to their default values. */
initialize_server_options(&options);
+ /* Avoid killing the process in high-pressure swapping environments. */
+ if (madvise(NULL, 0, MADV_PROTECT) != 0)
+ debug("madvise(): %.200s", strerror(errno));
+
/* Parse command-line arguments. */
while ((opt = getopt(ac, av, "f:p:b:k:h:g:u:o:C:dDeiqrtQRT46")) != -1) {
switch (opt) {
==== //depot/projects/scottl-camlock/src/games/factor/factor.c#2 (text+ko) ====
@@ -13,11 +13,7 @@
* 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. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
+ * 3. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
@@ -35,18 +31,20 @@
*/
#ifndef lint
-static const char copyright[] =
-"@(#) Copyright (c) 1989, 1993\n\
- The Regents of the University of California. All rights reserved.\n";
-#endif /* not lint */
-
-#ifndef lint
-#if 0
-static char sccsid[] = "@(#)factor.c 8.4 (Berkeley) 5/4/95";
-__RCSID("$NetBSD: factor.c,v 1.13 2002/06/18 23:07:36 simonb Exp $");
+#include <sys/cdefs.h>
+#ifdef __COPYRIGHT
+__COPYRIGHT("@(#) Copyright (c) 1989, 1993\
+ The Regents of the University of California. All rights reserved.");
+#endif
+#ifdef __SCCSID
+__SCCSID("@(#)factor.c 8.4 (Berkeley) 5/4/95");
+#endif
+#ifdef __RCSID
+__RCSID("$NetBSD: factor.c,v 1.19 2009/08/12 05:54:31 dholland Exp $");
+#endif
+#ifdef __FBSDID
+__FBSDID("$FreeBSD: src/games/factor/factor.c,v 1.14 2009/11/26 00:38:13 fanf Exp $");
#endif
-static const char rcsid[] =
- "$FreeBSD: src/games/factor/factor.c,v 1.13 2002/10/09 19:55:04 fanf Exp $";
#endif /* not lint */
/*
@@ -63,7 +61,7 @@
*
* number: factor1 factor1 factor2 factor3 factor3 factor3 ...
*
- * where factor1 < factor2 < factor3 < ...
+ * where factor1 <= factor2 <= factor3 <= ...
*
* If no args are given, the list of numbers are read from stdin.
*/
@@ -214,7 +212,9 @@
bnfact = BN_new();
BN_set_word(bnfact, *(fact - 1));
BN_sqr(bnfact, bnfact, ctx);
- if (BN_cmp(bnfact, val) > 0)
+ if (BN_cmp(bnfact, val) > 0 ||
+ BN_is_prime(val, PRIME_CHECKS,
+ NULL, NULL, NULL) == 1)
pr_print(val);
else
pollard_pminus1(val);
@@ -257,22 +257,28 @@
#ifdef HAVE_OPENSSL
-/* pollard rho, algorithm from Jim Gillogly, May 2000 */
+/* pollard p-1, algorithm from Jim Gillogly, May 2000 */
static void
pollard_pminus1(BIGNUM *val)
{
- BIGNUM *base, *num, *i, *x;
+ BIGNUM *base, *rbase, *num, *i, *x;
base = BN_new();
+ rbase = BN_new();
num = BN_new();
i = BN_new();
x = BN_new();
+ BN_set_word(rbase, 1);
+newbase:
+ BN_add_word(rbase, 1);
BN_set_word(i, 2);
- BN_set_word(base, 2);
+ BN_copy(base, rbase);
for (;;) {
BN_mod_exp(base, base, i, val, ctx);
+ if (BN_is_one(base))
+ goto newbase;
BN_copy(x, base);
BN_sub_word(x, 1);
==== //depot/projects/scottl-camlock/src/lib/libc/gen/getcap.c#3 (text+ko) ====
@@ -34,7 +34,7 @@
static char sccsid[] = "@(#)getcap.c 8.3 (Berkeley) 3/25/94";
#endif /* LIBC_SCCS and not lint */
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/lib/libc/gen/getcap.c,v 1.22 2009/05/14 23:09:33 delphij Exp $");
+__FBSDID("$FreeBSD: src/lib/libc/gen/getcap.c,v 1.23 2009/11/25 04:45:45 wollman Exp $");
#include "namespace.h"
#include <sys/types.h>
@@ -647,7 +647,7 @@
cgetnext(char **bp, char **db_array)
{
size_t len;
- int done, hadreaderr, i, savederrno, status;
+ int done, hadreaderr, savederrno, status;
char *cp, *line, *rp, *np, buf[BSIZE], nbuf[BSIZE];
u_int dummy;
@@ -658,7 +658,7 @@
(void)cgetclose();
return (-1);
}
- for(;;) {
+ for (;;) {
if (toprec && !gottoprec) {
gottoprec = 1;
line = toprec;
@@ -709,7 +709,6 @@
/*
* Line points to a name line.
*/
- i = 0;
done = 0;
np = nbuf;
for (;;) {
==== //depot/projects/scottl-camlock/src/lib/libc/gen/getusershell.c#2 (text+ko) ====
@@ -32,7 +32,7 @@
#endif /* LIBC_SCCS and not lint */
/* $NetBSD: getusershell.c,v 1.17 1999/01/25 01:09:34 lukem Exp $ */
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/lib/libc/gen/getusershell.c,v 1.10 2007/01/09 00:27:54 imp Exp $");
+__FBSDID("$FreeBSD: src/lib/libc/gen/getusershell.c,v 1.11 2009/11/25 04:45:45 wollman Exp $");
#include "namespace.h"
#include <sys/param.h>
@@ -124,7 +124,7 @@
if ((fp = fopen(_PATH_SHELLS, "r")) == NULL)
return NS_UNAVAIL;
- sp = cp = line;
+ cp = line;
while (fgets(cp, MAXPATHLEN + 1, fp) != NULL) {
while (*cp != '#' && *cp != '/' && *cp != '\0')
cp++;
==== //depot/projects/scottl-camlock/src/lib/libc/gen/wordexp.c#3 (text+ko) ====
@@ -39,7 +39,7 @@
#include <wordexp.h>
#include "un-namespace.h"
-__FBSDID("$FreeBSD: src/lib/libc/gen/wordexp.c,v 1.7 2009/10/23 14:50:11 jilles Exp $");
+__FBSDID("$FreeBSD: src/lib/libc/gen/wordexp.c,v 1.8 2009/11/25 04:45:45 wollman Exp $");
static int we_askshell(const char *, wordexp_t *, int);
static int we_check(const char *, int);
@@ -320,7 +320,7 @@
if (c == '\0' || level != 0)
return (WRDE_SYNTAX);
} else
- c = *--words;
+ --words;
break;
default:
break;
==== //depot/projects/scottl-camlock/src/lib/libc/rpc/clnt_raw.c#2 (text+ko) ====
@@ -34,7 +34,7 @@
static char *sccsid = "@(#)clnt_raw.c 2.2 88/08/01 4.0 RPCSRC";
#endif
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/lib/libc/rpc/clnt_raw.c,v 1.20 2006/02/27 22:10:58 deischen Exp $");
+__FBSDID("$FreeBSD: src/lib/libc/rpc/clnt_raw.c,v 1.21 2009/11/25 04:52:12 wollman Exp $");
/*
* clnt_raw.c
@@ -92,13 +92,13 @@
rpcprog_t prog;
rpcvers_t vers;
{
- struct clntraw_private *clp = clntraw_private;
+ struct clntraw_private *clp;
struct rpc_msg call_msg;
- XDR *xdrs = &clp->xdr_stream;
- CLIENT *client = &clp->client_object;
+ XDR *xdrs;
+ CLIENT *client;
mutex_lock(&clntraw_lock);
- if (clp == NULL) {
+ if ((clp = clntraw_private) == NULL) {
clp = (struct clntraw_private *)calloc(1, sizeof (*clp));
if (clp == NULL) {
mutex_unlock(&clntraw_lock);
@@ -110,6 +110,9 @@
clp->_raw_buf = __rpc_rawcombuf;
clntraw_private = clp;
}
+ xdrs = &clp->xdr_stream;
+ client = &clp->client_object;
+
/*
* pre-serialize the static part of the call msg and stash it away
*/
==== //depot/projects/scottl-camlock/src/lib/libc/rpc/getnetconfig.c#4 (text+ko) ====
@@ -34,7 +34,7 @@
static char sccsid[] = "@(#)getnetconfig.c 1.12 91/12/19 SMI";
#endif
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/lib/libc/rpc/getnetconfig.c,v 1.16 2009/06/24 23:17:16 delphij Exp $");
+__FBSDID("$FreeBSD: src/lib/libc/rpc/getnetconfig.c,v 1.17 2009/11/25 04:45:45 wollman Exp $");
/*
* Copyright (c) 1989 by Sun Microsystems, Inc.
@@ -412,13 +412,13 @@
* Noone needs these entries anymore, then frees them.
* Make sure all info in netconfig_info structure has been reinitialized.
*/
- q = p = ni.head;
+ q = ni.head;
ni.eof = ni.ref = 0;
ni.head = NULL;
ni.tail = NULL;
mutex_unlock(&ni_lock);
- while (q) {
+ while (q != NULL) {
p = q->next;
if (q->ncp->nc_lookups != NULL) free(q->ncp->nc_lookups);
free(q->ncp);
==== //depot/projects/scottl-camlock/src/lib/libc/rpc/getrpcent.c#3 (text+ko) ====
@@ -34,7 +34,7 @@
static char *sccsid = "@(#)getrpcent.c 1.14 91/03/11 Copyr 1984 Sun Micro";
#endif
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/lib/libc/rpc/getrpcent.c,v 1.16 2007/05/17 03:34:33 jon Exp $");
+__FBSDID("$FreeBSD: src/lib/libc/rpc/getrpcent.c,v 1.17 2009/11/25 04:53:38 wollman Exp $");
/*
* Copyright (c) 1984 by Sun Microsystems, Inc.
@@ -698,7 +698,7 @@
return (NS_RETURN);
}
- memcpy(&new_rpc, rpc, sizeof(struct rpcent));
+ new_rpc = *rpc;
*buffer_size = desired_size;
memset(buffer, 0, desired_size);
==== //depot/projects/scottl-camlock/src/lib/libc/rpc/key_call.c#2 (text+ko) ====
@@ -32,7 +32,7 @@
#ident "@(#)key_call.c 1.25 94/04/24 SMI"
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/lib/libc/rpc/key_call.c,v 1.16 2006/02/27 22:10:59 deischen Exp $");
+__FBSDID("$FreeBSD: src/lib/libc/rpc/key_call.c,v 1.17 2009/11/25 04:45:45 wollman Exp $");
/*
* key_call.c, Interface to keyserver
@@ -302,7 +302,7 @@
void *localhandle;
struct netconfig *nconf;
struct netconfig *tpconf;
- struct key_call_private *kcp = key_call_private_main;
+ struct key_call_private *kcp;
struct timeval wait_time;
struct utsname u;
int main_thread;
==== //depot/projects/scottl-camlock/src/lib/libc/rpc/svc_raw.c#3 (text+ko) ====
@@ -38,7 +38,7 @@
static char sccsid[] = "@(#)svc_raw.c 1.25 89/01/31 Copyr 1984 Sun Micro";
#endif
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/lib/libc/rpc/svc_raw.c,v 1.16 2008/08/06 14:02:05 dfr Exp $");
+__FBSDID("$FreeBSD: src/lib/libc/rpc/svc_raw.c,v 1.17 2009/11/25 04:49:41 wollman Exp $");
/*
* svc_raw.c, This a toy for simple testing and timing.
@@ -176,9 +176,8 @@
msg->acpted_rply.ar_results.proc = (xdrproc_t) xdr_void;
msg->acpted_rply.ar_results.where = NULL;
- if (!xdr_replymsg(xdrs, msg) ||
- !SVCAUTH_WRAP(&SVC_AUTH(xprt), xdrs, xdr_proc, xdr_where))
- stat = FALSE;
+ stat = xdr_replymsg(xdrs, msg) &&
+ SVCAUTH_WRAP(&SVC_AUTH(xprt), xdrs, xdr_proc, xdr_where);
} else {
stat = xdr_replymsg(xdrs, msg);
}
==== //depot/projects/scottl-camlock/src/lib/libc/stdio/fgetws.c#3 (text+ko) ====
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/lib/libc/stdio/fgetws.c,v 1.7 2008/04/17 22:17:53 jhb Exp $");
+__FBSDID("$FreeBSD: src/lib/libc/stdio/fgetws.c,v 1.8 2009/11/25 04:45:45 wollman Exp $");
#include "namespace.h"
#include <errno.h>
@@ -89,7 +89,7 @@
if (!__mbsinit(&fp->_mbstate))
/* Incomplete character */
goto error;
- *wsp++ = L'\0';
+ *wsp = L'\0';
FUNLOCKFILE(fp);
return (ws);
==== //depot/projects/scottl-camlock/src/lib/libc/stdio/fvwrite.c#2 (text+ko) ====
@@ -34,7 +34,7 @@
static char sccsid[] = "@(#)fvwrite.c 8.1 (Berkeley) 6/4/93";
#endif /* LIBC_SCCS and not lint */
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/lib/libc/stdio/fvwrite.c,v 1.18 2007/01/09 00:28:06 imp Exp $");
+__FBSDID("$FreeBSD: src/lib/libc/stdio/fvwrite.c,v 1.19 2009/11/25 04:21:42 wollman Exp $");
#include <stdio.h>
#include <stdlib.h>
@@ -60,7 +60,7 @@
char *nl;
int nlknown, nldist;
- if ((len = uio->uio_resid) == 0)
+ if (uio->uio_resid == 0)
return (0);
/* make sure we can write */
if (prepwrite(fp) != 0)
==== //depot/projects/scottl-camlock/src/lib/libc/stdio/vfwprintf.c#3 (text+ko) ====
@@ -36,7 +36,7 @@
#endif /* LIBC_SCCS and not lint */
#endif
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/lib/libc/stdio/vfwprintf.c,v 1.41 2009/02/28 06:06:57 das Exp $");
+__FBSDID("$FreeBSD: src/lib/libc/stdio/vfwprintf.c,v 1.42 2009/11/25 04:27:55 wollman Exp $");
/*
* Actual wprintf innards.
@@ -293,7 +293,7 @@
* number of characters to print.
*/
p = mbsarg;
- insize = nchars = 0;
+ insize = nchars = nconv = 0;
mbs = initial_mbs;
while (nchars != (size_t)prec) {
nconv = mbrlen(p, MB_CUR_MAX, &mbs);
==== //depot/projects/scottl-camlock/src/lib/libc/stdio/xprintf_time.c#2 (text+ko) ====
@@ -30,7 +30,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $FreeBSD: src/lib/libc/stdio/xprintf_time.c,v 1.3 2006/02/04 14:35:01 phk Exp $
+ * $FreeBSD: src/lib/libc/stdio/xprintf_time.c,v 1.4 2009/11/25 04:35:54 wollman Exp $
*/
#include <namespace.h>
#include <stdio.h>
@@ -64,7 +64,6 @@
intmax_t t, tx;
int i, prec, nsec;
- prec = 0;
if (pi->is_long) {
tv = *((struct timeval **)arg[0]);
t = tv->tv_sec;
@@ -78,6 +77,8 @@
} else {
tp = *((time_t **)arg[0]);
t = *tp;
+ nsec = 0;
+ prec = 0;
}
p = buf;
==== //depot/projects/scottl-camlock/src/lib/libc/yp/yplib.c#3 (text+ko) ====
@@ -29,7 +29,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/lib/libc/yp/yplib.c,v 1.51 2007/07/24 13:06:08 simon Exp $");
+__FBSDID("$FreeBSD: src/lib/libc/yp/yplib.c,v 1.52 2009/11/25 04:45:45 wollman Exp $");
#include "namespace.h"
#include "reentrant.h"
@@ -241,7 +241,7 @@
ypmatch_cache_lookup(struct dom_binding *ypdb, char *map, keydat *key,
valdat *val)
{
- struct ypmatch_ent *c = ypdb->cache;
+ struct ypmatch_ent *c;
ypmatch_cache_expire(ypdb);
==== //depot/projects/scottl-camlock/src/lib/libfetch/ftp.c#3 (text+ko) ====
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/lib/libfetch/ftp.c,v 1.102 2008/02/08 09:48:48 des Exp $");
+__FBSDID("$FreeBSD: src/lib/libfetch/ftp.c,v 1.103 2009/11/25 14:57:07 attilio Exp $");
/*
* Portions of this code were taken from or based on ftpio.c:
@@ -1122,17 +1122,19 @@
/* change directory */
if (ftp_cwd(conn, url->doc) == -1)
- return (NULL);
+ goto errsock;
/* stat file */
if (us && ftp_stat(conn, url->doc, us) == -1
&& fetchLastErrCode != FETCH_PROTO
&& fetchLastErrCode != FETCH_UNAVAIL)
- return (NULL);
+ goto errsock;
/* just a stat */
- if (strcmp(op, "STAT") == 0)
+ if (strcmp(op, "STAT") == 0) {
+ ftp_disconnect(conn);
return (FILE *)1; /* bogus return value */
+ }
if (strcmp(op, "STOR") == 0 || strcmp(op, "APPE") == 0)
oflag = O_WRONLY;
else
@@ -1140,6 +1142,10 @@
/* initiate the transfer */
return (ftp_transfer(conn, op, url->doc, oflag, url->offset, flags));
+
+errsock:
+ ftp_disconnect(conn);
+ return (NULL);
}
/*
==== //depot/projects/scottl-camlock/src/lib/libtacplus/taclib.c#2 (text+ko) ====
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/lib/libtacplus/taclib.c,v 1.6 2005/02/14 17:42:56 stefanf Exp $");
+__FBSDID("$FreeBSD: src/lib/libtacplus/taclib.c,v 1.7 2009/11/25 14:59:28 attilio Exp $");
#include <sys/types.h>
#include <sys/socket.h>
@@ -1263,8 +1263,13 @@
* h->srvr_avs[0] = "foobie=var1"
* h->srvr_avs[1] = "foo=var2"
* is handled.
+ *
+ * Note that for empty string attribute values a
+ * 0-length string is returned in order to distinguish
+ * against unset values.
+ * dump_str() will handle srvr.len == 0 correctly.
*/
- if (found_seperator == 1 && ch != end) {
+ if (found_seperator == 1) {
srvr.len = end - ch;
srvr.data = ch;
return dup_str(h, &srvr, NULL);
==== //depot/projects/scottl-camlock/src/sbin/ifconfig/ifconfig.c#6 (text+ko) ====
@@ -38,7 +38,7 @@
static char sccsid[] = "@(#)ifconfig.c 8.2 (Berkeley) 2/16/94";
#endif
static const char rcsid[] =
- "$FreeBSD: src/sbin/ifconfig/ifconfig.c,v 1.148 2009/11/12 19:02:10 delphij Exp $";
+ "$FreeBSD: src/sbin/ifconfig/ifconfig.c,v 1.149 2009/11/25 00:00:57 will Exp $";
#endif /* not lint */
#include <sys/param.h>
@@ -147,7 +147,7 @@
struct ifaddrs *ifap, *ifa;
struct ifreq paifr;
const struct sockaddr_dl *sdl;
- char options[1024], *cp;
+ char options[1024], *cp, *namecp = NULL;
const char *ifname;
struct option *p;
size_t iflen;
@@ -294,7 +294,7 @@
sdl = (const struct sockaddr_dl *) ifa->ifa_addr;
else
sdl = NULL;
- if (cp != NULL && strcmp(cp, ifa->ifa_name) == 0)
+ if (cp != NULL && strcmp(cp, ifa->ifa_name) == 0 && !namesonly)
continue;
iflen = strlcpy(name, ifa->ifa_name, sizeof(name));
if (iflen >= sizeof(name)) {
@@ -308,16 +308,32 @@
continue;
if (uponly && (ifa->ifa_flags & IFF_UP) == 0)
continue;
- ifindex++;
/*
* Are we just listing the interfaces?
*/
if (namesonly) {
+ if (namecp == cp)
+ continue;
+ if (afp != NULL) {
+ /* special case for "ether" address family */
+ if (!strcmp(afp->af_name, "ether")) {
+ if (sdl == NULL ||
+ sdl->sdl_type != IFT_ETHER ||
+ sdl->sdl_alen != ETHER_ADDR_LEN)
+ continue;
+ } else {
+ if (ifa->ifa_addr->sa_family != afp->af_af)
+ continue;
+ }
+ }
+ namecp = cp;
+ ifindex++;
if (ifindex > 1)
printf(" ");
fputs(name, stdout);
continue;
}
+ ifindex++;
if (argc > 0)
ifconfig(argc, argv, 0, afp);
==== //depot/projects/scottl-camlock/src/share/man/man4/ada.4#2 (text+ko) ====
@@ -23,7 +23,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" $FreeBSD: src/share/man/man4/ada.4,v 1.1 2009/11/19 16:19:05 mav Exp $
+.\" $FreeBSD: src/share/man/man4/ada.4,v 1.2 2009/11/24 13:44:53 brueffer Exp $
.\"
.Dd November 19, 2009
.Dt ADA 4
@@ -36,12 +36,12 @@
.Sh DESCRIPTION
The
.Nm
-driver provides support for direct access devices, implementing
+driver provides support for direct access devices, implementing the
.Tn ATA
command protocol, that are attached to the system through a host adapter
-supported by CAM subsystem.
+supported by the CAM subsystem.
.Pp
-Host adapter must also be separately configured into the system before a
+The host adapter must also be separately configured into the system before an
.Tn ATA
direct access device can be configured.
.Sh COMMAND QUEUING
@@ -52,12 +52,12 @@
defines two types of queueing:
.Tn TCQ (Tagged Command Queueing, PATA legacy)
and
-.Tn NCQ (Native Command Queueing, SATA).
+.Tn NCQ (Native Command Queueing, SATA) .
The
.Nm
-device driver takes full advantage of the NCQ, when supported.
-To ensure that transactions to distant portions of the media,
-which may be deferred indefinitely by servicing requests nearer the current
+device driver takes full advantage of NCQ, when supported.
+To ensure that transactions to distant parts of the media,
+which may be deferred indefinitely by servicing requests closer to the current
head position, are completed in a timely fashion, an ordered
transaction is sent every 7 seconds during continuous device operation.
.Sh CACHE EFFECTS
@@ -84,8 +84,8 @@
The effect of a loss of write transactions on
a file system is non-deterministic and can cause corruption.
Most
-devices age write transactions to limit vulnerability to a few transactions
-recently reported as complete, but it is none-the-less recommended that
+devices age write transactions to limit the vulnerability to a few transactions
+recently reported as complete, but it is nonetheless recommended that
systems with write cache enabled devices reside on an Uninterruptible
Power Supply (UPS).
The
@@ -125,14 +125,14 @@
ATA device nodes
.El
.Sh SEE ALSO
+.Xr ad 4 ,
.Xr ahci 4 ,
-.Xr siis 4 ,
-.Xr ad 4
-.Xr da 4
+.Xr da 4 ,
+.Xr siis 4
.Sh HISTORY
The
.Nm
driver first appeared in
.Fx 8.0 .
.Sh AUTHORS
-.An Alexander Motin Aq mav at FreeBSD.org .
+.An Alexander Motin Aq mav at FreeBSD.org
==== //depot/projects/scottl-camlock/src/sys/boot/i386/libi386/elf32_freebsd.c#5 (text+ko) ====
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/boot/i386/libi386/elf32_freebsd.c,v 1.17 2006/11/02 17:28:38 ru Exp $");
+__FBSDID("$FreeBSD: src/sys/boot/i386/libi386/elf32_freebsd.c,v 1.18 2009/11/25 16:36:07 trasz Exp $");
#include <sys/param.h>
#include <sys/exec.h>
@@ -59,7 +59,7 @@
int boothowto, err, bootdev;
if ((md = file_findmetadata(fp, MODINFOMD_ELFHDR)) == NULL)
- return(EFTYPE); /* XXX actually EFUCKUP */
+ return(EFTYPE);
ehdr = (Elf_Ehdr *)&(md->md_data);
err = bi_load32(fp->f_args, &boothowto, &bootdev, &bootinfop, &modulep, &kernend);
==== //depot/projects/scottl-camlock/src/sys/boot/i386/libi386/elf64_freebsd.c#4 (text+ko) ====
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/boot/i386/libi386/elf64_freebsd.c,v 1.17 2006/10/26 20:04:22 ru Exp $");
+__FBSDID("$FreeBSD: src/sys/boot/i386/libi386/elf64_freebsd.c,v 1.18 2009/11/25 16:36:07 trasz Exp $");
#define __ELF_WORD_SIZE 64
#include <sys/param.h>
@@ -78,7 +78,7 @@
int i;
if ((md = file_findmetadata(fp, MODINFOMD_ELFHDR)) == NULL)
- return(EFTYPE); /* XXX actually EFUCKUP */
+ return(EFTYPE);
ehdr = (Elf_Ehdr *)&(md->md_data);
err = bi_load64(fp->f_args, &modulep, &kernend);
==== //depot/projects/scottl-camlock/src/sys/cam/ata/ata_xpt.c#62 (text+ko) ====
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/cam/ata/ata_xpt.c,v 1.15 2009/11/24 12:47:58 mav Exp $");
+__FBSDID("$FreeBSD: src/sys/cam/ata/ata_xpt.c,v 1.16 2009/11/25 14:24:14 mav Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@@ -347,7 +347,7 @@
if (cts.xport_specific.ata.valid & CTS_ATA_VALID_MODE)
mode = cts.xport_specific.ata.mode;
} else {
- if (cts.xport_specific.ata.valid & CTS_SATA_VALID_MODE)
+ if (cts.xport_specific.sata.valid & CTS_SATA_VALID_MODE)
mode = cts.xport_specific.sata.mode;
}
negotiate:
==== //depot/projects/scottl-camlock/src/sys/dev/an/if_an.c#13 (text+ko) ====
@@ -38,7 +38,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/an/if_an.c,v 1.93 2009/11/10 22:04:19 jhb Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/an/if_an.c,v 1.95 2009/11/24 16:57:35 jhb Exp $");
/*
* The Aironet 4500/4800 series cards come in PCMCIA, ISA and PCI form.
@@ -349,9 +349,6 @@
* to be able to issue commands and call some of the
* other routines.
*/
- sc->an_bhandle = rman_get_bushandle(sc->port_res);
- sc->an_btag = rman_get_bustag(sc->port_res);
-
ssid.an_len = sizeof(ssid);
ssid.an_type = AN_RID_SSIDLIST;
@@ -2803,7 +2800,7 @@
tx_frame_802_3.an_tx_802_3_payload_len,
(caddr_t)&sc->an_txbuf);
- txcontrol = AN_TXCTL_8023;
+ txcontrol = AN_TXCTL_8023 | AN_TXCTL_HW(sc->mpi350);
/* write the txcontrol only */
an_write_data(sc, id, 0x08, (caddr_t)&txcontrol,
sizeof(txcontrol));
@@ -2866,7 +2863,7 @@
tx_frame_802_3.an_tx_802_3_payload_len,
(caddr_t)&sc->an_txbuf);
- txcontrol = AN_TXCTL_8023;
+ txcontrol = AN_TXCTL_8023 | AN_TXCTL_HW(sc->mpi350);
/* write the txcontrol only */
bcopy((caddr_t)&txcontrol, &buf[0x08],
sizeof(txcontrol));
@@ -2888,7 +2885,7 @@
tx_frame_802_3.an_tx_802_3_payload_len;
an_tx_desc.an_phys
= sc->an_tx_buffer[idx].an_dma_paddr;
- for (i = 0; i < sizeof(an_tx_desc) / 4 ; i++) {
+ for (i = sizeof(an_tx_desc) / 4 - 1; i >= 0; i--) {
CSR_MEM_AUX_WRITE_4(sc, AN_TX_DESC_OFFSET
/* zero for now */
+ (0 * sizeof(an_tx_desc))
==== //depot/projects/scottl-camlock/src/sys/dev/an/if_an_isa.c#6 (text+ko) ====
@@ -38,7 +38,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/an/if_an_isa.c,v 1.18 2009/11/06 18:28:13 jhb Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/an/if_an_isa.c,v 1.19 2009/11/24 16:54:54 jhb Exp $");
#include "opt_inet.h"
@@ -111,8 +111,6 @@
an_alloc_port(dev, sc->port_rid, 1);
an_alloc_irq(dev, sc->irq_rid, 0);
- sc->an_bhandle = rman_get_bushandle(sc->port_res);
- sc->an_btag = rman_get_bustag(sc->port_res);
sc->an_dev = dev;
error = an_attach(sc, flags);
==== //depot/projects/scottl-camlock/src/sys/dev/an/if_an_pccard.c#8 (text+ko) ====
@@ -38,7 +38,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/an/if_an_pccard.c,v 1.32 2009/11/06 18:28:13 jhb Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/an/if_an_pccard.c,v 1.33 2009/11/24 16:54:54 jhb Exp $");
#include "opt_inet.h"
@@ -141,8 +141,6 @@
an_alloc_irq(dev, sc->irq_rid, 0);
- sc->an_bhandle = rman_get_bushandle(sc->port_res);
- sc->an_btag = rman_get_bustag(sc->port_res);
sc->an_dev = dev;
error = an_attach(sc, flags);
==== //depot/projects/scottl-camlock/src/sys/dev/an/if_an_pci.c#6 (text+ko) ====
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/an/if_an_pci.c,v 1.31 2009/11/06 18:28:13 jhb Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/an/if_an_pci.c,v 1.32 2009/11/24 16:54:54 jhb Exp $");
/*
* This is a PCI shim for the Aironet PC4500/4800 wireless network
@@ -175,9 +175,6 @@
goto fail;
}
- sc->an_btag = rman_get_bustag(sc->port_res);
- sc->an_bhandle = rman_get_bushandle(sc->port_res);
-
/* Allocate memory for MPI350 */
if (sc->mpi350) {
/* Allocate memory */
@@ -187,8 +184,6 @@
device_printf(dev, "couldn't map memory\n");
goto fail;
}
- sc->an_mem_btag = rman_get_bustag(sc->mem_res);
- sc->an_mem_bhandle = rman_get_bushandle(sc->mem_res);
/* Allocate aux. memory */
sc->mem_aux_rid = PCIR_BAR(2);
@@ -198,8 +193,6 @@
device_printf(dev, "couldn't map aux memory\n");
goto fail;
}
- sc->an_mem_aux_btag = rman_get_bustag(sc->mem_aux_res);
- sc->an_mem_aux_bhandle = rman_get_bushandle(sc->mem_aux_res);
/* Allocate DMA region */
error = bus_dma_tag_create(NULL, /* parent */
==== //depot/projects/scottl-camlock/src/sys/dev/an/if_anreg.h#8 (text+ko) ====
@@ -29,7 +29,7 @@
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*
- * $FreeBSD: src/sys/dev/an/if_anreg.h,v 1.29 2009/11/10 22:04:19 jhb Exp $
+ * $FreeBSD: src/sys/dev/an/if_anreg.h,v 1.31 2009/11/24 16:57:35 jhb Exp $
*/
#define AN_TIMEOUT 65536
@@ -45,47 +45,39 @@
/*
* register space access macros
*/
-#define CSR_WRITE_2(sc, reg, val) \
- bus_space_write_2(sc->an_btag, sc->an_bhandle, reg, val)
+#define CSR_WRITE_2(sc, reg, val) bus_write_2(sc->port_res, reg, val)
-#define CSR_READ_2(sc, reg) \
- bus_space_read_2(sc->an_btag, sc->an_bhandle, reg)
+#define CSR_READ_2(sc, reg) bus_read_2(sc->port_res, reg)
-#define CSR_WRITE_1(sc, reg, val) \
- bus_space_write_1(sc->an_btag, sc->an_bhandle, reg, val)
+#define CSR_WRITE_1(sc, reg, val) bus_write_1(sc->port_res, reg, val)
-#define CSR_READ_1(sc, reg) \
- bus_space_read_1(sc->an_btag, sc->an_bhandle, reg)
+#define CSR_READ_1(sc, reg) bus_read_1(sc->port_res, reg)
/*
* memory space access macros
*/
-#define CSR_MEM_WRITE_2(sc, reg, val) \
- bus_space_write_2(sc->an_mem_btag, sc->an_mem_bhandle, reg, val)
+#define CSR_MEM_WRITE_2(sc, reg, val) bus_write_2(sc->mem_res, reg, val)
-#define CSR_MEM_READ_2(sc, reg) \
- bus_space_read_2(sc->an_mem_btag, sc->an_mem_bhandle, reg)
+#define CSR_MEM_READ_2(sc, reg) bus_read_2(sc->mem_res, reg)
>>> TRUNCATED FOR MAIL (1000 lines) <<<
More information about the p4-projects
mailing list