From owner-svn-src-stable-7@FreeBSD.ORG Thu Jun 17 20:10:42 2010 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2AF37106564A; Thu, 17 Jun 2010 20:10:42 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 19C2C8FC13; Thu, 17 Jun 2010 20:10:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o5HKAfEb036645; Thu, 17 Jun 2010 20:10:41 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o5HKAfOc036643; Thu, 17 Jun 2010 20:10:41 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201006172010.o5HKAfOc036643@svn.freebsd.org> From: Marius Strobl Date: Thu, 17 Jun 2010 20:10:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209270 - stable/7/sys/sparc64/sparc64 X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Jun 2010 20:10:42 -0000 Author: marius Date: Thu Jun 17 20:10:41 2010 New Revision: 209270 URL: http://svn.freebsd.org/changeset/base/209270 Log: MFC: r209138 Update a branch missed in r207537 (commited to stable/7 in r207891). Modified: stable/7/sys/sparc64/sparc64/mp_locore.S Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/sparc64/sparc64/mp_locore.S ============================================================================== --- stable/7/sys/sparc64/sparc64/mp_locore.S Thu Jun 17 20:10:39 2010 (r209269) +++ stable/7/sys/sparc64/sparc64/mp_locore.S Thu Jun 17 20:10:41 2010 (r209270) @@ -207,7 +207,7 @@ ENTRY(mp_startup) bl %icc, 2f nop cmp %l1, CPU_IMPL_ULTRASPARCIII - bl %icc, 3f + bl %icc, 4f nop 2: mov CPU_STICKSYNC, %l2 membar #StoreLoad From owner-svn-src-stable-7@FreeBSD.ORG Thu Jun 17 20:38:19 2010 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2BD3B1065679; Thu, 17 Jun 2010 20:38:19 +0000 (UTC) (envelope-from mlaier@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 010568FC0C; Thu, 17 Jun 2010 20:38:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o5HKcIZM042797; Thu, 17 Jun 2010 20:38:18 GMT (envelope-from mlaier@svn.freebsd.org) Received: (from mlaier@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o5HKcI1J042794; Thu, 17 Jun 2010 20:38:18 GMT (envelope-from mlaier@svn.freebsd.org) Message-Id: <201006172038.o5HKcI1J042794@svn.freebsd.org> From: Max Laier Date: Thu, 17 Jun 2010 20:38:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209271 - stable/7/usr.sbin/arp X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Jun 2010 20:38:19 -0000 Author: mlaier Date: Thu Jun 17 20:38:18 2010 New Revision: 209271 URL: http://svn.freebsd.org/changeset/base/209271 Log: MFC r209063: Cache the last result from if_indextoname for printing. This speeds up "arp -an" when using a lot of aliases (on a single interface). A better fix would include a better interface for if_indextoname than getting the whole address list from the kernel just to find the one index->name mapping. > 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. _M arp M arp/arp.c Modified: stable/7/usr.sbin/arp/arp.c Directory Properties: stable/7/usr.sbin/arp/ (props changed) Modified: stable/7/usr.sbin/arp/arp.c ============================================================================== --- stable/7/usr.sbin/arp/arp.c Thu Jun 17 20:10:41 2010 (r209270) +++ stable/7/usr.sbin/arp/arp.c Thu Jun 17 20:38:18 2010 (r209271) @@ -523,6 +523,9 @@ search(u_long addr, action_fn *action) /* * Display an arp entry */ +static char lifname[IF_NAMESIZE]; +static int64_t lifindex = -1; + static void print_entry(struct sockaddr_dl *sdl, struct sockaddr_inarp *addr, struct rt_msghdr *rtm) @@ -530,7 +533,6 @@ print_entry(struct sockaddr_dl *sdl, const char *host; struct hostent *hp; struct iso88025_sockaddr_dl_data *trld; - char ifname[IF_NAMESIZE]; int seg; if (nflag == 0) @@ -559,8 +561,12 @@ print_entry(struct sockaddr_dl *sdl, } } else printf("(incomplete)"); - if (if_indextoname(sdl->sdl_index, ifname) != NULL) - printf(" on %s", ifname); + if (sdl->sdl_index != lifindex && + if_indextoname(sdl->sdl_index, lifname) != NULL) { + lifindex = sdl->sdl_index; + printf(" on %s", lifname); + } else if (sdl->sdl_index == lifindex) + printf(" on %s", lifname); if (rtm->rtm_rmx.rmx_expire == 0) printf(" permanent"); if (addr->sin_other & SIN_PROXY) From owner-svn-src-stable-7@FreeBSD.ORG Thu Jun 17 21:36:00 2010 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9B304106567A for ; Thu, 17 Jun 2010 21:36:00 +0000 (UTC) (envelope-from max@love2party.net) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.17.9]) by mx1.freebsd.org (Postfix) with ESMTP id 2A53D8FC21 for ; Thu, 17 Jun 2010 21:35:59 +0000 (UTC) Received: from vampire.homelinux.org (dslb-088-066-042-132.pools.arcor-ip.net [88.66.42.132]) by mrelayeu.kundenserver.de (node=mreu2) with ESMTP (Nemesis) id 0LkUcJ-1Ovxg52eWx-00bkSQ; Thu, 17 Jun 2010 23:35:58 +0200 Received: (qmail 43113 invoked from network); 17 Jun 2010 21:35:58 -0000 Received: from f8x64.laiers.local (192.168.4.188) by mx.laiers.local with SMTP; 17 Jun 2010 21:35:58 -0000 From: Max Laier Organization: FreeBSD To: Max Laier Date: Thu, 17 Jun 2010 23:35:58 +0200 User-Agent: KMail/1.13.3 (FreeBSD/8.0-RELEASE-p2; KDE/4.4.3; amd64; ; ) References: <201006172038.o5HKcI1J042794@svn.freebsd.org> In-Reply-To: <201006172038.o5HKcI1J042794@svn.freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201006172335.58726.max@love2party.net> X-Provags-ID: V01U2FsdGVkX1+JQLj9mgNiKD83uIkD5UbbnrqNxUbt0RBsOOg dHm/S9he9lxR6WDTiawIvKQBp2yFeG8Hv26J6mz18u7t/RGqoF PtYmMcy8bLjDf3cQK0mYQ== Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-7@freebsd.org Subject: Re: svn commit: r209271 - stable/7/usr.sbin/arp X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Jun 2010 21:36:00 -0000 On Thursday 17 June 2010 22:38:18 Max Laier wrote: > Author: mlaier > Date: Thu Jun 17 20:38:18 2010 > New Revision: 209271 > URL: http://svn.freebsd.org/changeset/base/209271 > > Log: > MFC r209063: > Cache the last result from if_indextoname for printing. This speeds up > "arp -an" when using a lot of aliases (on a single interface). > > A better fix would include a better interface for if_indextoname than > getting the whole address list from the kernel just to find the one > index->name mapping. > > > 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. Woops ... sorry 'bout that. > _M arp > M arp/arp.c > > Modified: > stable/7/usr.sbin/arp/arp.c > Directory Properties: > stable/7/usr.sbin/arp/ (props changed) > > Modified: stable/7/usr.sbin/arp/arp.c > =========================================================================== > === --- stable/7/usr.sbin/arp/arp.c Thu Jun 17 20:10:41 2010 (r209270) +++ > stable/7/usr.sbin/arp/arp.c Thu Jun 17 20:38:18 2010 (r209271) @@ -523,6 > +523,9 @@ search(u_long addr, action_fn *action) > /* > * Display an arp entry > */ > +static char lifname[IF_NAMESIZE]; > +static int64_t lifindex = -1; > + > static void > print_entry(struct sockaddr_dl *sdl, > struct sockaddr_inarp *addr, struct rt_msghdr *rtm) > @@ -530,7 +533,6 @@ print_entry(struct sockaddr_dl *sdl, > const char *host; > struct hostent *hp; > struct iso88025_sockaddr_dl_data *trld; > - char ifname[IF_NAMESIZE]; > int seg; > > if (nflag == 0) > @@ -559,8 +561,12 @@ print_entry(struct sockaddr_dl *sdl, > } > } else > printf("(incomplete)"); > - if (if_indextoname(sdl->sdl_index, ifname) != NULL) > - printf(" on %s", ifname); > + if (sdl->sdl_index != lifindex && > + if_indextoname(sdl->sdl_index, lifname) != NULL) { > + lifindex = sdl->sdl_index; > + printf(" on %s", lifname); > + } else if (sdl->sdl_index == lifindex) > + printf(" on %s", lifname); > if (rtm->rtm_rmx.rmx_expire == 0) > printf(" permanent"); > if (addr->sin_other & SIN_PROXY) > > > !DSPAM:4c1a87f6420841209311444! From owner-svn-src-stable-7@FreeBSD.ORG Fri Jun 18 18:15:41 2010 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 034C41065670; Fri, 18 Jun 2010 18:15:41 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CCFC68FC16; Fri, 18 Jun 2010 18:15:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o5IIFexd033964; Fri, 18 Jun 2010 18:15:40 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o5IIFeuV033961; Fri, 18 Jun 2010 18:15:40 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201006181815.o5IIFeuV033961@svn.freebsd.org> From: Xin LI Date: Fri, 18 Jun 2010 18:15:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209311 - stable/7/contrib/cpio/src X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Jun 2010 18:15:41 -0000 Author: delphij Date: Fri Jun 18 18:15:40 2010 New Revision: 209311 URL: http://svn.freebsd.org/changeset/base/209311 Log: Fix two regressions introduced by GNU cpio 2.8 import: cpio/src/copyout.c: Old behavior is not to strip leading / from symbol link target. By default cpio will replace the symbol link rather than following it so this should not be a risk. cpio/src/util.c: Zero out rdev_{maj,min} for files where they are not applicable. This is a direct commit since GNU cpio has been removed from -HEAD. Sorry for the breakage... Reported by: sbruno Modified: stable/7/contrib/cpio/src/copyout.c stable/7/contrib/cpio/src/util.c Modified: stable/7/contrib/cpio/src/copyout.c ============================================================================== --- stable/7/contrib/cpio/src/copyout.c Fri Jun 18 17:39:56 2010 (r209310) +++ stable/7/contrib/cpio/src/copyout.c Fri Jun 18 18:15:40 2010 (r209311) @@ -836,9 +836,6 @@ process_copy_out () continue; } link_name[link_size] = 0; - cpio_safer_name_suffix (link_name, false, - abs_paths_flag, true); - link_size = strlen (link_name); file_hdr.c_filesize = link_size; if (archive_format == arf_tar || archive_format == arf_ustar) { Modified: stable/7/contrib/cpio/src/util.c ============================================================================== --- stable/7/contrib/cpio/src/util.c Fri Jun 18 17:39:56 2010 (r209310) +++ stable/7/contrib/cpio/src/util.c Fri Jun 18 18:15:40 2010 (r209311) @@ -1252,8 +1252,25 @@ stat_to_cpio (struct cpio_file_stat *hdr hdr->c_uid = CPIO_UID (st->st_uid); hdr->c_gid = CPIO_GID (st->st_gid); hdr->c_nlink = st->st_nlink; - hdr->c_rdev_maj = major (st->st_rdev); - hdr->c_rdev_min = minor (st->st_rdev); + + switch (hdr->c_mode & CP_IFMT) + { + case CP_IFBLK: + case CP_IFCHR: +#ifdef CP_IFIFO + case CP_IFIFO: +#endif +#ifdef CP_IFSOCK + case CP_IFSOCK: +#endif + hdr->c_rdev_maj = major (st->st_rdev); + hdr->c_rdev_min = minor (st->st_rdev); + break; + default: + hdr->c_rdev_maj = 0; + hdr->c_rdev_min = 0; + break; + } hdr->c_mtime = st->st_mtime; hdr->c_filesize = st->st_size; hdr->c_chksum = 0; From owner-svn-src-stable-7@FreeBSD.ORG Sat Jun 19 05:36:22 2010 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6DCC31065672 for ; Sat, 19 Jun 2010 05:36:22 +0000 (UTC) (envelope-from kientzle@freebsd.org) Received: from monday.kientzle.com (kientzle.com [66.166.149.50]) by mx1.freebsd.org (Postfix) with ESMTP id 226F28FC0C for ; Sat, 19 Jun 2010 05:36:21 +0000 (UTC) Received: (from root@localhost) by monday.kientzle.com (8.14.3/8.14.3) id o5J5B4tC083947; Sat, 19 Jun 2010 05:11:04 GMT (envelope-from kientzle@freebsd.org) Received: from horton.x.kientzle.com (fw2.kientzle.com [10.123.1.2]) by kientzle.com with SMTP id q66hjpssthdw9qg2tcehh5sqmi; Sat, 19 Jun 2010 05:11:02 +0000 (UTC) (envelope-from kientzle@freebsd.org) Message-ID: <4C1C5152.3020802@freebsd.org> Date: Fri, 18 Jun 2010 22:10:42 -0700 From: Tim Kientzle User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.8.1.23) Gecko/20100314 SeaMonkey/1.1.18 MIME-Version: 1.0 To: Xin LI References: <201006181815.o5IIFeuV033961@svn.freebsd.org> In-Reply-To: <201006181815.o5IIFeuV033961@svn.freebsd.org> Content-Type: multipart/mixed; boundary="------------040003050706090704020008" Cc: svn-src-stable-7@freebsd.org Subject: Re: svn commit: r209311 - stable/7/contrib/cpio/src X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 Jun 2010 05:36:22 -0000 This is a multi-part message in MIME format. --------------040003050706090704020008 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Could you also take a look at bin/147969: http://www.freebsd.org/cgi/query-pr.cgi?pr=147969 I looked at it and came up with a tentative fix (attached), but haven't had a chance to test it yet. Cheers, Tim Xin LI wrote: > Author: delphij > Date: Fri Jun 18 18:15:40 2010 > New Revision: 209311 > URL: http://svn.freebsd.org/changeset/base/209311 > > Log: > Fix two regressions introduced by GNU cpio 2.8 import: > > cpio/src/copyout.c: > Old behavior is not to strip leading / from symbol link target. > > By default cpio will replace the symbol link rather than following > it so this should not be a risk. > > cpio/src/util.c: > Zero out rdev_{maj,min} for files where they are not applicable. > > This is a direct commit since GNU cpio has been removed from -HEAD. > > Sorry for the breakage... > > Reported by: sbruno > > Modified: > stable/7/contrib/cpio/src/copyout.c > stable/7/contrib/cpio/src/util.c > > Modified: stable/7/contrib/cpio/src/copyout.c > ============================================================================== > --- stable/7/contrib/cpio/src/copyout.c Fri Jun 18 17:39:56 2010 (r209310) > +++ stable/7/contrib/cpio/src/copyout.c Fri Jun 18 18:15:40 2010 (r209311) > @@ -836,9 +836,6 @@ process_copy_out () > continue; > } > link_name[link_size] = 0; > - cpio_safer_name_suffix (link_name, false, > - abs_paths_flag, true); > - link_size = strlen (link_name); > file_hdr.c_filesize = link_size; > if (archive_format == arf_tar || archive_format == arf_ustar) > { > > Modified: stable/7/contrib/cpio/src/util.c > ============================================================================== > --- stable/7/contrib/cpio/src/util.c Fri Jun 18 17:39:56 2010 (r209310) > +++ stable/7/contrib/cpio/src/util.c Fri Jun 18 18:15:40 2010 (r209311) > @@ -1252,8 +1252,25 @@ stat_to_cpio (struct cpio_file_stat *hdr > hdr->c_uid = CPIO_UID (st->st_uid); > hdr->c_gid = CPIO_GID (st->st_gid); > hdr->c_nlink = st->st_nlink; > - hdr->c_rdev_maj = major (st->st_rdev); > - hdr->c_rdev_min = minor (st->st_rdev); > + > + switch (hdr->c_mode & CP_IFMT) > + { > + case CP_IFBLK: > + case CP_IFCHR: > +#ifdef CP_IFIFO > + case CP_IFIFO: > +#endif > +#ifdef CP_IFSOCK > + case CP_IFSOCK: > +#endif > + hdr->c_rdev_maj = major (st->st_rdev); > + hdr->c_rdev_min = minor (st->st_rdev); > + break; > + default: > + hdr->c_rdev_maj = 0; > + hdr->c_rdev_min = 0; > + break; > + } > hdr->c_mtime = st->st_mtime; > hdr->c_filesize = st->st_size; > hdr->c_chksum = 0; > > --------------040003050706090704020008 Content-Type: text/x-patch; name="gnu-cpio.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="gnu-cpio.patch" Index: contrib/cpio/src/tar.c =================================================================== --- contrib/cpio/src/tar.c (revision 209324) +++ contrib/cpio/src/tar.c (working copy) @@ -32,6 +32,32 @@ /* Stash the tar linkname in static storage. */ +#undef FROM_OCTAL +#define FROM_OCTAL(f) tar_otoa(f, sizeof f) + +/* Convert the string of octal digits S into a number. + * Converted from GNU cpio 2.6 sources in + * order to fix tar breakage caused by using + * from_ascii. + */ +static unsigned long +tar_otoa(const char *where, size_t digs) +{ + const char *s = where; + const char *end = s + digs; + unsigned long val = 0; + + while (s < end && *s == ' ') + ++s; + while (s < end && *s >= '0' && *s <= '7') + val = 8 * val + *s++ - '0'; + while (s < end && (*s == ' ' || *s == '\0')) + ++s; + if (s < end) + error (0, 0, _("Malformed number %.*s"), digs, where); + return val; +} + static char * stash_tar_linkname (char *linkname) { --------------040003050706090704020008--