Date: Tue, 15 Jun 2004 01:41:27 GMT From: Peter Wemm <peter@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 54975 for review Message-ID: <200406150141.i5F1fRLh087171@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=54975 Change 54975 by peter@peter_daintree on 2004/06/15 01:40:33 IFC @54974 Affected files ... .. //depot/projects/hammer/lib/libc/sys/read.2#5 integrate .. //depot/projects/hammer/libexec/talkd/talkd.c#4 integrate .. //depot/projects/hammer/sbin/routed/table.c#5 integrate .. //depot/projects/hammer/share/man/man4/Makefile#41 integrate .. //depot/projects/hammer/share/man/man4/ip.4#9 integrate .. //depot/projects/hammer/share/misc/pci_vendors#9 integrate .. //depot/projects/hammer/sys/kern/link_elf_obj.c#40 integrate .. //depot/projects/hammer/sys/vm/vm_contig.c#17 integrate .. //depot/projects/hammer/usr.bin/tar/bsdtar.c#11 integrate Differences ... ==== //depot/projects/hammer/lib/libc/sys/read.2#5 (text+ko) ==== @@ -30,7 +30,7 @@ .\" SUCH DAMAGE. .\" .\" @(#)read.2 8.4 (Berkeley) 2/26/94 -.\" $FreeBSD: src/lib/libc/sys/read.2,v 1.22 2004/01/25 06:24:08 ache Exp $ +.\" $FreeBSD: src/lib/libc/sys/read.2,v 1.23 2004/06/15 01:24:41 kbyanc Exp $ .\" .Dd February 26, 1994 .Dt READ 2 @@ -189,7 +189,8 @@ The .Fa iovcnt argument -was less than or equal to 0, or greater than 16. +was less than or equal to 0, or greater than +.Li IOV_MAX . .It Bq Er EINVAL One of the .Fa iov_len ==== //depot/projects/hammer/libexec/talkd/talkd.c#4 (text+ko) ==== @@ -42,7 +42,7 @@ static char sccsid[] = "@(#)talkd.c 8.1 (Berkeley) 6/4/93"; #endif static const char rcsid[] = - "$FreeBSD: src/libexec/talkd/talkd.c,v 1.15 2003/09/28 09:16:09 tjr Exp $"; + "$FreeBSD: src/libexec/talkd/talkd.c,v 1.17 2004/06/14 22:44:13 bms Exp $"; #endif /* not lint */ /* @@ -72,11 +72,10 @@ CTL_MSG request; CTL_RESPONSE response; -int sockt; int debug = 0; long lastmsgtime; -char hostname[MAXHOSTNAMELEN]; +char hostname[MAXHOSTNAMELEN]; #define TIMEOUT 30 #define MAXIDLE 120 @@ -110,7 +109,7 @@ signal(SIGALRM, timeout); alarm(TIMEOUT); for (;;) { - cc = recv(0, (char *)mp, sizeof (*mp), 0); + cc = recv(0, (char *)mp, sizeof(*mp), 0); if (cc != sizeof (*mp)) { if (cc < 0 && errno != EINTR) syslog(LOG_WARNING, "recv: %m"); @@ -122,8 +121,8 @@ ctl_addr.sa_len = sizeof(ctl_addr); process_request(mp, &response); /* can block here, is this what I want? */ - cc = sendto(sockt, (char *)&response, sizeof (response), 0, - &ctl_addr, sizeof (ctl_addr)); + cc = sendto(STDIN_FILENO, (char *)&response, + sizeof(response), 0, &ctl_addr, sizeof(ctl_addr)); if (cc != sizeof (response)) syslog(LOG_WARNING, "sendto: %m"); } ==== //depot/projects/hammer/sbin/routed/table.c#5 (text+ko) ==== @@ -26,7 +26,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sbin/routed/table.c,v 1.19 2004/04/09 19:58:37 markm Exp $ + * $FreeBSD: src/sbin/routed/table.c,v 1.20 2004/06/15 00:23:26 bms Exp $ */ #include "defs.h" @@ -34,12 +34,12 @@ #ifdef __NetBSD__ __RCSID("$NetBSD$"); #elif defined(__FreeBSD__) -__RCSID("$FreeBSD: src/sbin/routed/table.c,v 1.19 2004/04/09 19:58:37 markm Exp $"); +__RCSID("$FreeBSD: src/sbin/routed/table.c,v 1.20 2004/06/15 00:23:26 bms Exp $"); #else __RCSID("$Revision: 2.27 $"); #ident "$Revision: 2.27 $" #endif -#ident "$FreeBSD: src/sbin/routed/table.c,v 1.19 2004/04/09 19:58:37 markm Exp $" +#ident "$FreeBSD: src/sbin/routed/table.c,v 1.20 2004/06/15 00:23:26 bms Exp $" static struct rt_spare *rts_better(struct rt_entry *); static struct rt_spare rts_empty = {0,0,0,HOPCNT_INFINITY,0,0,0}; @@ -1110,10 +1110,10 @@ if (rtm->rtm_flags & RTF_LLINFO) continue; -#if defined(RTF_CLONED) && defined(__bsdi__) +#if defined(RTF_WASCLONED) && defined(__FreeBSD__) /* ignore cloned routes */ - if (rtm->rtm_flags & RTF_CLONED) + if (rtm->rtm_flags & RTF_WASCLONED) continue; #endif @@ -1267,8 +1267,8 @@ continue; } -#if defined(RTF_CLONED) && defined(__bsdi__) - if (m.r.rtm.rtm_flags & RTF_CLONED) { +#if defined(RTF_WASCLONED) && defined(__FreeBSD__) + if (m.r.rtm.rtm_flags & RTF_WASCLONED) { trace_act("ignore cloned %s", str); continue; } ==== //depot/projects/hammer/share/man/man4/Makefile#41 (text+ko) ==== @@ -1,5 +1,5 @@ # @(#)Makefile 8.1 (Berkeley) 6/18/93 -# $FreeBSD: src/share/man/man4/Makefile,v 1.269 2004/06/14 10:55:03 dfr Exp $ +# $FreeBSD: src/share/man/man4/Makefile,v 1.270 2004/06/15 01:18:56 bms Exp $ MAN= aac.4 \ acpi.4 \ @@ -368,6 +368,7 @@ MLINKS+=ipfirewall.4 ipaccounting.4 \ ipfirewall.4 ipacct.4 \ ipfirewall.4 ipfw.4 +MLINKS+=ip.4 rawip.4 MLINKS+=kue.4 if_kue.4 MLINKS+=lge.4 if_lge.4 MLINKS+=lo.4 loop.4 ==== //depot/projects/hammer/share/man/man4/ip.4#9 (text+ko) ==== @@ -30,9 +30,9 @@ .\" SUCH DAMAGE. .\" .\" @(#)ip.4 8.2 (Berkeley) 11/30/93 -.\" $FreeBSD: src/share/man/man4/ip.4,v 1.35 2004/04/22 08:49:51 silby Exp $ +.\" $FreeBSD: src/share/man/man4/ip.4,v 1.36 2004/06/15 01:08:09 bms Exp $ .\" -.Dd March 3, 2001 +.Dd June 14, 2004 .Dt IP 4 .Os .Sh NAME @@ -529,6 +529,14 @@ ip->ip_off = offset; .Ed .Pp +The ip_len and ip_off fields +.Em must be provided in host byte order . +All other fields must be provided in network byte order. +See +.Xr byteorder 4 +for more information on network byte order. +If the ip_id field is set to 0, then the kernel will choose an +appopriate value. If the header source address is set to .Dv INADDR_ANY , the kernel will choose an appropriate address. @@ -568,10 +576,24 @@ an option field was shorter than the minimum value or longer than the option buffer provided. .El +.Pp +The following errors may occur when attempting to send +.Tn IP +datagrams via a +.Dq raw socket +with the +.Em IP_HDRINCL +option set: +.Bl -tag -width Er +.It Bq Er EINVAL +The user-supplied ip_len field was not equal to the length of the datagram +written to the socket. +.El .Sh SEE ALSO .Xr getsockopt 2 , .Xr recv 2 , .Xr send 2 , +.Xr byteorder 4 , .Xr icmp 4 , .Xr inet 4 , .Xr intro 4 ==== //depot/projects/hammer/share/misc/pci_vendors#9 (text+ko) ==== @@ -1,4 +1,4 @@ -; $FreeBSD: src/share/misc/pci_vendors,v 1.26 2003/10/29 11:14:58 sheldonh Exp $ +; $FreeBSD: src/share/misc/pci_vendors,v 1.28 2004/06/15 00:38:12 bms Exp $ ; ; Automatically generated by src/tools/tools/pciid/mk_pci_vendors.pl ; (with the -l option), using the following source lists: @@ -291,6 +291,7 @@ 5655 Mach 64 VT3 5656 Mach64 VT4 PCI (PQFP Package) 5964 Radeon 9200 Series + 5941 Radeon 9200 Series - Secondary 5D44 Radeon 9200 Series - Secondary 700F A3/U1 PCI to AGP Bridge 7010 RS200 PCI to AGP Bridge @@ -976,6 +977,7 @@ 8026 TSB43AB21 1394a-2000 OHCI PHY/link-layer Controller 8027 PCI4451 OHCI-Lynx IEEE-1394 FireWire Adapter 8400 802.11b+ 22Mbps Wireless Adapter + 9066 TNETW1130 802.11g+ 54/108 Mbps Wireless Adapter A001 TDC1570 64-Bit PCI ATM Interface A100 TDC1561 32-Bit PCI ATM Interface A102 TNETA1575 HyperSAR Plus w/PCI Host interface & UTOPIA Interface ==== //depot/projects/hammer/sys/kern/link_elf_obj.c#40 (text+ko) ==== @@ -26,7 +26,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/kern/link_elf_obj.c,v 1.81 2004/05/18 05:15:43 peter Exp $"); +__FBSDID("$FreeBSD: src/sys/kern/link_elf_obj.c,v 1.83 2004/06/15 01:35:57 peter Exp $"); #include "opt_ddb.h" #include "opt_mac.h" ==== //depot/projects/hammer/sys/vm/vm_contig.c#17 (text+ko) ==== @@ -60,7 +60,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/vm/vm_contig.c,v 1.34 2004/04/06 20:15:36 imp Exp $"); +__FBSDID("$FreeBSD: src/sys/vm/vm_contig.c,v 1.35 2004/06/15 01:02:00 green Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -119,7 +119,7 @@ } else if (object->type == OBJT_SWAP || object->type == OBJT_DEFAULT) { m_tmp = m; - vm_pageout_flush(&m_tmp, 1, 0); + vm_pageout_flush(&m_tmp, 1, VM_PAGER_PUT_SYNC); VM_OBJECT_UNLOCK(object); return (TRUE); } @@ -152,6 +152,7 @@ vm_object_t object; vm_offset_t addr, tmp_addr; int pass, pqtype; + int inactl, actl, inactmax, actmax; vm_page_t pga = vm_page_array; size = round_page(size); @@ -163,7 +164,7 @@ panic("contigmalloc1: boundary must be a power of 2"); start = 0; - for (pass = 0; pass <= 1; pass++) { + for (pass = 2; pass >= 0; pass--) { vm_page_lock_queues(); again0: mtx_lock_spin(&vm_page_queue_free_mtx); @@ -188,11 +189,29 @@ if ((i == cnt.v_page_count) || ((VM_PAGE_TO_PHYS(&pga[i]) + size) > high)) { mtx_unlock_spin(&vm_page_queue_free_mtx); + /* + * Instead of racing to empty the inactive/active + * queues, give up, even with more left to free, + * if we try more than the initial amount of pages. + * + * There's no point attempting this on the last pass. + */ + if (pass > 0) { + inactl = actl = 0; + inactmax = vm_page_queues[PQ_INACTIVE].lcnt; + actmax = vm_page_queues[PQ_ACTIVE].lcnt; again1: - if (vm_contig_launder(PQ_INACTIVE)) - goto again1; - if (vm_contig_launder(PQ_ACTIVE)) - goto again1; + if (inactl < inactmax && + vm_contig_launder(PQ_INACTIVE)) { + inactl++; + goto again1; + } + if (actl < actmax && + vm_contig_launder(PQ_ACTIVE)) { + actl++; + goto again1; + } + } vm_page_unlock_queues(); continue; } ==== //depot/projects/hammer/usr.bin/tar/bsdtar.c#11 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include "bsdtar_platform.h" -__FBSDID("$FreeBSD: src/usr.bin/tar/bsdtar.c,v 1.24 2004/06/11 01:35:56 kientzle Exp $"); +__FBSDID("$FreeBSD: src/usr.bin/tar/bsdtar.c,v 1.26 2004/06/15 00:28:34 kientzle Exp $"); #include <sys/param.h> #include <sys/stat.h> @@ -75,6 +75,7 @@ #define OPTION_NODUMP 3 #define OPTION_HELP 4 #define OPTION_INCLUDE 5 +#define OPTION_ONE_FILE_SYSTEM 5 const struct option tar_longopts[] = { { "absolute-paths", no_argument, NULL, 'P' }, @@ -104,6 +105,7 @@ { "nodump", no_argument, NULL, OPTION_NODUMP }, { "norecurse", no_argument, NULL, 'n' }, { "no-same-owner", no_argument, NULL, 'o' }, + { "one-file-system", no_argument, NULL, OPTION_ONE_FILE_SYSTEM }, { "preserve-permissions", no_argument, NULL, 'p' }, { "read-full-blocks", no_argument, NULL, 'B' }, { "same-permissions", no_argument, NULL, 'p' }, @@ -228,6 +230,7 @@ #ifdef HAVE_GETOPT_LONG case OPTION_HELP: long_help(bsdtar); + exit(0); break; #endif #ifdef HAVE_GETOPT_LONG @@ -248,7 +251,7 @@ case 'L': /* BSD convention */ bsdtar->symlink_mode = 'L'; break; - case 'l': /* SUSv2 */ + case 'l': /* SUSv2; note that GNU -l conflicts */ bsdtar->option_warn_links = 1; break; case 'm': /* SUSv2 */ @@ -265,9 +268,14 @@ case 'O': /* GNU tar */ bsdtar->option_stdout = 1; break; - case 'o': /* SUSv2 */ + case 'o': /* SUSv2; note that GNU -o conflicts */ bsdtar->extract_flags &= ~ARCHIVE_EXTRACT_OWNER; break; +#if HAVE_GETOPT_LONG + case OPTION_ONE_FILE_SYSTEM: /* -l in GNU tar */ + bsdtar->option_dont_traverse_mounts = 1; + break; +#endif #if 0 /* * The common BSD -P option is not necessary, since @@ -321,9 +329,6 @@ case 'w': /* SUSv2 */ bsdtar->option_interactive = 1; break; - case 'X': /* -l in GNU tar */ - bsdtar->option_dont_traverse_mounts = 1; - break; case 'x': /* SUSv2 */ if (mode != '\0') bsdtar_errc(bsdtar, 1, 0, @@ -362,7 +367,7 @@ */ if (mode == '\0' && possible_help_request) { long_help(bsdtar); - exit(1); + exit(0); } if (mode == '\0') @@ -519,14 +524,14 @@ p = bsdtar->progname; - printf("Basic Usage:\n"); - printf(" List: %s -tf [archive-filename]\n", p); - printf(" Extract: %s -xf [archive-filename]\n", p); - printf(" Create: %s -cf [archive-filename] [filenames...]\n", p); + fprintf(stderr, "Usage:\n"); + fprintf(stderr, " List: %s -tf <archive-filename>\n", p); + fprintf(stderr, " Extract: %s -xf <archive-filename>\n", p); + fprintf(stderr, " Create: %s -cf <archive-filename> [filenames...]\n", p); #ifdef HAVE_GETOPT_LONG - printf(" Help: %s --help\n", p); + fprintf(stderr, " Help: %s --help\n", p); #else - printf(" Help: %s -h\n", p); + fprintf(stderr, " Help: %s -h\n", p); #endif exit(1); } @@ -543,7 +548,9 @@ " <file>, <dir> add these items to archive\n", " -z, -j Compress archive with gzip/bzip2\n", " -F {ustar|pax|cpio|shar} Select archive format\n", +#ifdef HAVE_GETOPT_LONG " --exclude <pattern> Skip files that match pattern\n", +#endif " C=<dir> Change to <dir> before processing remaining files\n", " @<archive> Add entries from <archive> to output\n", "List: %p -t [options] [<patterns>]\n", @@ -558,6 +565,16 @@ }; +/* + * Note that the word 'bsdtar' will always appear in the first line + * of output. + * + * In particular, /bin/sh scripts that need to test for the presence + * of bsdtar can use the following template: + * + * if (tar --help 2>&1 | grep bsdtar >/dev/null 2>&1 ) then \ + * echo bsdtar; else echo not bsdtar; fi + */ static void long_help(struct bsdtar *bsdtar) { @@ -567,7 +584,13 @@ prog = bsdtar->progname; - printf("%s: manipulate archive files\n", prog); + fflush(stderr); + if (strcmp(prog,"bsdtar")!=0) + p = "(bsdtar)"; + else + p = ""; + + fprintf(stderr, "%s%s: manipulate archive files\n", prog, p); for (msg = long_help_msg; *msg != NULL; msg++) { for (p = *msg; p != NULL; p++) { @@ -575,7 +598,7 @@ break; else if (*p == '%') { if (p[1] == 'p') { - fputs(prog, stdout); + fputs(prog, stderr); p++; } else putchar('%'); @@ -583,4 +606,5 @@ putchar(*p); } } + fflush(stderr); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200406150141.i5F1fRLh087171>