svn commit: r309881 - stable/10/usr.sbin/pw

2016-12-11 Thread Baptiste Daroussin
Author: bapt
Date: Mon Dec 12 07:03:10 2016
New Revision: 309881
URL: https://svnweb.freebsd.org/changeset/base/309881

Log:
  MFC r309803:
  
  Fix pw groupshow 
  
  PR:   204676
  Submitted by: longw...@incore.de

Modified:
  stable/10/usr.sbin/pw/pw_group.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/usr.sbin/pw/pw_group.c
==
--- stable/10/usr.sbin/pw/pw_group.cMon Dec 12 07:02:53 2016
(r309880)
+++ stable/10/usr.sbin/pw/pw_group.cMon Dec 12 07:03:10 2016
(r309881)
@@ -282,7 +282,7 @@ int
 pw_group_show(int argc, char **argv, char *arg1)
 {
struct group *grp = NULL;
-   char *name;
+   char *name = NULL;
intmax_t id = -1;
int ch;
bool all, force, quiet, pretty;
___
svn-src-stable-10@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-stable-10
To unsubscribe, send any mail to "svn-src-stable-10-unsubscr...@freebsd.org"


svn commit: r309879 - in stable/10/contrib/groff: contrib/mm src/utils/afmtodit

2016-12-11 Thread Baptiste Daroussin
Author: bapt
Date: Mon Dec 12 07:01:05 2016
New Revision: 309879
URL: https://svnweb.freebsd.org/changeset/base/309879

Log:
  MFC r309796:
  
  Perl is not available in base fix scripts depending on it to use
  the version from ports
  
  PR:   215159
  Reported by:  Anatoly Kamchatnov 

Modified:
  stable/10/contrib/groff/contrib/mm/mmroff.pl
  stable/10/contrib/groff/src/utils/afmtodit/afmtodit.pl
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/contrib/groff/contrib/mm/mmroff.pl
==
--- stable/10/contrib/groff/contrib/mm/mmroff.plMon Dec 12 07:00:14 
2016(r309878)
+++ stable/10/contrib/groff/contrib/mm/mmroff.plMon Dec 12 07:01:05 
2016(r309879)
@@ -1,4 +1,4 @@
-#! /usr/bin/perl
+#! /usr/bin/env perl
 
 use strict;
 # runs groff in safe mode, that seems to be the default

Modified: stable/10/contrib/groff/src/utils/afmtodit/afmtodit.pl
==
--- stable/10/contrib/groff/src/utils/afmtodit/afmtodit.pl  Mon Dec 12 
07:00:14 2016(r309878)
+++ stable/10/contrib/groff/src/utils/afmtodit/afmtodit.pl  Mon Dec 12 
07:01:05 2016(r309879)
@@ -1,4 +1,4 @@
-#! /usr/bin/perl -w
+#! /usr/bin/env perl -w
 # -*- Perl -*-
 # Copyright (C) 1989-2000, 2001, 2002, 2003, 2004, 2005
 # Free Software Foundation, Inc.
___
svn-src-stable-10@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-stable-10
To unsubscribe, send any mail to "svn-src-stable-10-unsubscr...@freebsd.org"


svn commit: r309877 - stable/10/share/misc

2016-12-11 Thread Baptiste Daroussin
Author: bapt
Date: Mon Dec 12 06:58:44 2016
New Revision: 309877
URL: https://svnweb.freebsd.org/changeset/base/309877

Log:
  MFC r309795:
  
  Update pci ids database to 2016.11.21

Modified:
  stable/10/share/misc/pci_vendors
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/share/misc/pci_vendors
==
--- stable/10/share/misc/pci_vendorsMon Dec 12 06:56:19 2016
(r309876)
+++ stable/10/share/misc/pci_vendorsMon Dec 12 06:58:44 2016
(r309877)
@@ -3,8 +3,8 @@
 #
 #  List of PCI ID's
 #
-#  Version: 2016.10.20
-#  Date:2016-10-20 03:15:02
+#  Version: 2016.11.21
+#  Date:2016-11-21 03:15:01
 #
 #  Maintained by Albert Pool, Martin Mares, and other volunteers from
 #  the PCI ID Project at http://pci-ids.ucw.cz/.
@@ -50,9 +50,11 @@
 021b  Compaq Computer Corporation
8139  HNE-300 (RealTek RTL8139c) [iPaq Networking]
 0270  Hauppauge computer works Inc. (Wrong ID)
+0291  Davicom Semiconductor, Inc. (Wrong ID)
 # SpeedStream is Efficient Networks, Inc, a Siemens Company
 02ac  SpeedStream
1012  1012 PCMCIA 10/100 Ethernet Card [RTL81xx]
+02e0  XFX Pine Group Inc. (Wrong ID)
 0303  Hewlett-Packard Company (Wrong ID)
 0308  ZyXEL Communications Corporation (Wrong ID)
 0315  SK-Electronics Co., Ltd.
@@ -548,12 +550,12 @@
1028 1fd3  HBA330 MMZ
00ab  SAS3516 Fusion-MPT Tri-Mode RAID On Chip (ROC)
00ac  SAS3416 Fusion-MPT Tri-Mode I/O Controller Chip (IOC)
-   1d49 0201  ThinkSystem 9400-16i PCIe 12Gb HBA
-   1d49 0203  ThinkSystem 9400-16e PCIe 12Gb HBA
+   1d49 0201  ThinkSystem 430-16i SAS/SATA 12Gb HBA
+   1d49 0203  ThinkSystem 430-16e SAS/SATA 12Gb HBA
00ae  SAS3508 Fusion-MPT Tri-Mode RAID On Chip (ROC)
00af  SAS3408 Fusion-MPT Tri-Mode I/O Controller Chip (IOC)
-   1d49 0200  ThinkSystem 9400-8i PCIe 12Gb HBA
-   1d49 0202  ThinkSystem 9400-8e PCIe 12Gb HBA
+   1d49 0200  ThinkSystem 430-8i SAS/SATA 12Gb HBA
+   1d49 0202  ThinkSystem 430-8e SAS/SATA 12Gb HBA
00be  SAS3504 Fusion-MPT Tri-Mode RAID On Chip (ROC)
00bf  SAS3404 Fusion-MPT Tri-Mode I/O Controller Chip (IOC)
00c0  SAS3324 PCI-Express Fusion-MPT SAS-3
@@ -7531,7 +7533,7 @@
1885 0700  Tsunami FPGA PMC with Altera Stratix S40
1885 0701  Tsunami FPGA PMC with Altera Stratix S30
9733  PEX 9733 33-lane, 9-port PCI Express Gen 3 (8.0 GT/s) Switch
-   1d49 0001  ThinkSystem P310W-4P NVMe Switch Card
+   1d49 0001  ThinkSystem 1610-4P NVMe Switch Adapter
9749  PEX 9749 49-lane, 13-port PCI Express Gen 3 (8.0 GT/s) Switch
a100  Blackmagic Design DeckLink
bb04  B 3PCIOSD1A Isolated PCI Serial
@@ -8377,6 +8379,7 @@
1048 0c45  GLoria II
1048 0c4a  GLoria II-64 Pro
1048 0c4b  GLoria II-64 Pro DVII
+   10a9 9002  VPro VR3
0110  NV11 [GeForce2 MX/MX 400]
1043 4015  AGP-V7100 Pro
1043 4021  V7100 Deluxe Combo
@@ -10649,6 +10652,7 @@
1b00  GP102 [TITAN X]
1b01  GP102
1b30  GP102GL [Quadro P6000]
+   1b38  GP102GL [Tesla P40]
1b70  GP102GL
1b78  GP102GL
1b80  GP104 [GeForce GTX 1080]
@@ -10668,10 +10672,11 @@
1c03  GP106 [GeForce GTX 1060 6GB]
1c20  GP106M [GeForce GTX 1060]
1c30  GP106GL
+   1c35  GP106
1c60  GP106M [GeForce GTX 1060]
1c70  GP106GL
1c80  GP107
-   1c81  GP107
+   1c81  GP107 [GeForce GTX 1050]
1c82  GP107 [GeForce GTX 1050 Ti]
1ca7  GP107GL
1ca8  GP107GL
@@ -13729,6 +13734,7 @@
7375  PM7375 [LASAR-155 ATM SAR]
7384  PM7384 [FREEDM - 84P672 Frm Engine & Datalink Mgr]
8000  PM8000  [SPC - SAS Protocol Controller]
+   8009  PM8009 SPCve 8x6G
8032  ATTO Celerity FC8xEN
117c 003b  Celerity FC-82EN Fibre Channel Adapter
117c 003c  Celerity FC-84EN Fibre Channel Adapter
@@ -13742,6 +13748,8 @@
8071  PM8071 Tachyon SPCve 12G eight-port SAS/SATA controller
8072  PM8072 Tachyon SPCv 12G 16-port SAS/SATA controller
8073  PM8073 Tachyon SPCve 12G 16-port SAS/SATA controller
+   8531  PM8531 PFX 24xG3 Fanout PCIe Switches
+   8546  PM8546 B-FEIP PSX 96xG3 PCIe Storage Switch
 11f9  I-Cube Inc
 11fa  Kasan Electronics Company, Ltd.
 11fb  Datel Inc
@@ -16213,6 +16221,71 @@
589a  T520-509A Unified Wire Ethernet Controller [VF]
589b  T540-509B Unified Wire Ethernet Controller [VF]
589c  T520-509C Unified Wire Ethernet Controller [VF]
+   6001  T6225-CR Unified Wire Ethernet Controller
+   6002  T6225-SO-CR Unified Wire Ethernet Controller
+   6003  T6425-CR Unified Wire 

svn commit: r309867 - stable/10/bin/kenv

2016-12-11 Thread Xin LI
Author: delphij
Date: Mon Dec 12 02:14:42 2016
New Revision: 309867
URL: https://svnweb.freebsd.org/changeset/base/309867

Log:
  MFC r309238,309239:
  
  r309238: Plug a potential memory leak.
  r309239: style(9).

Modified:
  stable/10/bin/kenv/kenv.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/bin/kenv/kenv.c
==
--- stable/10/bin/kenv/kenv.c   Mon Dec 12 02:13:35 2016(r309866)
+++ stable/10/bin/kenv/kenv.c   Mon Dec 12 02:14:42 2016(r309867)
@@ -63,7 +63,6 @@ main(int argc, char **argv)
char *env, *eq, *val;
int ch, error;
 
-   error = 0;
val = NULL;
env = NULL;
while ((ch = getopt(argc, argv, "hNquv")) != -1) {
@@ -128,7 +127,7 @@ main(int argc, char **argv)
 static int
 kdumpenv(void)
 {
-   char *buf, *cp;
+   char *buf, *bp, *cp;
int buflen, envlen;
 
envlen = kenv(KENV_DUMP, NULL, NULL, 0);
@@ -136,10 +135,9 @@ kdumpenv(void)
return (-1);
for (;;) {
buflen = envlen * 120 / 100;
-   buf = malloc(buflen + 1);
+   buf = calloc(1, buflen + 1);
if (buf == NULL)
return (-1);
-   memset(buf, 0, buflen + 1); /* Be defensive */
envlen = kenv(KENV_DUMP, NULL, buf, buflen);
if (envlen < 0) {
free(buf);
@@ -151,21 +149,23 @@ kdumpenv(void)
break;
}
 
-   for (; *buf != '\0'; buf += strlen(buf) + 1) {
+   for (bp = buf; *bp != '\0'; bp += strlen(bp) + 1) {
if (hflag) {
-   if (strncmp(buf, "hint.", 5) != 0)
+   if (strncmp(bp, "hint.", 5) != 0)
continue;
}
-   cp = strchr(buf, '=');
+   cp = strchr(bp, '=');
if (cp == NULL)
continue;
*cp++ = '\0';
if (Nflag)
-   printf("%s\n", buf);
+   printf("%s\n", bp);
else
-   printf("%s=\"%s\"\n", buf, cp);
-   buf = cp;
+   printf("%s=\"%s\"\n", bp, cp);
+   bp = cp;
}
+
+   free(buf);
return (0);
 }
 
@@ -190,7 +190,7 @@ ksetenv(const char *env, char *val)
 {
int ret;
 
-   ret = kenv(KENV_SET, env, val, strlen(val)+1);
+   ret = kenv(KENV_SET, env, val, strlen(val) + 1);
if (ret == 0)
printf("%s=\"%s\"\n", env, val);
return (ret);
@@ -200,7 +200,7 @@ static int
 kunsetenv(const char *env)
 {
int ret;
-   
+
ret = kenv(KENV_UNSET, env, NULL, 0);
return (ret);
 }
___
svn-src-stable-10@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-stable-10
To unsubscribe, send any mail to "svn-src-stable-10-unsubscr...@freebsd.org"


svn commit: r309862 - stable/10/usr.bin/sort

2016-12-11 Thread Xin LI
Author: delphij
Date: Mon Dec 12 00:47:12 2016
New Revision: 309862
URL: https://svnweb.freebsd.org/changeset/base/309862

Log:
  MFC r309232-309234:
  
  r309232: Fix an obvious typo.
  r309233: Eliminate variables that are computed, assigned but
   never used.
  r309234: pages and psize are always assigned, so there is no
   need to initialize them as zero.

Modified:
  stable/10/usr.bin/sort/bwstring.c
  stable/10/usr.bin/sort/sort.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/usr.bin/sort/bwstring.c
==
--- stable/10/usr.bin/sort/bwstring.c   Mon Dec 12 00:45:43 2016
(r309861)
+++ stable/10/usr.bin/sort/bwstring.c   Mon Dec 12 00:47:12 2016
(r309862)
@@ -910,7 +910,6 @@ bws_month_score(const struct bwstring *s
 
if (MB_CUR_MAX == 1) {
const unsigned char *end, *s;
-   size_t len;
 
s = s0->data.cstr;
end = s + s0->len;
@@ -918,8 +917,6 @@ bws_month_score(const struct bwstring *s
while (isblank(*s) && s < end)
++s;
 
-   len = strlen((const char*)s);
-
for (int i = 11; i >= 0; --i) {
if (cmonths[i] &&
(s == (unsigned char*)strstr((const char*)s, 
(char*)(cmonths[i]
@@ -928,7 +925,6 @@ bws_month_score(const struct bwstring *s
 
} else {
const wchar_t *end, *s;
-   size_t len;
 
s = s0->data.wstr;
end = s + s0->len;
@@ -936,8 +932,6 @@ bws_month_score(const struct bwstring *s
while (iswblank(*s) && s < end)
++s;
 
-   len = wcslen(s);
-
for (int i = 11; i >= 0; --i) {
if (wmonths[i] && (s == wcsstr(s, wmonths[i])))
return (i);

Modified: stable/10/usr.bin/sort/sort.c
==
--- stable/10/usr.bin/sort/sort.c   Mon Dec 12 00:45:43 2016
(r309861)
+++ stable/10/usr.bin/sort/sort.c   Mon Dec 12 00:47:12 2016
(r309862)
@@ -209,14 +209,10 @@ sort_modifier_empty(struct sort_mods *sm
 static void
 usage(bool opt_err)
 {
-   struct option *o;
FILE *out;
 
-   out = stdout;
-   o = &(long_options[0]);
+   out = opt_err ? stderr : stdout;
 
-   if (opt_err)
-   out = stderr;
fprintf(out, getstr(12), getprogname());
if (opt_err)
exit(2);
@@ -271,8 +267,6 @@ set_hw_params(void)
 {
long pages, psize;
 
-   pages = psize = 0;
-
 #if defined(SORT_THREADS)
ncpu = 1;
 #endif
@@ -280,7 +274,7 @@ set_hw_params(void)
pages = sysconf(_SC_PHYS_PAGES);
if (pages < 1) {
perror("sysconf pages");
-   psize = 1;
+   pages = 1;
}
psize = sysconf(_SC_PAGESIZE);
if (psize < 1) {
___
svn-src-stable-10@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-stable-10
To unsubscribe, send any mail to "svn-src-stable-10-unsubscr...@freebsd.org"


svn commit: r309857 - in stable: 10/contrib/llvm/lib/Analysis 11/contrib/llvm/lib/Analysis 9/contrib/llvm/lib/Analysis

2016-12-11 Thread Dimitry Andric
Author: dim
Date: Sun Dec 11 19:58:13 2016
New Revision: 309857
URL: https://svnweb.freebsd.org/changeset/base/309857

Log:
  MFC r309722:
  
  Pull in r281586 from upstream llvm trunk (by Wei Mi):
  
Add some shortcuts in LazyValueInfo to reduce compile time of
Correlated Value Propagation.
  
The patch is to partially fix PR10584. Correlated Value Propagation
queries LVI to check non-null for pointer params of each callsite. If
we know the def of param is an alloca instruction, we know it is
non-null and can return early from LVI. Similarly, CVP queries LVI to
check whether pointer for each mem access is constant. If the def of
the pointer is an alloca instruction, we know it is not a constant
pointer. These shortcuts can reduce the cost of CVP significantly.
  
Differential Revision: https://reviews.llvm.org/D18066
  
  This significantly reduces memory usage and compilation time when
  compiling a particular C++ source file of the graphics/colmap port.
  
  PR:   215136

Modified:
  stable/10/contrib/llvm/lib/Analysis/LazyValueInfo.cpp
Directory Properties:
  stable/10/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/11/contrib/llvm/lib/Analysis/LazyValueInfo.cpp
  stable/9/contrib/llvm/lib/Analysis/LazyValueInfo.cpp
Directory Properties:
  stable/11/   (props changed)
  stable/9/contrib/llvm/   (props changed)

Modified: stable/10/contrib/llvm/lib/Analysis/LazyValueInfo.cpp
==
--- stable/10/contrib/llvm/lib/Analysis/LazyValueInfo.cpp   Sun Dec 11 
19:50:39 2016(r309856)
+++ stable/10/contrib/llvm/lib/Analysis/LazyValueInfo.cpp   Sun Dec 11 
19:58:13 2016(r309857)
@@ -1033,7 +1033,26 @@ void LazyValueInfo::releaseMemory() {
   }
 }
 
+ 
+/// Returns true if we can statically tell that this value will never be a
+/// "useful" constant.  In practice, this means we've got something like an
+/// alloca or a malloc call for which a comparison against a constant can
+/// only be guarding dead code.  Note that we are potentially giving up some
+/// precision in dead code (a constant result) in favour of avoiding a
+/// expensive search for a easily answered common query.
+static bool isKnownNonConstant(Value *V) {
+  V = V->stripPointerCasts();
+  // The return val of alloc cannot be a Constant.
+  if (isa(V))
+return true;
+  return false;
+}
+
 Constant *LazyValueInfo::getConstant(Value *V, BasicBlock *BB) {
+  // Bail out early if V is known not to be a Constant.
+  if (isKnownNonConstant(V))
+return nullptr;
+
   LVILatticeVal Result = getCache(PImpl).getValueInBlock(V, BB);
   
   if (Result.isConstant())
___
svn-src-stable-10@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-stable-10
To unsubscribe, send any mail to "svn-src-stable-10-unsubscr...@freebsd.org"