From owner-svn-src-stable-11@freebsd.org Sun Jul 16 00:25:01 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B790FB7EEAF; Sun, 16 Jul 2017 00:25:01 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 844B563E53; Sun, 16 Jul 2017 00:25:01 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6G0P0wO043126; Sun, 16 Jul 2017 00:25:00 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6G0P0Uf043125; Sun, 16 Jul 2017 00:25:00 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201707160025.v6G0P0Uf043125@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sun, 16 Jul 2017 00:25:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r321039 - stable/11/sys/arm/include X-SVN-Group: stable-11 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: stable/11/sys/arm/include X-SVN-Commit-Revision: 321039 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Jul 2017 00:25:01 -0000 Author: markj Date: Sun Jul 16 00:25:00 2017 New Revision: 321039 URL: https://svnweb.freebsd.org/changeset/base/321039 Log: MFC r311204: Add some missing atomic_*_ptr #defines for arm. Modified: stable/11/sys/arm/include/atomic.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/arm/include/atomic.h ============================================================================== --- stable/11/sys/arm/include/atomic.h Sat Jul 15 21:43:40 2017 (r321038) +++ stable/11/sys/arm/include/atomic.h Sun Jul 16 00:25:00 2017 (r321039) @@ -78,15 +78,22 @@ atomic_store_long(volatile u_long *dst, u_long src) } #define atomic_clear_ptr atomic_clear_32 +#define atomic_clear_acq_ptr atomic_clear_acq_32 +#define atomic_clear_rel_ptr atomic_clear_rel_32 #define atomic_set_ptr atomic_set_32 +#define atomic_set_acq_ptr atomic_set_acq_32 +#define atomic_set_rel_ptr atomic_set_rel_32 #define atomic_fcmpset_ptr atomic_fcmpset_32 #define atomic_fcmpset_rel_ptr atomic_fcmpset_rel_32 #define atomic_fcmpset_acq_ptr atomic_fcmpset_acq_32 #define atomic_cmpset_ptr atomic_cmpset_32 -#define atomic_cmpset_rel_ptr atomic_cmpset_rel_32 #define atomic_cmpset_acq_ptr atomic_cmpset_acq_32 +#define atomic_cmpset_rel_ptr atomic_cmpset_rel_32 +#define atomic_load_acq_ptr atomic_load_acq_32 #define atomic_store_ptr atomic_store_32 #define atomic_store_rel_ptr atomic_store_rel_32 +#define atomic_swap_ptr atomic_swap_32 +#define atomic_readandclear_ptr atomic_readandclear_32 #define atomic_add_int atomic_add_32 #define atomic_add_acq_int atomic_add_acq_32 From owner-svn-src-stable-11@freebsd.org Sun Jul 16 16:51:40 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 06501C08837; Sun, 16 Jul 2017 16:51:40 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B6EFA8475A; Sun, 16 Jul 2017 16:51:39 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6GGpc6Q054408; Sun, 16 Jul 2017 16:51:39 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6GGpcx7054407; Sun, 16 Jul 2017 16:51:38 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201707161651.v6GGpcx7054407@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sun, 16 Jul 2017 16:51:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r321047 - stable/11/share/misc X-SVN-Group: stable-11 X-SVN-Commit-Author: bapt X-SVN-Commit-Paths: stable/11/share/misc X-SVN-Commit-Revision: 321047 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Jul 2017 16:51:40 -0000 Author: bapt Date: Sun Jul 16 16:51:38 2017 New Revision: 321047 URL: https://svnweb.freebsd.org/changeset/base/321047 Log: MFC r320988: Update pci_vendors to 2017.07.13 Modified: stable/11/share/misc/pci_vendors Directory Properties: stable/11/ (props changed) Modified: stable/11/share/misc/pci_vendors ============================================================================== --- stable/11/share/misc/pci_vendors Sun Jul 16 16:22:52 2017 (r321046) +++ stable/11/share/misc/pci_vendors Sun Jul 16 16:51:38 2017 (r321047) @@ -3,8 +3,8 @@ # # List of PCI ID's # -# Version: 2017.05.25 -# Date: 2017-05-25 03:15:02 +# Version: 2017.07.13 +# Date: 2017-07-13 03:15:01 # # Maintained by Albert Pool, Martin Mares, and other volunteers from # the PCI ID Project at http://pci-ids.ucw.cz/. @@ -561,6 +561,7 @@ 00af SAS3408 Fusion-MPT Tri-Mode I/O Controller Chip (IOC) 1d49 0200 ThinkSystem 430-8i SAS/SATA 12Gb HBA 1d49 0202 ThinkSystem 430-8e SAS/SATA 12Gb HBA + 1d49 0204 ThinkSystem 430-8i SAS/SATA 12Gb Dense 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 @@ -2139,13 +2140,12 @@ # Radeon HD 7970 X2 1787 2317 Radeon HD 7990 1787 3000 Tahiti XT2 [Radeon HD 7970 GHz Edition] - 6799 New Zealand [Radeon HD 7900 Series] 679a Tahiti PRO [Radeon HD 7950/8950 OEM / R9 280] 1002 0b01 Radeon HD 8950 OEM 1002 3000 Tahiti PRO2 [Radeon HD 7950 Boost] 1462 3000 Radeon HD 8950 OEM 174b a003 Radeon R9 280 - 679b Malta [Radeon HD 7990] + 679b Malta [Radeon HD 7990/8990 OEM] 1002 0b28 Radeon HD 8990 OEM 1002 0b2a Radeon HD 7990 1462 8036 Radeon HD 8990 OEM @@ -2205,28 +2205,34 @@ 174b e324 Sapphire Nitro R9 390 67b9 Vesuvius [Radeon R9 295X2] 67be Hawaii LE - 67c0 Ellesmere [Polaris10] + 67c0 Ellesmere [Radeon Pro WX 7100] 67c4 Ellesmere [Radeon Pro WX 7100] + 1002 0336 Radeon Pro Duo + 1002 1336 Radeon Pro Duo 67c7 Ellesmere [Radeon Pro WX 5100] 67ca Ellesmere [Polaris10] 67cc Ellesmere [Polaris10] 67cf Ellesmere [Polaris10] - 67df Ellesmere [Radeon RX 470/480] + 67df Ellesmere [Radeon RX 470/480/570/580] 1002 0b37 Radeon RX 480 1043 04a8 Radeon RX 480 1043 04b0 Radeon RX 470 1043 04fb Radeon RX 480 1043 04fd Radeon RX 480 8GB + 1458 22f0 Radeon RX 570 1462 3411 Radeon RX 470 1462 3413 Radeon RX 480 148c 2372 Radeon RX 480 148c 2373 Radeon RX 470 1682 9470 Radeon RX 470 1682 9480 Radeon RX 480 + 1682 9588 Radeon RX 580 XTR 174b e347 Radeon RX 470/480 174b e349 Radeon RX 470 1787 a470 Radeon RX 470 1787 a480 Radeon RX 480 + 1da2 e353 Sapphire Radeon RX 580 Pulse 8GB + 1da2 e366 Radeon RX 570 67e0 Baffin [Polaris11] 67e1 Baffin [Polaris11] 67e3 Baffin [Radeon Pro WX 4100] @@ -2234,7 +2240,7 @@ 67e9 Baffin [Polaris11] 67eb Baffin [Polaris11] 67ef Baffin [Radeon RX 460] - 67ff Baffin [Polaris11] + 67ff Baffin [Radeon RX 560] 6800 Wimbledon XT [Radeon HD 7970M] 1002 0124 Radeon HD 7970M 8086 2110 Radeon HD 7970M @@ -2430,6 +2436,7 @@ 144d c0c7 Radeon HD 7550M 6842 Thames LE [Radeon HD 7000M Series] 6843 Thames [Radeon HD 7670M] + 6863 Vega 10 [Radeon Vega Frontier Edition] 687f Vega [Radeon RX Vega] 6888 Cypress XT [FirePro V8800] 6889 Cypress PRO [FirePro V7800] @@ -2940,9 +2947,10 @@ 174b e308 Radeon R9 380 Nitro 4G D5 6980 Polaris12 6981 Polaris12 - 6985 Polaris12 + 6985 Lexa XT [Radeon PRO WX 3100] 6986 Polaris12 6987 Polaris12 + 6995 Lexa XT [Radeon PRO WX 2100] 699f Lexa PRO [Radeon RX 550] 700f RS100 AGP Bridge 7010 RS200/RS250 AGP Bridge @@ -3804,6 +3812,7 @@ 1014 0338 PCI-X DDR Auxiliary Cache Adapter (575C) 0302 Winnipeg PCI-X Host Bridge 0308 CalIOC2 PCI-E Root Port + 0311 FC 5740/1954 4-Port 10/100/1000 Base-TX PCI-X Adapter for POWER 0314 ZISC 036 Neural accelerator card 032d Axon - Cell Companion Chip 1014 03a1 PCIe PowerXCell 8i Cell Accelerator Board @@ -3834,6 +3843,7 @@ 1014 04c7 PCIe3 x 8 Cache SAS RAID Internal Adapter 6GB(2CCA) 1014 04c8 PCIe3 x 8 Cache SAS RAID Internal Adapter 6GB(2CD2) 1014 04c9 PCIe3 x 8 Cache SAS RAID Internal Adapter 6GB(2CCD) + 03dc POWER8 Host Bridge (PHB3) 044b GenWQE Accelerator Adapter 04aa Flash Adapter 90 (PCIe2 0.9TB) 04da PCI-E IPR SAS+ Adapter (ASIC) @@ -4499,6 +4509,8 @@ 0533 MGA G200EH 103c 3381 iLO4 0534 G200eR2 + 0538 G200eH + 1590 00e4 iLO5 VGA 0540 M91XX 102b 2080 M9140 LP PCIe x16 102b 20c0 Xenia @@ -5011,6 +5023,8 @@ 12ee PCI-X 2.0 Local Bus Adapter 1302 RMP-3 Shared Memory Driver 1303 RMP-3 (Remote Management Processor) + 22f6 iLO5 Virtual USB Controller + 1590 00e4 iLO5 Standard Virtual USB Controller 2910 E2910A PCIBus Exerciser 2925 E2925A 32 Bit, 33 MHzPCI Exerciser & Analyzer 3206 Adaptec Embedded Serial ATA HostRAID @@ -5398,6 +5412,7 @@ 1546 803c FWB-PCIE1X11B 8240 XIO2001 PCI Express-to-PCI Bridge 8241 TUSB73x0 SuperSpeed USB 3.0 xHCI Host Controller + 1014 04b2 S824 (8286-42A) 8400 ACX 100 22Mbps Wireless Interface 1186 3b00 DWL-650+ PC Card cardbus 22Mbs Wireless Adapter [AirPlus] 1186 3b01 DWL-520+ 22Mbps PCI Wireless Adapter @@ -6015,6 +6030,7 @@ 1077 02a7 QL45212-DE 25GbE Adapter 1077 e4f6 FastLinQ QL45211H 25GbE Adapter 1077 e4f7 FastLinQ QL45212H 25GbE Adapter + 1590 0223 Synergy 6810C 25/50Gb Ethernet Adapter 165c FastLinQ QL45000 Series 40GbE Controller (FCoE) 1077 e4f1 FastLinQ QL45462H 40GbE FCoE Adapter 1077 e4f2 FastLinQ QL45461H 40GbE FCoE Adapter @@ -6068,8 +6084,12 @@ 2432 ISP2432-based 4Gb Fibre Channel to PCI Express HBA 103c 7040 FC1142SR 4Gb 1-port PCIe Fibre Channel Host Bus Adapter [HPAE311A] 2532 ISP2532-based 8Gb Fibre Channel to PCI Express HBA + 1014 041e FC EN0Y/EN12 PCIe2 LP 8 Gb 4-port Fibre Channel Adapter for POWER 103c 3262 StorageWorks 81Q 103c 3263 StorageWorks 82Q + 1077 015c QLE2560 PCI Express to 8Gb FC Single Channel + 1077 015d QLE2562 PCI Express to 8Gb FC Dual Channel + 1077 015e QLE2564 PCI Express to 8Gb FC Quad Channel 1077 0167 QME2572 Dual Port FC8 HBA Mezzanine 1590 00fc StoreFabric 84Q 8Gb Quad Port Fibre Channel Host Bus Adapter 3022 ISP4022-based Ethernet NIC @@ -6084,6 +6104,7 @@ 7322 IBA7322 QDR InfiniBand HCA 8000 10GbE Converged Network Adapter (TCP/IP Networking) 8001 10GbE Converged Network Adapter (FCoE) + 1014 03af FC 5708/5270 10 Gb FCoE PCIe Dual Port Adapter for POWER 8020 cLOM8214 1/10GbE Controller 1028 1f64 QMD8262-k 10G DP bNDC KR 103c 3346 CN1000Q Dual Port Converged Network Adapter @@ -6107,15 +6128,27 @@ 8031 8300 Series 10GbE Converged Network Adapter (FCoE) 8032 8300 Series 10GbE Converged Network Adapter (iSCSI) 8070 FastLinQ QL41000 Series 10/25/40/50GbE Controller + 1077 0001 10GE 2P QL41162HxRJ-DE Adapter + 1077 0002 10GE 2P QL41112HxCU-DE Adapter + 1077 000b 25GE 2P QL41262HxCU-DE Adapter 1077 0011 FastLinQ QL41212H 25GbE Adapter 1077 0012 FastLinQ QL41112H 10GbE Adapter 8080 FastLinQ QL41000 Series 10/25/40/50GbE Controller (FCoE) + 1077 0001 10GE 2P QL41162HxRJ-DE Adapter + 1077 0002 10GE 2P QL41112HxCU-DE Adapter + 1077 000b 25GE 2P QL41262HxCU-DE Adapter 1077 000d FastLinQ QL41262H 25GbE FCoE Adapter 1077 000e FastLinQ QL41162H 10GbE FCoE Adapter 8084 FastLinQ QL41000 Series 10/25/40/50GbE Controller (iSCSI) + 1077 0001 10GE 2P QL41162HxRJ-DE Adapter + 1077 0002 10GE 2P QL41112HxCU-DE Adapter + 1077 000b 25GE 2P QL41262HxCU-DE Adapter 1077 000d FastLinQ QL41262H 25GbE iSCSI Adapter 1077 000e FastLinQ QL41162H 10GbE iSCSI Adapter 8090 FastLinQ QL41000 Series Gigabit Ethernet Controller (SR-IOV VF) + 1077 0001 25GE 2P QL41262HxCU-DE Adapter + 1077 0002 10GE 2P QL41112HxCU-DE Adapter + 1077 000b 25GE 2P QL41262HxCU-DE Adapter 1077 000d FastLinQ QL41262H 25GbE FCoE Adapter (SR-IOV VF) 1077 000e FastLinQ QL41162H 10GbE iSCSI Adapter (SR-IOV VF) 1077 0011 FastLinQ QL41212H 25GbE Adapter (SR-IOV VF) @@ -9947,6 +9980,8 @@ 0f02 GF108 [GeForce GT 730] 0f06 GF108 [GeForce GT 730] 0fb0 GM200 High Definition Audio + 0fb8 GP108 High Definition Audio Controller + 0fb9 GP107GL High Definition Audio Controller 0fbb GM204 High Definition Audio Controller 0fc0 GK107 [GeForce GT 640 OEM] 0fc1 GK107 [GeForce GT 640] @@ -10620,6 +10655,7 @@ 134f GM108M [GeForce 920MX] 137a GM108GLM [Quadro K620M / Quadro M500M] 17aa 505a Quadro M500M + 137b GM108GLM [Quadro M520 Mobile] 137d GM108M [GeForce 940A] 1380 GM107 [GeForce GTX 750 Ti] 1381 GM107 [GeForce GTX 750] @@ -10665,6 +10701,7 @@ 13d8 GM204M [GeForce GTX 970M] 13d9 GM204M [GeForce GTX 965M] 13da GM204M [GeForce GTX 980] + 13e7 GM204 [GeForce GTX 980 Engineering Sample] 13f0 GM204GL [Quadro M5000] 13f1 GM204GL [Quadro M4000] 13f2 GM204GL [Tesla M60] @@ -10690,7 +10727,7 @@ 1617 GM204M [GeForce GTX 980M] 1618 GM204M [GeForce GTX 970M] 1619 GM204M [GeForce GTX 965M] - 161a GM204M [GeForce GTX 980] + 161a GM204M [GeForce GTX 980 Mobile] 1667 GM204M [GeForce GTX 965M] 1725 GP100 172e GP100 @@ -10744,10 +10781,11 @@ 1ca7 GP107GL 1ca8 GP107GL 1caa GP107GL - 1cb1 GP107GL [Quardo P1000] - 1cb2 GP107GL [Quardo P600] - 1cb3 GP107GL [Quardo P400] + 1cb1 GP107GL [Quadro P1000] + 1cb2 GP107GL [Quadro P600] + 1cb3 GP107GL [Quadro P400] 1d01 GP108 [GeForce GT 1030] + 1d10 GP108 [GeForce MX150] 1d81 GV100 10df Emulex Corporation 0720 OneConnect NIC (Skyhawk) @@ -10771,7 +10809,8 @@ e100 Proteus-X: LightPulse IOV Fibre Channel Host Adapter e131 LightPulse 8Gb/s PCIe Shared I/O Fibre Channel Adapter e180 Proteus-X: LightPulse IOV Fibre Channel Host Adapter - e200 Lancer-X: LightPulse Fibre Channel Host Adapter + e200 LightPulse LPe16002 + 1014 03f1 PCIe2 16 Gb 2-port Fibre Channel Adapter (FC EL5B; CCIN 577F) e208 LightPulse 16Gb Fibre Channel Host Adapter (Lancer-VF) e220 OneConnect NIC (Lancer) 17aa 1054 ThinkServer LPm16002B-M6-L AnyFabric @@ -10800,6 +10839,7 @@ f0e5 Zephyr LightPulse Fibre Channel Host Adapter f0f5 Neptune LightPulse Fibre Channel Host Adapter f100 Saturn-X: LightPulse Fibre Channel Host Adapter + 1014 038a 8Gb PCI Express Dual Port FC Adapter for POWER 103c 3282 8Gb Dual-port PCI-e FC HBA f111 Saturn-X LightPulse Fibre Channel Host Adapter f112 Saturn-X LightPulse Fibre Channel Host Adapter @@ -10822,6 +10862,8 @@ fc40 Saturn-X: LightPulse Fibre Channel Host Adapter fc50 Proteus-X: LightPulse IOV Fibre Channel Host Adapter fd00 Helios-X LightPulse Fibre Channel Host Adapter +# Also IBM FC 5759 / FC 1910 for POWER + 10df fd02 LightPulse LP11002 Dual-port 4Gigabit PCI Fibre Channel Adapter fd11 Helios-X LightPulse Fibre Channel Host Adapter fd12 Helios-X LightPulse Fibre Channel Host Adapter fe00 Zephyr-X LightPulse Fibre Channel Host Adapter @@ -10923,6 +10965,7 @@ 524a RTS524A PCI Express Card Reader 5250 RTS5250 PCI Express Card Reader 525a RTS525A PCI Express Card Reader + 17aa 224f ThinkPad X1 Carbon 5th Gen 5286 RTS5286 PCI Express Card Reader 5287 RTL8411B PCI Express Card Reader 5288 RTS5288 PCI Express Card Reader @@ -11028,6 +11071,7 @@ 1775 11cc CC11/CL11 1849 8168 Motherboard (one of many) 7470 3468 TG-3468 Gigabit PCI Express Network Adapter + 8086 2055 NUC Kit DN2820FYKH 8086 d615 Desktop Board D510MO/D525MW 8169 RTL8169 PCI Gigabit Ethernet Controller 1025 0079 Aspire 5024WLMi @@ -14773,7 +14817,7 @@ 12d6 Analogic Corp 12d7 Biotronic SRL 12d8 Pericom Semiconductor - 01a7 PI7C21P100 PCI to PCI Bridge + 01a7 7C21P100 2-port PCI-X to PCI-X Bridge 400a PI7C9X442SL PCI Express Bridge Port 400e PI7C9X442SL USB OHCI Controller 400f PI7C9X442SL USB EHCI Controller @@ -15081,6 +15125,8 @@ 5160 RealSSD P420h 5161 RealSSD P420m 5163 RealSSD P425m + 5180 9100 PRO NVMe SSD + 5181 9100 MAX NVMe SSD 1345 Arescom Inc 1347 Odetics 1349 Sumitomo Electric Industries, Ltd. @@ -16081,6 +16127,7 @@ 509f T540-509F Unified Wire Ethernet Controller 50a0 T540-50A0 Unified Wire Ethernet Controller 50a1 T540-50A1 Unified Wire Ethernet Controller + 50a2 T580-50A2 Unified Wire Ethernet Controller 5401 T520-CR Unified Wire Ethernet Controller 5402 T522-CR Unified Wire Ethernet Controller 5403 T540-CR Unified Wire Ethernet Controller @@ -16133,6 +16180,7 @@ 549f T540-509F Unified Wire Ethernet Controller 54a0 T540-50A0 Unified Wire Ethernet Controller 54a1 T540-50A1 Unified Wire Ethernet Controller + 54a2 T580-50A2 Unified Wire Ethernet Controller 5501 T520-CR Unified Wire Storage Controller 5502 T522-CR Unified Wire Storage Controller 5503 T540-CR Unified Wire Storage Controller @@ -16185,6 +16233,7 @@ 559f T540-509F Unified Wire Storage Controller 55a0 T540-50A0 Unified Wire Storage Controller 55a1 T540-50A1 Unified Wire Storage Controller + 55a2 T580-50A2 Unified Wire Storage Controller 5601 T520-CR Unified Wire Storage Controller 5602 T522-CR Unified Wire Storage Controller 5603 T540-CR Unified Wire Storage Controller @@ -16237,6 +16286,7 @@ 569f T540-509F Unified Wire Storage Controller 56a0 T540-50A0 Unified Wire Storage Controller 56a1 T540-50A1 Unified Wire Storage Controller + 56a2 T580-50A2 Unified Wire Storage Controller 5701 T520-CR Unified Wire Ethernet Controller 5702 T522-CR Unified Wire Ethernet Controller 5703 T540-CR Unified Wire Ethernet Controller @@ -16328,6 +16378,7 @@ 589f T540-509F Unified Wire Ethernet Controller [VF] 58a0 T540-50A0 Unified Wire Ethernet Controller [VF] 58a1 T540-50A1 Unified Wire Ethernet Controller [VF] + 58a2 T580-50A2 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 Ethernet Controller @@ -16343,6 +16394,9 @@ 6015 T6201-BT Unified Wire Ethernet Controller 6080 T6225-6080 Unified Wire Ethernet Controller 6081 T62100-6081 Unified Wire Ethernet Controller + 6082 T6225-6082 Unified Wire Ethernet Controller + 6083 T62100-6083 Unified Wire Ethernet Controller + 6084 T64100-6084 Unified Wire Ethernet Controller 6401 T6225-CR Unified Wire Ethernet Controller 6402 T6225-SO-CR Unified Wire Ethernet Controller 6403 T6425-CR Unified Wire Ethernet Controller @@ -16358,6 +16412,9 @@ 6415 T6201-BT Unified Wire Ethernet Controller 6480 T6225-6080 Unified Wire Ethernet Controller 6481 T62100-6081 Unified Wire Ethernet Controller + 6482 T6225-6082 Unified Wire Ethernet Controller + 6483 T62100-6083 Unified Wire Ethernet Controller + 6484 T64100-6084 Unified Wire Ethernet Controller 6501 T6225-CR Unified Wire Storage Controller 6502 T6225-SO-CR Unified Wire Storage Controller 6503 T6425-CR Unified Wire Storage Controller @@ -16373,6 +16430,9 @@ 6515 T6201-BT Unified Wire Storage Controller 6580 T6225-6080 Unified Wire Storage Controller 6581 T62100-6081 Unified Wire Storage Controller + 6582 T6225-6082 Unified Wire Storage Controller + 6583 T62100-6083 Unified Wire Storage Controller + 6584 T64100-6084 Unified Wire Storage Controller 6601 T6225-CR Unified Wire Storage Controller 6602 T6225-SO-CR Unified Wire Storage Controller 6603 T6425-CR Unified Wire Storage Controller @@ -16388,6 +16448,9 @@ 6615 T6201-BT Unified Wire Storage Controller 6680 T6225-6080 Unified Wire Storage Controller 6681 T62100-6081 Unified Wire Storage Controller + 6682 T6225-6082 Unified Wire Storage Controller + 6683 T62100-6083 Unified Wire Storage Controller + 6684 T64100-6084 Unified Wire Storage Controller 6801 T6225-CR Unified Wire Ethernet Controller [VF] 6802 T6225-SO-CR Unified Wire Ethernet Controller [VF] 6803 T6425-CR Unified Wire Ethernet Controller [VF] @@ -16403,6 +16466,9 @@ 6815 T6201-BT Unified Wire Ethernet Controller [VF] 6880 T6225-6080 Unified Wire Ethernet Controller [VF] 6881 T62100-6081 Unified Wire Ethernet Controller [VF] + 6882 T6225-6082 Unified Wire Ethernet Controller [VF] + 6883 T62100-6083 Unified Wire Ethernet Controller [VF] + 6884 T64100-6084 Unified Wire Ethernet Controller [VF] a000 PE10K Unified Wire Ethernet Controller 1426 Storage Technology Corp. 1427 Better On-Line Solutions @@ -17003,6 +17069,7 @@ 1028 1f68 BCM57800 1-Gigabit Ethernet 168d NetXtreme II BCM57840 10/20 Gigabit Ethernet 168e NetXtreme II BCM57810 10 Gigabit Ethernet + 1014 0492 PCIe2 2-port 10 GbE BaseT RJ45 Adapter (FC EN0W; CCIN 2CC4) 103c 1798 Flex-10 10Gb 2-port 530FLB Adapter [Meru] 103c 17a5 Flex-10 10Gb 2-port 530M Adapter 103c 18d3 Ethernet 10Gb 2-port 530T Adapter @@ -17929,7 +17996,8 @@ 0001 SOC-it 101 System Controller 1540 PROVIDEO MULTIMEDIA Co Ltd 1541 MACHONE Communications -1542 Concurrent Computer Corporation +# nee VIVID Technology Inc. +1542 Concurrent Real-Time 9260 RCIM-II Real-Time Clock & Interrupt Module 9271 RCIM-III Real-Time Clock & Interrupt Module (PCIe) 9272 Pulse Width Modulator Card @@ -18133,6 +18201,7 @@ 103c 18d6 InfiniBand FDR/EN 10/40Gb Dual Port 544QSFP Adapter 15b3 0025 ConnectX-3 IB QDR Dual Port Mezzanine Card 15b3 0026 ConnectX-3 IB FDR Dual Port Mezzanine Card + 15b3 0028 ConnectX-3 VPI Dual QSFP+ Port QDR Infiniband 40Gb/s or 10Gb Ethernet 15b3 0059 ConnectX-3 VPI IB FDR/40 GbE Single Port QSFP+ Mezzanine Card 15b3 0065 ConnectX-3 VPI IB FDR/40 GbE Dual Port QSFP+ Adapter 15b3 0066 ConnectX-3 IB FDR10 Dual Port Mezzanine Card @@ -18209,6 +18278,7 @@ 6372 MT25408 [ConnectX EN 10GigE 10GBaseT, PCIe 2.0 2.5GT/s] 6732 MT26418 [ConnectX VPI PCIe 2.0 5GT/s - IB DDR / 10GigE] 673c MT26428 [ConnectX VPI PCIe 2.0 5GT/s - IB QDR / 10GigE] + 1014 0487 GX++ 1-port 4X IB QDR Adapter for Power 795 103c 1782 4X QDR InfiniBand Mezzanine HCA for c-Class BladeSystem 15b3 0021 HP InfiniBand 4X QDR CX-2 PCI-e G2 Dual Port HCA 6746 MT26438 [ConnectX VPI PCIe 2.0 5GT/s - IB QDR / 10GigE Virtualization+] @@ -18217,6 +18287,8 @@ 6750 MT26448 [ConnectX EN 10GigE, PCIe 2.0 5GT/s] 1014 0461 2-Port 10 GbE RoCE SR LP PCIe2 (rev b0) 15b3 0018 HP 10 GbE PCI-e G2 Dual-Port NIC (rev C1) +# FC EC26 + 15b3 6572 IBM Flex System EN4132 2-port 10Gb RoCE Adapter 675a MT25408 [ConnectX EN 10GigE 10GBaseT, PCIe Gen2 5GT/s] 6764 MT26468 [ConnectX EN 10GigE, PCIe 2.0 5GT/s Virtualization+] 103c 3313 NC542m Dual Port Flex-10 10GbE BLc Adapter @@ -19746,15 +19818,15 @@ 1924 800e SFN7x42Q-R2 Flareon Ultra 7000 Series 10/40G Adapter 1924 800f SFN7xx4F-R1 Flareon Ultra 7000 Series 10G Adapter 0a03 SFC9220 10/40G Ethernet Controller - 1924 8011 SFN8022-R1 Flareon 8000 Series 10G Adapter - 1924 8012 SFN8522-R1 Flareon Ultra 8000 Series 10G Adapter - 1924 8013 SFN8042-R1 Flareon 8000 Series 10/40G Adapter - 1924 8014 SFN8542-R1 Flareon Ultra 8000 Series 10/40G Adapter - 1924 8016 SFN8022-R2 Flareon 8000 Series 10G Adapter - 1924 8017 SFN8522-R2 Flareon Ultra 8000 Series 10G Adapter - 1924 8018 SFN8042-R2 Flareon 8000 Series 10/40G Adapter - 1924 8019 SFN8542-R2 Flareon Ultra 8000 Series 10/40G Adapter - 1924 801a SFN8722-R1 Flareon Ultra 8000 Series OCP 10G Adapter + 1924 8011 SFN8022-R1 8000 Series 10G Adapter + 1924 8012 SFN8522-R1 8000 Series 10G Adapter + 1924 8013 SFN8042-R1 8000 Series 10/40G Adapter + 1924 8014 SFN8542-R1 8000 Series 10/40G Adapter + 1924 8016 SFN8022-R2 8000 Series 10G Adapte + 1924 8017 SFN8522-R2 8000 Series 10G Adapter + 1924 8018 SFN8042-R2 8000 Series 10/40G Adapter + 1924 8019 SFN8542-R2 8000 Series 10/40G Adapter + 1924 801a SFN8722-R1 8000 Series OCP 10G Adapter 1803 SFC9020 10G Ethernet Controller (Virtual Function) 1813 SFL9021 10GBASE-T Ethernet Controller (Virtual Function) 1903 SFC9120 10G Ethernet Controller (Virtual Function) @@ -20008,20 +20080,29 @@ 0212 BladeEngine2 10Gb Gen2 PCIe iSCSI Adapter 0221 BladeEngine3 10Gb Gen2 PCIe Network Adapter 0222 BladeEngine3 10Gb Gen2 PCIe iSCSI Adapter - 0700 OneConnect 10Gb NIC + 0700 OneConnect OCe10100/OCe10102 Series 10 GbE 103c 1747 NC550SFP DualPort 10GbE Server Adapter 103c 1749 NC550SFP Dual Port Server Adapter 103c 174a NC551m Dual Port FlexFabric 10Gb Adapter 103c 174b StorageWorks NC550 DualPort Converged Network Adapter 103c 3314 NC551i Dual Port FlexFabric 10Gb Adapter 0702 OneConnect 10Gb iSCSI Initiator - 0704 OneConnect 10Gb FCoE Initiator + 0704 OneConnect OCe10100/OCe10102 Series 10 GbE CNA + 10df e602 OneConnect OCe10100 10Gb CNA + 10df e630 OneConnect OCe10102-FM-E / OCe10102-FX-E for EMC VNX Symmetrix 0710 OneConnect 10Gb NIC (be3) +# FC 5287 / FC 5284; CCIN 5287 + 1014 03d0 PCIe2 2-port 10GbE SR Adapter for POWER +# FC 5288 / FC 5286; CCIN 5288 + 1014 03d1 PCIe2 2-port 10GbE SFP+ Copper Adapter for POWER + 1014 0409 Integrated Multifunction Card with Dual 10GbE SR Optical + Dual 1GbE for Power 750/760 + 1014 040a Integrated Multifunction Card with Dual 10GbE SR Copper + Dual 1GbE for Power 750/760 103c 3315 NC553i 10Gb 2-port FlexFabric Converged Network Adapter 103c 3340 NC552SFP 2-port 10Gb Server Adapter 103c 3341 NC552m 10Gb 2-port FlexFabric Converged Network Adapter 103c 3345 NC553m 10Gb 2-port FlexFabric Converged Network Adapter 103c 337b NC554FLB 10Gb 2-port FlexFabric Converged Network Adapter + 10df e733 Flex System EN4054 4-port 10Gb Ethernet Mezzanine Adapter 0712 OneConnect 10Gb iSCSI Initiator (be3) 0714 OneConnect 10Gb FCoE Initiator (be3) 103c 3315 NC553i 10Gb 2-port FlexFabric Converged Network Adapter @@ -20297,6 +20378,7 @@ 001e ADQ208 001f DSU 0020 ADQ14 + 0023 ADQ7 2014 TX320 2019 S6000 # now owned by HGST (a Western Digital subsidiary) @@ -20505,6 +20587,7 @@ 0004 ExaNIC X10-GM 0005 ExaNIC X40 0006 ExaNIC X10-HPT + 0007 ExaNIC X40 1cf7 Subspace Dynamics 1d00 Pure Storage 1d18 RME @@ -20549,10 +20632,11 @@ 4200 A5PL-E1-10GETI [10 GbE Ethernet Traffic Instrument] 1d78 DERA 1d7c Aerotech, Inc. -1d87 Rockchip Inc. RK3399 PCI Express Root Port +1d87 Fuzhou Rockchip Electronics Co., Ltd 1d8f Enyx 1d95 Graphcore Ltd 1da1 Teko Telecom S.r.l. +1da2 Sapphire Technology Limited 1de1 Tekram Technology Co.,Ltd. 0391 TRM-S1040 [DC-315 / DC-395 series] 2020 DC-390 @@ -20605,6 +20689,7 @@ 1fc9 3015 Ethernet Adapter 4026 TN9610 10GbE SFP+ Ethernet Adapter 4027 TN9710P 10GBase-T/NBASE-T Ethernet Adapter + 1154 0368 LGY-PCIE-MG 1432 8104 10 Gigabit Ethernet PCI Express Adapter 1fc9 3015 Ethernet Adapter 4527 TN9710Q 5GBase-T/NBASE-T Ethernet Adapter @@ -22513,6 +22598,7 @@ 10ba 80003ES2LAN Gigabit Ethernet Controller (Copper) 10bb 80003ES2LAN Gigabit Ethernet Controller (Serdes) 10bc 82571EB Gigabit Ethernet Controller (Copper) + 1014 0368 4-Port 10/100/1000 Base-TX PCI Express Adapter for POWER 103c 704b NC364T PCI Express Quad Port Gigabit Server Adapter 108e 11bc x4 PCI-Express Quad Gigabit Ethernet UTP Low Profile Adapter 8086 10bc PRO/1000 PT Quad Port LP Server Adapter @@ -23016,6 +23102,7 @@ 1529 82599 10 Gigabit Dual Port Network Connection with FCoE 152a 82599 10 Gigabit Dual Port Backplane Connection with FCoE 152e 82599 Virtual Function + 152f I350 Virtual Function 1530 X540 Virtual Function 1533 I210 Gigabit Network Connection 103c 0003 Ethernet I210-T1 GbE NIC @@ -23074,6 +23161,8 @@ 18d4 0c08 X550 10Gb 2-port RJ45 OCP Mezz Card MOP81-I-10GT2 8086 0001 Ethernet Converged Network Adapter X550-T2 8086 001a Ethernet Converged Network Adapter X550-T2 + 8086 001b Ethernet Server Adapter X550-T2 for OCP + 8086 001d Ethernet 10G 2P X550-t Adapter 8086 0022 Ethernet Converged Network Adapter X550-T2 1564 X550 Virtual Function 1565 X550 Virtual Function @@ -23216,22 +23305,38 @@ 15be Ethernet Connection (6) I219-V 15bf JHL6240 Thunderbolt 3 NHI (Low Power) [Alpine Ridge LP 2016] 15c0 JHL6240 Thunderbolt 3 Bridge (Low Power) [Alpine Ridge LP 2016] + 15c2 Ethernet Connection X553 Backplane + 15c3 Ethernet Connection X553 Backplane + 15c4 Ethernet Connection X553 10 GbE SFP+ 15c5 X553 Virtual Function + 15c6 Ethernet Connection X553 1GbE + 15c7 Ethernet Connection X553 1GbE + 15c8 Ethernet Connection X553/X557-AT 10GBASE-T + 15ce Ethernet Connection X553 10 GbE SFP+ 15d0 Ethernet SDI Adapter FM10420-100GbE-QDA2 15d1 Ethernet Controller 10G X550T 8086 0002 Ethernet Converged Network Adapter X550-T1 + 8086 001b Ethernet Server Adapter X550-T1 for OCP 8086 0021 Ethernet Converged Network Adapter X550-T1 8086 00a2 Ethernet Converged Network Adapter X550-T1 15d2 JHL6540 Thunderbolt 3 NHI (C step) [Alpine Ridge 4C 2016] 15d3 JHL6540 Thunderbolt 3 Bridge (C step) [Alpine Ridge 4C 2016] + 15d4 JHL6540 Thunderbolt 3 USB Controller (C step) [Alpine Ridge 4C 2016] 15d5 Ethernet SDI Adapter FM10420-25GbE-DA2 8086 0001 Intel(R) Ethernet SDI Adapter FM10420-25GbE-DA2 15d6 Ethernet Connection (5) I219-V 15d7 Ethernet Connection (4) I219-LM 15d8 Ethernet Connection (4) I219-V + 17aa 224f ThinkPad X1 Carbon 5th Gen 15d9 JHL6340 Thunderbolt 3 NHI (C step) [Alpine Ridge 2C 2016] 15da JHL6340 Thunderbolt 3 Bridge (C step) [Alpine Ridge 2C 2016] + 15df Ethernet Connection (8) I219-LM + 15e0 Ethernet Connection (8) I219-V + 15e1 Ethernet Connection (9) I219-LM + 15e2 Ethernet Connection (9) I219-V 15e3 Ethernet Connection (5) I219-LM + 15e4 Ethernet Connection X553 1GbE + 15e5 Ethernet Connection X553 1GbE 1600 Broadwell-U Host Bridge -OPI 1601 Broadwell-U PCI Express x16 Controller 1602 Broadwell-U Integrated Graphics @@ -23271,31 +23376,32 @@ 163d Broadwell-U Integrated Graphics 163e Broadwell-U Integrated Graphics 1889 Ethernet Adaptive Virtual Function - 1900 Skylake Host Bridge/DRAM Registers - 1901 Skylake PCIe Controller (x16) + 1900 Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor Host Bridge/DRAM Registers + 1901 Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor PCIe Controller (x16) 1902 HD Graphics 510 - 1903 Skylake Processor Thermal Subsystem - 1904 Skylake Host Bridge/DRAM Registers + 1903 Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor Thermal Subsystem + 1904 Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor Host Bridge/DRAM Registers 1028 06f3 Latitude 3570 17aa 382a B51-80 Laptop - 1905 Skylake PCIe Controller (x8) + 1905 Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor PCIe Controller (x8) 1906 HD Graphics 510 17aa 382a B51-80 Laptop - 1908 Skylake Host Bridge/DRAM Registers - 1909 Skylake PCIe Controller (x4) - 190c Skylake Host Bridge/DRAM Registers - 190f Skylake Host Bridge/DRAM Registers - 1910 Skylake Host Bridge/DRAM Registers - 1911 Skylake Gaussian Mixture Model + 1908 Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor Host Bridge/DRAM Registers + 1909 Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor PCIe Controller (x4) + 190c Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor Host Bridge/DRAM Registers + 190f Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor Host Bridge/DRAM Registers + 1910 Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor Host Bridge/DRAM Registers + 1911 Xeon E3-1200 v5/v6 / E3-1500 v5 / 6th/7th Gen Core Processor Gaussian Mixture Model + 17aa 224f ThinkPad X1 Carbon 5th Gen 1912 HD Graphics 530 1916 HD Graphics 520 1028 06f3 Latitude 3570 - 1918 Skylake Host Bridge/DRAM Registers - 1919 Skylake Imaging Unit + 1918 Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor Host Bridge/DRAM Registers + 1919 Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor Imaging Unit 191b HD Graphics 530 191d HD Graphics P530 191e HD Graphics 515 - 191f Skylake Host Bridge/DRAM Registers + 191f Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor Host Bridge/DRAM Registers 1921 HD Graphics 520 1926 Iris Graphics 540 1927 Iris Graphics 550 @@ -24531,6 +24637,7 @@ 24fd Wireless 8265 / 8275 # Windstorm Peak 8086 0010 Dual Band Wireless-AC 8265 + 8086 1130 Dual Band Wireless-AC 8265 2500 82820 820 (Camino) Chipset Host Bridge (MCH) 1028 0095 Precision Workstation 220 Chipset 1043 801c P3C-2000 system chipset @@ -26676,6 +26783,7 @@ 17aa 4021 Intel Ethernet Connection X722 for 10G SFP+ 17aa 4022 Ethernet Connection X722 for 10GbE SFP+ 37d1 Ethernet Connection X722 for 1GbE + 14cd 0010 88E1514 Ethernet OCP 2x1G RJ45 Phy Card [USI-1514-1GbaseT] 1590 0216 Ethernet 1Gb 2-port 368i Adapter 1590 0217 Ethernet 1Gb 2-port 368FLR-MMT Adapter 1590 0247 Ethernet 1Gb 4-port 369i Adapter @@ -27229,9 +27337,13 @@ 5845 QEMU NVM Express Controller 1af4 1100 QEMU Virtual Machine 5902 HD Graphics 610 + 5904 Xeon E3-1200 v6/7th Gen Core Processor Host Bridge/DRAM Registers + 17aa 224f ThinkPad X1 Carbon 5th Gen 590f Xeon E3-1200 v6/7th Gen Core Processor Host Bridge/DRAM Registers 5910 Xeon E3-1200 v6/7th Gen Core Processor Host Bridge/DRAM Registers 5912 HD Graphics 630 + 5916 HD Graphics 620 + 17aa 224f ThinkPad X1 Carbon 5th Gen 5a84 Celeron N3350/Pentium N4200/Atom E3900 Series Integrated Graphics Controller 5a88 Celeron N3350/Pentium N4200/Atom E3900 Series Imaging Unit 5a98 Celeron N3350/Pentium N4200/Atom E3900 Series Audio Cluster @@ -27908,6 +28020,8 @@ 9d03 Sunrise Point-LP SATA Controller [AHCI mode] 1028 06f3 Latitude 3570 17aa 382a B51-80 Laptop + 9d10 Sunrise Point-LP PCI Express Root Port #1 + 9d12 Sunrise Point-LP PCI Express Root Port #3 9d14 Sunrise Point-LP PCI Express Root Port #5 17aa 382a B51-80 Laptop 9d15 Sunrise Point-LP PCI Express Root Port #6 @@ -27918,9 +28032,11 @@ 17aa 382a B51-80 Laptop 9d21 Sunrise Point-LP PMC 1028 06f3 Latitude 3570 + 17aa 224f ThinkPad X1 Carbon 5th Gen 17aa 382a B51-80 Laptop 9d23 Sunrise Point-LP SMBus 1028 06f3 Latitude 3570 + 17aa 224f ThinkPad X1 Carbon 5th Gen 17aa 382a B51-80 Laptop 9d27 Sunrise Point-LP Serial IO UART Controller #0 9d28 Sunrise Point-LP Serial IO UART Controller #1 @@ -27932,14 +28048,18 @@ 17aa 382a B51-80 Laptop 9d31 Sunrise Point-LP Thermal subsystem 1028 06f3 Latitude 3570 + 17aa 224f ThinkPad X1 Carbon 5th Gen 17aa 382a B51-80 Laptop 9d3a Sunrise Point-LP CSME HECI #1 1028 06f3 Latitude 3570 + 17aa 224f ThinkPad X1 Carbon 5th Gen 17aa 382a B51-80 Laptop 9d43 Sunrise Point-LP LPC Controller 17aa 382a B51-80 Laptop 9d48 Sunrise Point-LP LPC Controller 1028 06f3 Latitude 3570 + 9d58 Sunrise Point-LP LPC Controller + 17aa 224f ThinkPad X1 Carbon 5th Gen 9d60 Sunrise Point-LP Serial IO I2C Controller #0 1028 06f3 Latitude 3570 8086 9d60 100 Series PCH/Sunrise Point PCH I2C0 [Skylake/Kaby Lake LPSS I2C] @@ -28520,6 +28640,20 @@ 9005 0552 Series 8 - ASR-8805 - 8 internal 0 external 12G SAS Port/PCIe 3.0 9005 0553 Series 8 - ASR-8085 - 0 internal 8 external 12G SAS Port/PCIe 3.0 9005 0554 Series 8 - ASR-8885 - 8 internal 8 external 12G SAS Port/PCIe 3.0 + 028f Smart Storage PQI 12G SAS/PCIe 3 + 103c 0600 Smart Array P408i-p SR Gen10 + 103c 0601 Smart Array P408e-p SR Gen10 + 103c 0602 Smart Array P408i-a SR Gen10 + 103c 0603 Smart Array P408i-c SR Gen10 + 103c 0650 Smart Array E208i-p SR Gen10 + 103c 0651 Smart Array E208e-p SR Gen10 + 103c 0652 Smart Array E208i-c SR Gen10 + 103c 0654 Smart Array E208i-a SR Gen10 + 103c 0655 Smart Array P408e-m SR Gen10 + 103c 0700 Smart Array P204i-c SR Gen10 + 103c 0701 Smart Array P204i-b SR Gen10 + 103c 1100 Smart Array P816i-a SR Gen10 + 103c 1101 Smart Array P416ie-m SR G10 0410 AIC-9410W SAS (Razor HBA RAID) 9005 0410 ASC-48300(Spirit RAID) 9005 0411 ASC-58300 (Oakmont RAID) From owner-svn-src-stable-11@freebsd.org Sun Jul 16 17:04:58 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F4199C0904A; Sun, 16 Jul 2017 17:04:57 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C2AF6145; Sun, 16 Jul 2017 17:04:57 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6GH4vW9058662; Sun, 16 Jul 2017 17:04:57 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6GH4uIp058660; Sun, 16 Jul 2017 17:04:56 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201707161704.v6GH4uIp058660@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Sun, 16 Jul 2017 17:04:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r321049 - stable/11/sys/arm/arm X-SVN-Group: stable-11 X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: stable/11/sys/arm/arm X-SVN-Commit-Revision: 321049 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Jul 2017 17:04:58 -0000 Author: emaste Date: Sun Jul 16 17:04:56 2017 New Revision: 321049 URL: https://svnweb.freebsd.org/changeset/base/321049 Log: MFC r320056: arm: set appropriate section flags for .init_pagetable The arm kernel linker scripts place the .init_pagetable section in .bss, but .init_pagetable had no section flags set, and so did not match the expected flags for .bss. GNU ld silently ignores this case, but lld reports an error: ld: error: incompatible section flags for .bss >>> locore.o:(.init_pagetable): 0x0 >>> output section .bss: 0x3 PR: 220055 Sponsored by: The FreeBSD Foundation Modified: stable/11/sys/arm/arm/locore-v4.S stable/11/sys/arm/arm/locore-v6.S Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/arm/arm/locore-v4.S ============================================================================== --- stable/11/sys/arm/arm/locore-v4.S Sun Jul 16 16:54:03 2017 (r321048) +++ stable/11/sys/arm/arm/locore-v4.S Sun Jul 16 17:04:56 2017 (r321049) @@ -355,7 +355,7 @@ svcstk: * Memory for the initial pagetable. We are unable to place this in * the bss as this will be cleared after the table is loaded. */ - .section ".init_pagetable" + .section ".init_pagetable", "aw", %nobits .align 14 /* 16KiB aligned */ pagetable: .space L1_TABLE_SIZE Modified: stable/11/sys/arm/arm/locore-v6.S ============================================================================== --- stable/11/sys/arm/arm/locore-v6.S Sun Jul 16 16:54:03 2017 (r321048) +++ stable/11/sys/arm/arm/locore-v6.S Sun Jul 16 17:04:56 2017 (r321049) @@ -429,7 +429,7 @@ svcstk: * Memory for the initial pagetable. We are unable to place this in * the bss as this will be cleared after the table is loaded. */ - .section ".init_pagetable" + .section ".init_pagetable", "aw", %nobits .align 14 /* 16KiB aligned */ .globl boot_pt1 boot_pt1: From owner-svn-src-stable-11@freebsd.org Sun Jul 16 17:36:25 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 17BE2C09E3C; Sun, 16 Jul 2017 17:36:25 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DB15B19F8; Sun, 16 Jul 2017 17:36:24 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6GHaOVR071611; Sun, 16 Jul 2017 17:36:24 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6GHaO4Z071610; Sun, 16 Jul 2017 17:36:24 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201707161736.v6GHaO4Z071610@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Sun, 16 Jul 2017 17:36:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r321051 - in stable: 10/sys/conf 11/sys/conf X-SVN-Group: stable-11 X-SVN-Commit-Author: gjb X-SVN-Commit-Paths: in stable: 10/sys/conf 11/sys/conf X-SVN-Commit-Revision: 321051 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Jul 2017 17:36:25 -0000 Author: gjb Date: Sun Jul 16 17:36:23 2017 New Revision: 321051 URL: https://svnweb.freebsd.org/changeset/base/321051 Log: MFC r320969: Fix a missing comment marker. Sponsored by: The FreeBSD Foundation Modified: stable/11/sys/conf/NOTES Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/10/sys/conf/NOTES Directory Properties: stable/10/ (props changed) Modified: stable/11/sys/conf/NOTES ============================================================================== --- stable/11/sys/conf/NOTES Sun Jul 16 17:29:27 2017 (r321050) +++ stable/11/sys/conf/NOTES Sun Jul 16 17:36:23 2017 (r321051) @@ -304,7 +304,7 @@ options SX_NOINLINE # TURNSTILE_PROFILING enables rudimentary profiling of the hash table # used to hold active lock queues. # UMTX_PROFILING enables rudimentary profiling of the hash table used - to hold active lock queues. +# to hold active lock queues. # WITNESS enables the witness code which detects deadlocks and cycles # during locking operations. # WITNESS_KDB causes the witness code to drop into the kernel debugger if From owner-svn-src-stable-11@freebsd.org Sun Jul 16 19:16:04 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0A604C31DBF; Sun, 16 Jul 2017 19:16:04 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CBE2763828; Sun, 16 Jul 2017 19:16:03 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6GJG2oa013476; Sun, 16 Jul 2017 19:16:02 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6GJG21K013475; Sun, 16 Jul 2017 19:16:02 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201707161916.v6GJG21K013475@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Sun, 16 Jul 2017 19:16:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r321052 - stable/11/sys/dev/psci X-SVN-Group: stable-11 X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: stable/11/sys/dev/psci X-SVN-Commit-Revision: 321052 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Jul 2017 19:16:04 -0000 Author: emaste Date: Sun Jul 16 19:16:02 2017 New Revision: 321052 URL: https://svnweb.freebsd.org/changeset/base/321052 Log: MFC r320065: arm: add .arch_extension sec for smc instruction Clang 4.0 accepts the smc instruction with or without specifying .arch_extension sec, but Clang 5.0 produces an error without it. Sponsored by: The FreeBSD Foundation Modified: stable/11/sys/dev/psci/psci_arm.S Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/psci/psci_arm.S ============================================================================== --- stable/11/sys/dev/psci/psci_arm.S Sun Jul 16 17:36:23 2017 (r321051) +++ stable/11/sys/dev/psci/psci_arm.S Sun Jul 16 19:16:02 2017 (r321052) @@ -28,7 +28,8 @@ #include __FBSDID("$FreeBSD$"); -.arch_extension virt /* For hvc */ +.arch_extension sec /* For smc */ +.arch_extension virt /* For hvc */ /* * int psci_hvc_despatch(register_t psci_fnid, register_t...) From owner-svn-src-stable-11@freebsd.org Sun Jul 16 19:20:16 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8E59BC780AE; Sun, 16 Jul 2017 19:20:16 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5D0C863A27; Sun, 16 Jul 2017 19:20:16 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6GJKFGP013705; Sun, 16 Jul 2017 19:20:15 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6GJKFd9013704; Sun, 16 Jul 2017 19:20:15 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201707161920.v6GJKFd9013704@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Sun, 16 Jul 2017 19:20:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r321053 - stable/11 X-SVN-Group: stable-11 X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: stable/11 X-SVN-Commit-Revision: 321053 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Jul 2017 19:20:16 -0000 Author: emaste Date: Sun Jul 16 19:20:15 2017 New Revision: 321053 URL: https://svnweb.freebsd.org/changeset/base/321053 Log: MFC r319219: add a sanity check before installworld on the running system FreeBSD does not guarantee kernel forward compatibility (that is, running a newer userland on an older kernel). The documented upgrade procedure specifies that installkernel should be performed, followed by a reboot and then installworld. As a sanity check when installing onto the running system (DESTDIR is / or unset), attempt to run "sh echo OK" using rescue from the objdir. If rescue fails (e.g., because the system has not been rebooted and the "old" kernel lacks a system call required by the to-be-installed world), abort the installation. This was added to avoid ino64 foot-shooting in HEAD, but is generally useful for any upgrade case adding new syscalls. Sponsored by: The FreeBSD Foundation Modified: stable/11/Makefile.inc1 Directory Properties: stable/11/ (props changed) Modified: stable/11/Makefile.inc1 ============================================================================== --- stable/11/Makefile.inc1 Sun Jul 16 19:16:02 2017 (r321052) +++ stable/11/Makefile.inc1 Sun Jul 16 19:20:15 2017 (r321053) @@ -915,6 +915,22 @@ __installcheck_UGID: .PHONY fi .endfor .endif +# +# If installing over the running system (DESTDIR is / or unset) and the install +# includes rescue, try running rescue from the objdir as a sanity check. If +# rescue is not functional (e.g., because it depends on a system call not +# supported by the currently running kernel), abort the installation. +# +.if !make(distributeworld) && ${MK_RESCUE} != "no" && \ + (empty(DESTDIR) || ${DESTDIR} == "/") && empty(BYPASS_INSTALLCHECK_SH) +_installcheck_world: __installcheck_sh_check +__installcheck_sh_check: .PHONY + @if [ "`${OBJTREE}${.CURDIR}/rescue/rescue/rescue sh -c 'echo OK'`" != \ + OK ]; then \ + echo "rescue/sh check failed, installation aborted" >&2; \ + false; \ + fi +.endif # # Required install tools to be saved in a scratch dir for safety. From owner-svn-src-stable-11@freebsd.org Sun Jul 16 19:21:34 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 89DF2C7811A; Sun, 16 Jul 2017 19:21:34 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5861563CFC; Sun, 16 Jul 2017 19:21:34 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6GJLXcp013808; Sun, 16 Jul 2017 19:21:33 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6GJLXZp013807; Sun, 16 Jul 2017 19:21:33 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201707161921.v6GJLXZp013807@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Sun, 16 Jul 2017 19:21:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r321054 - stable/11/contrib/compiler-rt/lib/tsan/rtl X-SVN-Group: stable-11 X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: stable/11/contrib/compiler-rt/lib/tsan/rtl X-SVN-Commit-Revision: 321054 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Jul 2017 19:21:34 -0000 Author: emaste Date: Sun Jul 16 19:21:33 2017 New Revision: 321054 URL: https://svnweb.freebsd.org/changeset/base/321054 Log: MFC r319516: tsan: set noexec stack on aarch64 Sponsored by: The FreeBSD Foundation Modified: stable/11/contrib/compiler-rt/lib/tsan/rtl/tsan_rtl_aarch64.S Directory Properties: stable/11/ (props changed) Modified: stable/11/contrib/compiler-rt/lib/tsan/rtl/tsan_rtl_aarch64.S ============================================================================== --- stable/11/contrib/compiler-rt/lib/tsan/rtl/tsan_rtl_aarch64.S Sun Jul 16 19:20:15 2017 (r321053) +++ stable/11/contrib/compiler-rt/lib/tsan/rtl/tsan_rtl_aarch64.S Sun Jul 16 19:21:33 2017 (r321054) @@ -252,7 +252,7 @@ __sigsetjmp: CFI_ENDPROC .size __sigsetjmp, .-__sigsetjmp -#if defined(__linux__) +#if defined(__FreeBSD__) || defined(__linux__) /* We do not need executable stack. */ .section .note.GNU-stack,"",@progbits #endif From owner-svn-src-stable-11@freebsd.org Sun Jul 16 19:24:11 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 04B2BC7829B; Sun, 16 Jul 2017 19:24:11 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C557363EDC; Sun, 16 Jul 2017 19:24:10 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6GJO9Lr017484; Sun, 16 Jul 2017 19:24:09 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6GJO9RO017483; Sun, 16 Jul 2017 19:24:09 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201707161924.v6GJO9RO017483@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Sun, 16 Jul 2017 19:24:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r321055 - stable/11/sys/security/mac_bsdextended X-SVN-Group: stable-11 X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: stable/11/sys/security/mac_bsdextended X-SVN-Commit-Revision: 321055 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Jul 2017 19:24:11 -0000 Author: emaste Date: Sun Jul 16 19:24:09 2017 New Revision: 321055 URL: https://svnweb.freebsd.org/changeset/base/321055 Log: MFC r319890: Correct bitwise test in mac_bsdextended ugidfw_rule_valid() PR: 218039 CID: 1008934 Reported by: Coverity, PVS-Studio Sponsored by: The FreeBSD Foundation Modified: stable/11/sys/security/mac_bsdextended/mac_bsdextended.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/security/mac_bsdextended/mac_bsdextended.c ============================================================================== --- stable/11/sys/security/mac_bsdextended/mac_bsdextended.c Sun Jul 16 19:21:33 2017 (r321054) +++ stable/11/sys/security/mac_bsdextended/mac_bsdextended.c Sun Jul 16 19:24:09 2017 (r321055) @@ -125,7 +125,7 @@ ugidfw_rule_valid(struct mac_bsdextended_rule *rule) return (EINVAL); if ((rule->mbr_object.mbo_neg | MBO_ALL_FLAGS) != MBO_ALL_FLAGS) return (EINVAL); - if ((rule->mbr_object.mbo_neg | MBO_TYPE_DEFINED) && + if (((rule->mbr_object.mbo_flags & MBO_TYPE_DEFINED) != 0) && (rule->mbr_object.mbo_type | MBO_ALL_TYPE) != MBO_ALL_TYPE) return (EINVAL); if ((rule->mbr_mode | MBI_ALLPERM) != MBI_ALLPERM) From owner-svn-src-stable-11@freebsd.org Sun Jul 16 21:03:27 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8810EC7A2C8; Sun, 16 Jul 2017 21:03:27 +0000 (UTC) (envelope-from wulf@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5329067170; Sun, 16 Jul 2017 21:03:27 +0000 (UTC) (envelope-from wulf@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6GL3QZw058910; Sun, 16 Jul 2017 21:03:26 GMT (envelope-from wulf@FreeBSD.org) Received: (from wulf@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6GL3QUm058909; Sun, 16 Jul 2017 21:03:26 GMT (envelope-from wulf@FreeBSD.org) Message-Id: <201707162103.v6GL3QUm058909@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: wulf set sender to wulf@FreeBSD.org using -f From: Vladimir Kondratyev Date: Sun, 16 Jul 2017 21:03:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r321060 - stable/11/sys/dev/atkbdc X-SVN-Group: stable-11 X-SVN-Commit-Author: wulf X-SVN-Commit-Paths: stable/11/sys/dev/atkbdc X-SVN-Commit-Revision: 321060 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Jul 2017 21:03:27 -0000 Author: wulf Date: Sun Jul 16 21:03:26 2017 New Revision: 321060 URL: https://svnweb.freebsd.org/changeset/base/321060 Log: MFC r319162: psm: add support for evdev protocol Approved by: gonzo (mentor) Modified: stable/11/sys/dev/atkbdc/psm.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/atkbdc/psm.c ============================================================================== --- stable/11/sys/dev/atkbdc/psm.c Sun Jul 16 20:56:41 2017 (r321059) +++ stable/11/sys/dev/atkbdc/psm.c Sun Jul 16 21:03:26 2017 (r321060) @@ -63,6 +63,7 @@ __FBSDID("$FreeBSD$"); #include "opt_isa.h" #include "opt_psm.h" +#include "opt_evdev.h" #include #include @@ -90,6 +91,11 @@ __FBSDID("$FreeBSD$"); #include #endif +#ifdef EVDEV_SUPPORT +#include +#include +#endif + #include #include @@ -325,8 +331,14 @@ typedef struct elantechhw { #define ELANTECH_REG_RDWR 0x00 #define ELANTECH_CUSTOM_CMD 0xf8 +#ifdef EVDEV_SUPPORT +#define ELANTECH_MAX_FINGERS 5 +#else #define ELANTECH_MAX_FINGERS PSM_FINGERS +#endif +#define ELANTECH_FINGER_MAX_P 255 +#define ELANTECH_FINGER_MAX_W 15 #define ELANTECH_FINGER_SET_XYP(pb) (finger_t) { \ .x = (((pb)->ipacket[1] & 0x0f) << 8) | (pb)->ipacket[2], \ .y = (((pb)->ipacket[4] & 0x0f) << 8) | (pb)->ipacket[5], \ @@ -418,6 +430,10 @@ struct psm_softc { /* Driver status information */ int cmdcount; struct sigio *async; /* Processes waiting for SIGIO */ int extended_buttons; +#ifdef EVDEV_SUPPORT + struct evdev_dev *evdev_a; /* Absolute reporting device */ + struct evdev_dev *evdev_r; /* Relative reporting device */ +#endif }; static devclass_t psm_devclass; @@ -427,6 +443,8 @@ static devclass_t psm_devclass; #define PSM_ASLP 2 /* Waiting for mouse data */ #define PSM_SOFTARMED 4 /* Software interrupt armed */ #define PSM_NEED_SYNCBITS 8 /* Set syncbits using next data pkt */ +#define PSM_EV_OPEN_R 0x10 /* Relative evdev device is open */ +#define PSM_EV_OPEN_A 0x20 /* Absolute evdev device is open */ /* driver configuration flags (config) */ #define PSM_CONFIG_RESOLUTION 0x000f /* resolution */ @@ -532,13 +550,23 @@ static int psmattach(device_t); static int psmdetach(device_t); static int psmresume(device_t); -static d_open_t psmopen; -static d_close_t psmclose; +static d_open_t psm_cdev_open; +static d_close_t psm_cdev_close; static d_read_t psmread; static d_write_t psmwrite; static d_ioctl_t psmioctl; static d_poll_t psmpoll; +static int psmopen(struct psm_softc *); +static int psmclose(struct psm_softc *); + +#ifdef EVDEV_SUPPORT +static evdev_open_t psm_ev_open_r; +static evdev_close_t psm_ev_close_r; +static evdev_open_t psm_ev_open_a; +static evdev_close_t psm_ev_close_a; +#endif + static int enable_aux_dev(KBDC); static int disable_aux_dev(KBDC); static int get_mouse_status(KBDC, int *, int, int); @@ -668,8 +696,8 @@ static driver_t psm_driver = { static struct cdevsw psm_cdevsw = { .d_version = D_VERSION, .d_flags = D_NEEDGIANT, - .d_open = psmopen, - .d_close = psmclose, + .d_open = psm_cdev_open, + .d_close = psm_cdev_close, .d_read = psmread, .d_write = psmwrite, .d_ioctl = psmioctl, @@ -677,6 +705,17 @@ static struct cdevsw psm_cdevsw = { .d_name = PSM_DRIVER_NAME, }; +#ifdef EVDEV_SUPPORT +static const struct evdev_methods psm_ev_methods_r = { + .ev_open = psm_ev_open_r, + .ev_close = psm_ev_close_r, +}; +static const struct evdev_methods psm_ev_methods_a = { + .ev_open = psm_ev_open_a, + .ev_close = psm_ev_close_a, +}; +#endif + /* device I/O routines */ static int enable_aux_dev(KBDC kbdc) @@ -1197,7 +1236,8 @@ reinitialize(struct psm_softc *sc, int doinit) splx(s); /* restore the driver state */ - if ((sc->state & PSM_OPEN) && (err == 0)) { + if ((sc->state & (PSM_OPEN | PSM_EV_OPEN_R | PSM_EV_OPEN_A)) && + (err == 0)) { /* enable the aux device and the port again */ err = doopen(sc, c); if (err != 0) @@ -1578,7 +1618,271 @@ psmprobe(device_t dev) return (0); } +#ifdef EVDEV_SUPPORT +/* Values are taken from Linux drivers for userland software compatibility */ +#define PS2_MOUSE_VENDOR 0x0002 +#define PS2_MOUSE_GENERIC_PRODUCT 0x0001 +#define PS2_MOUSE_SYNAPTICS_NAME "SynPS/2 Synaptics TouchPad" +#define PS2_MOUSE_SYNAPTICS_PRODUCT 0x0007 +#define PS2_MOUSE_TRACKPOINT_NAME "TPPS/2 IBM TrackPoint" +#define PS2_MOUSE_TRACKPOINT_PRODUCT 0x000A +#define PS2_MOUSE_ELANTECH_NAME "ETPS/2 Elantech Touchpad" +#define PS2_MOUSE_ELANTECH_ST_NAME "ETPS/2 Elantech TrackPoint" +#define PS2_MOUSE_ELANTECH_PRODUCT 0x000E + +#define ABSINFO_END { ABS_CNT, 0, 0, 0 } + +static void +psm_support_abs_bulk(struct evdev_dev *evdev, const uint16_t info[][4]) +{ + size_t i; + + for (i = 0; info[i][0] != ABS_CNT; i++) + evdev_support_abs(evdev, info[i][0], 0, info[i][1], info[i][2], + 0, 0, info[i][3]); +} + +static void +psm_push_mt_finger(struct psm_softc *sc, int id, const finger_t *f) +{ + int y = sc->synhw.minimumYCoord + sc->synhw.maximumYCoord - f->y; + + evdev_push_abs(sc->evdev_a, ABS_MT_SLOT, id); + evdev_push_abs(sc->evdev_a, ABS_MT_TRACKING_ID, id); + evdev_push_abs(sc->evdev_a, ABS_MT_POSITION_X, f->x); + evdev_push_abs(sc->evdev_a, ABS_MT_POSITION_Y, y); + evdev_push_abs(sc->evdev_a, ABS_MT_PRESSURE, f->p); +} + +static void +psm_push_st_finger(struct psm_softc *sc, const finger_t *f) +{ + int y = sc->synhw.minimumYCoord + sc->synhw.maximumYCoord - f->y; + + evdev_push_abs(sc->evdev_a, ABS_X, f->x); + evdev_push_abs(sc->evdev_a, ABS_Y, y); + evdev_push_abs(sc->evdev_a, ABS_PRESSURE, f->p); + if (sc->synhw.capPalmDetect) + evdev_push_abs(sc->evdev_a, ABS_TOOL_WIDTH, f->w); +} + +static void +psm_release_mt_slot(struct evdev_dev *evdev, int32_t slot) +{ + + evdev_push_abs(evdev, ABS_MT_SLOT, slot); + evdev_push_abs(evdev, ABS_MT_TRACKING_ID, -1); +} + static int +psm_register(device_t dev, int model_code) +{ + struct psm_softc *sc = device_get_softc(dev); + struct evdev_dev *evdev_r; + int error, i, nbuttons, nwheels, product; + bool is_pointing_stick; + const char *name; + + name = model_name(model_code); + nbuttons = sc->hw.buttons; + product = PS2_MOUSE_GENERIC_PRODUCT; + nwheels = 0; + is_pointing_stick = false; + + switch (model_code) { + case MOUSE_MODEL_TRACKPOINT: + name = PS2_MOUSE_TRACKPOINT_NAME; + product = PS2_MOUSE_TRACKPOINT_PRODUCT; + nbuttons = 3; + is_pointing_stick = true; + break; + + case MOUSE_MODEL_ELANTECH: + name = PS2_MOUSE_ELANTECH_ST_NAME; + product = PS2_MOUSE_ELANTECH_PRODUCT; + nbuttons = 3; + is_pointing_stick = true; + break; + + case MOUSE_MODEL_MOUSEMANPLUS: + case MOUSE_MODEL_4D: + nwheels = 2; + break; + + case MOUSE_MODEL_EXPLORER: + case MOUSE_MODEL_INTELLI: + case MOUSE_MODEL_NET: + case MOUSE_MODEL_NETSCROLL: + case MOUSE_MODEL_4DPLUS: + nwheels = 1; + break; + } + + evdev_r = evdev_alloc(); + evdev_set_name(evdev_r, name); + evdev_set_phys(evdev_r, device_get_nameunit(dev)); + evdev_set_id(evdev_r, BUS_I8042, PS2_MOUSE_VENDOR, product, 0); + evdev_set_methods(evdev_r, sc, &psm_ev_methods_r); + + evdev_support_prop(evdev_r, INPUT_PROP_POINTER); + if (is_pointing_stick) + evdev_support_prop(evdev_r, INPUT_PROP_POINTING_STICK); + evdev_support_event(evdev_r, EV_SYN); + evdev_support_event(evdev_r, EV_KEY); + evdev_support_event(evdev_r, EV_REL); + evdev_support_rel(evdev_r, REL_X); + evdev_support_rel(evdev_r, REL_Y); + switch (nwheels) { + case 2: + evdev_support_rel(evdev_r, REL_HWHEEL); + /* FALLTHROUGH */ + case 1: + evdev_support_rel(evdev_r, REL_WHEEL); + } + for (i = 0; i < nbuttons; i++) + evdev_support_key(evdev_r, BTN_MOUSE + i); + + error = evdev_register_mtx(evdev_r, &Giant); + if (error) + evdev_free(evdev_r); + else + sc->evdev_r = evdev_r; + return (error); +} + +static int +psm_register_synaptics(device_t dev) +{ + struct psm_softc *sc = device_get_softc(dev); + const uint16_t synaptics_absinfo_st[][4] = { + { ABS_X, sc->synhw.minimumXCoord, + sc->synhw.maximumXCoord, sc->synhw.infoXupmm }, + { ABS_Y, sc->synhw.minimumYCoord, + sc->synhw.maximumYCoord, sc->synhw.infoYupmm }, + { ABS_PRESSURE, 0, ELANTECH_FINGER_MAX_P, 0 }, + ABSINFO_END, + }; + const uint16_t synaptics_absinfo_mt[][4] = { + { ABS_MT_SLOT, 0, PSM_FINGERS-1, 0}, + { ABS_MT_TRACKING_ID, -1, PSM_FINGERS-1, 0}, + { ABS_MT_POSITION_X, sc->synhw.minimumXCoord, + sc->synhw.maximumXCoord, sc->synhw.infoXupmm }, + { ABS_MT_POSITION_Y, sc->synhw.minimumYCoord, + sc->synhw.maximumYCoord, sc->synhw.infoYupmm }, + { ABS_MT_PRESSURE, 0, ELANTECH_FINGER_MAX_P, 0 }, + ABSINFO_END, + }; + struct evdev_dev *evdev_a; + int error, i, guest_model; + + evdev_a = evdev_alloc(); + evdev_set_name(evdev_a, PS2_MOUSE_SYNAPTICS_NAME); + evdev_set_phys(evdev_a, device_get_nameunit(dev)); + evdev_set_id(evdev_a, BUS_I8042, PS2_MOUSE_VENDOR, + PS2_MOUSE_SYNAPTICS_PRODUCT, 0); + evdev_set_methods(evdev_a, sc, &psm_ev_methods_a); + + evdev_support_event(evdev_a, EV_SYN); + evdev_support_event(evdev_a, EV_KEY); + evdev_support_event(evdev_a, EV_ABS); + evdev_support_prop(evdev_a, INPUT_PROP_POINTER); + if (sc->synhw.capAdvancedGestures) + evdev_support_prop(evdev_a, INPUT_PROP_SEMI_MT); + if (sc->synhw.capClickPad) + evdev_support_prop(evdev_a, INPUT_PROP_BUTTONPAD); + evdev_support_key(evdev_a, BTN_TOUCH); + evdev_support_nfingers(evdev_a, 3); + psm_support_abs_bulk(evdev_a, synaptics_absinfo_st); + if (sc->synhw.capAdvancedGestures || sc->synhw.capReportsV) + psm_support_abs_bulk(evdev_a, synaptics_absinfo_mt); + if (sc->synhw.capPalmDetect) + evdev_support_abs(evdev_a, ABS_TOOL_WIDTH, 0, 0, 15, 0, 0, 0); + evdev_support_key(evdev_a, BTN_LEFT); + if (!sc->synhw.capClickPad) { + evdev_support_key(evdev_a, BTN_RIGHT); + if (sc->synhw.capExtended && sc->synhw.capMiddle) + evdev_support_key(evdev_a, BTN_MIDDLE); + } + if (sc->synhw.capExtended && sc->synhw.capFourButtons) { + evdev_support_key(evdev_a, BTN_BACK); + evdev_support_key(evdev_a, BTN_FORWARD); + } + if (sc->synhw.capExtended && (sc->synhw.nExtendedButtons > 0)) + for (i = 0; i < sc->synhw.nExtendedButtons; i++) + evdev_support_key(evdev_a, BTN_0 + i); + + error = evdev_register_mtx(evdev_a, &Giant); + if (!error && sc->synhw.capPassthrough) { + guest_model = sc->tpinfo.sysctl_tree != NULL ? + MOUSE_MODEL_TRACKPOINT : MOUSE_MODEL_GENERIC; + error = psm_register(dev, guest_model); + } + if (error) + evdev_free(evdev_a); + else + sc->evdev_a = evdev_a; + return (error); +} + +static int +psm_register_elantech(device_t dev) +{ + struct psm_softc *sc = device_get_softc(dev); + const uint16_t elantech_absinfo[][4] = { + { ABS_X, 0, sc->elanhw.sizex, + sc->elanhw.dpmmx }, + { ABS_Y, 0, sc->elanhw.sizey, + sc->elanhw.dpmmy }, + { ABS_PRESSURE, 0, ELANTECH_FINGER_MAX_P, 0 }, + { ABS_TOOL_WIDTH, 0, ELANTECH_FINGER_MAX_W, 0 }, + { ABS_MT_SLOT, 0, ELANTECH_MAX_FINGERS - 1, 0 }, + { ABS_MT_TRACKING_ID, -1, ELANTECH_MAX_FINGERS - 1, 0 }, + { ABS_MT_POSITION_X, 0, sc->elanhw.sizex, + sc->elanhw.dpmmx }, + { ABS_MT_POSITION_Y, 0, sc->elanhw.sizey, + sc->elanhw.dpmmy }, + { ABS_MT_PRESSURE, 0, ELANTECH_FINGER_MAX_P, 0 }, + { ABS_MT_TOUCH_MAJOR, 0, ELANTECH_FINGER_MAX_W * + sc->elanhw.dptracex, 0 }, + ABSINFO_END, + }; + struct evdev_dev *evdev_a; + int error; + + evdev_a = evdev_alloc(); + evdev_set_name(evdev_a, PS2_MOUSE_ELANTECH_NAME); + evdev_set_phys(evdev_a, device_get_nameunit(dev)); + evdev_set_id(evdev_a, BUS_I8042, PS2_MOUSE_VENDOR, + PS2_MOUSE_ELANTECH_PRODUCT, 0); + evdev_set_methods(evdev_a, sc, &psm_ev_methods_a); + + evdev_support_event(evdev_a, EV_SYN); + evdev_support_event(evdev_a, EV_KEY); + evdev_support_event(evdev_a, EV_ABS); + evdev_support_prop(evdev_a, INPUT_PROP_POINTER); + if (sc->elanhw.issemimt) + evdev_support_prop(evdev_a, INPUT_PROP_SEMI_MT); + if (sc->elanhw.isclickpad) + evdev_support_prop(evdev_a, INPUT_PROP_BUTTONPAD); + evdev_support_key(evdev_a, BTN_TOUCH); + evdev_support_nfingers(evdev_a, ELANTECH_MAX_FINGERS); + evdev_support_key(evdev_a, BTN_LEFT); + if (!sc->elanhw.isclickpad) + evdev_support_key(evdev_a, BTN_RIGHT); + psm_support_abs_bulk(evdev_a, elantech_absinfo); + + error = evdev_register_mtx(evdev_a, &Giant); + if (!error && sc->elanhw.hastrackpoint) + error = psm_register(dev, MOUSE_MODEL_ELANTECH); + if (error) + evdev_free(evdev_a); + else + sc->evdev_a = evdev_a; + return (error); +} +#endif + +static int psmattach(device_t dev) { int unit = device_get_unit(dev); @@ -1609,6 +1913,24 @@ psmattach(device_t dev) sc->bdev = make_dev(&psm_cdevsw, 0, 0, 0, 0666, "bpsm%d", unit); sc->bdev->si_drv1 = sc; +#ifdef EVDEV_SUPPORT + switch (sc->hw.model) { + case MOUSE_MODEL_SYNAPTICS: + error = psm_register_synaptics(dev); + break; + + case MOUSE_MODEL_ELANTECH: + error = psm_register_elantech(dev); + break; + + default: + error = psm_register(dev, sc->hw.model); + } + + if (error) + return (error); +#endif + /* Some touchpad devices need full reinitialization after suspend. */ switch (sc->hw.model) { case MOUSE_MODEL_SYNAPTICS: @@ -1657,6 +1979,11 @@ psmdetach(device_t dev) if (sc->state & PSM_OPEN) return (EBUSY); +#ifdef EVDEV_SUPPORT + evdev_free(sc->evdev_r); + evdev_free(sc->evdev_a); +#endif + rid = KBDC_RID_AUX; bus_teardown_intr(dev, sc->intr, sc->ih); bus_release_resource(dev, SYS_RES_IRQ, rid, sc->intr); @@ -1670,13 +1997,83 @@ psmdetach(device_t dev) return (0); } +#ifdef EVDEV_SUPPORT static int -psmopen(struct cdev *dev, int flag, int fmt, struct thread *td) +psm_ev_open_r(struct evdev_dev *evdev, void *ev_softc) { + struct psm_softc *sc = (struct psm_softc *)ev_softc; + int err = 0; + + /* Get device data */ + if ((sc->state & PSM_VALID) == 0) { + /* the device is no longer valid/functioning */ + return (ENXIO); + } + + if (!(sc->state & (PSM_OPEN | PSM_EV_OPEN_A))) + err = psmopen(sc); + + if (err == 0) + sc->state |= PSM_EV_OPEN_R; + + return (err); +} + +static void +psm_ev_close_r(struct evdev_dev *evdev, void *ev_softc) +{ + struct psm_softc *sc = (struct psm_softc *)ev_softc; + + sc->state &= ~PSM_EV_OPEN_R; + + if (sc->state & (PSM_OPEN | PSM_EV_OPEN_A)) + return; + + if (sc->state & PSM_VALID) + psmclose(sc); +} + +static int +psm_ev_open_a(struct evdev_dev *evdev, void *ev_softc) +{ + struct psm_softc *sc = (struct psm_softc *)ev_softc; + int err = 0; + + /* Get device data */ + if ((sc->state & PSM_VALID) == 0) { + /* the device is no longer valid/functioning */ + return (ENXIO); + } + + if (!(sc->state & (PSM_OPEN | PSM_EV_OPEN_R))) + err = psmopen(sc); + + if (err == 0) + sc->state |= PSM_EV_OPEN_A; + + return (err); +} + +static void +psm_ev_close_a(struct evdev_dev *evdev, void *ev_softc) +{ + struct psm_softc *sc = (struct psm_softc *)ev_softc; + + sc->state &= ~PSM_EV_OPEN_A; + + if (sc->state & (PSM_OPEN | PSM_EV_OPEN_R)) + return; + + if (sc->state & PSM_VALID) + psmclose(sc); +} +#endif + +static int +psm_cdev_open(struct cdev *dev, int flag, int fmt, struct thread *td) +{ struct psm_softc *sc; - int command_byte; - int err; - int s; + int err = 0; /* Get device data */ sc = dev->si_drv1; @@ -1691,6 +2088,59 @@ psmopen(struct cdev *dev, int flag, int fmt, struct th device_busy(devclass_get_device(psm_devclass, sc->unit)); +#ifdef EVDEV_SUPPORT + /* Already opened by evdev */ + if (!(sc->state & (PSM_EV_OPEN_R | PSM_EV_OPEN_A))) +#endif + err = psmopen(sc); + + if (err == 0) + sc->state |= PSM_OPEN; + else + device_unbusy(devclass_get_device(psm_devclass, sc->unit)); + + return (err); +} + +static int +psm_cdev_close(struct cdev *dev, int flag, int fmt, struct thread *td) +{ + struct psm_softc *sc; + int err = 0; + + /* Get device data */ + sc = dev->si_drv1; + if ((sc == NULL) || (sc->state & PSM_VALID) == 0) { + /* the device is no longer valid/functioning */ + return (ENXIO); + } + +#ifdef EVDEV_SUPPORT + /* Still opened by evdev */ + if (!(sc->state & (PSM_EV_OPEN_R | PSM_EV_OPEN_A))) +#endif + err = psmclose(sc); + + if (err == 0) { + sc->state &= ~PSM_OPEN; + /* clean up and sigio requests */ + if (sc->async != NULL) { + funsetown(&sc->async); + sc->async = NULL; + } + device_unbusy(devclass_get_device(psm_devclass, sc->unit)); + } + + return (err); +} + +static int +psmopen(struct psm_softc *sc) +{ + int command_byte; + int err; + int s; + /* Initialize state */ sc->mode.level = sc->dflt_mode.level; sc->mode.protocol = sc->dflt_mode.protocol; @@ -1750,16 +2200,13 @@ psmopen(struct cdev *dev, int flag, int fmt, struct th err = doopen(sc, command_byte); /* done */ - if (err == 0) - sc->state |= PSM_OPEN; kbdc_lock(sc->kbdc, FALSE); return (err); } static int -psmclose(struct cdev *dev, int flag, int fmt, struct thread *td) +psmclose(struct psm_softc *sc) { - struct psm_softc *sc = dev->si_drv1; int stat[3]; int command_byte; int s; @@ -1836,16 +2283,8 @@ psmclose(struct cdev *dev, int flag, int fmt, struct t /* remove anything left in the output buffer */ empty_aux_buffer(sc->kbdc, 10); - /* clean up and sigio requests */ - if (sc->async != NULL) { - funsetown(&sc->async); - sc->async = NULL; - } - /* close is almost always successful */ - sc->state &= ~PSM_OPEN; kbdc_lock(sc->kbdc, FALSE); - device_unbusy(devclass_get_device(psm_devclass, sc->unit)); return (0); } @@ -2496,7 +2935,7 @@ psmintr(void *arg) pb = &sc->pqueue[sc->pqueue_end]; /* discard the byte if the device is not open */ - if ((sc->state & PSM_OPEN) == 0) + if (!(sc->state & (PSM_OPEN | PSM_EV_OPEN_R | PSM_EV_OPEN_A))) continue; getmicrouptime(&now); @@ -2854,7 +3293,15 @@ proc_synaptics(struct psm_softc *sc, packetbuf_t *pb, guest_buttons |= MOUSE_BUTTON2DOWN; if (pb->ipacket[1] & 0x02) guest_buttons |= MOUSE_BUTTON3DOWN; - +#ifdef EVDEV_SUPPORT + if (evdev_rcpt_mask & EVDEV_RCPT_HW_MOUSE) { + evdev_push_rel(sc->evdev_r, REL_X, *x); + evdev_push_rel(sc->evdev_r, REL_Y, -*y); + evdev_push_mouse_btn(sc->evdev_r, + guest_buttons); + evdev_sync(sc->evdev_r); + } +#endif ms->button = touchpad_buttons | guest_buttons | sc->extended_buttons; } @@ -2965,6 +3412,24 @@ proc_synaptics(struct psm_softc *sc, packetbuf_t *pb, int mask = 0; maskedbits = (sc->synhw.nExtendedButtons + 1) >> 1; mask = (1 << maskedbits) - 1; +#ifdef EVDEV_SUPPORT + int i; + if (evdev_rcpt_mask & EVDEV_RCPT_HW_MOUSE) { + if (sc->synhw.capPassthrough) { + evdev_push_mouse_btn(sc->evdev_r, + extended_buttons); + evdev_sync(sc->evdev_r); + } + for (i = 0; i < maskedbits; i++) { + evdev_push_key(sc->evdev_a, + BTN_0 + i * 2, + pb->ipacket[4] & (1 << i)); + evdev_push_key(sc->evdev_a, + BTN_0 + i * 2 + 1, + pb->ipacket[5] & (1 << i)); + } + } +#endif pb->ipacket[4] &= ~(mask); pb->ipacket[5] &= ~(mask); } else if (!sc->syninfo.directional_scrolls && @@ -3016,6 +3481,31 @@ proc_synaptics(struct psm_softc *sc, packetbuf_t *pb, if (id >= nfingers) PSM_FINGER_RESET(f[id]); +#ifdef EVDEV_SUPPORT + if (evdev_rcpt_mask & EVDEV_RCPT_HW_MOUSE) { + for (id = 0; id < PSM_FINGERS; id++) { + if (PSM_FINGER_IS_SET(f[id])) + psm_push_mt_finger(sc, id, &f[id]); + else + psm_release_mt_slot(sc->evdev_a, id); + } + evdev_push_key(sc->evdev_a, BTN_TOUCH, nfingers > 0); + evdev_push_nfingers(sc->evdev_a, nfingers); + if (nfingers > 0) + psm_push_st_finger(sc, &f[0]); + else + evdev_push_abs(sc->evdev_a, ABS_PRESSURE, 0); + evdev_push_mouse_btn(sc->evdev_a, touchpad_buttons); + if (sc->synhw.capExtended && sc->synhw.capFourButtons) { + evdev_push_key(sc->evdev_a, BTN_FORWARD, + touchpad_buttons & MOUSE_BUTTON4DOWN); + evdev_push_key(sc->evdev_a, BTN_BACK, + touchpad_buttons & MOUSE_BUTTON5DOWN); + } + evdev_sync(sc->evdev_a); + } +#endif + ms->button = touchpad_buttons; psmgestures(sc, &f[0], nfingers, ms); @@ -4015,7 +4505,12 @@ proc_elantech(struct psm_softc *sc, packetbuf_t *pb, m ((pb->ipacket[0] & 0x01) ? MOUSE_BUTTON1DOWN : 0) | ((pb->ipacket[0] & 0x02) ? MOUSE_BUTTON3DOWN : 0) | ((pb->ipacket[0] & 0x04) ? MOUSE_BUTTON2DOWN : 0); - +#ifdef EVDEV_SUPPORT + evdev_push_rel(sc->evdev_r, REL_X, *x); + evdev_push_rel(sc->evdev_r, REL_Y, -*y); + evdev_push_mouse_btn(sc->evdev_r, trackpoint_button); + evdev_sync(sc->evdev_r); +#endif ms->button = touchpad_button | trackpoint_button; return (0); @@ -4042,6 +4537,31 @@ proc_elantech(struct psm_softc *sc, packetbuf_t *pb, m ((pb->ipacket[0] & 0x02) ? MOUSE_BUTTON3DOWN : 0); } +#ifdef EVDEV_SUPPORT + if (evdev_rcpt_mask & EVDEV_RCPT_HW_MOUSE) { + for (id = 0; id < ELANTECH_MAX_FINGERS; id++) { + if (PSM_FINGER_IS_SET(f[id])) { + psm_push_mt_finger(sc, id, &f[id]); + /* Convert touch width to surface units */ + evdev_push_abs(sc->evdev_a, ABS_MT_TOUCH_MAJOR, + f[id].w * sc->elanhw.dptracex); + } + if (sc->elanaction.mask & (1 << id) && + !(mask & (1 << id))) + psm_release_mt_slot(sc->evdev_a, id); + } + evdev_push_key(sc->evdev_a, BTN_TOUCH, nfingers > 0); + evdev_push_nfingers(sc->evdev_a, nfingers); + if (nfingers > 0) { + if (PSM_FINGER_IS_SET(f[0])) + psm_push_st_finger(sc, &f[0]); + } else + evdev_push_abs(sc->evdev_a, ABS_PRESSURE, 0); + evdev_push_mouse_btn(sc->evdev_a, touchpad_button); + evdev_sync(sc->evdev_a); + } +#endif + ms->button = touchpad_button | trackpoint_button; /* Send finger 1 position to gesture processor */ @@ -4382,6 +4902,41 @@ psmsoftintr(void *arg) break; } +#ifdef EVDEV_SUPPORT + if (evdev_rcpt_mask & EVDEV_RCPT_HW_MOUSE && + sc->hw.model != MOUSE_MODEL_ELANTECH && + sc->hw.model != MOUSE_MODEL_SYNAPTICS) { + evdev_push_rel(sc->evdev_r, EV_REL, x); + evdev_push_rel(sc->evdev_r, EV_REL, -y); + + switch (sc->hw.model) { + case MOUSE_MODEL_EXPLORER: + case MOUSE_MODEL_INTELLI: + case MOUSE_MODEL_NET: + case MOUSE_MODEL_NETSCROLL: + case MOUSE_MODEL_4DPLUS: + evdev_push_rel(sc->evdev_r, REL_WHEEL, -z); + break; + case MOUSE_MODEL_MOUSEMANPLUS: + case MOUSE_MODEL_4D: + switch (z) { + case 1: + case -1: + evdev_push_rel(sc->evdev_r, REL_WHEEL, -z); + break; + case 2: + case -2: + evdev_push_rel(sc->evdev_r, REL_HWHEEL, z / 2); + break; + } + break; + } + + evdev_push_mouse_btn(sc->evdev_r, ms.button); + evdev_sync(sc->evdev_r); + } +#endif + /* scale values */ if (sc->mode.accelfactor >= 1) { if (x != 0) { @@ -6494,6 +7049,9 @@ psmresume(device_t dev) } DRIVER_MODULE(psm, atkbdc, psm_driver, psm_devclass, 0, 0); +#ifdef EVDEV_SUPPORT +MODULE_DEPEND(psm, evdev, 1, 1, 1); +#endif #ifdef DEV_ISA From owner-svn-src-stable-11@freebsd.org Mon Jul 17 02:52:03 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D38B8C7F070; Mon, 17 Jul 2017 02:52:03 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9A9326F0E7; Mon, 17 Jul 2017 02:52:03 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6H2q2Db002497; Mon, 17 Jul 2017 02:52:02 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6H2q2C6002494; Mon, 17 Jul 2017 02:52:02 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201707170252.v6H2q2C6002494@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Mon, 17 Jul 2017 02:52:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r321064 - in stable/11: share/man/man4 sys/dev/arcmsr X-SVN-Group: stable-11 X-SVN-Commit-Author: delphij X-SVN-Commit-Paths: in stable/11: share/man/man4 sys/dev/arcmsr X-SVN-Commit-Revision: 321064 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Jul 2017 02:52:03 -0000 Author: delphij Date: Mon Jul 17 02:52:02 2017 New Revision: 321064 URL: https://svnweb.freebsd.org/changeset/base/321064 Log: MFC r320986: Update arcmsr(4) to 1.40.00.00 in order to add support of ARC-1884 SATA RAID controllers. Many thanks to Areca for continuing to support FreeBSD. Submitted by: 黃清隆 Modified: stable/11/share/man/man4/arcmsr.4 stable/11/sys/dev/arcmsr/arcmsr.c stable/11/sys/dev/arcmsr/arcmsr.h Directory Properties: stable/11/ (props changed) Modified: stable/11/share/man/man4/arcmsr.4 ============================================================================== --- stable/11/share/man/man4/arcmsr.4 Mon Jul 17 00:42:13 2017 (r321063) +++ stable/11/share/man/man4/arcmsr.4 Mon Jul 17 02:52:02 2017 (r321064) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 4, 2015 +.Dd July 14, 2017 .Dt ARCMSR 4 .Os .Sh NAME @@ -147,6 +147,8 @@ ARC-1880 ARC-1882 .It ARC-1883 +.It +ARC-1884 .El .Sh FILES .Bl -tag -width ".Pa /dev/arcmsr?" -compact Modified: stable/11/sys/dev/arcmsr/arcmsr.c ============================================================================== --- stable/11/sys/dev/arcmsr/arcmsr.c Mon Jul 17 00:42:13 2017 (r321063) +++ stable/11/sys/dev/arcmsr/arcmsr.c Mon Jul 17 02:52:02 2017 (r321064) @@ -77,6 +77,7 @@ ** 1.20.00.28 09/13/2013 Ching Huang Removed recursive mutex in arcmsr_abort_dr_ccbs ** 1.20.00.29 12/18/2013 Ching Huang Change simq allocation number, support ARC1883 ** 1.30.00.00 11/30/2015 Ching Huang Added support ARC1203 +** 1.40.00.00 07/11/2017 Ching Huang Added support ARC1884 ****************************************************************************************** */ @@ -148,7 +149,7 @@ __FBSDID("$FreeBSD$"); #define arcmsr_callout_init(a) callout_init(a); #endif -#define ARCMSR_DRIVER_VERSION "arcmsr version 1.30.00.00 2015-11-30" +#define ARCMSR_DRIVER_VERSION "arcmsr version 1.40.00.00 2017-07-11" #include /* ************************************************************************** @@ -185,6 +186,8 @@ static void arcmsr_rescanLun_cb(struct cam_periph *per static void arcmsr_polling_devmap(void *arg); static void arcmsr_srb_timeout(void *arg); static void arcmsr_hbd_postqueue_isr(struct AdapterControlBlock *acb); +static void arcmsr_hbe_postqueue_isr(struct AdapterControlBlock *acb); +void arcmsr_teardown_intr(device_t dev, struct AdapterControlBlock *acb); #ifdef ARCMSR_DEBUG1 static void arcmsr_dump_data(struct AdapterControlBlock *acb); #endif @@ -376,6 +379,12 @@ static u_int32_t arcmsr_disable_allintr( struct Adapte CHIP_REG_WRITE32(HBD_MessageUnit, 0, pcief0_int_enable, ARCMSR_HBDMU_ALL_INT_DISABLE); } break; + case ACB_ADAPTER_TYPE_E: { + /* disable all outbound interrupt */ + intmask_org = CHIP_REG_READ32(HBC_MessageUnit, 0, host_int_mask) ; /* disable outbound message0 int */ + CHIP_REG_WRITE32(HBE_MessageUnit, 0, host_int_mask, intmask_org | ARCMSR_HBEMU_ALL_INTMASKENABLE); + } + break; } return (intmask_org); } @@ -418,6 +427,13 @@ static void arcmsr_enable_allintr( struct AdapterContr acb->outbound_int_enable = mask; } break; + case ACB_ADAPTER_TYPE_E: { + /* enable outbound Post Queue, outbound doorbell Interrupt */ + mask = ~(ARCMSR_HBEMU_OUTBOUND_DOORBELL_ISR | ARCMSR_HBEMU_OUTBOUND_POSTQUEUE_ISR); + CHIP_REG_WRITE32(HBE_MessageUnit, 0, host_int_mask, intmask_org & mask); + acb->outbound_int_enable = ~(intmask_org & mask) & 0x0000000f; + } + break; } } /* @@ -503,6 +519,28 @@ static u_int8_t arcmsr_hbd_wait_msgint_ready(struct Ad return (FALSE); } /* +********************************************************************** +********************************************************************** +*/ +static u_int8_t arcmsr_hbe_wait_msgint_ready(struct AdapterControlBlock *acb) +{ + u_int32_t Index, read_doorbell; + u_int8_t Retries = 0x00; + + do { + for(Index=0; Index < 100; Index++) { + read_doorbell = CHIP_REG_READ32(HBE_MessageUnit, 0, iobound_doorbell); + if((read_doorbell ^ acb->in_doorbell) & ARCMSR_HBEMU_IOP2DRV_MESSAGE_CMD_DONE) { + CHIP_REG_WRITE32(HBE_MessageUnit, 0, host_int_status, 0);/*clear interrupt*/ + acb->in_doorbell = read_doorbell; + return TRUE; + } + UDELAY(10000); + }/*max 1 seconds*/ + }while(Retries++ < 20);/*max 20 sec*/ + return (FALSE); +} +/* ************************************************************************ ************************************************************************ */ @@ -576,6 +614,25 @@ static void arcmsr_flush_hbd_cache(struct AdapterContr ************************************************************************ ************************************************************************ */ +static void arcmsr_flush_hbe_cache(struct AdapterControlBlock *acb) +{ + int retry_count = 30;/* enlarge wait flush adapter cache time: 10 minute */ + + CHIP_REG_WRITE32(HBE_MessageUnit, 0, inbound_msgaddr0, ARCMSR_INBOUND_MESG0_FLUSH_CACHE); + acb->out_doorbell ^= ARCMSR_HBEMU_DRV2IOP_MESSAGE_CMD_DONE; + CHIP_REG_WRITE32(HBE_MessageUnit, 0, iobound_doorbell, acb->out_doorbell); + do { + if(arcmsr_hbe_wait_msgint_ready(acb)) { + break; + } else { + retry_count--; + } + }while(retry_count != 0); +} +/* +************************************************************************ +************************************************************************ +*/ static void arcmsr_flush_adapter_cache(struct AdapterControlBlock *acb) { switch (acb->adapter_type) { @@ -595,6 +652,10 @@ static void arcmsr_flush_adapter_cache(struct AdapterC arcmsr_flush_hbd_cache(acb); } break; + case ACB_ADAPTER_TYPE_E: { + arcmsr_flush_hbe_cache(acb); + } + break; } } /* @@ -715,6 +776,19 @@ static void arcmsr_abort_hbd_allcmd(struct AdapterCont ********************************************************************* ********************************************************************* */ +static void arcmsr_abort_hbe_allcmd(struct AdapterControlBlock *acb) +{ + CHIP_REG_WRITE32(HBE_MessageUnit, 0, inbound_msgaddr0, ARCMSR_INBOUND_MESG0_ABORT_CMD); + acb->out_doorbell ^= ARCMSR_HBEMU_DRV2IOP_MESSAGE_CMD_DONE; + CHIP_REG_WRITE32(HBE_MessageUnit, 0, iobound_doorbell, acb->out_doorbell); + if(!arcmsr_hbe_wait_msgint_ready(acb)) { + printf("arcmsr%d: wait 'abort all outstanding command' timeout \n", acb->pci_unit); + } +} +/* +********************************************************************* +********************************************************************* +*/ static void arcmsr_abort_allcmd(struct AdapterControlBlock *acb) { switch (acb->adapter_type) { @@ -734,6 +808,10 @@ static void arcmsr_abort_allcmd(struct AdapterControlB arcmsr_abort_hbd_allcmd(acb); } break; + case ACB_ADAPTER_TYPE_E: { + arcmsr_abort_hbe_allcmd(acb); + } + break; } } /* @@ -836,6 +914,9 @@ static void arcmsr_drain_donequeue(struct AdapterContr case ACB_ADAPTER_TYPE_D: srb = (struct CommandControlBlock *)(acb->vir2phy_offset+(flag_srb & 0xFFFFFFE0)); /*frame must be 32 bytes aligned*/ break; + case ACB_ADAPTER_TYPE_E: + srb = acb->psrb_pool[flag_srb]; + break; case ACB_ADAPTER_TYPE_A: case ACB_ADAPTER_TYPE_B: default: @@ -938,6 +1019,10 @@ static void arcmsr_done4abort_postqueue(struct Adapter arcmsr_hbd_postqueue_isr(acb); } break; + case ACB_ADAPTER_TYPE_E: { + arcmsr_hbe_postqueue_isr(acb); + } + break; } } /* @@ -1149,6 +1234,15 @@ static void arcmsr_post_srb(struct AdapterControlBlock ARCMSR_LOCK_RELEASE(&acb->postDone_lock); } break; + case ACB_ADAPTER_TYPE_E: { + u_int32_t ccb_post_stamp, arc_cdb_size; + + arc_cdb_size = (srb->arc_cdb_size > 0x300) ? 0x300 : srb->arc_cdb_size; + ccb_post_stamp = (srb->smid | ((arc_cdb_size-1) >> 6)); + CHIP_REG_WRITE32(HBE_MessageUnit, 0, inbound_queueport_high, 0); + CHIP_REG_WRITE32(HBE_MessageUnit, 0, inbound_queueport_low, ccb_post_stamp); + } + break; } } /* @@ -1184,6 +1278,12 @@ static struct QBUFFER *arcmsr_get_iop_rqbuffer( struct qbuffer = (struct QBUFFER *)&phbdmu->phbdmu->message_rbuffer; } break; + case ACB_ADAPTER_TYPE_E: { + struct HBE_MessageUnit *phbcmu = (struct HBE_MessageUnit *)acb->pmu; + + qbuffer = (struct QBUFFER *)&phbcmu->message_rbuffer; + } + break; } return(qbuffer); } @@ -1220,6 +1320,12 @@ static struct QBUFFER *arcmsr_get_iop_wqbuffer( struct qbuffer = (struct QBUFFER *)&phbdmu->phbdmu->message_wbuffer; } break; + case ACB_ADAPTER_TYPE_E: { + struct HBE_MessageUnit *phbcmu = (struct HBE_MessageUnit *)acb->pmu; + + qbuffer = (struct QBUFFER *)&phbcmu->message_wbuffer; + } + break; } return(qbuffer); } @@ -1251,6 +1357,12 @@ static void arcmsr_iop_message_read(struct AdapterCont CHIP_REG_WRITE32(HBD_MessageUnit, 0, inbound_doorbell, ARCMSR_HBDMU_DRV2IOP_DATA_OUT_READ); } break; + case ACB_ADAPTER_TYPE_E: { + /* let IOP know data has been read */ + acb->out_doorbell ^= ARCMSR_HBEMU_DRV2IOP_DATA_READ_OK; + CHIP_REG_WRITE32(HBE_MessageUnit, 0, iobound_doorbell, acb->out_doorbell); + } + break; } } /* @@ -1293,6 +1405,15 @@ static void arcmsr_iop_message_wrote(struct AdapterCon CHIP_REG_WRITE32(HBD_MessageUnit, 0, inbound_doorbell, ARCMSR_HBDMU_DRV2IOP_DATA_IN_READY); } break; + case ACB_ADAPTER_TYPE_E: { + /* + ** push inbound doorbell tell iop, driver data write ok + ** and wait reply on next hwinterrupt for next Qbuffer post + */ + acb->out_doorbell ^= ARCMSR_HBEMU_DRV2IOP_DATA_WRITE_OK; + CHIP_REG_WRITE32(HBE_MessageUnit, 0, iobound_doorbell, acb->out_doorbell); + } + break; } } /* @@ -1352,6 +1473,20 @@ static void arcmsr_stop_hbd_bgrb(struct AdapterControl ************************************************************************ ************************************************************************ */ +static void arcmsr_stop_hbe_bgrb(struct AdapterControlBlock *acb) +{ + acb->acb_flags &= ~ACB_F_MSG_START_BGRB; + CHIP_REG_WRITE32(HBE_MessageUnit, 0, inbound_msgaddr0, ARCMSR_INBOUND_MESG0_STOP_BGRB); + acb->out_doorbell ^= ARCMSR_HBEMU_DRV2IOP_MESSAGE_CMD_DONE; + CHIP_REG_WRITE32(HBE_MessageUnit, 0, iobound_doorbell, acb->out_doorbell); + if(!arcmsr_hbe_wait_msgint_ready(acb)) { + printf("arcmsr%d: wait 'stop adapter background rebulid' timeout \n", acb->pci_unit); + } +} +/* +************************************************************************ +************************************************************************ +*/ static void arcmsr_stop_adapter_bgrb(struct AdapterControlBlock *acb) { switch (acb->adapter_type) { @@ -1371,6 +1506,10 @@ static void arcmsr_stop_adapter_bgrb(struct AdapterCon arcmsr_stop_hbd_bgrb(acb); } break; + case ACB_ADAPTER_TYPE_E: { + arcmsr_stop_hbe_bgrb(acb); + } + break; } } /* @@ -1446,7 +1585,8 @@ static u_int32_t arcmsr_Read_iop_rqbuffer_data(struct u_int8_t *iop_data; u_int32_t iop_len; - if(acb->adapter_type & (ACB_ADAPTER_TYPE_C | ACB_ADAPTER_TYPE_D)) { + if((acb->adapter_type == ACB_ADAPTER_TYPE_C) || (acb->adapter_type == ACB_ADAPTER_TYPE_D) || + (acb->adapter_type == ACB_ADAPTER_TYPE_E)) { return(arcmsr_Read_iop_rqbuffer_data_D(acb, prbuffer)); } iop_data = (u_int8_t *)prbuffer->data; @@ -1541,7 +1681,8 @@ static void arcmsr_Write_data_2iop_wqbuffer(struct Ada u_int8_t *iop_data; int32_t allxfer_len=0; - if(acb->adapter_type & (ACB_ADAPTER_TYPE_C | ACB_ADAPTER_TYPE_D)) { + if((acb->adapter_type == ACB_ADAPTER_TYPE_C) || (acb->adapter_type == ACB_ADAPTER_TYPE_D) || + (acb->adapter_type == ACB_ADAPTER_TYPE_E)) { arcmsr_Write_data_2iop_wqbuffer_D(acb); return; } @@ -1694,6 +1835,14 @@ static void arcmsr_dr_handle(struct AdapterControlBloc devicemap += 4; } break; + case ACB_ADAPTER_TYPE_E: + devicemap = offsetof(struct HBE_MessageUnit, msgcode_rwbuffer[ARCMSR_FW_DEVMAP_OFFSET]); + for (target = 0; target < 4; target++) + { + deviceMapCurrent[target]=bus_space_read_4(acb->btag[0], acb->bhandle[0], devicemap); + devicemap += 4; + } + break; } if(acb->acb_flags & ACB_F_BUS_HANG_ON) @@ -1792,6 +1941,18 @@ static void arcmsr_hbd_message_isr(struct AdapterContr ************************************************************************** ************************************************************************** */ +static void arcmsr_hbe_message_isr(struct AdapterControlBlock *acb) { + u_int32_t outbound_message; + + CHIP_REG_WRITE32(HBE_MessageUnit, 0, host_int_status, 0); + outbound_message = CHIP_REG_READ32(HBE_MessageUnit, 0, msgcode_rwbuffer[0]); + if (outbound_message == ARCMSR_SIGNATURE_GET_CONFIG) + arcmsr_dr_handle( acb ); +} +/* +************************************************************************** +************************************************************************** +*/ static void arcmsr_hba_doorbell_isr(struct AdapterControlBlock *acb) { u_int32_t doorbell_status; @@ -1876,6 +2037,35 @@ static void arcmsr_hbd_doorbell_isr(struct AdapterCont ************************************************************************** ************************************************************************** */ +static void arcmsr_hbe_doorbell_isr(struct AdapterControlBlock *acb) +{ + u_int32_t doorbell_status, in_doorbell; + + /* + ******************************************************************* + ** Maybe here we need to check wrqbuffer_lock is lock or not + ** DOORBELL: din! don! + ** check if there are any mail need to pack from firmware + ******************************************************************* + */ + in_doorbell = CHIP_REG_READ32(HBE_MessageUnit, 0, iobound_doorbell); + CHIP_REG_WRITE32(HBE_MessageUnit, 0, host_int_status, 0); /* clear doorbell interrupt */ + doorbell_status = in_doorbell ^ acb->in_doorbell; + if(doorbell_status & ARCMSR_HBEMU_IOP2DRV_DATA_WRITE_OK) { + arcmsr_iop2drv_data_wrote_handle(acb); + } + if(doorbell_status & ARCMSR_HBEMU_IOP2DRV_DATA_READ_OK) { + arcmsr_iop2drv_data_read_handle(acb); + } + if(doorbell_status & ARCMSR_HBEMU_IOP2DRV_MESSAGE_CMD_DONE) { + arcmsr_hbe_message_isr(acb); /* messenger of "driver to iop commands" */ + } + acb->in_doorbell = in_doorbell; +} +/* +************************************************************************** +************************************************************************** +*/ static void arcmsr_hba_postqueue_isr(struct AdapterControlBlock *acb) { u_int32_t flag_srb; @@ -2013,6 +2203,34 @@ static void arcmsr_hbd_postqueue_isr(struct AdapterCon CHIP_REG_READ32(HBD_MessageUnit, 0, outboundlist_interrupt_cause); /*Dummy ioread32 to force pci flush */ } /* +************************************************************************** +************************************************************************** +*/ +static void arcmsr_hbe_postqueue_isr(struct AdapterControlBlock *acb) +{ + u_int16_t error; + uint32_t doneq_index; + uint16_t cmdSMID; + + /* + ***************************************************************************** + ** areca cdb command done + ***************************************************************************** + */ + bus_dmamap_sync(acb->srb_dmat, acb->srb_dmamap, BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE); + doneq_index = acb->doneq_index; + while ((CHIP_REG_READ32(HBE_MessageUnit, 0, reply_post_producer_index) & 0xFFFF) != doneq_index) { + cmdSMID = acb->pCompletionQ[doneq_index].cmdSMID; + error = (acb->pCompletionQ[doneq_index].cmdFlag & ARCMSR_SRBREPLY_FLAG_ERROR_MODE1) ? TRUE : FALSE; + arcmsr_drain_donequeue(acb, (u_int32_t)cmdSMID, error); + doneq_index++; + if (doneq_index >= acb->completionQ_entry) + doneq_index = 0; + } + acb->doneq_index = doneq_index; + CHIP_REG_WRITE32(HBE_MessageUnit, 0, reply_post_consumer_index, doneq_index); +} +/* ********************************************************************** ********************************************************************** */ @@ -2143,6 +2361,37 @@ static void arcmsr_handle_hbd_isr( struct AdapterContr // CHIP_REG_READ32(HBD_MessageUnit, 0, pcief0_int_enable); } /* +********************************************************************** +********************************************************************** +*/ +static void arcmsr_handle_hbe_isr( struct AdapterControlBlock *acb) +{ + u_int32_t host_interrupt_status; + /* + ********************************************* + ** check outbound intstatus + ********************************************* + */ + host_interrupt_status = CHIP_REG_READ32(HBE_MessageUnit, 0, host_int_status) & + (ARCMSR_HBEMU_OUTBOUND_POSTQUEUE_ISR | + ARCMSR_HBEMU_OUTBOUND_DOORBELL_ISR); + if(!host_interrupt_status) { + /*it must be share irq*/ + return; + } + do { + /* MU doorbell interrupts*/ + if(host_interrupt_status & ARCMSR_HBEMU_OUTBOUND_DOORBELL_ISR) { + arcmsr_hbe_doorbell_isr(acb); + } + /* MU post queue interrupts*/ + if(host_interrupt_status & ARCMSR_HBEMU_OUTBOUND_POSTQUEUE_ISR) { + arcmsr_hbe_postqueue_isr(acb); + } + host_interrupt_status = CHIP_REG_READ32(HBE_MessageUnit, 0, host_int_status); + } while (host_interrupt_status & (ARCMSR_HBEMU_OUTBOUND_POSTQUEUE_ISR | ARCMSR_HBEMU_OUTBOUND_DOORBELL_ISR)); +} +/* ****************************************************************************** ****************************************************************************** */ @@ -2161,6 +2410,9 @@ static void arcmsr_interrupt(struct AdapterControlBloc case ACB_ADAPTER_TYPE_D: arcmsr_handle_hbd_isr(acb); break; + case ACB_ADAPTER_TYPE_E: + arcmsr_handle_hbe_isr(acb); + break; default: printf("arcmsr%d: interrupt service," " unknown adapter type =%d\n", acb->pci_unit, acb->adapter_type); @@ -2205,6 +2457,12 @@ static void arcmsr_polling_devmap(void *arg) case ACB_ADAPTER_TYPE_D: CHIP_REG_WRITE32(HBD_MessageUnit, 0, inbound_msgaddr0, ARCMSR_INBOUND_MESG0_GET_CONFIG); break; + + case ACB_ADAPTER_TYPE_E: + CHIP_REG_WRITE32(HBE_MessageUnit, 0, inbound_msgaddr0, ARCMSR_INBOUND_MESG0_GET_CONFIG); + acb->out_doorbell ^= ARCMSR_HBEMU_DRV2IOP_MESSAGE_CMD_DONE; + CHIP_REG_WRITE32(HBE_MessageUnit, 0, iobound_doorbell, acb->out_doorbell); + break; } if((acb->acb_flags & ACB_F_SCSISTOPADAPTER) == 0) @@ -2907,6 +3165,7 @@ static void arcmsr_action(struct cam_sim *psim, union else cpi->base_transfer_speed = 300000; if((acb->vendor_device_id == PCIDevVenIDARC1880) || + (acb->vendor_device_id == PCIDevVenIDARC1884) || (acb->vendor_device_id == PCIDevVenIDARC1680) || (acb->vendor_device_id == PCIDevVenIDARC1214)) { @@ -2991,6 +3250,7 @@ static void arcmsr_action(struct cam_sim *psim, union cts->protocol = PROTO_SCSI; if((acb->vendor_device_id == PCIDevVenIDARC1880) || + (acb->vendor_device_id == PCIDevVenIDARC1884) || (acb->vendor_device_id == PCIDevVenIDARC1680) || (acb->vendor_device_id == PCIDevVenIDARC1214)) { @@ -3150,6 +3410,20 @@ static void arcmsr_start_hbd_bgrb(struct AdapterContro ********************************************************************** ********************************************************************** */ +static void arcmsr_start_hbe_bgrb(struct AdapterControlBlock *acb) +{ + acb->acb_flags |= ACB_F_MSG_START_BGRB; + CHIP_REG_WRITE32(HBE_MessageUnit, 0, inbound_msgaddr0, ARCMSR_INBOUND_MESG0_START_BGRB); + acb->out_doorbell ^= ARCMSR_HBEMU_DRV2IOP_MESSAGE_CMD_DONE; + CHIP_REG_WRITE32(HBE_MessageUnit, 0, iobound_doorbell, acb->out_doorbell); + if(!arcmsr_hbe_wait_msgint_ready(acb)) { + printf("arcmsr%d: wait 'start adapter background rebulid' timeout \n", acb->pci_unit); + } +} +/* +********************************************************************** +********************************************************************** +*/ static void arcmsr_start_adapter_bgrb(struct AdapterControlBlock *acb) { switch (acb->adapter_type) { @@ -3165,6 +3439,9 @@ static void arcmsr_start_adapter_bgrb(struct AdapterCo case ACB_ADAPTER_TYPE_D: arcmsr_start_hbd_bgrb(acb); break; + case ACB_ADAPTER_TYPE_E: + arcmsr_start_hbe_bgrb(acb); + break; } } /* @@ -3388,8 +3665,63 @@ polling_ccb_retry: } /* ********************************************************************** +** ********************************************************************** */ +static void arcmsr_polling_hbe_srbdone(struct AdapterControlBlock *acb, struct CommandControlBlock *poll_srb) +{ + struct CommandControlBlock *srb; + u_int32_t poll_srb_done=0, poll_count=0, doneq_index; + u_int16_t error, cmdSMID; + +polling_ccb_retry: + poll_count++; + bus_dmamap_sync(acb->srb_dmat, acb->srb_dmamap, BUS_DMASYNC_POSTREAD|BUS_DMASYNC_POSTWRITE); + while(1) { + doneq_index = acb->doneq_index; + if((CHIP_REG_READ32(HBE_MessageUnit, 0, reply_post_producer_index) & 0xFFFF) == doneq_index) { + if(poll_srb_done) { + break;/*chip FIFO no ccb for completion already*/ + } else { + UDELAY(25000); + if ((poll_count > 100) && (poll_srb != NULL)) { + break; + } + if (acb->srboutstandingcount == 0) { + break; + } + goto polling_ccb_retry; + } + } + cmdSMID = acb->pCompletionQ[doneq_index].cmdSMID; + doneq_index++; + if (doneq_index >= acb->completionQ_entry) + doneq_index = 0; + acb->doneq_index = doneq_index; + srb = acb->psrb_pool[cmdSMID]; + error = (acb->pCompletionQ[doneq_index].cmdFlag & ARCMSR_SRBREPLY_FLAG_ERROR_MODE1) ? TRUE : FALSE; + if (poll_srb != NULL) + poll_srb_done = (srb == poll_srb) ? 1:0; + if((srb->acb != acb) || (srb->srb_state != ARCMSR_SRB_START)) { + if(srb->srb_state == ARCMSR_SRB_ABORTED) { + printf("arcmsr%d: scsi id=%d lun=%jx srb='%p'poll command abort successfully \n" + , acb->pci_unit, srb->pccb->ccb_h.target_id, (uintmax_t)srb->pccb->ccb_h.target_lun, srb); + srb->pccb->ccb_h.status |= CAM_REQ_ABORTED; + arcmsr_srb_complete(srb, 1); + continue; + } + printf("arcmsr%d: polling get an illegal srb command done srb='%p'srboutstandingcount=%d \n" + , acb->pci_unit, srb, acb->srboutstandingcount); + continue; + } + arcmsr_report_srb_state(acb, srb, error); + } /*drain reply FIFO*/ + CHIP_REG_WRITE32(HBE_MessageUnit, 0, reply_post_producer_index, doneq_index); +} +/* +********************************************************************** +********************************************************************** +*/ static void arcmsr_polling_srbdone(struct AdapterControlBlock *acb, struct CommandControlBlock *poll_srb) { switch (acb->adapter_type) { @@ -3409,6 +3741,10 @@ static void arcmsr_polling_srbdone(struct AdapterContr arcmsr_polling_hbd_srbdone(acb, poll_srb); } break; + case ACB_ADAPTER_TYPE_E: { + arcmsr_polling_hbe_srbdone(acb, poll_srb); + } + break; } } /* @@ -3615,6 +3951,58 @@ static void arcmsr_get_hbd_config(struct AdapterContro ********************************************************************** ********************************************************************** */ +static void arcmsr_get_hbe_config(struct AdapterControlBlock *acb) +{ + char *acb_firm_model = acb->firm_model; + char *acb_firm_version = acb->firm_version; + char *acb_device_map = acb->device_map; + size_t iop_firm_model = offsetof(struct HBE_MessageUnit,msgcode_rwbuffer[ARCMSR_FW_MODEL_OFFSET]); /*firm_model,15,60-67*/ + size_t iop_firm_version = offsetof(struct HBE_MessageUnit,msgcode_rwbuffer[ARCMSR_FW_VERS_OFFSET]); /*firm_version,17,68-83*/ + size_t iop_device_map = offsetof(struct HBE_MessageUnit,msgcode_rwbuffer[ARCMSR_FW_DEVMAP_OFFSET]); + int i; + + CHIP_REG_WRITE32(HBE_MessageUnit, 0, inbound_msgaddr0, ARCMSR_INBOUND_MESG0_GET_CONFIG); + acb->out_doorbell ^= ARCMSR_HBEMU_DRV2IOP_MESSAGE_CMD_DONE; + CHIP_REG_WRITE32(HBE_MessageUnit, 0, iobound_doorbell, acb->out_doorbell); + if(!arcmsr_hbe_wait_msgint_ready(acb)) { + printf("arcmsr%d: wait 'get adapter firmware miscellaneous data' timeout \n", acb->pci_unit); + } + + i = 0; + while(i < 8) { + *acb_firm_model = bus_space_read_1(acb->btag[0], acb->bhandle[0], iop_firm_model+i); + /* 8 bytes firm_model, 15, 60-67*/ + acb_firm_model++; + i++; + } + i = 0; + while(i < 16) { + *acb_firm_version = bus_space_read_1(acb->btag[0], acb->bhandle[0], iop_firm_version+i); + /* 16 bytes firm_version, 17, 68-83*/ + acb_firm_version++; + i++; + } + i = 0; + while(i < 16) { + *acb_device_map = bus_space_read_1(acb->btag[0], acb->bhandle[0], iop_device_map+i); + acb_device_map++; + i++; + } + printf("Areca RAID adapter%d: %s F/W version %s \n", acb->pci_unit, acb->firm_model, acb->firm_version); + acb->firm_request_len = CHIP_REG_READ32(HBE_MessageUnit, 0, msgcode_rwbuffer[1]); /*firm_request_len, 1, 04-07*/ + acb->firm_numbers_queue = CHIP_REG_READ32(HBE_MessageUnit, 0, msgcode_rwbuffer[2]); /*firm_numbers_queue, 2, 08-11*/ + acb->firm_sdram_size = CHIP_REG_READ32(HBE_MessageUnit, 0, msgcode_rwbuffer[3]); /*firm_sdram_size, 3, 12-15*/ + acb->firm_ide_channels = CHIP_REG_READ32(HBE_MessageUnit, 0, msgcode_rwbuffer[4]); /*firm_ide_channels, 4, 16-19*/ + acb->firm_cfg_version = CHIP_REG_READ32(HBE_MessageUnit, 0, msgcode_rwbuffer[ARCMSR_FW_CFGVER_OFFSET]); /*firm_cfg_version, 25, */ + if(acb->firm_numbers_queue > ARCMSR_MAX_OUTSTANDING_CMD) + acb->maxOutstanding = ARCMSR_MAX_OUTSTANDING_CMD - 1; + else + acb->maxOutstanding = acb->firm_numbers_queue - 1; +} +/* +********************************************************************** +********************************************************************** +*/ static void arcmsr_get_firmware_spec(struct AdapterControlBlock *acb) { switch (acb->adapter_type) { @@ -3634,6 +4022,10 @@ static void arcmsr_get_firmware_spec(struct AdapterCon arcmsr_get_hbd_config(acb); } break; + case ACB_ADAPTER_TYPE_E: { + arcmsr_get_hbe_config(acb); + } + break; } } /* @@ -3695,6 +4087,18 @@ static void arcmsr_wait_firmware_ready( struct Adapter } } break; + case ACB_ADAPTER_TYPE_E: { + while ((CHIP_REG_READ32(HBE_MessageUnit, 0, outbound_msgaddr1) & ARCMSR_HBEMU_MESSAGE_FIRMWARE_OK) == 0) + { + if (timeout++ > 4000) /* (4000*15)/1000 = 60 sec */ + { + printf( "arcmsr%d:timed out waiting for firmware ready\n", acb->pci_unit); + return; + } + UDELAY(15000); /* wait 15 milli-seconds */ + } + } + break; } } /* @@ -3738,6 +4142,14 @@ static void arcmsr_clear_doorbell_queue_buffer( struct } break; + case ACB_ADAPTER_TYPE_E: { + /* empty doorbell Qbuffer if door bell ringed */ + acb->in_doorbell = CHIP_REG_READ32(HBE_MessageUnit, 0, iobound_doorbell); + CHIP_REG_WRITE32(HBE_MessageUnit, 0, host_int_status, 0); /*clear doorbell interrupt */ + acb->out_doorbell ^= ARCMSR_HBEMU_DRV2IOP_DATA_READ_OK; + CHIP_REG_WRITE32(HBE_MessageUnit, 0, iobound_doorbell, acb->out_doorbell); + } + break; } } /* @@ -3844,6 +4256,27 @@ static u_int32_t arcmsr_iop_confirm(struct AdapterCont } } break; + case ACB_ADAPTER_TYPE_E: { + u_int32_t cdb_phyaddr_lo32; + cdb_phyaddr_lo32 = srb_phyaddr_lo32 + offsetof(struct CommandControlBlock, arcmsr_cdb); + CHIP_REG_WRITE32(HBE_MessageUnit, 0, msgcode_rwbuffer[0], ARCMSR_SIGNATURE_SET_CONFIG); + CHIP_REG_WRITE32(HBE_MessageUnit, 0, msgcode_rwbuffer[1], ARCMSR_SIGNATURE_1884); + CHIP_REG_WRITE32(HBE_MessageUnit, 0, msgcode_rwbuffer[2], cdb_phyaddr_lo32); + CHIP_REG_WRITE32(HBE_MessageUnit, 0, msgcode_rwbuffer[3], srb_phyaddr_hi32); + CHIP_REG_WRITE32(HBE_MessageUnit, 0, msgcode_rwbuffer[4], SRB_SIZE); + cdb_phyaddr_lo32 = srb_phyaddr_lo32 + ARCMSR_SRBS_POOL_SIZE; + CHIP_REG_WRITE32(HBE_MessageUnit, 0, msgcode_rwbuffer[5], cdb_phyaddr_lo32); + CHIP_REG_WRITE32(HBE_MessageUnit, 0, msgcode_rwbuffer[6], srb_phyaddr_hi32); + CHIP_REG_WRITE32(HBE_MessageUnit, 0, msgcode_rwbuffer[7], COMPLETION_Q_POOL_SIZE); + CHIP_REG_WRITE32(HBE_MessageUnit, 0, inbound_msgaddr0, ARCMSR_INBOUND_MESG0_SET_CONFIG); + acb->out_doorbell ^= ARCMSR_HBEMU_DRV2IOP_MESSAGE_CMD_DONE; + CHIP_REG_WRITE32(HBE_MessageUnit, 0, iobound_doorbell, acb->out_doorbell); + if(!arcmsr_hbe_wait_msgint_ready(acb)) { + printf( "arcmsr%d: 'set srb high part physical address' timeout \n", acb->pci_unit); + return FALSE; + } + } + break; } return (TRUE); } @@ -3853,21 +4286,14 @@ static u_int32_t arcmsr_iop_confirm(struct AdapterCont */ static void arcmsr_enable_eoi_mode(struct AdapterControlBlock *acb) { - switch (acb->adapter_type) + if (acb->adapter_type == ACB_ADAPTER_TYPE_B) { - case ACB_ADAPTER_TYPE_A: - case ACB_ADAPTER_TYPE_C: - case ACB_ADAPTER_TYPE_D: - break; - case ACB_ADAPTER_TYPE_B: { - struct HBB_MessageUnit *phbbmu = (struct HBB_MessageUnit *)acb->pmu; - WRITE_CHIP_REG32(0, phbbmu->drv2iop_doorbell, ARCMSR_MESSAGE_ACTIVE_EOI_MODE); - if(!arcmsr_hbb_wait_msgint_ready(acb)) { - printf( "arcmsr%d: 'iop enable eoi mode' timeout \n", acb->pci_unit); - return; - } + struct HBB_MessageUnit *phbbmu = (struct HBB_MessageUnit *)acb->pmu; + WRITE_CHIP_REG32(0, phbbmu->drv2iop_doorbell, ARCMSR_MESSAGE_ACTIVE_EOI_MODE); + if(!arcmsr_hbb_wait_msgint_ready(acb)) { + printf( "arcmsr%d: 'iop enable eoi mode' timeout \n", acb->pci_unit); + return; } - break; } } /* @@ -3913,7 +4339,8 @@ static void arcmsr_map_free_srb(void *arg, bus_dma_seg " srb dmamap bus_dmamap_create error\n", acb->pci_unit); return; } - if((acb->adapter_type == ACB_ADAPTER_TYPE_C) || (acb->adapter_type == ACB_ADAPTER_TYPE_D)) + if((acb->adapter_type == ACB_ADAPTER_TYPE_C) || (acb->adapter_type == ACB_ADAPTER_TYPE_D) + || (acb->adapter_type == ACB_ADAPTER_TYPE_E)) { srb_tmp->cdb_phyaddr_low = srb_phyaddr; srb_tmp->cdb_phyaddr_high = (u_int32_t)((srb_phyaddr >> 16) >> 16); @@ -3921,10 +4348,12 @@ static void arcmsr_map_free_srb(void *arg, bus_dma_seg else srb_tmp->cdb_phyaddr_low = srb_phyaddr >> 5; srb_tmp->acb = acb; + srb_tmp->smid = i << 16; acb->srbworkingQ[i] = acb->psrb_pool[i] = srb_tmp; srb_phyaddr = srb_phyaddr + SRB_SIZE; srb_tmp = (struct CommandControlBlock *)((unsigned long)srb_tmp + SRB_SIZE); } + acb->pCompletionQ = (pCompletion_Q)srb_tmp; acb->vir2phy_offset = (unsigned long)srb_tmp - (unsigned long)srb_phyaddr; } /* @@ -3992,6 +4421,12 @@ static u_int32_t arcmsr_initialize(device_t dev) max_coherent_size = ARCMSR_SRBS_POOL_SIZE; } break; + case PCIDevVenIDARC1884: + acb->adapter_type = ACB_ADAPTER_TYPE_E; + acb->adapter_bus_speed = ACB_BUS_SPEED_12G; + max_coherent_size = ARCMSR_SRBS_POOL_SIZE + COMPLETION_Q_POOL_SIZE; + acb->completionQ_entry = COMPLETION_Q_POOL_SIZE / sizeof(struct deliver_completeQ); + break; case PCIDevVenIDARC1214: { acb->adapter_type = ACB_ADAPTER_TYPE_D; acb->adapter_bus_speed = ACB_BUS_SPEED_6G; @@ -4140,141 +4575,177 @@ static u_int32_t arcmsr_initialize(device_t dev) pci_write_config(dev, PCIR_COMMAND, pci_command, 2); switch(acb->adapter_type) { case ACB_ADAPTER_TYPE_A: { - u_int32_t rid0 = PCIR_BAR(0); - vm_offset_t mem_base0; + u_int32_t rid0 = PCIR_BAR(0); + vm_offset_t mem_base0; - acb->sys_res_arcmsr[0] = bus_alloc_resource_any(dev,SYS_RES_MEMORY, &rid0, RF_ACTIVE); - if(acb->sys_res_arcmsr[0] == NULL) { - arcmsr_free_resource(acb); - printf("arcmsr%d: bus_alloc_resource failure!\n", device_get_unit(dev)); - return ENOMEM; - } - if(rman_get_start(acb->sys_res_arcmsr[0]) <= 0) { - arcmsr_free_resource(acb); - printf("arcmsr%d: rman_get_start failure!\n", device_get_unit(dev)); - return ENXIO; - } - mem_base0 = (vm_offset_t) rman_get_virtual(acb->sys_res_arcmsr[0]); - if(mem_base0 == 0) { - arcmsr_free_resource(acb); - printf("arcmsr%d: rman_get_virtual failure!\n", device_get_unit(dev)); - return ENXIO; - } - acb->btag[0] = rman_get_bustag(acb->sys_res_arcmsr[0]); - acb->bhandle[0] = rman_get_bushandle(acb->sys_res_arcmsr[0]); - acb->pmu = (struct MessageUnit_UNION *)mem_base0; + acb->sys_res_arcmsr[0] = bus_alloc_resource_any(dev,SYS_RES_MEMORY, &rid0, RF_ACTIVE); + if(acb->sys_res_arcmsr[0] == NULL) { + arcmsr_free_resource(acb); + printf("arcmsr%d: bus_alloc_resource failure!\n", device_get_unit(dev)); + return ENOMEM; } + if(rman_get_start(acb->sys_res_arcmsr[0]) <= 0) { + arcmsr_free_resource(acb); + printf("arcmsr%d: rman_get_start failure!\n", device_get_unit(dev)); + return ENXIO; + } + mem_base0 = (vm_offset_t) rman_get_virtual(acb->sys_res_arcmsr[0]); + if(mem_base0 == 0) { + arcmsr_free_resource(acb); + printf("arcmsr%d: rman_get_virtual failure!\n", device_get_unit(dev)); + return ENXIO; + } + acb->btag[0] = rman_get_bustag(acb->sys_res_arcmsr[0]); + acb->bhandle[0] = rman_get_bushandle(acb->sys_res_arcmsr[0]); + acb->pmu = (struct MessageUnit_UNION *)mem_base0; + acb->rid = 0; + } break; case ACB_ADAPTER_TYPE_B: { - struct HBB_MessageUnit *phbbmu; - struct CommandControlBlock *freesrb; - u_int32_t rid[]={ PCIR_BAR(0), PCIR_BAR(2) }; - vm_offset_t mem_base[]={0,0}; - u_long size; - if (vendor_dev_id == PCIDevVenIDARC1203) - size = sizeof(struct HBB_DOORBELL_1203); - else - size = sizeof(struct HBB_DOORBELL); - for(i=0; i < 2; i++) { - if(i == 0) { - acb->sys_res_arcmsr[i] = bus_alloc_resource_any(dev,SYS_RES_MEMORY, &rid[i], - RF_ACTIVE); - } else { - acb->sys_res_arcmsr[i] = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid[i], - RF_ACTIVE); - } - if(acb->sys_res_arcmsr[i] == NULL) { - arcmsr_free_resource(acb); - printf("arcmsr%d: bus_alloc_resource %d failure!\n", device_get_unit(dev), i); - return ENOMEM; - } - if(rman_get_start(acb->sys_res_arcmsr[i]) <= 0) { - arcmsr_free_resource(acb); - printf("arcmsr%d: rman_get_start %d failure!\n", device_get_unit(dev), i); - return ENXIO; - } - mem_base[i] = (vm_offset_t) rman_get_virtual(acb->sys_res_arcmsr[i]); - if(mem_base[i] == 0) { - arcmsr_free_resource(acb); - printf("arcmsr%d: rman_get_virtual %d failure!\n", device_get_unit(dev), i); - return ENXIO; - } - acb->btag[i] = rman_get_bustag(acb->sys_res_arcmsr[i]); - acb->bhandle[i] = rman_get_bushandle(acb->sys_res_arcmsr[i]); - } - freesrb = (struct CommandControlBlock *)acb->uncacheptr; - acb->pmu = (struct MessageUnit_UNION *)((unsigned long)freesrb+ARCMSR_SRBS_POOL_SIZE); - phbbmu = (struct HBB_MessageUnit *)acb->pmu; - phbbmu->hbb_doorbell = (struct HBB_DOORBELL *)mem_base[0]; - phbbmu->hbb_rwbuffer = (struct HBB_RWBUFFER *)mem_base[1]; - if (vendor_dev_id == PCIDevVenIDARC1203) { - phbbmu->drv2iop_doorbell = offsetof(struct HBB_DOORBELL_1203, drv2iop_doorbell); - phbbmu->drv2iop_doorbell_mask = offsetof(struct HBB_DOORBELL_1203, drv2iop_doorbell_mask); - phbbmu->iop2drv_doorbell = offsetof(struct HBB_DOORBELL_1203, iop2drv_doorbell); - phbbmu->iop2drv_doorbell_mask = offsetof(struct HBB_DOORBELL_1203, iop2drv_doorbell_mask); + struct HBB_MessageUnit *phbbmu; + struct CommandControlBlock *freesrb; + u_int32_t rid[]={ PCIR_BAR(0), PCIR_BAR(2) }; + vm_offset_t mem_base[]={0,0}; + u_long size; + if (vendor_dev_id == PCIDevVenIDARC1203) + size = sizeof(struct HBB_DOORBELL_1203); + else + size = sizeof(struct HBB_DOORBELL); + for(i=0; i < 2; i++) { + if(i == 0) { + acb->sys_res_arcmsr[i] = bus_alloc_resource_any(dev,SYS_RES_MEMORY, &rid[i], + RF_ACTIVE); } else { - phbbmu->drv2iop_doorbell = offsetof(struct HBB_DOORBELL, drv2iop_doorbell); - phbbmu->drv2iop_doorbell_mask = offsetof(struct HBB_DOORBELL, drv2iop_doorbell_mask); - phbbmu->iop2drv_doorbell = offsetof(struct HBB_DOORBELL, iop2drv_doorbell); - phbbmu->iop2drv_doorbell_mask = offsetof(struct HBB_DOORBELL, iop2drv_doorbell_mask); + acb->sys_res_arcmsr[i] = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid[i], + RF_ACTIVE); } - } - break; - case ACB_ADAPTER_TYPE_C: { - u_int32_t rid0 = PCIR_BAR(1); - vm_offset_t mem_base0; - - acb->sys_res_arcmsr[0] = bus_alloc_resource_any(dev,SYS_RES_MEMORY, &rid0, RF_ACTIVE); - if(acb->sys_res_arcmsr[0] == NULL) { + if(acb->sys_res_arcmsr[i] == NULL) { arcmsr_free_resource(acb); - printf("arcmsr%d: bus_alloc_resource failure!\n", device_get_unit(dev)); + printf("arcmsr%d: bus_alloc_resource %d failure!\n", device_get_unit(dev), i); return ENOMEM; } - if(rman_get_start(acb->sys_res_arcmsr[0]) <= 0) { + if(rman_get_start(acb->sys_res_arcmsr[i]) <= 0) { arcmsr_free_resource(acb); - printf("arcmsr%d: rman_get_start failure!\n", device_get_unit(dev)); + printf("arcmsr%d: rman_get_start %d failure!\n", device_get_unit(dev), i); return ENXIO; } - mem_base0 = (vm_offset_t) rman_get_virtual(acb->sys_res_arcmsr[0]); - if(mem_base0 == 0) { + mem_base[i] = (vm_offset_t) rman_get_virtual(acb->sys_res_arcmsr[i]); + if(mem_base[i] == 0) { arcmsr_free_resource(acb); - printf("arcmsr%d: rman_get_virtual failure!\n", device_get_unit(dev)); + printf("arcmsr%d: rman_get_virtual %d failure!\n", device_get_unit(dev), i); return ENXIO; } - acb->btag[0] = rman_get_bustag(acb->sys_res_arcmsr[0]); - acb->bhandle[0] = rman_get_bushandle(acb->sys_res_arcmsr[0]); - acb->pmu = (struct MessageUnit_UNION *)mem_base0; + acb->btag[i] = rman_get_bustag(acb->sys_res_arcmsr[i]); + acb->bhandle[i] = rman_get_bushandle(acb->sys_res_arcmsr[i]); } + freesrb = (struct CommandControlBlock *)acb->uncacheptr; + acb->pmu = (struct MessageUnit_UNION *)((unsigned long)freesrb+ARCMSR_SRBS_POOL_SIZE); + phbbmu = (struct HBB_MessageUnit *)acb->pmu; + phbbmu->hbb_doorbell = (struct HBB_DOORBELL *)mem_base[0]; + phbbmu->hbb_rwbuffer = (struct HBB_RWBUFFER *)mem_base[1]; + if (vendor_dev_id == PCIDevVenIDARC1203) { + phbbmu->drv2iop_doorbell = offsetof(struct HBB_DOORBELL_1203, drv2iop_doorbell); + phbbmu->drv2iop_doorbell_mask = offsetof(struct HBB_DOORBELL_1203, drv2iop_doorbell_mask); + phbbmu->iop2drv_doorbell = offsetof(struct HBB_DOORBELL_1203, iop2drv_doorbell); + phbbmu->iop2drv_doorbell_mask = offsetof(struct HBB_DOORBELL_1203, iop2drv_doorbell_mask); + } else { + phbbmu->drv2iop_doorbell = offsetof(struct HBB_DOORBELL, drv2iop_doorbell); + phbbmu->drv2iop_doorbell_mask = offsetof(struct HBB_DOORBELL, drv2iop_doorbell_mask); + phbbmu->iop2drv_doorbell = offsetof(struct HBB_DOORBELL, iop2drv_doorbell); + phbbmu->iop2drv_doorbell_mask = offsetof(struct HBB_DOORBELL, iop2drv_doorbell_mask); + } + acb->rid = 0; + } break; + case ACB_ADAPTER_TYPE_C: { + u_int32_t rid0 = PCIR_BAR(1); + vm_offset_t mem_base0; + + acb->sys_res_arcmsr[0] = bus_alloc_resource_any(dev,SYS_RES_MEMORY, &rid0, RF_ACTIVE); + if(acb->sys_res_arcmsr[0] == NULL) { + arcmsr_free_resource(acb); + printf("arcmsr%d: bus_alloc_resource failure!\n", device_get_unit(dev)); + return ENOMEM; + } + if(rman_get_start(acb->sys_res_arcmsr[0]) <= 0) { + arcmsr_free_resource(acb); + printf("arcmsr%d: rman_get_start failure!\n", device_get_unit(dev)); + return ENXIO; + } + mem_base0 = (vm_offset_t) rman_get_virtual(acb->sys_res_arcmsr[0]); + if(mem_base0 == 0) { + arcmsr_free_resource(acb); + printf("arcmsr%d: rman_get_virtual failure!\n", device_get_unit(dev)); + return ENXIO; + } + acb->btag[0] = rman_get_bustag(acb->sys_res_arcmsr[0]); + acb->bhandle[0] = rman_get_bushandle(acb->sys_res_arcmsr[0]); + acb->pmu = (struct MessageUnit_UNION *)mem_base0; + acb->rid = 1; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable-11@freebsd.org Mon Jul 17 06:10:55 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B7F51CFCED2; Mon, 17 Jul 2017 06:10:55 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 846EA73A73; Mon, 17 Jul 2017 06:10:55 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6H6AsqD083805; Mon, 17 Jul 2017 06:10:54 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6H6AsDr083804; Mon, 17 Jul 2017 06:10:54 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201707170610.v6H6AsDr083804@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 17 Jul 2017 06:10:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r321065 - stable/11/libexec/rtld-elf X-SVN-Group: stable-11 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/11/libexec/rtld-elf X-SVN-Commit-Revision: 321065 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Jul 2017 06:10:55 -0000 Author: kib Date: Mon Jul 17 06:10:54 2017 New Revision: 321065 URL: https://svnweb.freebsd.org/changeset/base/321065 Log: MFC r320989: Language improvements. Modified: stable/11/libexec/rtld-elf/rtld.1 Directory Properties: stable/11/ (props changed) Modified: stable/11/libexec/rtld-elf/rtld.1 ============================================================================== --- stable/11/libexec/rtld-elf/rtld.1 Mon Jul 17 02:52:02 2017 (r321064) +++ stable/11/libexec/rtld-elf/rtld.1 Mon Jul 17 06:10:54 2017 (r321065) @@ -309,7 +309,7 @@ The syntax of the direct invocation is .Op Ar image arguments .Ed .Pp -The options are as follows: +The options are: .Bl -tag -width indent .It Fl f Ar fd File descriptor @@ -339,21 +339,22 @@ Ends the options. The argument following .Fl - -is interpreted as the path of binary to execute. +is interpreted as the path of the binary to execute. .El .Pp -To conform to user expectation to not break some naively restricted -execution environments, in the direct execution mode +In the direct execution mode, .Nm -emulates verification of the binary execute permission -for current user. +emulates verification of the binary execute permission for the +current user. +This is done to avoid breaking user expectations in naively restricted +execution environments. The verification only uses Unix .Dv DACs , ignores .Dv ACLs -and is racy by its nature. -The environments which rely on such restrictions are weak -and breakable on its own. +and is naturally prone to race conditions. +Environments which rely on such restrictions are weak +and breakable on their own. .Sh FILES .Bl -tag -width ".Pa /var/run/ld-elf32.so.hints" -compact .It Pa /var/run/ld-elf.so.hints From owner-svn-src-stable-11@freebsd.org Mon Jul 17 06:14:50 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 10438CFD1B2; Mon, 17 Jul 2017 06:14:50 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E0BA873E6F; Mon, 17 Jul 2017 06:14:49 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6H6Ennt084854; Mon, 17 Jul 2017 06:14:49 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6H6EnCe084853; Mon, 17 Jul 2017 06:14:49 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201707170614.v6H6EnCe084853@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 17 Jul 2017 06:14:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r321066 - stable/11/lib/libc/gen X-SVN-Group: stable-11 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/11/lib/libc/gen X-SVN-Commit-Revision: 321066 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Jul 2017 06:14:50 -0000 Author: kib Date: Mon Jul 17 06:14:48 2017 New Revision: 321066 URL: https://svnweb.freebsd.org/changeset/base/321066 Log: MFC r320868: Fix warnings, adjust style. Modified: stable/11/lib/libc/gen/dlfcn.c Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libc/gen/dlfcn.c ============================================================================== --- stable/11/lib/libc/gen/dlfcn.c Mon Jul 17 06:10:54 2017 (r321065) +++ stable/11/lib/libc/gen/dlfcn.c Mon Jul 17 06:14:48 2017 (r321066) @@ -57,92 +57,103 @@ void _rtld_atfork_post(int *); #pragma weak _rtld_error void -_rtld_error(const char *fmt, ...) +_rtld_error(const char *fmt __unused, ...) { } #pragma weak dladdr int -dladdr(const void *addr, Dl_info *dlip) +dladdr(const void *addr __unused, Dl_info *dlip __unused) { + _rtld_error(sorry); - return 0; + return (0); } #pragma weak dlclose int -dlclose(void *handle) +dlclose(void *handle __unused) { + _rtld_error(sorry); - return -1; + return (-1); } #pragma weak dlerror char * dlerror(void) { - return sorry; + + return (sorry); } #pragma weak dllockinit void dllockinit(void *context, - void *(*lock_create)(void *context), - void (*rlock_acquire)(void *lock), - void (*wlock_acquire)(void *lock), - void (*lock_release)(void *lock), - void (*lock_destroy)(void *lock), - void (*context_destroy)(void *context)) + void *(*lock_create)(void *context) __unused, + void (*rlock_acquire)(void *lock) __unused, + void (*wlock_acquire)(void *lock) __unused, + void (*lock_release)(void *lock) __unused, + void (*lock_destroy)(void *lock) __unused, + void (*context_destroy)(void *context) __unused) { + if (context_destroy != NULL) context_destroy(context); } #pragma weak dlopen void * -dlopen(const char *name, int mode) +dlopen(const char *name __unused, int mode __unused) { + _rtld_error(sorry); - return NULL; + return (NULL); } #pragma weak dlsym void * -dlsym(void * __restrict handle, const char * __restrict name) +dlsym(void * __restrict handle __unused, const char * __restrict name __unused) { + _rtld_error(sorry); - return NULL; + return (NULL); } #pragma weak dlfunc dlfunc_t -dlfunc(void * __restrict handle, const char * __restrict name) +dlfunc(void * __restrict handle __unused, const char * __restrict name __unused) { + _rtld_error(sorry); - return NULL; + return (NULL); } #pragma weak dlvsym void * -dlvsym(void * __restrict handle, const char * __restrict name, - const char * __restrict version) +dlvsym(void * __restrict handle __unused, const char * __restrict name __unused, + const char * __restrict version __unused) { + _rtld_error(sorry); - return NULL; + return (NULL); } #pragma weak dlinfo int -dlinfo(void * __restrict handle, int request, void * __restrict p) +dlinfo(void * __restrict handle __unused, int request __unused, + void * __restrict p __unused) { + _rtld_error(sorry); - return 0; + return (0); } #pragma weak _rtld_thread_init void -_rtld_thread_init(void * li) +_rtld_thread_init(void *li __unused) { + _rtld_error(sorry); } @@ -184,8 +195,8 @@ dl_init_phdr_info(void) #pragma weak dl_iterate_phdr int -dl_iterate_phdr(int (*callback)(struct dl_phdr_info *, size_t, void *), - void *data) +dl_iterate_phdr(int (*callback)(struct dl_phdr_info *, size_t, void *) __unused, + void *data __unused) { __init_elf_aux_vector(); @@ -197,28 +208,29 @@ dl_iterate_phdr(int (*callback)(struct dl_phdr_info *, #pragma weak fdlopen void * -fdlopen(int fd, int mode) +fdlopen(int fd __unused, int mode __unused) { _rtld_error(sorry); - return NULL; + return (NULL); } #pragma weak _rtld_atfork_pre void -_rtld_atfork_pre(int *locks) +_rtld_atfork_pre(int *locks __unused) { } #pragma weak _rtld_atfork_post void -_rtld_atfork_post(int *locks) +_rtld_atfork_post(int *locks __unused) { } #pragma weak _rtld_addr_phdr int -_rtld_addr_phdr(const void *addr, struct dl_phdr_info *phdr_info) +_rtld_addr_phdr(const void *addr __unused, + struct dl_phdr_info *phdr_info_a __unused) { return (0); @@ -234,7 +246,7 @@ _rtld_get_stack_prot(void) #pragma weak _rtld_is_dlopened int -_rtld_is_dlopened(void *arg) +_rtld_is_dlopened(void *arg __unused) { return (0); From owner-svn-src-stable-11@freebsd.org Mon Jul 17 06:36:43 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 47D9DCFDC24; Mon, 17 Jul 2017 06:36:43 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 16C6974E26; Mon, 17 Jul 2017 06:36:43 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6H6agLg093403; Mon, 17 Jul 2017 06:36:42 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6H6agP9093402; Mon, 17 Jul 2017 06:36:42 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201707170636.v6H6agP9093402@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Mon, 17 Jul 2017 06:36:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r321068 - stable/11/libexec/rshd X-SVN-Group: stable-11 X-SVN-Commit-Author: delphij X-SVN-Commit-Paths: stable/11/libexec/rshd X-SVN-Commit-Revision: 321068 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Jul 2017 06:36:43 -0000 Author: delphij Date: Mon Jul 17 06:36:42 2017 New Revision: 321068 URL: https://svnweb.freebsd.org/changeset/base/321068 Log: MFC r320433: Use strlcpy() instead of strncpy() and nul-terminating. Modified: stable/11/libexec/rshd/rshd.c Directory Properties: stable/11/ (props changed) Modified: stable/11/libexec/rshd/rshd.c ============================================================================== --- stable/11/libexec/rshd/rshd.c Mon Jul 17 06:28:34 2017 (r321067) +++ stable/11/libexec/rshd/rshd.c Mon Jul 17 06:36:42 2017 (r321068) @@ -338,8 +338,7 @@ doit(struct sockaddr *fromp) pam_err = pam_authenticate(pamh, 0); if (pam_err == PAM_SUCCESS) { if ((pam_err = pam_get_user(pamh, &cp, NULL)) == PAM_SUCCESS) { - strncpy(luser, cp, sizeof(luser)); - luser[sizeof(luser) - 1] = '\0'; + strlcpy(luser, cp, sizeof(luser)); /* XXX truncation! */ } pam_err = pam_acct_mgmt(pamh, 0); @@ -386,9 +385,7 @@ doit(struct sockaddr *fromp) if (lc != NULL && fromp->sa_family == AF_INET) { /*XXX*/ char remote_ip[MAXHOSTNAMELEN]; - strncpy(remote_ip, numericname, - sizeof(remote_ip) - 1); - remote_ip[sizeof(remote_ip) - 1] = 0; + strlcpy(remote_ip, numericname, sizeof(remote_ip)); /* XXX truncation! */ if (!auth_hostok(lc, rhost, remote_ip)) { syslog(LOG_INFO|LOG_AUTH, From owner-svn-src-stable-11@freebsd.org Mon Jul 17 06:45:14 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CED6ECFDFEE; Mon, 17 Jul 2017 06:45:14 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9A824755C8; Mon, 17 Jul 2017 06:45:14 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6H6jD8G097444; Mon, 17 Jul 2017 06:45:13 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6H6jDLH097441; Mon, 17 Jul 2017 06:45:13 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201707170645.v6H6jDLH097441@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Mon, 17 Jul 2017 06:45:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r321070 - stable/11/lib/libstand X-SVN-Group: stable-11 X-SVN-Commit-Author: delphij X-SVN-Commit-Paths: stable/11/lib/libstand X-SVN-Commit-Revision: 321070 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Jul 2017 06:45:14 -0000 Author: delphij Date: Mon Jul 17 06:45:13 2017 New Revision: 321070 URL: https://svnweb.freebsd.org/changeset/base/321070 Log: MFC r320468: Don't bother to set target for SEEK_END. While there also collapase SEEK_END into default case in lseek. Modified: stable/11/lib/libstand/bzipfs.c stable/11/lib/libstand/gzipfs.c stable/11/lib/libstand/lseek.c Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libstand/bzipfs.c ============================================================================== --- stable/11/lib/libstand/bzipfs.c Mon Jul 17 06:37:46 2017 (r321069) +++ stable/11/lib/libstand/bzipfs.c Mon Jul 17 06:45:13 2017 (r321070) @@ -320,8 +320,6 @@ bzf_seek(struct open_file *f, off_t offset, int where) case SEEK_CUR: target = offset + bzf->bzf_bzstream.total_out_lo32; break; - case SEEK_END: - target = -1; default: errno = EINVAL; return(-1); Modified: stable/11/lib/libstand/gzipfs.c ============================================================================== --- stable/11/lib/libstand/gzipfs.c Mon Jul 17 06:37:46 2017 (r321069) +++ stable/11/lib/libstand/gzipfs.c Mon Jul 17 06:45:13 2017 (r321070) @@ -300,8 +300,6 @@ zf_seek(struct open_file *f, off_t offset, int where) case SEEK_CUR: target = offset + zf->zf_zstream.total_out; break; - case SEEK_END: - target = -1; default: errno = EINVAL; return(-1); Modified: stable/11/lib/libstand/lseek.c ============================================================================== --- stable/11/lib/libstand/lseek.c Mon Jul 17 06:37:46 2017 (r321069) +++ stable/11/lib/libstand/lseek.c Mon Jul 17 06:45:13 2017 (r321070) @@ -87,7 +87,6 @@ lseek(int fd, off_t offset, int where) case SEEK_CUR: f->f_offset += offset; break; - case SEEK_END: default: errno = EOFFSET; return (-1); From owner-svn-src-stable-11@freebsd.org Mon Jul 17 20:55:00 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6896ADA06F1; Mon, 17 Jul 2017 20:55:00 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3735270FA1; Mon, 17 Jul 2017 20:55:00 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6HKsxV3049616; Mon, 17 Jul 2017 20:54:59 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6HKsxKm049614; Mon, 17 Jul 2017 20:54:59 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201707172054.v6HKsxKm049614@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Mon, 17 Jul 2017 20:54:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r321083 - in stable/11: etc/mtree usr.bin/procstat usr.bin/procstat/tests X-SVN-Group: stable-11 X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: in stable/11: etc/mtree usr.bin/procstat usr.bin/procstat/tests X-SVN-Commit-Revision: 321083 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Jul 2017 20:55:00 -0000 Author: ngie Date: Mon Jul 17 20:54:59 2017 New Revision: 321083 URL: https://svnweb.freebsd.org/changeset/base/321083 Log: MFC r318325: Start writing up some basic feature tests for procstat These tests query a running process for information related to the -b, -c, -e, and -f flags; the -f testcase is largely stubbed out, pending additional work to determine a good, deterministic descriptor. Core file test support is coming soon--it requires a bit more effort due to the fact that: - coredumps can be disabled (kern.coredump=0). - corefiles can be put in different directories than the current directory, or be named something other than `.core` (`kern.corefile`). Added: stable/11/usr.bin/procstat/tests/ - copied from r318325, head/usr.bin/procstat/tests/ Modified: stable/11/etc/mtree/BSD.tests.dist stable/11/usr.bin/procstat/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/etc/mtree/BSD.tests.dist ============================================================================== --- stable/11/etc/mtree/BSD.tests.dist Mon Jul 17 18:33:30 2017 (r321082) +++ stable/11/etc/mtree/BSD.tests.dist Mon Jul 17 20:54:59 2017 (r321083) @@ -640,6 +640,8 @@ .. printf .. + procstat + .. sdiff .. sed Modified: stable/11/usr.bin/procstat/Makefile ============================================================================== --- stable/11/usr.bin/procstat/Makefile Mon Jul 17 18:33:30 2017 (r321082) +++ stable/11/usr.bin/procstat/Makefile Mon Jul 17 20:54:59 2017 (r321083) @@ -1,5 +1,7 @@ # $FreeBSD$ +.include + PROG= procstat MAN= procstat.1 SRCS= procstat.c \ @@ -18,5 +20,9 @@ SRCS= procstat.c \ procstat_vm.c LIBADD+= procstat xo util sbuf + +.if ${MK_TESTS} != "no" +SUBDIR+= tests +.endif .include From owner-svn-src-stable-11@freebsd.org Mon Jul 17 21:01:12 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4C1F3DA0AC2; Mon, 17 Jul 2017 21:01:12 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 25EA67143E; Mon, 17 Jul 2017 21:01:12 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6HL1BoM050172; Mon, 17 Jul 2017 21:01:11 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6HL1A9u050167; Mon, 17 Jul 2017 21:01:10 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201707172101.v6HL1A9u050167@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Mon, 17 Jul 2017 21:01:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r321086 - in stable/11: etc/mtree usr.bin/stat usr.bin/stat/tests X-SVN-Group: stable-11 X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: in stable/11: etc/mtree usr.bin/stat usr.bin/stat/tests X-SVN-Commit-Revision: 321086 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Jul 2017 21:01:12 -0000 Author: ngie Date: Mon Jul 17 21:01:10 2017 New Revision: 321086 URL: https://svnweb.freebsd.org/changeset/base/321086 Log: MFC r319834,r319841,r320723,r320724: r319834: Write up some basic tests for readlink(1) The tests exercise -f (f_flag), -n (n_flag), and no arguments (basic). r319841: Add initial tests for stat(1) Testcases for -H, -L, and -f haven't been implemented yet, in part due to additional complexity needed to validate the features: * -H and -f will require an external "helper" program to display/modify the state/permissions for a given path. * -L is being covered partially via the -n testcase today. r320723: Use %e instead of %d with x_output_date(..) stat -x doesn't 0-fill days so %d is inappropriate. %e is correct. MFC with: r319841 r320724: :l_flag:: be more aggressive when normalizing whitespace Save output from ls -ldT and stat -l, then normalize all repeating whitespace using sed to single column spaces. This makes the test flexible with single-digit days, etc, similar to r320723. This approach is just a bit more of a hammer approach because of how the columns are ordered/spaced in both ls and stat. MFC with: r319841 Added: stable/11/usr.bin/stat/tests/ - copied from r319834, head/usr.bin/stat/tests/ stable/11/usr.bin/stat/tests/stat_test.sh - copied, changed from r319841, head/usr.bin/stat/tests/stat_test.sh Modified: stable/11/etc/mtree/BSD.tests.dist stable/11/usr.bin/stat/Makefile stable/11/usr.bin/stat/stat.1 stable/11/usr.bin/stat/tests/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/etc/mtree/BSD.tests.dist ============================================================================== --- stable/11/etc/mtree/BSD.tests.dist Mon Jul 17 21:01:07 2017 (r321085) +++ stable/11/etc/mtree/BSD.tests.dist Mon Jul 17 21:01:10 2017 (r321086) @@ -650,6 +650,8 @@ .. soelim .. + stat + .. tail .. tar Modified: stable/11/usr.bin/stat/Makefile ============================================================================== --- stable/11/usr.bin/stat/Makefile Mon Jul 17 21:01:07 2017 (r321085) +++ stable/11/usr.bin/stat/Makefile Mon Jul 17 21:01:10 2017 (r321086) @@ -1,8 +1,12 @@ # $FreeBSD$ +.include + PROG= stat LINKS= ${BINDIR}/stat ${BINDIR}/readlink MLINKS= stat.1 readlink.1 + +SUBDIR.${MK_TESTS}+= tests .include Modified: stable/11/usr.bin/stat/stat.1 ============================================================================== --- stable/11/usr.bin/stat/stat.1 Mon Jul 17 21:01:07 2017 (r321085) +++ stable/11/usr.bin/stat/stat.1 Mon Jul 17 21:01:10 2017 (r321086) @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 22, 2012 +.Dd June 22, 2017 .Dt STAT 1 .Os .Sh NAME Modified: stable/11/usr.bin/stat/tests/Makefile ============================================================================== --- head/usr.bin/stat/tests/Makefile Sun Jun 11 21:13:12 2017 (r319834) +++ stable/11/usr.bin/stat/tests/Makefile Mon Jul 17 21:01:10 2017 (r321086) @@ -1,5 +1,6 @@ # $FreeBSD$ ATF_TESTS_SH+= readlink_test +ATF_TESTS_SH+= stat_test .include Copied and modified: stable/11/usr.bin/stat/tests/stat_test.sh (from r319841, head/usr.bin/stat/tests/stat_test.sh) ============================================================================== --- head/usr.bin/stat/tests/stat_test.sh Mon Jun 12 00:21:55 2017 (r319841, copy source) +++ stable/11/usr.bin/stat/tests/stat_test.sh Mon Jul 17 21:01:10 2017 (r321086) @@ -60,14 +60,23 @@ l_flag_body() paths="a b c d" + ls_out=ls.output + stat_out=stat.output + # NOTE: # - Even though stat -l claims to be equivalent to `ls -lT`, the # whitespace is a bit more liberal in the `ls -lT` output. # - `ls -ldT` is used to not recursively list the contents of # directories. for path in $paths; do - atf_check -o inline:"$(ls -ldT $path | sed -e 's, , ,g')\n" \ - stat -l $path + atf_check -o save:$ls_out ls -ldT $path + cat $ls_out + atf_check -o save:$stat_out stat -l $path + cat $stat_out + echo "Comparing normalized whitespace" + atf_check sed -i '' -E -e 's/[[:space:]]+/ /g' $ls_out + atf_check sed -i '' -E -e 's/[[:space:]]+/ /g' $stat_out + atf_check cmp $ls_out $stat_out done } @@ -165,7 +174,7 @@ t_flag_body() x_output_date() { - local date_format='%a %b %d %H:%M:%S %Y' + local date_format='%a %b %e %H:%M:%S %Y' stat -t "$date_format" "$@" } From owner-svn-src-stable-11@freebsd.org Mon Jul 17 21:05:16 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F03D4DA0C8F; Mon, 17 Jul 2017 21:05:16 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BF2DC71BC3; Mon, 17 Jul 2017 21:05:16 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6HL5F1b054118; Mon, 17 Jul 2017 21:05:15 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6HL5FdD054117; Mon, 17 Jul 2017 21:05:15 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201707172105.v6HL5FdD054117@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Mon, 17 Jul 2017 21:05:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r321087 - stable/11/sys/dev/vt/hw/vga X-SVN-Group: stable-11 X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: stable/11/sys/dev/vt/hw/vga X-SVN-Commit-Revision: 321087 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Jul 2017 21:05:17 -0000 Author: ngie Date: Mon Jul 17 21:05:15 2017 New Revision: 321087 URL: https://svnweb.freebsd.org/changeset/base/321087 Log: MFC r319928: Use nitems(..) when computing `max` instead of the longhand version of the same logic Modified: stable/11/sys/dev/vt/hw/vga/vt_vga.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/vt/hw/vga/vt_vga.c ============================================================================== --- stable/11/sys/dev/vt/hw/vga/vt_vga.c Mon Jul 17 21:01:10 2017 (r321086) +++ stable/11/sys/dev/vt/hw/vga/vt_vga.c Mon Jul 17 21:05:15 2017 (r321087) @@ -288,7 +288,7 @@ vga_get_cp437(term_char_t c) int min, mid, max; min = 0; - max = (sizeof(cp437table) / sizeof(struct unicp437)) - 1; + max = nitems(cp437table) - 1; if (c < cp437table[0].unicode_base || c > cp437table[max].unicode_base + cp437table[max].length) From owner-svn-src-stable-11@freebsd.org Mon Jul 17 21:08:25 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5D2B5DA0D60; Mon, 17 Jul 2017 21:08:25 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2EF5C71D77; Mon, 17 Jul 2017 21:08:25 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6HL8OKR054365; Mon, 17 Jul 2017 21:08:24 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6HL8OPP054364; Mon, 17 Jul 2017 21:08:24 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201707172108.v6HL8OPP054364@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Mon, 17 Jul 2017 21:08:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r321088 - stable/11/bin/ln/tests X-SVN-Group: stable-11 X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: stable/11/bin/ln/tests X-SVN-Commit-Revision: 321088 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Jul 2017 21:08:25 -0000 Author: ngie Date: Mon Jul 17 21:08:24 2017 New Revision: 321088 URL: https://svnweb.freebsd.org/changeset/base/321088 Log: MFC r319855,r319856,r319858: r319855: Use readlink(1)/stat(1) to query symlinks instead of file(1) file(1) can be compiled out of the system via MK_FILE == no, and the output isn't guaranteed to be stable. It's better to use stat(1)/readlink(1) instead to query symlink/file paths. MFC with: r319714, r319854 r319856: Add a testcase for `ln -sF` The testcase fails today, so mark it with atf_expect_fail: in particular, the target (B) isn't being unlinked and the documentation doesn't suggest special handling for directories. Thus, there's either a doc or an implementation bug in ln(1) that needs to be resolved. MFC with: r319714, r319854, r319855 PR: 219943 r319858: Style fixes: clean up leading whitespace (8 single column spaces -> \t) MFC with: r319714, r319854, r319855, r319856 Modified: stable/11/bin/ln/tests/ln_test.sh Directory Properties: stable/11/ (props changed) Modified: stable/11/bin/ln/tests/ln_test.sh ============================================================================== --- stable/11/bin/ln/tests/ln_test.sh Mon Jul 17 21:05:15 2017 (r321087) +++ stable/11/bin/ln/tests/ln_test.sh Mon Jul 17 21:08:24 2017 (r321088) @@ -28,193 +28,217 @@ set_umask() { - if ! umask 022; then - atf_fail "setting umask failed" - fi + if ! umask 022; then + atf_fail "setting umask failed" + fi } atf_test_case L_flag L_flag_head() { - atf_set "descr" "Verify that when creating a hard link to a " \ - "symbolic link, '-L' option creates a hard" \ - "link to the target of the symbolic link" + atf_set "descr" "Verify that when creating a hard link to a " \ + "symbolic link, '-L' option creates a hard" \ + "link to the target of the symbolic link" } L_flag_body() { - set_umask - atf_check touch A - atf_check ln -s A B - atf_check ln -L B C - stat_A=$(stat -f %i A) - stat_C=$(stat -f %i C) - atf_check_equal "$stat_A" "$stat_C" - atf_check -o inline:'B: symbolic link to A\n' file B + set_umask + atf_check touch A + atf_check ln -s A B + atf_check ln -L B C + stat_A=$(stat -f %i A) + stat_C=$(stat -f %i C) + atf_check_equal "$stat_A" "$stat_C" + atf_check -o inline:'Symbolic Link\n' stat -f %SHT B + atf_check -o inline:'A\n' readlink B } atf_test_case P_flag P_flag_head() { - atf_set "descr" "Verify that when creating a hard link to a " \ - "symbolic link, '-P' option creates a hard " \ - "link to the symbolic link itself" + atf_set "descr" "Verify that when creating a hard link to a " \ + "symbolic link, '-P' option creates a hard " \ + "link to the symbolic link itself" } P_flag_body() { - set_umask - atf_check touch A - atf_check ln -s A B - atf_check ln -P B C - stat_B=$(stat -f %i B) - stat_C=$(stat -f %i C) - atf_check_equal "$stat_B" "$stat_C" + set_umask + atf_check touch A + atf_check ln -s A B + atf_check ln -P B C + stat_B=$(stat -f %i B) + stat_C=$(stat -f %i C) + atf_check_equal "$stat_B" "$stat_C" } atf_test_case f_flag f_flag_head() { - atf_set "descr" "Verify that if the target file already exists, " \ - "'-f' option unlinks it so that link may occur" + atf_set "descr" "Verify that if the target file already exists, " \ + "'-f' option unlinks it so that link may occur" } f_flag_body() { - set_umask - atf_check touch A B - atf_check ln -f A B - stat_A=$(stat -f %i A) - stat_B=$(stat -f %i B) - atf_check_equal "$stat_A" "$stat_B" + set_umask + atf_check touch A B + atf_check ln -f A B + stat_A=$(stat -f %i A) + stat_B=$(stat -f %i B) + atf_check_equal "$stat_A" "$stat_B" } atf_test_case target_exists_hard target_exists_hard_head() { - atf_set "descr" "Verify whether creating a hard link fails if the " \ - "target file already exists" + atf_set "descr" "Verify whether creating a hard link fails if the " \ + "target file already exists" } target_exists_hard_body() { - set_umask - atf_check touch A B - atf_check -s exit:1 -e inline:'ln: B: File exists\n' \ - ln A B + set_umask + atf_check touch A B + atf_check -s exit:1 -e inline:'ln: B: File exists\n' \ + ln A B } atf_test_case target_exists_symbolic target_exists_symbolic_head() { - atf_set "descr" "Verify whether creating a symbolic link fails if " \ - "the target file already exists" + atf_set "descr" "Verify whether creating a symbolic link fails if " \ + "the target file already exists" } target_exists_symbolic_body() { - set_umask - atf_check touch A B - atf_check -s exit:1 -e inline:'ln: B: File exists\n' \ - ln -s A B + set_umask + atf_check touch A B + atf_check -s exit:1 -e inline:'ln: B: File exists\n' \ + ln -s A B } atf_test_case shf_flag_dir shf_flag_dir_head() { - atf_set "descr" "Verify that if the target directory is a symbolic " \ - "link, '-shf' option prevents following the link" + atf_set "descr" "Verify that if the target directory is a symbolic " \ + "link, '-shf' option prevents following the link" } shf_flag_dir_body() { - atf_check mkdir -m 0777 A B - atf_check ln -s A C - atf_check ln -shf B C - atf_check -o inline:'C: symbolic link to B\n' file C + atf_check mkdir -m 0777 A B + atf_check ln -s A C + atf_check ln -shf B C + atf_check -o inline:'Symbolic Link\n' stat -f %SHT C + atf_check -o inline:'B\n' readlink C } atf_test_case snf_flag_dir snf_flag_dir_head() { - atf_set "descr" "Verify that if the target directory is a symbolic " \ - "link, '-snf' option prevents following the link" + atf_set "descr" "Verify that if the target directory is a symbolic " \ + "link, '-snf' option prevents following the link" } snf_flag_dir_body() { - atf_check mkdir -m 0777 A B - atf_check ln -s A C - atf_check ln -snf B C - atf_check -o inline:'C: symbolic link to B\n' file C + atf_check mkdir -m 0777 A B + atf_check ln -s A C + atf_check ln -snf B C + atf_check -o inline:'Symbolic Link\n' stat -f %SHT C + atf_check -o inline:'B\n' readlink C } +atf_test_case sF_flag +sF_flag_head() +{ + atf_set "descr" "Verify that if the target file already exists " \ + "and is a directory, then '-sF' option removes " \ + "it so that the link may occur" +} + +sF_flag_body() +{ + atf_expect_fail "B isn't being unlinked (bug 219943)" + atf_check mkdir A B + atf_check ln -sF A B + atf_check -o inline:'Symbolic Link\n' stat -f %SHT B +} + atf_test_case sf_flag sf_flag_head() { - atf_set "descr" "Verify that if the target file already exists, " \ - "'-sf' option unlinks it and creates a symbolic link " \ - "to the source file" + atf_set "descr" "Verify that if the target file already exists, " \ + "'-sf' option unlinks it and creates a symbolic link " \ + "to the source file" } sf_flag_body() { - set_umask - atf_check touch A B - atf_check ln -sf A B - atf_check -o inline:'B: symbolic link to A\n' file B + set_umask + atf_check touch A B + atf_check ln -sf A B + atf_check -o inline:'Symbolic Link\n' stat -f %SHT B + atf_check -o inline:'A\n' readlink B } atf_test_case s_flag s_flag_head() { - atf_set "descr" "Verify that '-s' option creates a symbolic link" + atf_set "descr" "Verify that '-s' option creates a symbolic link" } s_flag_body() { - set_umask - atf_check touch A - atf_check ln -s A B - atf_check -o inline:'B: symbolic link to A\n' file B + set_umask + atf_check touch A + atf_check ln -s A B + atf_check -o inline:'Symbolic Link\n' stat -f %SHT B + atf_check -o inline:'A\n' readlink B } atf_test_case s_flag_broken s_flag_broken_head() { - atf_set "descr" "Verify that if the source file does not exists, '-s' " \ - "option creates a broken symbolic link to the source file" + atf_set "descr" "Verify that if the source file does not exists, '-s' " \ + "option creates a broken symbolic link to the source file" } s_flag_broken_body() { - atf_check ln -s A B - atf_check -o inline:'B: broken symbolic link to A\n' file B + atf_check ln -s A B + atf_check -o inline:'Symbolic Link\n' stat -f %SHT B + atf_check -o inline:'A\n' readlink B } atf_test_case sw_flag sw_flag_head() { - atf_set "descr" "Verify that '-sw' option produces a warning if the " \ - "source of a symbolic link does not currently exist" + atf_set "descr" "Verify that '-sw' option produces a warning if the " \ + "source of a symbolic link does not currently exist" } sw_flag_body() { - atf_check -s exit:0 -e inline:'ln: warning: A: No such file or directory\n' \ - ln -sw A B - atf_check -o inline:'B: broken symbolic link to A\n' file B + atf_check -s exit:0 -e inline:'ln: warning: A: No such file or directory\n' \ + ln -sw A B + atf_check -o inline:'Symbolic Link\n' stat -f %SHT B + atf_check -o inline:'A\n' readlink B } atf_init_test_cases() { - atf_add_test_case L_flag - atf_add_test_case P_flag - atf_add_test_case f_flag - atf_add_test_case target_exists_hard - atf_add_test_case target_exists_symbolic - atf_add_test_case shf_flag_dir - atf_add_test_case snf_flag_dir - atf_add_test_case sf_flag - atf_add_test_case s_flag - atf_add_test_case s_flag_broken - atf_add_test_case sw_flag + atf_add_test_case L_flag + atf_add_test_case P_flag + atf_add_test_case f_flag + atf_add_test_case target_exists_hard + atf_add_test_case target_exists_symbolic + atf_add_test_case shf_flag_dir + atf_add_test_case snf_flag_dir + atf_add_test_case sF_flag + atf_add_test_case sf_flag + atf_add_test_case s_flag + atf_add_test_case s_flag_broken + atf_add_test_case sw_flag } From owner-svn-src-stable-11@freebsd.org Mon Jul 17 21:09:32 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A7E32DA0DE0; Mon, 17 Jul 2017 21:09:32 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7586E71EBD; Mon, 17 Jul 2017 21:09:32 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6HL9V9R054482; Mon, 17 Jul 2017 21:09:31 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6HL9VEN054481; Mon, 17 Jul 2017 21:09:31 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201707172109.v6HL9VEN054481@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Mon, 17 Jul 2017 21:09:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r321089 - stable/11/bin/ln X-SVN-Group: stable-11 X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: stable/11/bin/ln X-SVN-Commit-Revision: 321089 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Jul 2017 21:09:32 -0000 Author: ngie Date: Mon Jul 17 21:09:31 2017 New Revision: 321089 URL: https://svnweb.freebsd.org/changeset/base/321089 Log: MFC r319857: ln(1): wordsmith -F option description Modified: stable/11/bin/ln/ln.1 Directory Properties: stable/11/ (props changed) Modified: stable/11/bin/ln/ln.1 ============================================================================== --- stable/11/bin/ln/ln.1 Mon Jul 17 21:08:24 2017 (r321088) +++ stable/11/bin/ln/ln.1 Mon Jul 17 21:09:31 2017 (r321089) @@ -32,7 +32,7 @@ .\" @(#)ln.1 8.2 (Berkeley) 12/30/93 .\" $FreeBSD$ .\" -.Dd November 2, 2012 +.Dd June 12, 2017 .Dt LN 1 .Os .Sh NAME @@ -87,14 +87,18 @@ option should be used with either or .Fl i options. -If none is specified, +If neither .Fl f +nor +.Fl i +is specified, +.Fl f is implied. The .Fl F option is a no-op unless .Fl s -option is specified. +is specified. .It Fl L When creating a hard link to a symbolic link, create a hard link to the target of the symbolic link. From owner-svn-src-stable-11@freebsd.org Mon Jul 17 21:11:22 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BAC23DA1088; Mon, 17 Jul 2017 21:11:22 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 872E9722FD; Mon, 17 Jul 2017 21:11:22 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6HLBLoY057578; Mon, 17 Jul 2017 21:11:21 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6HLBLfj057575; Mon, 17 Jul 2017 21:11:21 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201707172111.v6HLBLfj057575@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Mon, 17 Jul 2017 21:11:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r321092 - in stable/11/bin/ln: . tests X-SVN-Group: stable-11 X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: in stable/11/bin/ln: . tests X-SVN-Commit-Revision: 321092 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Jul 2017 21:11:22 -0000 Author: ngie Date: Mon Jul 17 21:11:21 2017 New Revision: 321092 URL: https://svnweb.freebsd.org/changeset/base/321092 Log: MFC r320172,r320173: r320172: ln(1): fix -F behavior When '-F' option is used, the target directory needs to be unlinked. Currently, the modified target ("target/source") is being unlinked, and since it doesn't yet exist, the original target isn't removed. This is fixed by skipping the block where target is modified to "target/source" when '-F' option is set. Hence, a symbolic link (with the same name as of the original target) to the source_file is produced. Update the test for ln(1) to reflect fix for option '-F' PR: 219943 r320173: Don't expect :sF_flag to fail anymore While here, also add a check to verify that the link target is updated in the testcase MFC with: r320172 PR: 219943 Modified: stable/11/bin/ln/ln.c stable/11/bin/ln/tests/ln_test.sh Directory Properties: stable/11/ (props changed) Modified: stable/11/bin/ln/ln.c ============================================================================== --- stable/11/bin/ln/ln.c Mon Jul 17 21:10:08 2017 (r321091) +++ stable/11/bin/ln/ln.c Mon Jul 17 21:11:21 2017 (r321092) @@ -245,11 +245,11 @@ linkit(const char *source, const char *target, int isd /* * If the target is a directory (and not a symlink if hflag), - * append the source's name. + * append the source's name, unless Fflag is set. */ - if (isdir || + if (!Fflag && (isdir || (lstat(target, &sb) == 0 && S_ISDIR(sb.st_mode)) || - (!hflag && stat(target, &sb) == 0 && S_ISDIR(sb.st_mode))) { + (!hflag && stat(target, &sb) == 0 && S_ISDIR(sb.st_mode)))) { if (strlcpy(bbuf, source, sizeof(bbuf)) >= sizeof(bbuf) || (p = basename(bbuf)) == NULL || snprintf(path, sizeof(path), "%s/%s", target, p) >= Modified: stable/11/bin/ln/tests/ln_test.sh ============================================================================== --- stable/11/bin/ln/tests/ln_test.sh Mon Jul 17 21:10:08 2017 (r321091) +++ stable/11/bin/ln/tests/ln_test.sh Mon Jul 17 21:11:21 2017 (r321092) @@ -160,10 +160,10 @@ sF_flag_head() sF_flag_body() { - atf_expect_fail "B isn't being unlinked (bug 219943)" atf_check mkdir A B atf_check ln -sF A B atf_check -o inline:'Symbolic Link\n' stat -f %SHT B + atf_check -o inline:'A\n' readlink B } atf_test_case sf_flag From owner-svn-src-stable-11@freebsd.org Mon Jul 17 21:17:05 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 29A16DA12C5; Mon, 17 Jul 2017 21:17:05 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E4C6872B18; Mon, 17 Jul 2017 21:17:04 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6HLH3Z6059255; Mon, 17 Jul 2017 21:17:03 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6HLH35f059254; Mon, 17 Jul 2017 21:17:03 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201707172117.v6HLH35f059254@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Mon, 17 Jul 2017 21:17:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r321095 - stable/11/tests/sys/aio X-SVN-Group: stable-11 X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: stable/11/tests/sys/aio X-SVN-Commit-Revision: 321095 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Jul 2017 21:17:05 -0000 Author: ngie Date: Mon Jul 17 21:17:03 2017 New Revision: 321095 URL: https://svnweb.freebsd.org/changeset/base/321095 Log: MFC r318180: Mark all md tests as requiring unsafe AIO in order to function These tests have been flapping (failing<->passing) on Jenkins for months. It passes reliably for me if unsafe AIO is permitted, but it doesn't pass on Jenkins reliably if unsafe AIO is disabled (the current default). Mark the tests as requiring unsafe AIO to mitigate the intermittent failures when unsafe AIO isn't permitted. If the kernel code is changed to reliably function with md(4) devices using unsafe AIO, this commit can be reverted. PR: 217261 Modified: stable/11/tests/sys/aio/aio_test.c Directory Properties: stable/11/ (props changed) Modified: stable/11/tests/sys/aio/aio_test.c ============================================================================== --- stable/11/tests/sys/aio/aio_test.c Mon Jul 17 21:13:43 2017 (r321094) +++ stable/11/tests/sys/aio/aio_test.c Mon Jul 17 21:17:03 2017 (r321095) @@ -735,6 +735,7 @@ aio_md_test(completion comp) struct md_ioctl mdio; ATF_REQUIRE_KERNEL_MODULE("aio"); + ATF_REQUIRE_UNSAFE_AIO(); mdctl_fd = open("/dev/" MDCTL_NAME, O_RDWR, 0); ATF_REQUIRE_MSG(mdctl_fd != -1, From owner-svn-src-stable-11@freebsd.org Mon Jul 17 21:18:41 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E9015DA136A; Mon, 17 Jul 2017 21:18:41 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B83D272C81; Mon, 17 Jul 2017 21:18:41 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6HLIetc059407; Mon, 17 Jul 2017 21:18:40 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6HLIesT059406; Mon, 17 Jul 2017 21:18:40 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201707172118.v6HLIesT059406@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Mon, 17 Jul 2017 21:18:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r321096 - stable/11/usr.bin/du X-SVN-Group: stable-11 X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: stable/11/usr.bin/du X-SVN-Commit-Revision: 321096 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Jul 2017 21:18:42 -0000 Author: ngie Date: Mon Jul 17 21:18:40 2017 New Revision: 321096 URL: https://svnweb.freebsd.org/changeset/base/321096 Log: MFC r319846: du(1): trivial whitespace cleanup Modified: stable/11/usr.bin/du/du.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.bin/du/du.c ============================================================================== --- stable/11/usr.bin/du/du.c Mon Jul 17 21:17:03 2017 (r321095) +++ stable/11/usr.bin/du/du.c Mon Jul 17 21:18:40 2017 (r321096) @@ -47,7 +47,6 @@ __FBSDID("$FreeBSD$"); #include #include #include - #include #include #include @@ -514,7 +513,7 @@ static void ignoreclean(void) { struct ignentry *ign; - + while (!SLIST_EMPTY(&ignores)) { ign = SLIST_FIRST(&ignores); SLIST_REMOVE_HEAD(&ignores, next); From owner-svn-src-stable-11@freebsd.org Mon Jul 17 21:19:42 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 02E54DA151E; Mon, 17 Jul 2017 21:19:42 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C484672F98; Mon, 17 Jul 2017 21:19:41 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6HLJem7059778; Mon, 17 Jul 2017 21:19:40 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6HLJegG059775; Mon, 17 Jul 2017 21:19:40 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201707172119.v6HLJegG059775@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Mon, 17 Jul 2017 21:19:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r321099 - stable/11/usr.bin/stat X-SVN-Group: stable-11 X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: stable/11/usr.bin/stat X-SVN-Commit-Revision: 321099 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Jul 2017 21:19:42 -0000 Author: ngie Date: Mon Jul 17 21:19:40 2017 New Revision: 321099 URL: https://svnweb.freebsd.org/changeset/base/321099 Log: MFC r319836: stat(1): sort flags in the DESCRIPTION section -x's description should come after -t's description. Modified: stable/11/usr.bin/stat/stat.1 Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.bin/stat/stat.1 ============================================================================== --- stable/11/usr.bin/stat/stat.1 Mon Jul 17 21:19:29 2017 (r321098) +++ stable/11/usr.bin/stat/stat.1 Mon Jul 17 21:19:40 2017 (r321099) @@ -179,15 +179,15 @@ Display information in .Dq shell output format, suitable for initializing variables. -.It Fl x -Display information in a more verbose way as known from some -.Tn Linux -distributions. .It Fl t Ar timefmt Display timestamps using the specified format. This format is passed directly to .Xr strftime 3 . +.It Fl x +Display information in a more verbose way as known from some +.Tn Linux +distributions. .El .Ss Formats Format strings are similar to From owner-svn-src-stable-11@freebsd.org Tue Jul 18 06:45:15 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2985FC7DF6A; Tue, 18 Jul 2017 06:45:15 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EBF8622C3; Tue, 18 Jul 2017 06:45:14 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6I6jEwd090755; Tue, 18 Jul 2017 06:45:14 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6I6jD6q090750; Tue, 18 Jul 2017 06:45:13 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201707180645.v6I6jD6q090750@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 18 Jul 2017 06:45:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r321107 - in stable/11: lib/libsbuf share/man/man9 sys/kern sys/sys X-SVN-Group: stable-11 X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: in stable/11: lib/libsbuf share/man/man9 sys/kern sys/sys X-SVN-Commit-Revision: 321107 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Jul 2017 06:45:15 -0000 Author: ngie Date: Tue Jul 18 06:45:13 2017 New Revision: 321107 URL: https://svnweb.freebsd.org/changeset/base/321107 Log: MFC r307873,r314397,r314399,r314419,r314420,r314533,r316553: r307873 (by marcel): Include instead of when compiled as part of libsbuf. The former is the standard header, and allows us to compile libsbuf on macOS/linux. r314397 (by scottl): Implement sbuf_prf(), which takes an sbuf and outputs it to stdout in the non-kernel case and to the console+log in the kernel case. For the kernel case it hooks the putbuf() machinery underneath printf(9) so that the buffer is written completely atomically and without a copy into another temporary buffer. This is useful for fixing compound console/log messages that become broken and interleaved when multiple threads are competing for the console. r314399 (by scottl): Add prototype for sbuf_putbuf() r314419 (by jkim): Include stdio.h to fix libsbuf build. r314420 (by scottl): Provide a comment on why stdio.h needs to be included. r314533 (by scottl): Expose the sbuf_putbuf() symbol to libsbuf. There are a few other symbols that are present but not exposed, like get/set/clear flags, not sure if they need to be exposed at this point. r316553: sbuf(3): expose sbuf_{clear,get,set}_flags(3) via libsbuf These functions were added to sbuf(9) in r279992, but never exposed to userspace. Expose them now so they can be used/tested. Modified: stable/11/lib/libsbuf/Symbol.map stable/11/lib/libsbuf/Version.def stable/11/share/man/man9/sbuf.9 stable/11/sys/kern/subr_prf.c stable/11/sys/sys/sbuf.h Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libsbuf/Symbol.map ============================================================================== --- stable/11/lib/libsbuf/Symbol.map Tue Jul 18 06:15:05 2017 (r321106) +++ stable/11/lib/libsbuf/Symbol.map Tue Jul 18 06:45:13 2017 (r321107) @@ -21,6 +21,9 @@ FBSD_1.2 { sbuf_len; sbuf_done; sbuf_delete; + sbuf_clear_flags; + sbuf_get_flags; + sbuf_set_flags; }; FBSD_1.3 { @@ -31,3 +34,8 @@ FBSD_1.3 { FBSD_1.4 { sbuf_hexdump; }; + +FBSD_1.5 { + sbuf_putbuf; +}; + Modified: stable/11/lib/libsbuf/Version.def ============================================================================== --- stable/11/lib/libsbuf/Version.def Tue Jul 18 06:15:05 2017 (r321106) +++ stable/11/lib/libsbuf/Version.def Tue Jul 18 06:45:13 2017 (r321107) @@ -8,3 +8,6 @@ FBSD_1.3 { FBSD_1.4 { } FBSD_1.3; + +FBSD_1.5 { +} FBSD_1.4; Modified: stable/11/share/man/man9/sbuf.9 ============================================================================== --- stable/11/share/man/man9/sbuf.9 Tue Jul 18 06:15:05 2017 (r321106) +++ stable/11/share/man/man9/sbuf.9 Tue Jul 18 06:45:13 2017 (r321107) @@ -57,7 +57,8 @@ .Nm sbuf_delete , .Nm sbuf_start_section , .Nm sbuf_end_section , -.Nm sbuf_hexdump +.Nm sbuf_hexdump , +.Nm sbuf_putbuf .Nd safe string composition .Sh SYNOPSIS .In sys/types.h @@ -124,6 +125,8 @@ .Fa "const char *hdr" .Fa "int flags" .Fc +.Ft void +.Fn sbuf_putbuf "struct sbuf *s" .In sys/sysctl.h .Ft struct sbuf * .Fn sbuf_new_for_sysctl "struct sbuf *s" "char *buf" "int length" "struct sysctl_req *req" @@ -472,6 +475,12 @@ representation of the bytes if possible. See the .Xr hexdump 3 man page for more details on the interface. +.Pp +The +.Fn sbuf_putbuf +function printfs the sbuf to stdout if in userland, and to the console +and log if in the kernel. +It does not drain the buffer or update any pointers. .Sh NOTES If an operation caused an .Fa sbuf Modified: stable/11/sys/kern/subr_prf.c ============================================================================== --- stable/11/sys/kern/subr_prf.c Tue Jul 18 06:15:05 2017 (r321106) +++ stable/11/sys/kern/subr_prf.c Tue Jul 18 06:45:13 2017 (r321107) @@ -72,8 +72,20 @@ __FBSDID("$FreeBSD$"); * Note that stdarg.h and the ANSI style va_start macro is used for both * ANSI and traditional C compilers. */ +#ifdef _KERNEL #include +#else +#include +#endif +/* + * This is needed for sbuf_putbuf() when compiled into userland. Due to the + * shared nature of this file, it's the only place to put it. + */ +#ifndef _KERNEL +#include +#endif + #ifdef _KERNEL #define TOCONS 0x01 @@ -406,6 +418,23 @@ vprintf(const char *fmt, va_list ap) } static void +prf_putbuf(char *bufr, int flags, int pri) +{ + + if (flags & TOLOG) + msglogstr(bufr, pri, /*filter_cr*/1); + + if (flags & TOCONS) { + if ((panicstr == NULL) && (constty != NULL)) + msgbuf_addstr(&consmsgbuf, -1, + bufr, /*filter_cr*/ 0); + + if ((constty == NULL) ||(always_console_output)) + cnputs(bufr); + } +} + +static void putbuf(int c, struct putchar_arg *ap) { /* Check if no console output buffer was provided. */ @@ -426,19 +455,8 @@ putbuf(int c, struct putchar_arg *ap) /* Check if the buffer needs to be flushed. */ if (ap->remain == 2 || c == '\n') { + prf_putbuf(ap->p_bufr, ap->flags, ap->pri); - if (ap->flags & TOLOG) - msglogstr(ap->p_bufr, ap->pri, /*filter_cr*/1); - - if (ap->flags & TOCONS) { - if ((panicstr == NULL) && (constty != NULL)) - msgbuf_addstr(&consmsgbuf, -1, - ap->p_bufr, /*filter_cr*/ 0); - - if ((constty == NULL) ||(always_console_output)) - cnputs(ap->p_bufr); - } - ap->p_next = ap->p_bufr; ap->remain = ap->n_bufr; *ap->p_next = '\0'; @@ -1214,5 +1232,21 @@ counted_warning(unsigned *counter, const char *msg) break; } } +} +#endif + +#ifdef _KERNEL +void +sbuf_putbuf(struct sbuf *sb) +{ + + prf_putbuf(sbuf_data(sb), TOLOG | TOCONS, -1); +} +#else +void +sbuf_putbuf(struct sbuf *sb) +{ + + printf("%s", sbuf_data(sb)); } #endif Modified: stable/11/sys/sys/sbuf.h ============================================================================== --- stable/11/sys/sys/sbuf.h Tue Jul 18 06:15:05 2017 (r321106) +++ stable/11/sys/sys/sbuf.h Tue Jul 18 06:45:13 2017 (r321107) @@ -99,6 +99,7 @@ void sbuf_start_section(struct sbuf *, ssize_t *); ssize_t sbuf_end_section(struct sbuf *, ssize_t, size_t, int); void sbuf_hexdump(struct sbuf *, const void *, int, const char *, int); +void sbuf_putbuf(struct sbuf *); #ifdef _KERNEL struct uio; From owner-svn-src-stable-11@freebsd.org Tue Jul 18 06:57:52 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 12F2EC7E3FE; Tue, 18 Jul 2017 06:57:52 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D407B2BE0; Tue, 18 Jul 2017 06:57:51 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6I6vorm095393; Tue, 18 Jul 2017 06:57:50 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6I6voYa095392; Tue, 18 Jul 2017 06:57:50 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201707180657.v6I6voYa095392@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 18 Jul 2017 06:57:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r321110 - stable/11/sys/kern X-SVN-Group: stable-11 X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: stable/11/sys/kern X-SVN-Commit-Revision: 321110 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Jul 2017 06:57:52 -0000 Author: ngie Date: Tue Jul 18 06:57:50 2017 New Revision: 321110 URL: https://svnweb.freebsd.org/changeset/base/321110 Log: MFC r321109: Fix whitespace regression accidentally checked in via ^/head@r280149 Modified: stable/11/sys/kern/subr_sbuf.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/kern/subr_sbuf.c ============================================================================== --- stable/11/sys/kern/subr_sbuf.c Tue Jul 18 06:51:27 2017 (r321109) +++ stable/11/sys/kern/subr_sbuf.c Tue Jul 18 06:57:50 2017 (r321110) @@ -104,7 +104,7 @@ _assert_sbuf_integrity(const char *fun, struct sbuf *s ("%s called with a NULL sbuf pointer", fun)); KASSERT(s->s_buf != NULL, ("%s called with uninitialized or corrupt sbuf", fun)); - if (SBUF_ISFINISHED(s) && SBUF_NULINCLUDED(s)) { + if (SBUF_ISFINISHED(s) && SBUF_NULINCLUDED(s)) { KASSERT(s->s_len <= s->s_size, ("wrote past end of sbuf (%jd >= %jd)", (intmax_t)s->s_len, (intmax_t)s->s_size)); From owner-svn-src-stable-11@freebsd.org Tue Jul 18 08:23:48 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5A300C7FAAD; Tue, 18 Jul 2017 08:23:48 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 28EAA647C0; Tue, 18 Jul 2017 08:23:48 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6I8Nl2H032040; Tue, 18 Jul 2017 08:23:47 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6I8NlQa032038; Tue, 18 Jul 2017 08:23:47 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201707180823.v6I8NlQa032038@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 18 Jul 2017 08:23:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r321114 - in stable/11: etc/mtree lib/libsbuf lib/libsbuf/tests X-SVN-Group: stable-11 X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: in stable/11: etc/mtree lib/libsbuf lib/libsbuf/tests X-SVN-Commit-Revision: 321114 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Jul 2017 08:23:48 -0000 Author: ngie Date: Tue Jul 18 08:23:47 2017 New Revision: 321114 URL: https://svnweb.freebsd.org/changeset/base/321114 Log: MFC r316557: sbuf(3): add some basic functional tests for the library Areas not covered still [positive functionality wise] are: - sbuf_{clear,get,set}_flags - sbuf_new (in particular, with fixed buffers, etc). Some basic negative testing has been added, but more will be added in the future. This work was in part to validate work done by cem in r288223, and ian before that. Added: stable/11/lib/libsbuf/tests/ - copied from r316557, head/lib/libsbuf/tests/ Modified: stable/11/etc/mtree/BSD.tests.dist stable/11/lib/libsbuf/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/etc/mtree/BSD.tests.dist ============================================================================== --- stable/11/etc/mtree/BSD.tests.dist Tue Jul 18 08:23:21 2017 (r321113) +++ stable/11/etc/mtree/BSD.tests.dist Tue Jul 18 08:23:47 2017 (r321114) @@ -332,6 +332,8 @@ .. librt .. + libsbuf + .. libthr dlopen .. Modified: stable/11/lib/libsbuf/Makefile ============================================================================== --- stable/11/lib/libsbuf/Makefile Tue Jul 18 08:23:21 2017 (r321113) +++ stable/11/lib/libsbuf/Makefile Tue Jul 18 08:23:47 2017 (r321114) @@ -10,6 +10,10 @@ SHLIB_MAJOR = 6 SYMBOL_MAPS= ${.CURDIR}/Symbol.map VERSION_DEF= ${.CURDIR}/Version.def +.include + .PATH: ${SRCTOP}/sys/kern + +SUBDIR.${MK_TESTS}+= tests .include From owner-svn-src-stable-11@freebsd.org Tue Jul 18 08:28:38 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6699FC7FBE2; Tue, 18 Jul 2017 08:28:38 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 421B564B0E; Tue, 18 Jul 2017 08:28:38 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6I8SbKt032393; Tue, 18 Jul 2017 08:28:37 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6I8SbBP032391; Tue, 18 Jul 2017 08:28:37 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201707180828.v6I8SbBP032391@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 18 Jul 2017 08:28:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r321116 - stable/11/share/man/man9 X-SVN-Group: stable-11 X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: stable/11/share/man/man9 X-SVN-Commit-Revision: 321116 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Jul 2017 08:28:38 -0000 Author: ngie Date: Tue Jul 18 08:28:37 2017 New Revision: 321116 URL: https://svnweb.freebsd.org/changeset/base/321116 Log: MFC r316549,r316550,r316551,r316554: r316549: Add sys/types.h #include to EXAMPLE to provide a complete functional standalone example program r316550: sbuf(9): convert SYNOPSIS section from .Fn entries to .Fo/.Fa/.Fc entries This shortens the column count on many lines considerably. While here, add "(void)" to sbuf_new_auto(3) for consistency with style(9) recommendations. r316551: sbuf(9): clarify kernel-only APIs - move sbuf_bcopyin(9) and sbuf_copyin(9) near sbuf_new_for_sysctl(9), as all three functions are kernel-only APIs. - add #ifdef _KERNEL around sbuf_*copyin and sbuf_new_for_sysctl(9) to make it visually clear that they are kernel-only APIs. r316554: sbuf(9): add MLINKS for sbuf_{clear,get,set}_flags(9) These functions were added in r279992. Modified: stable/11/share/man/man9/Makefile stable/11/share/man/man9/sbuf.9 Directory Properties: stable/11/ (props changed) Modified: stable/11/share/man/man9/Makefile ============================================================================== --- stable/11/share/man/man9/Makefile Tue Jul 18 08:28:14 2017 (r321115) +++ stable/11/share/man/man9/Makefile Tue Jul 18 08:28:37 2017 (r321116) @@ -1461,6 +1461,7 @@ MLINKS+=sbuf.9 sbuf_bcat.9 \ sbuf.9 sbuf_bcpy.9 \ sbuf.9 sbuf_cat.9 \ sbuf.9 sbuf_clear.9 \ + sbuf.9 sbuf_clear_flags.9 \ sbuf.9 sbuf_copyin.9 \ sbuf.9 sbuf_cpy.9 \ sbuf.9 sbuf_data.9 \ @@ -1468,6 +1469,7 @@ MLINKS+=sbuf.9 sbuf_bcat.9 \ sbuf.9 sbuf_done.9 \ sbuf.9 sbuf_error.9 \ sbuf.9 sbuf_finish.9 \ + sbuf.9 sbuf_get_flags.9 \ sbuf.9 sbuf_hexdump.9 \ sbuf.9 sbuf_len.9 \ sbuf.9 sbuf_new.9 \ @@ -1476,6 +1478,7 @@ MLINKS+=sbuf.9 sbuf_bcat.9 \ sbuf.9 sbuf_printf.9 \ sbuf.9 sbuf_putc.9 \ sbuf.9 sbuf_set_drain.9 \ + sbuf.9 sbuf_set_flags.9 \ sbuf.9 sbuf_setpos.9 \ sbuf.9 sbuf_start_section.9 \ sbuf.9 sbuf_end_section.9 \ Modified: stable/11/share/man/man9/sbuf.9 ============================================================================== --- stable/11/share/man/man9/sbuf.9 Tue Jul 18 08:28:14 2017 (r321115) +++ stable/11/share/man/man9/sbuf.9 Tue Jul 18 08:28:37 2017 (r321116) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 14, 2015 +.Dd April 5, 2017 .Dt SBUF 9 .Os .Sh NAME @@ -66,57 +66,123 @@ .Ft typedef\ int ( sbuf_drain_func ) ( void\ *arg, const\ char\ *data, int\ len ) ; .Pp .Ft struct sbuf * -.Fn sbuf_new "struct sbuf *s" "char *buf" "int length" "int flags" +.Fo sbuf_new +.Fa "struct sbuf *s" +.Fa "char *buf" +.Fa "int length" +.Fa "int flags" +.Fc .Ft struct sbuf * -.Fn sbuf_new_auto +.Fo sbuf_new_auto +.Fa "void" +.Fc .Ft void -.Fn sbuf_clear "struct sbuf *s" +.Fo sbuf_clear +.Fa "struct sbuf *s" +.Fc .Ft int -.Fn sbuf_get_flags "struct sbuf *s" +.Fo sbuf_get_flags +.Fa "struct sbuf *s" +.Fc .Ft void -.Fn sbuf_set_flags "struct sbuf *s" "int flags" +.Fo sbuf_set_flags +.Fa "struct sbuf *s" +.Fa "int flags" +.Fc .Ft void -.Fn sbuf_clear_flags "struct sbuf *s" "int flags" +.Fo sbuf_clear_flags +.Fa "struct sbuf *s" +.Fa "int flags" +.Fc .Ft int -.Fn sbuf_setpos "struct sbuf *s" "int pos" +.Fo sbuf_setpos +.Fa "struct sbuf *s" +.Fa "int pos" +.Fc .Ft int -.Fn sbuf_bcat "struct sbuf *s" "const void *buf" "size_t len" +.Fo sbuf_bcat +.Fa "struct sbuf *s" +.Fa "const void *buf" +.Fa "size_t len" +.Fc .Ft int -.Fn sbuf_bcopyin "struct sbuf *s" "const void *uaddr" "size_t len" +.Fo sbuf_bcpy +.Fa "struct sbuf *s" +.Fa "const void *buf" +.Fa "size_t len" +.Fc .Ft int -.Fn sbuf_bcpy "struct sbuf *s" "const void *buf" "size_t len" +.Fo sbuf_cat +.Fa "struct sbuf *s" +.Fa "const char *str" +.Fc .Ft int -.Fn sbuf_cat "struct sbuf *s" "const char *str" +.Fo sbuf_cpy +.Fa "struct sbuf *s" +.Fa "const char *str" +.Fc .Ft int -.Fn sbuf_copyin "struct sbuf *s" "const void *uaddr" "size_t len" +.Fo sbuf_printf +.Fa "struct sbuf *s" +.Fa "const char *fmt" "..." +.Fc .Ft int -.Fn sbuf_cpy "struct sbuf *s" "const char *str" +.Fo sbuf_vprintf +.Fa "struct sbuf *s" +.Fa "const char *fmt" +.Fa "va_list ap" +.Fc .Ft int -.Fn sbuf_printf "struct sbuf *s" "const char *fmt" "..." -.Ft int -.Fn sbuf_vprintf "struct sbuf *s" "const char *fmt" "va_list ap" -.Ft int -.Fn sbuf_putc "struct sbuf *s" "int c" +.Fo sbuf_putc +.Fa "struct sbuf *s" +.Fa "int c" +.Fc .Ft void -.Fn sbuf_set_drain "struct sbuf *s" "sbuf_drain_func *func" "void *arg" +.Fo sbuf_set_drain +.Fa "struct sbuf *s" +.Fa "sbuf_drain_func *func" +.Fa "void *arg" +.Fc .Ft int -.Fn sbuf_trim "struct sbuf *s" +.Fo sbuf_trim +.Fa "struct sbuf *s" +.Fc .Ft int -.Fn sbuf_error "struct sbuf *s" +.Fo sbuf_error +.Fa "struct sbuf *s" +.Fc .Ft int -.Fn sbuf_finish "struct sbuf *s" +.Fo sbuf_finish +.Fa "struct sbuf *s" +.Fc .Ft char * -.Fn sbuf_data "struct sbuf *s" +.Fo sbuf_data +.Fa "struct sbuf *s" +.Fc .Ft ssize_t -.Fn sbuf_len "struct sbuf *s" +.Fo sbuf_len +.Fa "struct sbuf *s" +.Fc .Ft int -.Fn sbuf_done "struct sbuf *s" +.Fo sbuf_done +.Fa "struct sbuf *s" +.Fc .Ft void -.Fn sbuf_delete "struct sbuf *s" +.Fo sbuf_delete +.Fa "struct sbuf *s" +.Fc .Ft void -.Fn sbuf_start_section "struct sbuf *s" "ssize_t *old_lenp" +.Fo sbuf_start_section +.Fa "struct sbuf *s" +.Fa "ssize_t *old_lenp" +.Fc .Ft ssize_t -.Fn sbuf_end_section "struct sbuf *s" "ssize_t old_len" "size_t pad" "int c" +.Fo sbuf_end_section +.Fa "struct sbuf *s" +.Fa "ssize_t old_len" +.Fa "size_t pad" +.Fa "int c" +.Fc .Ft void .Fo sbuf_hexdump .Fa "struct sbuf *sb" @@ -126,10 +192,33 @@ .Fa "int flags" .Fc .Ft void -.Fn sbuf_putbuf "struct sbuf *s" +.Fo sbuf_putbuf +.Fa "struct sbuf *s" +.Fc +.Fd #ifdef _KERNEL +.In sys/types.h +.In sys/sbuf.h +.Ft int +.Fo sbuf_bcopyin +.Fa "struct sbuf *s" +.Fa "const void *uaddr" +.Fa "size_t len" +.Fc +.Ft int +.Fo sbuf_copyin +.Fa "struct sbuf *s" +.Fa "const void *uaddr" +.Fa "size_t len" +.Fc .In sys/sysctl.h .Ft struct sbuf * -.Fn sbuf_new_for_sysctl "struct sbuf *s" "char *buf" "int length" "struct sysctl_req *req" +.Fo sbuf_new_for_sysctl +.Fa "struct sbuf *s" +.Fa "char *buf" +.Fa "int length" +.Fa "struct sysctl_req *req" +.Fc +.Fd #endif /* _KERNEL */ .Sh DESCRIPTION The .Nm @@ -567,6 +656,7 @@ function (the userland version) will return zero for success and \-1 and set errno on error. .Sh EXAMPLES .Bd -literal -compact +#include #include struct sbuf *sb; From owner-svn-src-stable-11@freebsd.org Tue Jul 18 08:30:52 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D41D9C7FE2A; Tue, 18 Jul 2017 08:30:52 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AE8BF64D4B; Tue, 18 Jul 2017 08:30:52 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6I8UpqU032566; Tue, 18 Jul 2017 08:30:51 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6I8UpJv032561; Tue, 18 Jul 2017 08:30:51 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201707180830.v6I8UpJv032561@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 18 Jul 2017 08:30:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r321117 - in stable/11/lib: libcam/tests libsbuf/tests X-SVN-Group: stable-11 X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: in stable/11/lib: libcam/tests libsbuf/tests X-SVN-Commit-Revision: 321117 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Jul 2017 08:30:52 -0000 Author: ngie Date: Tue Jul 18 08:30:51 2017 New Revision: 321117 URL: https://svnweb.freebsd.org/changeset/base/321117 Log: MFC r316558: Use __FBSDID instead of the license agreement to embed the $FreeBSD$ RCS keyword Reminded by a comment made by markj w.r.t. using __FBSDID in .c files ala a past Phabricator review. Modified: stable/11/lib/libcam/tests/libcam_test.c stable/11/lib/libsbuf/tests/sbuf_core_test.c stable/11/lib/libsbuf/tests/sbuf_stdio_test.c stable/11/lib/libsbuf/tests/sbuf_string_test.c Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libcam/tests/libcam_test.c ============================================================================== --- stable/11/lib/libcam/tests/libcam_test.c Tue Jul 18 08:28:37 2017 (r321116) +++ stable/11/lib/libcam/tests/libcam_test.c Tue Jul 18 08:30:51 2017 (r321117) @@ -22,9 +22,10 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. - * - * $FreeBSD$ */ + +#include +__FBSDID("$FreeBSD$"); #include #include Modified: stable/11/lib/libsbuf/tests/sbuf_core_test.c ============================================================================== --- stable/11/lib/libsbuf/tests/sbuf_core_test.c Tue Jul 18 08:28:37 2017 (r321116) +++ stable/11/lib/libsbuf/tests/sbuf_core_test.c Tue Jul 18 08:30:51 2017 (r321117) @@ -22,9 +22,10 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. - * - * $FreeBSD$ */ + +#include +__FBSDID("$FreeBSD$"); #include #include Modified: stable/11/lib/libsbuf/tests/sbuf_stdio_test.c ============================================================================== --- stable/11/lib/libsbuf/tests/sbuf_stdio_test.c Tue Jul 18 08:28:37 2017 (r321116) +++ stable/11/lib/libsbuf/tests/sbuf_stdio_test.c Tue Jul 18 08:30:51 2017 (r321117) @@ -22,9 +22,10 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. - * - * $FreeBSD$ */ + +#include +__FBSDID("$FreeBSD$"); #include #include Modified: stable/11/lib/libsbuf/tests/sbuf_string_test.c ============================================================================== --- stable/11/lib/libsbuf/tests/sbuf_string_test.c Tue Jul 18 08:28:37 2017 (r321116) +++ stable/11/lib/libsbuf/tests/sbuf_string_test.c Tue Jul 18 08:30:51 2017 (r321117) @@ -22,9 +22,10 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. - * - * $FreeBSD$ */ + +#include +__FBSDID("$FreeBSD$"); #include #include From owner-svn-src-stable-11@freebsd.org Tue Jul 18 08:33:08 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E94F7CFC0B6; Tue, 18 Jul 2017 08:33:08 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C083B651C2; Tue, 18 Jul 2017 08:33:08 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6I8X7UI036631; Tue, 18 Jul 2017 08:33:07 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6I8X7fv036629; Tue, 18 Jul 2017 08:33:07 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201707180833.v6I8X7fv036629@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 18 Jul 2017 08:33:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r321119 - stable/11/lib/libc/stdio X-SVN-Group: stable-11 X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: stable/11/lib/libc/stdio X-SVN-Commit-Revision: 321119 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Jul 2017 08:33:09 -0000 Author: ngie Date: Tue Jul 18 08:33:07 2017 New Revision: 321119 URL: https://svnweb.freebsd.org/changeset/base/321119 Log: MFC r318705,r318711: r318705: fopen(3): make manlint fixes - Break on new lines. - Use .Dv with NULL. - Rewrap lines as necessary/when possible. r318711: fopencookie(3): declare function pointers in SYNOPSIS correctly Add obligatory `*` in declarations. Modified: stable/11/lib/libc/stdio/fopen.3 stable/11/lib/libc/stdio/fopencookie.3 Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libc/stdio/fopen.3 ============================================================================== --- stable/11/lib/libc/stdio/fopen.3 Tue Jul 18 08:30:58 2017 (r321118) +++ stable/11/lib/libc/stdio/fopen.3 Tue Jul 18 08:33:07 2017 (r321119) @@ -230,15 +230,20 @@ argument, .Fn fmemopen allocates .Fa size -bytes of memory. This buffer is automatically freed when the -stream is closed. Buffers can be opened in text-mode (default) or binary-mode +bytes of memory. +This buffer is automatically freed when the stream is closed. +Buffers can be opened in text-mode (default) or binary-mode (if .Dq Li b is present in the second or third position of the .Fa mode -argument). Buffers opened in text-mode make sure that writes are terminated with -a NULL byte, if the last write hasn't filled up the whole buffer. Buffers -opened in binary-mode never append a NULL byte. +argument). +Buffers opened in text-mode make sure that writes are terminated with a +.Dv NULL +byte, if the last write hasn't filled up the whole buffer. +Buffers opened in binary-mode never append a +.Dv NULL +byte. .Sh RETURN VALUES Upon successful completion .Fn fopen , Modified: stable/11/lib/libc/stdio/fopencookie.3 ============================================================================== --- stable/11/lib/libc/stdio/fopencookie.3 Tue Jul 18 08:30:58 2017 (r321118) +++ stable/11/lib/libc/stdio/fopencookie.3 Tue Jul 18 08:33:07 2017 (r321119) @@ -35,13 +35,13 @@ .Sh SYNOPSIS .In stdio.h .Ft typedef ssize_t -.Fn (cookie_read_function_t) "void *cookie" "char *buf" "size_t size" +.Fn (*cookie_read_function_t) "void *cookie" "char *buf" "size_t size" .Ft typedef ssize_t -.Fn (cookie_write_function_t) "void *cookie" "const char *buf" "size_t size" +.Fn (*cookie_write_function_t) "void *cookie" "const char *buf" "size_t size" .Ft typedef int -.Fn (cookie_seek_function_t) "void *cookie" "off64_t *offset" "int whence" +.Fn (*cookie_seek_function_t) "void *cookie" "off64_t *offset" "int whence" .Ft typedef int -.Fn (cookie_close_function_t) "void *cookie" +.Fn (*cookie_close_function_t) "void *cookie" .Bd -literal typedef struct { cookie_read_function_t *read; From owner-svn-src-stable-11@freebsd.org Tue Jul 18 08:35:24 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 57825CFC24B; Tue, 18 Jul 2017 08:35:24 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 341EE65458; Tue, 18 Jul 2017 08:35:24 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6I8ZN6j036857; Tue, 18 Jul 2017 08:35:23 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6I8ZNJZ036854; Tue, 18 Jul 2017 08:35:23 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201707180835.v6I8ZNJZ036854@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 18 Jul 2017 08:35:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r321121 - stable/11/usr.bin/localedef X-SVN-Group: stable-11 X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: stable/11/usr.bin/localedef X-SVN-Commit-Revision: 321121 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Jul 2017 08:35:24 -0000 Author: ngie Date: Tue Jul 18 08:35:22 2017 New Revision: 321121 URL: https://svnweb.freebsd.org/changeset/base/321121 Log: MFC r318257,r318278: r318257: style(9): sort headers r318278: Mark errf _Noreturn, and mark errf and warn __printflike The _Noreturn attribute was added to placate Coverity and other static analysis tools. The __printflike attribute was added to catch issues with the calls related to printf(3) abuse. - Modify the code to facilitate the __printflike attribute addition. - Convert errf calls in to_mb(..) and to_mb_string(..) to warn(..) so the calls will return instead of exiting, as the code suggests it should. Modified: stable/11/usr.bin/localedef/localedef.c stable/11/usr.bin/localedef/localedef.h stable/11/usr.bin/localedef/wide.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.bin/localedef/localedef.c ============================================================================== --- stable/11/usr.bin/localedef/localedef.c Tue Jul 18 08:33:29 2017 (r321120) +++ stable/11/usr.bin/localedef/localedef.c Tue Jul 18 08:35:22 2017 (r321121) @@ -119,7 +119,7 @@ open_category(void) */ file = fopen(category_file(), "w"); if (file == NULL) { - errf(strerror(errno)); + errf("%s", strerror(errno)); return (NULL); } return (file); @@ -131,11 +131,11 @@ close_category(FILE *f) if (fchmod(fileno(f), 0644) < 0) { (void) fclose(f); (void) unlink(category_file()); - errf(strerror(errno)); + errf("%s", strerror(errno)); } if (fclose(f) < 0) { (void) unlink(category_file()); - errf(strerror(errno)); + errf("%s", strerror(errno)); } if (verbose) { (void) fprintf(stdout, "done.\n"); @@ -195,13 +195,13 @@ putl_category(const char *s, FILE *f) if (s && fputs(s, f) == EOF) { (void) fclose(f); (void) unlink(category_file()); - errf(strerror(errno)); + errf("%s", strerror(errno)); return (EOF); } if (fputc('\n', f) == EOF) { (void) fclose(f); (void) unlink(category_file()); - errf(strerror(errno)); + errf("%s", strerror(errno)); return (EOF); } return (0); @@ -216,7 +216,7 @@ wr_category(void *buf, size_t sz, FILE *f) if (fwrite(buf, sz, 1, f) < 1) { (void) fclose(f); (void) unlink(category_file()); - errf(strerror(errno)); + errf("%s", strerror(errno)); return (EOF); } return (0); @@ -331,7 +331,7 @@ main(int argc, char **argv) while ((dir = opendir(locname)) == NULL) { if ((errno != ENOENT) || (mkdir(locname, 0755) < 0)) { - errf(strerror(errno)); + errf("%s", strerror(errno)); } } (void) closedir(dir); Modified: stable/11/usr.bin/localedef/localedef.h ============================================================================== --- stable/11/usr.bin/localedef/localedef.h Tue Jul 18 08:33:29 2017 (r321120) +++ stable/11/usr.bin/localedef/localedef.h Tue Jul 18 08:35:22 2017 (r321121) @@ -35,10 +35,11 @@ */ /* Common header files. */ +#include +#include +#include #include #include -#include -#include extern int com_char; extern int esc_char; @@ -54,8 +55,8 @@ extern int warnings; int yylex(void); void yyerror(const char *); -void errf(const char *, ...); -void warn(const char *, ...); +_Noreturn void errf(const char *, ...) __printflike(1, 2); +void warn(const char *, ...) __printflike(1, 2); int putl_category(const char *, FILE *); int wr_category(void *, size_t, FILE *); Modified: stable/11/usr.bin/localedef/wide.c ============================================================================== --- stable/11/usr.bin/localedef/wide.c Tue Jul 18 08:33:29 2017 (r321120) +++ stable/11/usr.bin/localedef/wide.c Tue Jul 18 08:35:22 2017 (r321121) @@ -598,7 +598,7 @@ to_mb(char *mb, wchar_t wc) int rv; if ((rv = _tomb(mb, wc)) < 0) { - errf(widemsg); + warn("%s", widemsg); free(widemsg); widemsg = NULL; } @@ -614,7 +614,7 @@ to_mb_string(const wchar_t *wcs) mbs = malloc((wcslen(wcs) * mb_cur_max) + 1); if (mbs == NULL) { - errf("out of memory"); + warn("out of memory"); return (NULL); } ptr = mbs; From owner-svn-src-stable-11@freebsd.org Tue Jul 18 08:44:50 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2E048CFC4D9; Tue, 18 Jul 2017 08:44:50 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E1EB1658D4; Tue, 18 Jul 2017 08:44:49 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6I8imcJ041010; Tue, 18 Jul 2017 08:44:48 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6I8imM7041009; Tue, 18 Jul 2017 08:44:48 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201707180844.v6I8imM7041009@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 18 Jul 2017 08:44:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r321123 - stable/11/lib/libcam/tests X-SVN-Group: stable-11 X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: stable/11/lib/libcam/tests X-SVN-Commit-Revision: 321123 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Jul 2017 08:44:50 -0000 Author: ngie Date: Tue Jul 18 08:44:48 2017 New Revision: 321123 URL: https://svnweb.freebsd.org/changeset/base/321123 Log: MFC r319844,r319845: r319844: Add positive and negative testcases for cam_get_device(3) r319845: Remove stdlib.h #include added in r319844 A previous iteration of the tests I added in r319844 involved free(3), but that attempt didn't pan out, so I switched to stack allocated buffers instead of heap allocated ones, making the #include unnecessary. MFC with: r319844 Modified: stable/11/lib/libcam/tests/libcam_test.c Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libcam/tests/libcam_test.c ============================================================================== --- stable/11/lib/libcam/tests/libcam_test.c Tue Jul 18 08:44:38 2017 (r321122) +++ stable/11/lib/libcam/tests/libcam_test.c Tue Jul 18 08:44:48 2017 (r321123) @@ -58,6 +58,75 @@ cam_has_error(void) return (strlen(cam_errbuf) != 0); } +ATF_TC_WITHOUT_HEAD(cam_get_device_negative_test_NULL_path); +ATF_TC_BODY(cam_get_device_negative_test_NULL_path, tc) +{ + char parsed_dev_name[DEV_IDLEN + 1]; + int parsed_unit; + + ATF_REQUIRE_MSG(cam_get_device(NULL, parsed_dev_name, + nitems(parsed_dev_name), &parsed_unit) == -1, + "cam_get_device succeeded unexpectedly"); +} + +ATF_TC_WITHOUT_HEAD(cam_get_device_negative_test_bad_path); +ATF_TC_BODY(cam_get_device_negative_test_bad_path, tc) +{ + char parsed_dev_name[DEV_IDLEN + 1]; + int parsed_unit; + + ATF_REQUIRE_MSG(cam_get_device("1ada", parsed_dev_name, + nitems(parsed_dev_name), &parsed_unit) == -1, + "cam_get_device succeeded unexpectedly"); +} + +ATF_TC_WITHOUT_HEAD(cam_get_device_negative_test_nul_path); +ATF_TC_BODY(cam_get_device_negative_test_nul_path, tc) +{ + char parsed_dev_name[DEV_IDLEN + 1]; + int parsed_unit; + + ATF_REQUIRE_MSG(cam_get_device("", parsed_dev_name, + nitems(parsed_dev_name), &parsed_unit) == -1, + "cam_get_device succeeded unexpectedly"); +} + +ATF_TC_WITHOUT_HEAD(cam_get_device_negative_test_root); +ATF_TC_BODY(cam_get_device_negative_test_root, tc) +{ + char parsed_dev_name[DEV_IDLEN + 1]; + int parsed_unit; + + ATF_REQUIRE_MSG(cam_get_device("/", parsed_dev_name, + nitems(parsed_dev_name), &parsed_unit) == -1, + "cam_get_device succeeded unexpectedly"); +} + +ATF_TC_WITHOUT_HEAD(cam_get_device_positive_test); +ATF_TC_BODY(cam_get_device_positive_test, tc) +{ + char expected_dev_name[] = "foo"; + char parsed_dev_name[DEV_IDLEN + 1]; + int expected_unit, parsed_unit; + + expected_unit = 1; + + ATF_REQUIRE_MSG(cam_get_device("/dev/foo1", parsed_dev_name, + nitems(parsed_dev_name), &parsed_unit) == 0, + "cam_get_device failed"); + ATF_REQUIRE_STREQ(parsed_dev_name, expected_dev_name); + ATF_REQUIRE(parsed_unit == expected_unit); + + strcpy(parsed_dev_name, ""); + parsed_unit = -1; + + ATF_REQUIRE_MSG(cam_get_device("foo1", parsed_dev_name, + nitems(parsed_dev_name), &parsed_unit) == 0, + "cam_get_device failed"); + ATF_REQUIRE_STREQ(parsed_dev_name, expected_dev_name); + ATF_REQUIRE(parsed_unit == expected_unit); +} + ATF_TC(cam_open_device_negative_test_O_RDONLY); ATF_TC_HEAD(cam_open_device_negative_test_O_RDONLY, tc) { @@ -206,6 +275,11 @@ ATF_TC_BODY(cam_freeccb_negative_test_NULL, tc) ATF_TP_ADD_TCS(tp) { + ATF_TP_ADD_TC(tp, cam_get_device_negative_test_NULL_path); + ATF_TP_ADD_TC(tp, cam_get_device_negative_test_bad_path); + ATF_TP_ADD_TC(tp, cam_get_device_negative_test_nul_path); + ATF_TP_ADD_TC(tp, cam_get_device_negative_test_root); + ATF_TP_ADD_TC(tp, cam_get_device_positive_test); ATF_TP_ADD_TC(tp, cam_open_device_negative_test_O_RDONLY); ATF_TP_ADD_TC(tp, cam_open_device_negative_test_nonexistent); ATF_TP_ADD_TC(tp, cam_open_device_negative_test_unprivileged); From owner-svn-src-stable-11@freebsd.org Tue Jul 18 08:50:44 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EA44ACFC674; Tue, 18 Jul 2017 08:50:44 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B310D65C05; Tue, 18 Jul 2017 08:50:44 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6I8ohFv041421; Tue, 18 Jul 2017 08:50:43 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6I8oh62041420; Tue, 18 Jul 2017 08:50:43 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201707180850.v6I8oh62041420@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 18 Jul 2017 08:50:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r321125 - stable/11/lib/libc/gen X-SVN-Group: stable-11 X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: stable/11/lib/libc/gen X-SVN-Commit-Revision: 321125 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Jul 2017 08:50:45 -0000 Author: ngie Date: Tue Jul 18 08:50:43 2017 New Revision: 321125 URL: https://svnweb.freebsd.org/changeset/base/321125 Log: MFC r318695: err(3): use `NULL`, aka `(void*)0` per POSIX instead of `(FILE *)0` This is being done to aid humans and static analysis checkers. Modified: stable/11/lib/libc/gen/err.c Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libc/gen/err.c ============================================================================== --- stable/11/lib/libc/gen/err.c Tue Jul 18 08:50:36 2017 (r321124) +++ stable/11/lib/libc/gen/err.c Tue Jul 18 08:50:43 2017 (r321125) @@ -97,7 +97,7 @@ void verrc(int eval, int code, const char *fmt, va_list ap) { if (err_file == NULL) - err_set_file((FILE *)0); + err_set_file(NULL); fprintf(err_file, "%s: ", _getprogname()); if (fmt != NULL) { vfprintf(err_file, fmt, ap); @@ -122,7 +122,7 @@ void verrx(int eval, const char *fmt, va_list ap) { if (err_file == NULL) - err_set_file((FILE *)0); + err_set_file(NULL); fprintf(err_file, "%s: ", _getprogname()); if (fmt != NULL) vfprintf(err_file, fmt, ap); @@ -162,7 +162,7 @@ void vwarnc(int code, const char *fmt, va_list ap) { if (err_file == NULL) - err_set_file((FILE *)0); + err_set_file(NULL); fprintf(err_file, "%s: ", _getprogname()); if (fmt != NULL) { vfprintf(err_file, fmt, ap); @@ -184,7 +184,7 @@ void vwarnx(const char *fmt, va_list ap) { if (err_file == NULL) - err_set_file((FILE *)0); + err_set_file(NULL); fprintf(err_file, "%s: ", _getprogname()); if (fmt != NULL) vfprintf(err_file, fmt, ap); From owner-svn-src-stable-11@freebsd.org Tue Jul 18 08:53:56 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2E908CFC9F0; Tue, 18 Jul 2017 08:53:56 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EFFAB66287; Tue, 18 Jul 2017 08:53:55 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6I8rscE045163; Tue, 18 Jul 2017 08:53:54 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6I8rsdM045161; Tue, 18 Jul 2017 08:53:54 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201707180853.v6I8rsdM045161@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 18 Jul 2017 08:53:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r321126 - stable/11/lib/libc/gen X-SVN-Group: stable-11 X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: stable/11/lib/libc/gen X-SVN-Commit-Revision: 321126 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Jul 2017 08:53:56 -0000 Author: ngie Date: Tue Jul 18 08:53:54 2017 New Revision: 321126 URL: https://svnweb.freebsd.org/changeset/base/321126 Log: MFC r318701,r319842: r318701: tcsendbreak(3): delete spurious blank line at the end of the man page r319842: getbsize(3): clarify that underflow/overflow warnings in regard to $BLOCKSIZE gets output via warnx(3) This helps set expectations for how one might deal with those messages, i.e., mute output from /dev/stderr today, since that's where vwarn(3) outputs messages to today. Modified: stable/11/lib/libc/gen/getbsize.3 stable/11/lib/libc/gen/tcsendbreak.3 Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libc/gen/getbsize.3 ============================================================================== --- stable/11/lib/libc/gen/getbsize.3 Tue Jul 18 08:50:43 2017 (r321125) +++ stable/11/lib/libc/gen/getbsize.3 Tue Jul 18 08:53:54 2017 (r321126) @@ -28,7 +28,7 @@ .\" @(#)getbsize.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd November 16, 2012 +.Dd June 11, 2017 .Dt GETBSIZE 3 .Os .Sh NAME @@ -67,7 +67,8 @@ Sizes less than 512 bytes are rounded up to 512 bytes, greater than 1 GB are rounded down to 1 GB. In each case .Fn getbsize -produces a warning message. +produces a warning message via +.Xr warnx 3 . .Pp The .Fn getbsize Modified: stable/11/lib/libc/gen/tcsendbreak.3 ============================================================================== --- stable/11/lib/libc/gen/tcsendbreak.3 Tue Jul 18 08:50:43 2017 (r321125) +++ stable/11/lib/libc/gen/tcsendbreak.3 Tue Jul 18 08:53:54 2017 (r321126) @@ -177,4 +177,3 @@ without writing all output. The default value for .Va kern.tty_drainwait is 300 seconds. - From owner-svn-src-stable-11@freebsd.org Tue Jul 18 16:03:41 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CED2ED9661D; Tue, 18 Jul 2017 16:03:41 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A9001730C6; Tue, 18 Jul 2017 16:03:41 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6IG3e1Z019833; Tue, 18 Jul 2017 16:03:40 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6IG3e27019827; Tue, 18 Jul 2017 16:03:40 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201707181603.v6IG3e27019827@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 18 Jul 2017 16:03:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r321129 - in stable/11: . bin/chmod bin/chmod/tests etc/mtree tools/build/mk usr.sbin/chown/tests X-SVN-Group: stable-11 X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: in stable/11: . bin/chmod bin/chmod/tests etc/mtree tools/build/mk usr.sbin/chown/tests X-SVN-Commit-Revision: 321129 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Jul 2017 16:03:41 -0000 Author: ngie Date: Tue Jul 18 16:03:39 2017 New Revision: 321129 URL: https://svnweb.freebsd.org/changeset/base/321129 Log: MFC r303212,r319642,r319830: r303212 (by bdrewery): Move chown tests to proper path r319642: Add some basic tests for chmod(1) r319830: Add more simple positive tests for chown(1) The tests are largely symmetric with the tests for chmod(1)--added in r319642. Remove chown-f_test (added in r268030) since the test coverage is now being provided by `chown_test`. Added: stable/11/bin/chmod/tests/ - copied from r319642, head/bin/chmod/tests/ stable/11/usr.sbin/chown/tests/chown_test.sh - copied unchanged from r319830, head/usr.sbin/chown/tests/chown_test.sh Deleted: stable/11/usr.sbin/chown/tests/chown-f_test.sh Modified: stable/11/ObsoleteFiles.inc stable/11/bin/chmod/Makefile stable/11/etc/mtree/BSD.tests.dist stable/11/tools/build/mk/OptionalObsoleteFiles.inc stable/11/usr.sbin/chown/tests/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/ObsoleteFiles.inc ============================================================================== --- stable/11/ObsoleteFiles.inc Tue Jul 18 14:02:02 2017 (r321128) +++ stable/11/ObsoleteFiles.inc Tue Jul 18 16:03:39 2017 (r321129) @@ -40,6 +40,8 @@ # 20170620: remove stale manpage OLD_FILES+=usr/share/man/man2/cap_rights_get.2.gz +# 20170610: chown-f_test replaced by chown_test +OLD_FILES+=usr/tests/usr.sbin/chown/chown-f_test # 20170531: remove pcap-int.h OLD_FILES+=usr/include/pcap-int.h # 20170402: new libc++ import which bumps version from 3.9.1 to 4.0.0. Modified: stable/11/bin/chmod/Makefile ============================================================================== --- stable/11/bin/chmod/Makefile Tue Jul 18 14:02:02 2017 (r321128) +++ stable/11/bin/chmod/Makefile Tue Jul 18 16:03:39 2017 (r321129) @@ -1,7 +1,11 @@ # @(#)Makefile 8.1 (Berkeley) 5/31/93 # $FreeBSD$ +.include + PACKAGE=runtime PROG= chmod + +SUBDIR.${MK_TESTS}+= tests .include Modified: stable/11/etc/mtree/BSD.tests.dist ============================================================================== --- stable/11/etc/mtree/BSD.tests.dist Tue Jul 18 14:02:02 2017 (r321128) +++ stable/11/etc/mtree/BSD.tests.dist Tue Jul 18 16:03:39 2017 (r321129) @@ -8,7 +8,7 @@ bin cat .. - chown + chmod .. date .. @@ -684,6 +684,8 @@ .. .. usr.sbin + chown + .. etcupdate .. extattr Modified: stable/11/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- stable/11/tools/build/mk/OptionalObsoleteFiles.inc Tue Jul 18 14:02:02 2017 (r321128) +++ stable/11/tools/build/mk/OptionalObsoleteFiles.inc Tue Jul 18 16:03:39 2017 (r321129) @@ -7767,6 +7767,9 @@ OLD_FILES+=usr/share/aclocal/atf-c.m4 OLD_FILES+=usr/share/aclocal/atf-common.m4 OLD_FILES+=usr/share/aclocal/atf-sh.m4 OLD_DIRS+=usr/share/aclocal +OLD_DIRS+=usr/tests/bin/chown +OLD_FILES+=usr/tests/bin/chown/Kyuafile +OLD_FILES+=usr/tests/bin/chown/chown-f_test OLD_FILES+=usr/tests/bin/chown/units_basics OLD_FILES+=usr/tests/bin/date/legacy_test OLD_FILES+=usr/tests/bin/sh/legacy_test Modified: stable/11/usr.sbin/chown/tests/Makefile ============================================================================== --- stable/11/usr.sbin/chown/tests/Makefile Tue Jul 18 14:02:02 2017 (r321128) +++ stable/11/usr.sbin/chown/tests/Makefile Tue Jul 18 16:03:39 2017 (r321129) @@ -1,9 +1,5 @@ # $FreeBSD$ -.include - -TESTSDIR= ${TESTSBASE}/bin/chown - -TAP_TESTS_SH= chown-f_test +ATF_TESTS_SH+= chown_test .include Copied: stable/11/usr.sbin/chown/tests/chown_test.sh (from r319830, head/usr.sbin/chown/tests/chown_test.sh) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/usr.sbin/chown/tests/chown_test.sh Tue Jul 18 16:03:39 2017 (r321129, copy of r319830, head/usr.sbin/chown/tests/chown_test.sh) @@ -0,0 +1,206 @@ +# +# Copyright (c) 2017 Dell EMC +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 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. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# +# $FreeBSD$ + +atf_test_case RH_flag +RH_flag_head() +{ + atf_set "descr" "Verify that setting ownership recursively via -R doesn't " \ + "affect symlinks specified via the arguments when -H " \ + "is specified" + atf_set "require.user" "root" +} +RH_flag_body() +{ + atf_check mkdir -p A/B + atf_check ln -s B A/C + atf_check chown -h 42:42 A/C + atf_check -o inline:'0:0\n0:0\n42:42\n' stat -f '%u:%g' A A/B A/C + atf_check chown -RH 84:84 A + atf_check -o inline:'84:84\n84:84\n84:84\n' stat -f '%u:%g' A A/B A/C + atf_check chown -RH 126:126 A/C + atf_check -o inline:'84:84\n126:126\n84:84\n' stat -f '%u:%g' A A/B A/C +} + +atf_test_case RL_flag +RL_flag_head() +{ + atf_set "descr" "Verify that setting ownership recursively via -R doesn't " \ + "affect symlinks specified via the arguments when -L " \ + "is specified" + atf_set "require.user" "root" +} +RL_flag_body() +{ + atf_check mkdir -p A/B + atf_check ln -s B A/C + atf_check chown -h 42:42 A/C + atf_check -o inline:'0:0\n0:0\n42:42\n' stat -f '%u:%g' A A/B A/C + atf_check chown -RL 84:84 A + atf_check -o inline:'84:84\n84:84\n42:42\n' stat -f '%u:%g' A A/B A/C + atf_check chown -RL 126:126 A/C + atf_check -o inline:'84:84\n126:126\n42:42\n' stat -f '%u:%g' A A/B A/C +} + +atf_test_case RP_flag +RP_flag_head() +{ + atf_set "descr" "Verify that setting ownership recursively via -R " \ + "doesn't affect symlinks specified via the arguments " \ + "when -P is specified" + atf_set "require.user" "root" +} +RP_flag_body() +{ + atf_check mkdir -p A/B + atf_check ln -s B A/C + atf_check chown -h 42:42 A/C + atf_check -o inline:'0:0\n0:0\n42:42\n' stat -f '%u:%g' A A/B A/C + atf_check chown -RP 84:84 A + atf_check -o inline:'84:84\n84:84\n84:84\n' stat -f '%u:%g' A A/B A/C + atf_check chown -RP 126:126 A/C + atf_check -o inline:'84:84\n84:84\n126:126\n' stat -f '%u:%g' A A/B A/C +} + +atf_test_case f_flag cleanup +f_flag_head() +{ + atf_set "descr" "Verify that setting a mode for a file with -f " \ + "doesn't emit an error message/exit with a non-zero " \ + "code" + atf_set "require.user" "root" +} + +f_flag_body() +{ + atf_check truncate -s 0 foo bar + atf_check chown 0:0 foo bar + atf_check chflags uchg foo + atf_check -e not-empty -s not-exit:0 chown 42:42 foo bar + atf_check -o inline:'0:0\n42:42\n' stat -f '%u:%g' foo bar + atf_check -s exit:0 chown -f 84:84 foo bar + atf_check -o inline:'0:0\n84:84\n' stat -f '%u:%g' foo bar +} + +f_flag_cleanup() +{ + atf_check chflags 0 foo +} + +atf_test_case h_flag +h_flag_head() +{ + atf_set "descr" "Verify that setting a mode for a file with -f " \ + "doesn't emit an error message/exit with a non-zero " \ + "code" + atf_set "require.user" "root" +} + +h_flag_body() +{ + atf_check truncate -s 0 foo + atf_check -o inline:'0:0\n' stat -f '%u:%g' foo + atf_check ln -s foo bar + atf_check -o inline:'0:0\n0:0\n' stat -f '%u:%g' foo bar + atf_check chown -h 42:42 bar + atf_check -o inline:'0:0\n42:42\n' stat -f '%u:%g' foo bar + atf_check chown 84:84 bar + atf_check -o inline:'84:84\n42:42\n' stat -f '%u:%g' foo bar +} + +atf_test_case v_flag +v_flag_head() +{ + atf_set "descr" "Verify that setting ownership with -v emits the " \ + "file doesn't emit an error message/exit with a " \ + "non-zero code" + atf_set "require.user" "root" +} +v_flag_body() +{ + atf_check truncate -s 0 foo bar + atf_check chown 0:0 foo + atf_check chown 42:42 bar + atf_check -o 'inline:bar\n' chown -v 0:0 foo bar + atf_check chown -v 0:0 foo bar + for f in foo bar; do + echo "$f: 0:0 -> 84:84"; + done > output.txt + atf_check -o file:output.txt chown -vv 84:84 foo bar + atf_check chown -vv 84:84 foo bar +} + +md_file="md.out" +atf_test_case x_flag cleanup +x_flag_head() +{ + atf_set "descr" "Verify that setting a mode with -x doesn't set " \ + "ownership across mountpoints" + atf_set "require.user" "root" +} +x_flag_body() +{ + atf_check -o save:$md_file mdconfig -a -t malloc -s 20m + if ! md_device=$(cat $md_file); then + atf_fail "cat $md_file failed" + fi + atf_check -o not-empty newfs /dev/$md_device + atf_check mkdir mnt + atf_check mount /dev/$md_device mnt + atf_check truncate -s 0 foo bar mnt/bazbaz + atf_check ln -s bar mnt/barbaz + atf_check ln -s ../foo mnt/foobaz + cd mnt + test_files="../foo ../bar barbaz bazbaz foobaz" + atf_check -o inline:'0:0\n0:0\n0:0\n0:0\n0:0\n' \ + stat -f '%u:%g' $test_files + atf_check chown -Rx 42:42 . + atf_check -o inline:'0:0\n0:0\n42:42\n42:42\n42:42\n' \ + stat -f '%u:%g' $test_files + atf_check chown -R 84:84 . + atf_check -o inline:'0:0\n0:0\n84:84\n84:84\n84:84\n' \ + stat -f '%u:%g' $test_files +} +x_flag_cleanup() +{ + if ! md_device=$(cat $md_file) || [ -z "$md_device" ]; then + echo "Couldn't get device from $md_file" + exit 0 + fi + umount mnt + mdconfig -d -u $md_device +} + +atf_init_test_cases() +{ + atf_add_test_case RH_flag + atf_add_test_case RL_flag + atf_add_test_case RP_flag + atf_add_test_case f_flag + atf_add_test_case h_flag + atf_add_test_case v_flag + atf_add_test_case x_flag +} From owner-svn-src-stable-11@freebsd.org Tue Jul 18 16:48:37 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6253BD99A73; Tue, 18 Jul 2017 16:48:37 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2EB7F74902; Tue, 18 Jul 2017 16:48:37 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6IGmaCr036716; Tue, 18 Jul 2017 16:48:36 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6IGmaKv036714; Tue, 18 Jul 2017 16:48:36 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201707181648.v6IGmaKv036714@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 18 Jul 2017 16:48:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r321132 - in stable/11: etc/mtree usr.bin/du usr.bin/du/tests X-SVN-Group: stable-11 X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: in stable/11: etc/mtree usr.bin/du usr.bin/du/tests X-SVN-Commit-Revision: 321132 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Jul 2017 16:48:37 -0000 Author: ngie Date: Tue Jul 18 16:48:36 2017 New Revision: 321132 URL: https://svnweb.freebsd.org/changeset/base/321132 Log: MFC r319850: Add some initial basic tests for du(1) Tests that exercise the following flags are added in this commit: - -A - -H - -I - -g - -h - -k - -m Additional tests will be added soon. Added: stable/11/usr.bin/du/tests/ - copied from r319850, head/usr.bin/du/tests/ Modified: stable/11/etc/mtree/BSD.tests.dist stable/11/usr.bin/du/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/etc/mtree/BSD.tests.dist ============================================================================== --- stable/11/etc/mtree/BSD.tests.dist Tue Jul 18 16:36:32 2017 (r321131) +++ stable/11/etc/mtree/BSD.tests.dist Tue Jul 18 16:48:36 2017 (r321132) @@ -612,6 +612,8 @@ .. dirname .. + du + .. file2c .. getconf Modified: stable/11/usr.bin/du/Makefile ============================================================================== --- stable/11/usr.bin/du/Makefile Tue Jul 18 16:36:32 2017 (r321131) +++ stable/11/usr.bin/du/Makefile Tue Jul 18 16:48:36 2017 (r321132) @@ -1,7 +1,11 @@ # @(#)Makefile 8.1 (Berkeley) 6/6/93 # $FreeBSD$ +.include + PROG= du LIBADD= util + +SUBDIR.${MK_TESTS}+= tests .include From owner-svn-src-stable-11@freebsd.org Tue Jul 18 16:58:56 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 31432D99FD4; Tue, 18 Jul 2017 16:58:56 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F24C8750A1; Tue, 18 Jul 2017 16:58:55 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6IGwt7Z041148; Tue, 18 Jul 2017 16:58:55 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6IGwtYg041146; Tue, 18 Jul 2017 16:58:55 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201707181658.v6IGwtYg041146@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 18 Jul 2017 16:58:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r321135 - in stable/11/sys: netinet netinet6 X-SVN-Group: stable-11 X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: in stable/11/sys: netinet netinet6 X-SVN-Commit-Revision: 321135 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Jul 2017 16:58:56 -0000 Author: ngie Date: Tue Jul 18 16:58:54 2017 New Revision: 321135 URL: https://svnweb.freebsd.org/changeset/base/321135 Log: MFC r318255: Add missing braces around MCAST_EXCLUDE check when KTR support is compiled into the kernel This ensures that .iss_asm (the number of ASM listeners) isn't incorrectly decremented for MLD-layer source datagrams when inspecting im*s_st[1] (the second state in the structure). PR: 217509 [1] Modified: stable/11/sys/netinet/in_mcast.c stable/11/sys/netinet6/in6_mcast.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/netinet/in_mcast.c ============================================================================== --- stable/11/sys/netinet/in_mcast.c Tue Jul 18 16:58:52 2017 (r321134) +++ stable/11/sys/netinet/in_mcast.c Tue Jul 18 16:58:54 2017 (r321135) @@ -1047,9 +1047,10 @@ inm_merge(struct in_multi *inm, /*const*/ struct in_mf /* Decrement ASM listener count on transition out of ASM mode. */ if (imf->imf_st[0] == MCAST_EXCLUDE && nsrc0 == 0) { if ((imf->imf_st[1] != MCAST_EXCLUDE) || - (imf->imf_st[1] == MCAST_EXCLUDE && nsrc1 > 0)) + (imf->imf_st[1] == MCAST_EXCLUDE && nsrc1 > 0)) { CTR1(KTR_IGMPV3, "%s: --asm on inm at t1", __func__); --inm->inm_st[1].iss_asm; + } } /* Increment ASM listener count on transition to ASM mode. */ Modified: stable/11/sys/netinet6/in6_mcast.c ============================================================================== --- stable/11/sys/netinet6/in6_mcast.c Tue Jul 18 16:58:52 2017 (r321134) +++ stable/11/sys/netinet6/in6_mcast.c Tue Jul 18 16:58:54 2017 (r321135) @@ -999,9 +999,10 @@ in6m_merge(struct in6_multi *inm, /*const*/ struct in6 /* Decrement ASM listener count on transition out of ASM mode. */ if (imf->im6f_st[0] == MCAST_EXCLUDE && nsrc0 == 0) { if ((imf->im6f_st[1] != MCAST_EXCLUDE) || - (imf->im6f_st[1] == MCAST_EXCLUDE && nsrc1 > 0)) + (imf->im6f_st[1] == MCAST_EXCLUDE && nsrc1 > 0)) { CTR1(KTR_MLD, "%s: --asm on inm at t1", __func__); --inm->in6m_st[1].iss_asm; + } } /* Increment ASM listener count on transition to ASM mode. */ From owner-svn-src-stable-11@freebsd.org Tue Jul 18 17:16:56 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8F2F2D9A688; Tue, 18 Jul 2017 17:16:56 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6B83675B97; Tue, 18 Jul 2017 17:16:56 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6IHGth8049506; Tue, 18 Jul 2017 17:16:55 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6IHGtaQ049504; Tue, 18 Jul 2017 17:16:55 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201707181716.v6IHGtaQ049504@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 18 Jul 2017 17:16:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r321136 - stable/11/tools/regression/geom_gpt X-SVN-Group: stable-11 X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: stable/11/tools/regression/geom_gpt X-SVN-Commit-Revision: 321136 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Jul 2017 17:16:56 -0000 Author: ngie Date: Tue Jul 18 17:16:55 2017 New Revision: 321136 URL: https://svnweb.freebsd.org/changeset/base/321136 Log: MFC r319800,r319806: r319800: Don't explicitly get the class to PART in gctl_test_helper.c This will allow the tool to be used with arbitrary geom(4) classes, like GEOM. Specify class=PART explicitly in the tester to keep existing behavior. r319806: Improve handling with system state - Always unlink $cmd after exit via END block. - The tests don't function well if kern.geom.debugflags != 0. Save debugflags, then restore them at the end of the test. Modified: stable/11/tools/regression/geom_gpt/gctl_test.t stable/11/tools/regression/geom_gpt/gctl_test_helper.c Directory Properties: stable/11/ (props changed) Modified: stable/11/tools/regression/geom_gpt/gctl_test.t ============================================================================== --- stable/11/tools/regression/geom_gpt/gctl_test.t Tue Jul 18 16:58:54 2017 (r321135) +++ stable/11/tools/regression/geom_gpt/gctl_test.t Tue Jul 18 17:16:55 2017 (r321136) @@ -35,48 +35,48 @@ my $disk = "/tmp/disk-$$"; my $mntpt_prefix = "/tmp/mount-$$"; my %steps = ( - "000" => "gctl", - "001" => "gctl verb=bogus", - "010" => "gctl verb=create", - "011" => "gctl verb=create provider=bogus", + "000" => "gctl class=PART", + "001" => "gctl class=PART verb=bogus", + "010" => "gctl class=PART verb=create", + "011" => "gctl class=PART verb=create provider=bogus", "020" => "mdcfg create pristine", - "021" => "gctl verb=create provider=%dev% entries=-1", - "022" => "gctl verb=create provider=%dev% entries=128", - "023" => "gctl verb=create provider=%dev%", - "024" => "gctl verb=modify geom=%dev%", + "021" => "gctl class=PART verb=create provider=%dev% entries=-1", + "022" => "gctl class=PART verb=create provider=%dev% entries=128", + "023" => "gctl class=PART verb=create provider=%dev%", + "024" => "gctl class=PART verb=modify geom=%dev%", "025" => "conf", - "030" => "gctl verb=add", - "031" => "gctl verb=add geom=bogus", - "032" => "gctl verb=add geom=%dev%", - "033" => "gctl verb=add geom=%dev% type=bogus", - "034" => "gctl verb=add geom=%dev% type=ed0101b0-2a71-11da-ba81-003048416ace", - "035" => "gctl verb=add geom=%dev% type=ed0101b0-2a71-11da-ba81-003048416ace start=1", - "036" => "gctl verb=add geom=%dev% type=ed0101b0-2a71-11da-ba81-003048416ace start=34", - "037" => "gctl verb=add geom=%dev% type=ed0101b0-2a71-11da-ba81-003048416ace start=34 end=12345678", - "038" => "gctl verb=add geom=%dev% type=ed0101b0-2a71-11da-ba81-003048416ace start=162 end=417 entry=129", - "039" => "gctl verb=add geom=%dev% type=ed0101b0-2a71-11da-ba81-003048416ace start=162 end=417 entry:8=5", - "040" => "gctl verb=add geom=%dev% type=83d34ed5-c4ff-11da-b65b-000347c5d7f3 start=34 end=161 entry=5", - "041" => "gctl verb=add geom=%dev% type=83d34ed5-c4ff-11da-b65b-000347c5d7f3 start=34 end=546", - "042" => "gctl verb=add geom=%dev% type=83d34ed5-c4ff-11da-b65b-000347c5d7f3 start=162 end=417", - "043" => "gctl verb=add geom=%dev% type=83d34ed5-c4ff-11da-b65b-000347c5d7f3 start=100 end=300", - "044" => "gctl verb=add geom=%dev% type=83d34ed5-c4ff-11da-b65b-000347c5d7f3 start=300 end=500", - "045" => "gctl verb=add geom=%dev% type=83d34ed5-c4ff-11da-b65b-000347c5d7f3 start=34 end=161 entry:8", - "046" => "gctl verb=add geom=%dev% type=d2bd4509-c4ff-11da-b4cc-00306e39b62f start=418 end=546 entry:8", + "030" => "gctl class=PART verb=add", + "031" => "gctl class=PART verb=add geom=bogus", + "032" => "gctl class=PART verb=add geom=%dev%", + "033" => "gctl class=PART verb=add geom=%dev% type=bogus", + "034" => "gctl class=PART verb=add geom=%dev% type=ed0101b0-2a71-11da-ba81-003048416ace", + "035" => "gctl class=PART verb=add geom=%dev% type=ed0101b0-2a71-11da-ba81-003048416ace start=1", + "036" => "gctl class=PART verb=add geom=%dev% type=ed0101b0-2a71-11da-ba81-003048416ace start=34", + "037" => "gctl class=PART verb=add geom=%dev% type=ed0101b0-2a71-11da-ba81-003048416ace start=34 end=12345678", + "038" => "gctl class=PART verb=add geom=%dev% type=ed0101b0-2a71-11da-ba81-003048416ace start=162 end=417 entry=129", + "039" => "gctl class=PART verb=add geom=%dev% type=ed0101b0-2a71-11da-ba81-003048416ace start=162 end=417 entry:8=5", + "040" => "gctl class=PART verb=add geom=%dev% type=83d34ed5-c4ff-11da-b65b-000347c5d7f3 start=34 end=161 entry=5", + "041" => "gctl class=PART verb=add geom=%dev% type=83d34ed5-c4ff-11da-b65b-000347c5d7f3 start=34 end=546", + "042" => "gctl class=PART verb=add geom=%dev% type=83d34ed5-c4ff-11da-b65b-000347c5d7f3 start=162 end=417", + "043" => "gctl class=PART verb=add geom=%dev% type=83d34ed5-c4ff-11da-b65b-000347c5d7f3 start=100 end=300", + "044" => "gctl class=PART verb=add geom=%dev% type=83d34ed5-c4ff-11da-b65b-000347c5d7f3 start=300 end=500", + "045" => "gctl class=PART verb=add geom=%dev% type=83d34ed5-c4ff-11da-b65b-000347c5d7f3 start=34 end=161 entry:8", + "046" => "gctl class=PART verb=add geom=%dev% type=d2bd4509-c4ff-11da-b4cc-00306e39b62f start=418 end=546 entry:8", "047" => "conf", - "050" => "gctl verb=remove geom=%dev% entry=5", - "051" => "gctl verb=remove geom=%dev% entry=2", - "052" => "gctl verb=remove geom=%dev% entry=1", - "053" => "gctl verb=remove geom=%dev% entry=1", + "050" => "gctl class=PART verb=remove geom=%dev% entry=5", + "051" => "gctl class=PART verb=remove geom=%dev% entry=2", + "052" => "gctl class=PART verb=remove geom=%dev% entry=1", + "053" => "gctl class=PART verb=remove geom=%dev% entry=1", "054" => "conf", - "060" => "gctl verb=add geom=%dev% type=516e7cb6-6ecf-11d6-8ff8-00022d09712b start=34 end=546 entry:8=1", + "060" => "gctl class=PART verb=add geom=%dev% type=516e7cb6-6ecf-11d6-8ff8-00022d09712b start=34 end=546 entry:8=1", "061" => "mount %dev%p1", - "062" => "gctl verb=delete geom=%dev% entry=1", + "062" => "gctl class=PART verb=delete geom=%dev% entry=1", "063" => "umount %dev%p1", - "064" => "gctl verb=delete geom=%dev% entry=1", + "064" => "gctl class=PART verb=delete geom=%dev% entry=1", "065" => "conf", "100" => "mdcfg destroy", "110" => "mdcfg create corrupted", - "111" => "gctl verb=add geom=%dev%", + "111" => "gctl class=PART verb=add geom=%dev%", "120" => "mdcfg destroy", ); @@ -144,10 +144,20 @@ my $out = basename($cmd) . ".out"; # Make sure we have permission to use gctl... if (`$cmd` =~ "^FAIL Permission denied") { print "1..0 # SKIP insufficient permissions\n"; - unlink $cmd; exit 0; } +my $debugflags_oid = 'kern.geom.debugflags'; +chomp(my $old_geom_debugflags = `sysctl -n $debugflags_oid`); +if ($? != 0) { + print "1..0 # SKIP could not query $debugflags_oid\n"; + exit 0; +} +if (system("sysctl $debugflags_oid=0") != 0) { + print "1..0 # SKIP could not set $debugflags_oid=0\n"; + exit 0; +} + my $count = keys (%steps); print "1..$count\n"; @@ -227,4 +237,7 @@ foreach my $key (sort keys %steps) { } $nr += 1; } -exit 0; +END { + system("sysctl $debugflags_oid=$old_geom_debugflags"); + unlink($cmd); +} Modified: stable/11/tools/regression/geom_gpt/gctl_test_helper.c ============================================================================== --- stable/11/tools/regression/geom_gpt/gctl_test_helper.c Tue Jul 18 16:58:54 2017 (r321135) +++ stable/11/tools/regression/geom_gpt/gctl_test_helper.c Tue Jul 18 17:16:55 2017 (r321136) @@ -117,7 +117,6 @@ main(int argc, char *argv[]) req = gctl_get_handle(); assert(req != NULL); - gctl_ro_param(req, "class", -1, "PART"); while ((c = getopt(argc, argv, "v")) != -1) { switch (c) { From owner-svn-src-stable-11@freebsd.org Tue Jul 18 17:35:30 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9135FD9AE24; Tue, 18 Jul 2017 17:35:30 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6D4137683F; Tue, 18 Jul 2017 17:35:30 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6IHZT0t058110; Tue, 18 Jul 2017 17:35:29 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6IHZTTR058103; Tue, 18 Jul 2017 17:35:29 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201707181735.v6IHZTTR058103@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 18 Jul 2017 17:35:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r321139 - in stable/11/bin/dd: . tests X-SVN-Group: stable-11 X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: in stable/11/bin/dd: . tests X-SVN-Commit-Revision: 321139 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Jul 2017 17:35:30 -0000 Author: ngie Date: Tue Jul 18 17:35:29 2017 New Revision: 321139 URL: https://svnweb.freebsd.org/changeset/base/321139 Log: MFC r302500,r319339,r319543,r319544,r319551,r321138: r302500 (by cem): dd(1): Enable access to SIZE_T_MAX character devices On machines where SIZE_T_MAX exceeds OFF_MAX (signed 64-bit), permit seeking character devices to negative off_t values. This enables dd(1) to interact with kernel KVA in /dev/kmem on amd64, for example. r319339 (by asomers): Fix integer overflow detection in dd dd(1) tried to detect whether the seek offset would overflow, but it failed to account for the case where the provided argument was negative and the file was a regular file (negative seeks are allowed for character devices). I fixed it, and added a regression test. CID: 1368659 r319543: Stylistic tweaks Move opening braces of functions from the last column to column 0. MFC with: r319339 r319544: Mark :seek_overflow as an expected failure MFC with: r319339 PR: 219757 r319551 (by asomers): Fix bin/dd/dd2_tests:seek_overflow on UFS and TMPFS Split the postive and negative parts into separate test cases. The positive test case can only run on ZFS, because only ZFS supports files that large. PR: 219757 r321138: Remove unnecessary make logic added in r319339 This makes the change cleaner and easier to backport to ^/stable/10. Added: stable/11/bin/dd/tests/dd2_test.sh - copied, changed from r319339, head/bin/dd/tests/dd2_test.sh Modified: stable/11/bin/dd/args.c stable/11/bin/dd/position.c stable/11/bin/dd/tests/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/bin/dd/args.c ============================================================================== --- stable/11/bin/dd/args.c Tue Jul 18 17:29:12 2017 (r321138) +++ stable/11/bin/dd/args.c Tue Jul 18 17:35:29 2017 (r321139) @@ -167,14 +167,6 @@ jcl(char **argv) errx(1, "cbs meaningless if not doing record operations"); } else cfunc = def; - - /* - * Bail out if the calculation of a file offset would overflow. - */ - if (in.offset > OFF_MAX / (ssize_t)in.dbsz || - out.offset > OFF_MAX / (ssize_t)out.dbsz) - errx(1, "seek offsets cannot be larger than %jd", - (intmax_t)OFF_MAX); } static int Modified: stable/11/bin/dd/position.c ============================================================================== --- stable/11/bin/dd/position.c Tue Jul 18 17:29:12 2017 (r321138) +++ stable/11/bin/dd/position.c Tue Jul 18 17:35:29 2017 (r321139) @@ -45,12 +45,41 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include "dd.h" #include "extern.h" +static off_t +seek_offset(IO *io) +{ + off_t n; + size_t sz; + + n = io->offset; + sz = io->dbsz; + + _Static_assert(sizeof(io->offset) == sizeof(int64_t), "64-bit off_t"); + + /* + * If the lseek offset will be negative, verify that this is a special + * device file. Some such files (e.g. /dev/kmem) permit "negative" + * offsets. + * + * Bail out if the calculation of a file offset would overflow. + */ + if ((io->flags & ISCHR) == 0 && (n < 0 || n > OFF_MAX / (ssize_t)sz)) + errx(1, "seek offsets cannot be larger than %jd", + (intmax_t)OFF_MAX); + else if ((io->flags & ISCHR) != 0 && (uint64_t)n > UINT64_MAX / sz) + errx(1, "seek offsets cannot be larger than %ju", + (uintmax_t)UINT64_MAX); + + return ((off_t)( (uint64_t)n * sz )); +} + /* * Position input/output data streams before starting the copy. Device type * dependent. Seekable devices use lseek, and the rest position by reading. @@ -68,7 +97,7 @@ pos_in(void) /* If known to be seekable, try to seek on it. */ if (in.flags & ISSEEK) { errno = 0; - if (lseek(in.fd, in.offset * in.dbsz, SEEK_CUR) == -1 && + if (lseek(in.fd, seek_offset(&in), SEEK_CUR) == -1 && errno != 0) err(1, "%s", in.name); return; @@ -136,7 +165,7 @@ pos_out(void) */ if (out.flags & (ISSEEK | ISPIPE)) { errno = 0; - if (lseek(out.fd, out.offset * out.dbsz, SEEK_CUR) == -1 && + if (lseek(out.fd, seek_offset(&out), SEEK_CUR) == -1 && errno != 0) err(1, "%s", out.name); return; Modified: stable/11/bin/dd/tests/Makefile ============================================================================== --- stable/11/bin/dd/tests/Makefile Tue Jul 18 17:29:12 2017 (r321138) +++ stable/11/bin/dd/tests/Makefile Tue Jul 18 17:35:29 2017 (r321139) @@ -1,5 +1,6 @@ # $FreeBSD$ +ATF_TESTS_SH= dd2_test NETBSD_ATF_TESTS_SH= dd_test .include Copied and modified: stable/11/bin/dd/tests/dd2_test.sh (from r319339, head/bin/dd/tests/dd2_test.sh) ============================================================================== --- head/bin/dd/tests/dd2_test.sh Wed May 31 16:07:32 2017 (r319339, copy source) +++ stable/11/bin/dd/tests/dd2_test.sh Tue Jul 18 17:35:29 2017 (r321139) @@ -26,17 +26,35 @@ # $FreeBSD$ -atf_test_case seek_overflow -seek_overflow_head() { - atf_set "descr" "dd(1) should reject too-large seek values" +atf_test_case max_seek +max_seek_head() +{ + atf_set "descr" "dd(1) can seek by the maximum amount" } -seek_overflow_body() { +max_seek_body() +{ + case `df -T . | tail -n 1 | cut -wf 2` in + "ufs") + atf_skip "UFS's maximum file size is too small";; + "zfs") ;; # ZFS is fine + "tmpfs") + atf_skip "tmpfs can't create arbitrarily large spare files";; + *) atf_skip "Unknown file system";; + esac + touch f.in - # Positive tests seek=`echo "2^63 / 4096 - 1" | bc` atf_check -s exit:0 -e ignore dd if=f.in of=f.out bs=4096 seek=$seek +} - # Negative tests +atf_test_case seek_overflow +seek_overflow_head() +{ + atf_set "descr" "dd(1) should reject too-large seek values" +} +seek_overflow_body() +{ + touch f.in seek=`echo "2^63 / 4096" | bc` atf_check -s not-exit:0 -e match:"seek offsets cannot be larger than" \ dd if=f.in of=f.out bs=4096 seek=$seek @@ -46,5 +64,6 @@ seek_overflow_body() { atf_init_test_cases() { - atf_add_test_case seek_overflow + atf_add_test_case max_seek + atf_add_test_case seek_overflow } From owner-svn-src-stable-11@freebsd.org Tue Jul 18 17:51:48 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2ABEAD9B668; Tue, 18 Jul 2017 17:51:48 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B063F7737F; Tue, 18 Jul 2017 17:51:47 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6IHpkSo064301; Tue, 18 Jul 2017 17:51:46 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6IHpkob064299; Tue, 18 Jul 2017 17:51:46 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201707181751.v6IHpkob064299@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 18 Jul 2017 17:51:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r321142 - in stable/11: contrib/atf/atf-c libexec/atf/atf-sh X-SVN-Group: stable-11 X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: in stable/11: contrib/atf/atf-c libexec/atf/atf-sh X-SVN-Commit-Revision: 321142 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Jul 2017 17:51:48 -0000 Author: ngie Date: Tue Jul 18 17:51:46 2017 New Revision: 321142 URL: https://svnweb.freebsd.org/changeset/base/321142 Log: MFC r316552,r319662: r316552: atf-c: fix documentation description for atf_utils_wait(3) atf_utils_wait(3) should be used in combination with atf_utils_fork(3), not itself (atf_utils_wait(3)). r319662: Add MLINKS for atf-sh(3) to each of the functions it implements This hopefully will make atf-sh(3) easier to understand for newcomers, without having to go through the atf-sh(3) level of indirection. Modified: stable/11/contrib/atf/atf-c/atf-c.3 stable/11/libexec/atf/atf-sh/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/contrib/atf/atf-c/atf-c.3 ============================================================================== --- stable/11/contrib/atf/atf-c/atf-c.3 Tue Jul 18 17:51:33 2017 (r321141) +++ stable/11/contrib/atf/atf-c/atf-c.3 Tue Jul 18 17:51:46 2017 (r321142) @@ -22,7 +22,7 @@ .\" IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR .\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN .\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -.Dd March 6, 2017 +.Dd April 5, 2017 .Dt ATF-C 3 .Os .Sh NAME @@ -680,7 +680,7 @@ those spawned by .Fc .Bd -ragged -offset indent Waits and validates the result of a subprocess spawned with -.Fn atf_utils_wait . +.Fn atf_utils_fork . The validation involves checking that the subprocess exited cleanly and returned the code specified in .Fa expected_exit_status Modified: stable/11/libexec/atf/atf-sh/Makefile ============================================================================== --- stable/11/libexec/atf/atf-sh/Makefile Tue Jul 18 17:51:33 2017 (r321141) +++ stable/11/libexec/atf/atf-sh/Makefile Tue Jul 18 17:51:46 2017 (r321142) @@ -34,7 +34,29 @@ ATF= ${SRCTOP}/contrib/atf PROG_CXX= atf-sh SRCS= atf-sh.cpp MAN= atf-sh.1 atf-sh.3 -MLINKS+= atf-sh.3 atf-sh-api.3 # Backwards compatibility. +# Backwards compatibility. +MLINKS+= atf-sh.3 atf-sh-api.3 + +MLINKS+= \ + atf-sh.3 atf_add_test_case.3 \ + atf-sh.3 atf_check.3 \ + atf-sh.3 atf_check_equal.3 \ + atf-sh.3 atf_config_get.3 \ + atf-sh.3 atf_config_has.3 \ + atf-sh.3 atf_expect_death.3 \ + atf-sh.3 atf_expect_exit.3 \ + atf-sh.3 atf_expect_fail.3 \ + atf-sh.3 atf_expect_pass.3 \ + atf-sh.3 atf_expect_signal.3 \ + atf-sh.3 atf_expect_timeout.3 \ + atf-sh.3 atf_fail.3 \ + atf-sh.3 atf_get.3 \ + atf-sh.3 atf_get_srcdir.3 \ + atf-sh.3 atf_pass.3 \ + atf-sh.3 atf_require_prog.3 \ + atf-sh.3 atf_set.3 \ + atf-sh.3 atf_skip.3 \ + atf-sh.3 atf_test_case.3 CFLAGS+= -DHAVE_CONFIG_H CFLAGS+= -DATF_LIBEXECDIR='"${LIBEXECDIR}"' From owner-svn-src-stable-11@freebsd.org Tue Jul 18 18:09:17 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A7F58D9BFD7; Tue, 18 Jul 2017 18:09:17 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7F1067CD68; Tue, 18 Jul 2017 18:09:17 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6II9GuC073202; Tue, 18 Jul 2017 18:09:16 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6II9GUJ073199; Tue, 18 Jul 2017 18:09:16 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201707181809.v6II9GUJ073199@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 18 Jul 2017 18:09:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r321143 - stable/11/lib/libc/tests/nss X-SVN-Group: stable-11 X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: stable/11/lib/libc/tests/nss X-SVN-Commit-Revision: 321143 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Jul 2017 18:09:17 -0000 Author: ngie Date: Tue Jul 18 18:09:16 2017 New Revision: 321143 URL: https://svnweb.freebsd.org/changeset/base/321143 Log: MFC r319048,r319049,r319051,r319054: r319048: Push `snapshot_file` copying down into run_tests function, and mark snapshot_file const char *. This fixes a bogus set of errors from gcc about strdup not being allowed a NULL argument. r319049: Bump WARNS from 1 to 3 after recent commits to fix warnings in the directory. Tested with: clang 4.0, gcc 4.2.1, gcc 6.3.0 r319051: hostent_test_getnameinfo_eq(..): initialize found_a_host to false CID: 1368943 r319054: hostent_test_getaddrinfo_eq(..): call freeaddrinfo on `ai` when done This plugs a leak of memory allocated via getaddrinfo. CID: 1346866 Modified: stable/11/lib/libc/tests/nss/Makefile stable/11/lib/libc/tests/nss/getaddrinfo_test.c stable/11/lib/libc/tests/nss/gethostby_test.c Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libc/tests/nss/Makefile ============================================================================== --- stable/11/lib/libc/tests/nss/Makefile Tue Jul 18 17:51:46 2017 (r321142) +++ stable/11/lib/libc/tests/nss/Makefile Tue Jul 18 18:09:16 2017 (r321143) @@ -20,7 +20,7 @@ ATF_TESTS_C+= getusershell_test ${PACKAGE}FILES+= mach -WARNS?= 1 +WARNS?= 3 CFLAGS+= -I${SRCTOP}/tests Modified: stable/11/lib/libc/tests/nss/getaddrinfo_test.c ============================================================================== --- stable/11/lib/libc/tests/nss/getaddrinfo_test.c Tue Jul 18 17:51:46 2017 (r321142) +++ stable/11/lib/libc/tests/nss/getaddrinfo_test.c Tue Jul 18 18:09:16 2017 (r321143) @@ -410,11 +410,19 @@ addrinfo_read_hostlist_func(struct addrinfo *ai, char } static void -run_tests(char *hostlist_file, char *snapshot_file, int ai_family) +run_tests(char *hostlist_file, const char *snapshot_file, int ai_family) { struct addrinfo_test_data td, td_snap; + char *snapshot_file_copy; int rv; + if (snapshot_file == NULL) + snapshot_file_copy = NULL; + else { + snapshot_file_copy = strdup(snapshot_file); + ATF_REQUIRE(snapshot_file_copy != NULL); + } + memset(&hints, 0, sizeof(struct addrinfo)); hints.ai_family = ai_family; hints.ai_flags = AI_CANONNAME; @@ -477,24 +485,17 @@ fin: TEST_DATA_DESTROY(addrinfo, &td_snap); TEST_DATA_DESTROY(addrinfo, &td); - free(hostlist_file); - free(snapshot_file); + free(snapshot_file_copy); } #define HOSTLIST_FILE "mach" #define RUN_TESTS(tc, snapshot_file, ai_family) do { \ char *_hostlist_file; \ - char *_snapshot_file; \ ATF_REQUIRE(0 < asprintf(&_hostlist_file, "%s/%s", \ atf_tc_get_config_var(tc, "srcdir"), HOSTLIST_FILE)); \ - if (snapshot_file == NULL) \ - _snapshot_file = NULL; \ - else { \ - _snapshot_file = strdup(snapshot_file); \ - ATF_REQUIRE(_snapshot_file != NULL); \ - } \ - run_tests(_hostlist_file, _snapshot_file, ai_family); \ -} while(0) + run_tests(_hostlist_file, snapshot_file, ai_family); \ + free(_hostlist_file); \ +} while (0) ATF_TC_WITHOUT_HEAD(pf_unspec); ATF_TC_BODY(pf_unspec, tc) Modified: stable/11/lib/libc/tests/nss/gethostby_test.c ============================================================================== --- stable/11/lib/libc/tests/nss/gethostby_test.c Tue Jul 18 17:51:46 2017 (r321142) +++ stable/11/lib/libc/tests/nss/gethostby_test.c Tue Jul 18 18:09:16 2017 (r321143) @@ -776,24 +776,26 @@ hostent_test_getaddrinfo_eq(struct hostent *he, void * rv = getaddrinfo(he->h_name, NULL, &hints, &ai); if (rv == 0) { printf("not ok - shouldn't have been resolved\n"); - return (-1); - } + rv = -1; + } else + rv = 0; } else { rv = getaddrinfo(he->h_name, NULL, &hints, &ai); if (rv != 0) { printf("not ok - should have been resolved\n"); - return (-1); + rv = -1; + goto done; } - rv = is_hostent_equal(he, ai); if (rv != 0) { printf("not ok - addrinfo and hostent are not equal\n"); - return (-1); + rv = -1; } - } - - return (0); +done: + if (ai != NULL) + freeaddrinfo(ai); + return (rv); } static int @@ -884,7 +886,7 @@ hostent_test_getnameinfo_eq(struct hostent *he, void * * An address might reverse resolve to hostname alias or the * official hostname, e.g. moon.vub.ac.be. */ - bool found_a_match; + bool found_a_match = false; if (strcmp(result->h_name, buffer) == 0) { found_a_match = true; @@ -924,10 +926,19 @@ static int run_tests(const char *hostlist_file, const char *snapshot_file, int _af_type, enum test_methods method, bool use_ipv6_mapping) { + char *snapshot_file_copy; struct hostent_test_data td, td_addr, td_snap; res_state statp; int rv = -2; + if (snapshot_file == NULL) + snapshot_file_copy = NULL; + else { + snapshot_file_copy = strdup(snapshot_file); + ATF_REQUIRE(snapshot_file_copy != NULL); + } + snapshot_file = snapshot_file_copy; + switch (_af_type) { case AF_INET: ATF_REQUIRE_FEATURE("inet"); @@ -946,8 +957,8 @@ run_tests(const char *hostlist_file, const char *snaps if (statp == NULL || ((statp->options & RES_INIT) == 0 && res_ninit(statp) == -1)) { printf("error: can't init res_state\n"); - - return (-1); + rv = -1; + goto fin2; } if (use_ipv6_mapping) @@ -1051,6 +1062,9 @@ fin: TEST_DATA_DESTROY(hostent, &td_addr); TEST_DATA_DESTROY(hostent, &td); +fin2: + free(snapshot_file_copy); + return (rv); } @@ -1059,30 +1073,24 @@ fin: #define _RUN_TESTS(tc, snapshot_file, af_type, method, use_ipv6_mapping) \ do { \ char *_hostlist_file; \ - char *_snapshot_file; \ ATF_REQUIRE(0 < asprintf(&_hostlist_file, "%s/%s", \ atf_tc_get_config_var(tc, "srcdir"), HOSTLIST_FILE)); \ - if (snapshot_file == NULL) \ - _snapshot_file = NULL; \ - else { \ - _snapshot_file = strdup(snapshot_file); \ - ATF_REQUIRE(_snapshot_file != NULL); \ - } \ - ATF_REQUIRE(run_tests(_hostlist_file, _snapshot_file, af_type, \ + ATF_REQUIRE(run_tests(_hostlist_file, snapshot_file, af_type, \ method, use_ipv6_mapping) == 0); \ -} while(0) + free(_hostlist_file); \ +} while (0) #define RUN_HOST_TESTS(tc, snapshot_file, af_type, method, use_ipv6_mapping) \ do { \ use_ipnode_functions = false; \ _RUN_TESTS(tc, snapshot_file, af_type, method, use_ipv6_mapping); \ -} while(0) +} while (0) #define RUN_IPNODE_TESTS(tc, snapshot_file, af_type, method, use_ipv6_mapping) \ do { \ use_ipnode_functions = true; \ _RUN_TESTS(tc, snapshot_file, af_type, method, use_ipv6_mapping); \ -} while(0) +} while (0) ATF_TC_WITHOUT_HEAD(gethostbyaddr_ipv4); ATF_TC_BODY(gethostbyaddr_ipv4, tc) From owner-svn-src-stable-11@freebsd.org Tue Jul 18 18:15:30 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 33D61D9C24C; Tue, 18 Jul 2017 18:15:30 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 030FC7D2B8; Tue, 18 Jul 2017 18:15:29 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6IIFTP2077724; Tue, 18 Jul 2017 18:15:29 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6IIFSoX077718; Tue, 18 Jul 2017 18:15:28 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201707181815.v6IIFSoX077718@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 18 Jul 2017 18:15:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r321145 - stable/11/lib/libc/sys X-SVN-Group: stable-11 X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: stable/11/lib/libc/sys X-SVN-Commit-Revision: 321145 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Jul 2017 18:15:30 -0000 Author: ngie Date: Tue Jul 18 18:15:28 2017 New Revision: 321145 URL: https://svnweb.freebsd.org/changeset/base/321145 Log: MFC r318715,r318717,r318718,r318719,r318720,r318721: r318715: _umtx_op(2): fix minor manlint issues - Sort .Xr entries in SEE ALSO section. - Sort SEE ALSO and STANDARDS sections properly, in terms of the entire document. r318717: cap_enter(2): fix manlint issues - Sort SEE ALSO section appropriately. - Correct section for sysctl(9). r318718: rctl_add_rule(2): fix manlint warnings - Fix commas (either missing or misused) after .Nm entries in SYNOPSIS r318719: open(2): fix manlint warnings - Sort SEE ALSO .Xr entries. - Sort sections (HISTORY comes after STANDARDS). r318720: ptrace(2): clean up trailing whitespace r318721: kill(2): add missing section for sysctl(9) Modified: stable/11/lib/libc/sys/_umtx_op.2 stable/11/lib/libc/sys/cap_enter.2 stable/11/lib/libc/sys/kill.2 stable/11/lib/libc/sys/open.2 stable/11/lib/libc/sys/ptrace.2 stable/11/lib/libc/sys/rctl_add_rule.2 Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libc/sys/_umtx_op.2 ============================================================================== --- stable/11/lib/libc/sys/_umtx_op.2 Tue Jul 18 18:09:26 2017 (r321144) +++ stable/11/lib/libc/sys/_umtx_op.2 Tue Jul 18 18:15:28 2017 (r321145) @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 29, 2016 +.Dd May 23, 2017 .Dt _UMTX_OP 2 .Os .Sh NAME @@ -1382,32 +1382,11 @@ Mutex lock requests without timeout specified are rest The error is not returned to userspace code since restart is handled by usual adjustment of the instruction counter. .El -.Sh BUGS -A window between a unlocking robust mutex and resetting the pointer in the -.Dv robust_inact_offset -member of the registered -.Vt struct umtx_robust_lists_params -allows another thread to destroy the mutex, thus making the kernel inspect -freed or reused memory. -The -.Li libthr -implementation is only vulnerable to this race when operating on -a shared mutex. -A possible fix for the current implementation is to strengthen the checks -for shared mutexes before terminating them, in particular, verifying -that the mutex memory is mapped from a shared memory object allocated -by the -.Dv UMTX_OP_SHM -request. -This is not done because it is believed that the race is adequately -covered by other consistency checks, while adding the check would -prevent alternative implementations of -.Li libpthread . .Sh SEE ALSO .Xr clock_gettime 2 , .Xr mmap 2 , -.Xr shm_open 2 , .Xr setrlimit 2 , +.Xr shm_open 2 , .Xr sigaction 2 , .Xr thr_exit 2 , .Xr thr_kill 2 , @@ -1425,3 +1404,24 @@ to implement .St -p1003.1-2001 .Xr pthread 3 functionality. +.Sh BUGS +A window between a unlocking robust mutex and resetting the pointer in the +.Dv robust_inact_offset +member of the registered +.Vt struct umtx_robust_lists_params +allows another thread to destroy the mutex, thus making the kernel inspect +freed or reused memory. +The +.Li libthr +implementation is only vulnerable to this race when operating on +a shared mutex. +A possible fix for the current implementation is to strengthen the checks +for shared mutexes before terminating them, in particular, verifying +that the mutex memory is mapped from a shared memory object allocated +by the +.Dv UMTX_OP_SHM +request. +This is not done because it is believed that the race is adequately +covered by other consistency checks, while adding the check would +prevent alternative implementations of +.Li libpthread . Modified: stable/11/lib/libc/sys/cap_enter.2 ============================================================================== --- stable/11/lib/libc/sys/cap_enter.2 Tue Jul 18 18:09:26 2017 (r321144) +++ stable/11/lib/libc/sys/cap_enter.2 Tue Jul 18 18:15:28 2017 (r321145) @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 27, 2016 +.Dd May 23, 2017 .Dt CAP_ENTER 2 .Os .Sh NAME @@ -139,11 +139,11 @@ points outside the process's allocated address space. .Xr cap_fcntls_limit 2 , .Xr cap_ioctls_limit 2 , .Xr cap_rights_limit 2 , -.Xr procctl 2 , -.Xr sysctl 2 , .Xr fexecve 2 , +.Xr procctl 2 , .Xr cap_sandboxed 3 , -.Xr capsicum 4 +.Xr capsicum 4 , +.Xr sysctl 9 .Sh HISTORY Support for capabilities and capabilities mode was developed as part of the .Tn TrustedBSD Modified: stable/11/lib/libc/sys/kill.2 ============================================================================== --- stable/11/lib/libc/sys/kill.2 Tue Jul 18 18:09:26 2017 (r321144) +++ stable/11/lib/libc/sys/kill.2 Tue Jul 18 18:15:28 2017 (r321145) @@ -71,7 +71,7 @@ A single exception is the signal SIGCONT, which may al to any process with the same session ID as the sender. In addition, if the .Va security.bsd.conservative_signals -.Xr sysctl +.Xr sysctl 9 is set to 1, the user is not a super-user, and the receiver is set-uid, then only job control and terminal control signals may Modified: stable/11/lib/libc/sys/open.2 ============================================================================== --- stable/11/lib/libc/sys/open.2 Tue Jul 18 18:09:26 2017 (r321144) +++ stable/11/lib/libc/sys/open.2 Tue Jul 18 18:15:28 2017 (r321145) @@ -471,16 +471,8 @@ is specified and the file is not a directory. .Xr read 2 , .Xr umask 2 , .Xr write 2 , -.Xr fopen 3 -.Sh HISTORY -The -.Fn open -function appeared in -.At v6 . -The -.Fn openat -function was introduced in -.Fx 8.0 . +.Xr fopen 3 , +.Xr capsicum 4 .Sh STANDARDS These functions are specified by .St -p1003.1-2008 . @@ -497,6 +489,15 @@ when is set in flags and the final component of pathname is a symbolic link to distinguish it from the case of too many symbolic link traversals in one of its non-final components. +.Sh HISTORY +The +.Fn open +function appeared in +.At v6 . +The +.Fn openat +function was introduced in +.Fx 8.0 . .Sh BUGS The Open Group Extended API Set 2 specification requires that the test for whether Modified: stable/11/lib/libc/sys/ptrace.2 ============================================================================== --- stable/11/lib/libc/sys/ptrace.2 Tue Jul 18 18:09:26 2017 (r321144) +++ stable/11/lib/libc/sys/ptrace.2 Tue Jul 18 18:15:28 2017 (r321145) @@ -166,7 +166,7 @@ new child processes will execute without tracing enabl This event flag controls tracing of LWP .Pq kernel thread creation and destruction. -When this event is enabled, +When this event is enabled, new LWPs will stop and report an event with .Dv PL_FLAG_BORN set before executing their first instruction, @@ -215,7 +215,7 @@ or includes only .Dv PTRACE_EXEC events. -All other event flags are disabled. +All other event flags are disabled. .Pp The .Fa request Modified: stable/11/lib/libc/sys/rctl_add_rule.2 ============================================================================== --- stable/11/lib/libc/sys/rctl_add_rule.2 Tue Jul 18 18:09:26 2017 (r321144) +++ stable/11/lib/libc/sys/rctl_add_rule.2 Tue Jul 18 18:15:28 2017 (r321145) @@ -28,10 +28,10 @@ .Dt RCTL_ADD_RULE 2 .Os .Sh NAME -.Nm rctl_add_rule, -.Nm rctl_get_limits -.Nm rctl_get_racct, -.Nm rctl_get_rules, +.Nm rctl_add_rule , +.Nm rctl_get_limits , +.Nm rctl_get_racct , +.Nm rctl_get_rules , .Nm rctl_remove_rule .Nd manipulate and query the resource limits database .Sh LIBRARY From owner-svn-src-stable-11@freebsd.org Tue Jul 18 18:20:58 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 00944D9C3C2; Tue, 18 Jul 2017 18:20:58 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C3AA27D5D2; Tue, 18 Jul 2017 18:20:57 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6IIKvYY080261; Tue, 18 Jul 2017 18:20:57 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6IIKv6i080260; Tue, 18 Jul 2017 18:20:57 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201707181820.v6IIKv6i080260@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 18 Jul 2017 18:20:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r321147 - stable/11/lib/libc/stdlib X-SVN-Group: stable-11 X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: stable/11/lib/libc/stdlib X-SVN-Commit-Revision: 321147 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Jul 2017 18:20:58 -0000 Author: ngie Date: Tue Jul 18 18:20:56 2017 New Revision: 321147 URL: https://svnweb.freebsd.org/changeset/base/321147 Log: MFC r318710: quick_exit(3): delete trailing whitespace in licensing tort Modified: stable/11/lib/libc/stdlib/quick_exit.3 Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libc/stdlib/quick_exit.3 ============================================================================== --- stable/11/lib/libc/stdlib/quick_exit.3 Tue Jul 18 18:15:45 2017 (r321146) +++ stable/11/lib/libc/stdlib/quick_exit.3 Tue Jul 18 18:20:56 2017 (r321147) @@ -1,6 +1,6 @@ .\" Copyright (c) 2011 David Chisnall .\" All rights reserved. -.\" +.\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: @@ -9,7 +9,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. -.\" +.\" .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE @@ -21,7 +21,7 @@ .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. -.\" +.\" .\" $FreeBSD$ .\" .Dd December 13, 2014 From owner-svn-src-stable-11@freebsd.org Tue Jul 18 18:23:57 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E6E1ED9C64F; Tue, 18 Jul 2017 18:23:57 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B3BAA7DA54; Tue, 18 Jul 2017 18:23:57 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6IINufw081992; Tue, 18 Jul 2017 18:23:56 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6IINuNi081989; Tue, 18 Jul 2017 18:23:56 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201707181823.v6IINuNi081989@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 18 Jul 2017 18:23:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r321150 - stable/11/lib/libc/posix1e X-SVN-Group: stable-11 X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: stable/11/lib/libc/posix1e X-SVN-Commit-Revision: 321150 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Jul 2017 18:23:58 -0000 Author: ngie Date: Tue Jul 18 18:23:56 2017 New Revision: 321150 URL: https://svnweb.freebsd.org/changeset/base/321150 Log: MFC r318704,r318708,r318709: r318704: posix1e(3): reference using the section (3) when referencing libbsm with .Xr r318708: acl_create_entry(3): separate .Nm entries with commas in SYNOPSIS r318709: acl_to_text(3): start sentences on new lines Modified: stable/11/lib/libc/posix1e/acl_create_entry.3 stable/11/lib/libc/posix1e/acl_to_text.3 stable/11/lib/libc/posix1e/posix1e.3 Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libc/posix1e/acl_create_entry.3 ============================================================================== --- stable/11/lib/libc/posix1e/acl_create_entry.3 Tue Jul 18 18:23:54 2017 (r321149) +++ stable/11/lib/libc/posix1e/acl_create_entry.3 Tue Jul 18 18:23:56 2017 (r321150) @@ -29,7 +29,7 @@ .Dt ACL_CREATE_ENTRY 3 .Os .Sh NAME -.Nm acl_create_entry +.Nm acl_create_entry , .Nm acl_create_entry_np .Nd create a new ACL entry .Sh LIBRARY Modified: stable/11/lib/libc/posix1e/acl_to_text.3 ============================================================================== --- stable/11/lib/libc/posix1e/acl_to_text.3 Tue Jul 18 18:23:54 2017 (r321149) +++ stable/11/lib/libc/posix1e/acl_to_text.3 Tue Jul 18 18:23:56 2017 (r321150) @@ -58,8 +58,9 @@ including the NULL terminator) in the location pointed .Va len_p . If the ACL is POSIX.1e, the format of the text string returned by .Fn acl_to_text -shall be the POSIX.1e long ACL form. If the ACL is NFSv4, the format -of the text string shall be the compact form, unless the +shall be the POSIX.1e long ACL form. +If the ACL is NFSv4, the format of the text string shall be the compact form, unless +the .Va ACL_TEXT_VERBOSE flag is given. .Pp Modified: stable/11/lib/libc/posix1e/posix1e.3 ============================================================================== --- stable/11/lib/libc/posix1e/posix1e.3 Tue Jul 18 18:23:54 2017 (r321149) +++ stable/11/lib/libc/posix1e/posix1e.3 Tue Jul 18 18:23:56 2017 (r321150) @@ -63,7 +63,7 @@ flow label APIs. However, .Fx does implement the -.Xr libbsm +.Xr libbsm 3 audit API. It also provides .Xr capsicum 4 , From owner-svn-src-stable-11@freebsd.org Tue Jul 18 18:33:08 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A20AED9CA23; Tue, 18 Jul 2017 18:33:08 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7104B7DF86; Tue, 18 Jul 2017 18:33:08 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6IIX7rs085946; Tue, 18 Jul 2017 18:33:07 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6IIX73Z085945; Tue, 18 Jul 2017 18:33:07 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201707181833.v6IIX73Z085945@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 18 Jul 2017 18:33:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r321152 - stable/11/usr.bin/getconf X-SVN-Group: stable-11 X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: stable/11/usr.bin/getconf X-SVN-Commit-Revision: 321152 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Jul 2017 18:33:08 -0000 Author: ngie Date: Tue Jul 18 18:33:07 2017 New Revision: 321152 URL: https://svnweb.freebsd.org/changeset/base/321152 Log: MFC r318280: getconf: use nitems(..) to compute NWORDS instead of hardcoding the equivalent macro Modified: stable/11/usr.bin/getconf/fake-gperf.awk Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.bin/getconf/fake-gperf.awk ============================================================================== --- stable/11/usr.bin/getconf/fake-gperf.awk Tue Jul 18 18:33:05 2017 (r321151) +++ stable/11/usr.bin/getconf/fake-gperf.awk Tue Jul 18 18:33:07 2017 (r321152) @@ -36,7 +36,8 @@ state == 1 { print; next; } state = 3; print "\t{ NULL, 0, 0 }"; print "};"; - print "#define\tNWORDS\t(sizeof(wordlist)/sizeof(wordlist[0]) - 1)"; + print "#include "; + print "#define\tNWORDS\t(nitems(wordlist) - 1)"; print "static const struct map *"; print "in_word_set(const char *word)"; print "{"; From owner-svn-src-stable-11@freebsd.org Tue Jul 18 18:34:11 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2EB1ED9CAF6; Tue, 18 Jul 2017 18:34:11 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EFF6A7E1F0; Tue, 18 Jul 2017 18:34:10 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6IIYAhJ086078; Tue, 18 Jul 2017 18:34:10 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6IIYAob086077; Tue, 18 Jul 2017 18:34:10 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201707181834.v6IIYAob086077@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 18 Jul 2017 18:34:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r321153 - stable/11/lib/libc/net X-SVN-Group: stable-11 X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: stable/11/lib/libc/net X-SVN-Commit-Revision: 321153 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Jul 2017 18:34:11 -0000 Author: ngie Date: Tue Jul 18 18:34:09 2017 New Revision: 321153 URL: https://svnweb.freebsd.org/changeset/base/321153 Log: MFC r318707: sctp_send(3): start sentences on new lines Modified: stable/11/lib/libc/net/sctp_send.3 Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libc/net/sctp_send.3 ============================================================================== --- stable/11/lib/libc/net/sctp_send.3 Tue Jul 18 18:33:07 2017 (r321152) +++ stable/11/lib/libc/net/sctp_send.3 Tue Jul 18 18:34:09 2017 (r321153) @@ -105,8 +105,8 @@ struct sctp_sndrcvinfo { The .Fa sinfo->sinfo_ppid argument is an opaque 32 bit value that is passed transparently -through the stack to the peer endpoint. It will be available on -reception of a message (see +through the stack to the peer endpoint. +It will be available on reception of a message (see .Xr sctp_recvmsg 3 ) . Note that the stack passes this value without regard to byte order. From owner-svn-src-stable-11@freebsd.org Tue Jul 18 18:35:48 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3D0A1D9CC46; Tue, 18 Jul 2017 18:35:48 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 06D6F7E48F; Tue, 18 Jul 2017 18:35:47 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6IIZlcA086340; Tue, 18 Jul 2017 18:35:47 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6IIZlAm086339; Tue, 18 Jul 2017 18:35:47 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201707181835.v6IIZlAm086339@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 18 Jul 2017 18:35:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r321156 - stable/11/lib/libc/iconv X-SVN-Group: stable-11 X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: stable/11/lib/libc/iconv X-SVN-Commit-Revision: 321156 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Jul 2017 18:35:48 -0000 Author: ngie Date: Tue Jul 18 18:35:46 2017 New Revision: 321156 URL: https://svnweb.freebsd.org/changeset/base/321156 Log: MFC r318703: __iconv_get_list: separate .Nm entries with commas Modified: stable/11/lib/libc/iconv/__iconv_get_list.3 Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libc/iconv/__iconv_get_list.3 ============================================================================== --- stable/11/lib/libc/iconv/__iconv_get_list.3 Tue Jul 18 18:35:41 2017 (r321155) +++ stable/11/lib/libc/iconv/__iconv_get_list.3 Tue Jul 18 18:35:46 2017 (r321156) @@ -38,7 +38,7 @@ .Dt __ICONV_GET_LIST 3 .Os .Sh NAME -.Nm __iconv_get_list +.Nm __iconv_get_list , .Nm __iconv_free_list .Nd retrieving a list of character encodings supported by .Xr iconv 3 From owner-svn-src-stable-11@freebsd.org Tue Jul 18 18:36:45 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9F2C2D9CD09; Tue, 18 Jul 2017 18:36:45 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6CDE07E6C2; Tue, 18 Jul 2017 18:36:45 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6IIaiid086524; Tue, 18 Jul 2017 18:36:44 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6IIaiu1086523; Tue, 18 Jul 2017 18:36:44 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201707181836.v6IIaiu1086523@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 18 Jul 2017 18:36:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r321158 - stable/11/lib/libc/xdr X-SVN-Group: stable-11 X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: stable/11/lib/libc/xdr X-SVN-Commit-Revision: 321158 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Jul 2017 18:36:45 -0000 Author: ngie Date: Tue Jul 18 18:36:44 2017 New Revision: 321158 URL: https://svnweb.freebsd.org/changeset/base/321158 Log: MFC r318712: xdr(3): add missing comma after xdr_sizeof(3) in SYNOPSIS This unbreaks the .Nm declaration Modified: stable/11/lib/libc/xdr/xdr.3 Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libc/xdr/xdr.3 ============================================================================== --- stable/11/lib/libc/xdr/xdr.3 Tue Jul 18 18:36:40 2017 (r321157) +++ stable/11/lib/libc/xdr/xdr.3 Tue Jul 18 18:36:44 2017 (r321158) @@ -31,7 +31,7 @@ .Nm xdr_reference , .Nm xdr_setpos , .Nm xdr_short , -.Nm xdr_sizeof, +.Nm xdr_sizeof , .Nm xdrstdio_create , .Nm xdr_string , .Nm xdr_u_char , From owner-svn-src-stable-11@freebsd.org Tue Jul 18 18:37:51 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7DA48D9CE10; Tue, 18 Jul 2017 18:37:51 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4D33C7E923; Tue, 18 Jul 2017 18:37:51 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6IIbo21086661; Tue, 18 Jul 2017 18:37:50 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6IIboJb086660; Tue, 18 Jul 2017 18:37:50 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201707181837.v6IIboJb086660@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 18 Jul 2017 18:37:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r321159 - stable/11/lib/libc/locale X-SVN-Group: stable-11 X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: stable/11/lib/libc/locale X-SVN-Commit-Revision: 321159 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Jul 2017 18:37:51 -0000 Author: ngie Date: Tue Jul 18 18:37:50 2017 New Revision: 321159 URL: https://svnweb.freebsd.org/changeset/base/321159 Log: MFC r318706: localeconv(3): start sentences on new lines Modified: stable/11/lib/libc/locale/localeconv.3 Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libc/locale/localeconv.3 ============================================================================== --- stable/11/lib/libc/locale/localeconv.3 Tue Jul 18 18:36:44 2017 (r321158) +++ stable/11/lib/libc/locale/localeconv.3 Tue Jul 18 18:37:50 2017 (r321159) @@ -202,7 +202,8 @@ result similarly denotes an unavailable value. .Pp The .Fn localeconv_l -function takes an explicit locale parameter. For more information, see +function takes an explicit locale parameter. +For more information, see .Xr xlocale 3 . .Sh RETURN VALUES The From owner-svn-src-stable-11@freebsd.org Tue Jul 18 18:39:56 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 081F6D9CF21; Tue, 18 Jul 2017 18:39:56 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CB42E7EBA9; Tue, 18 Jul 2017 18:39:55 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6IIdtJO086926; Tue, 18 Jul 2017 18:39:55 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6IIdtoQ086925; Tue, 18 Jul 2017 18:39:55 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201707181839.v6IIdtoQ086925@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 18 Jul 2017 18:39:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r321162 - stable/11/contrib/libc-vis X-SVN-Group: stable-11 X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: stable/11/contrib/libc-vis X-SVN-Commit-Revision: 321162 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Jul 2017 18:39:56 -0000 Author: ngie Date: Tue Jul 18 18:39:54 2017 New Revision: 321162 URL: https://svnweb.freebsd.org/changeset/base/321162 Log: MFC r318702: vis(3): delete spurious .Pp macro Modified: stable/11/contrib/libc-vis/vis.3 Directory Properties: stable/11/ (props changed) Modified: stable/11/contrib/libc-vis/vis.3 ============================================================================== --- stable/11/contrib/libc-vis/vis.3 Tue Jul 18 18:39:51 2017 (r321161) +++ stable/11/contrib/libc-vis/vis.3 Tue Jul 18 18:39:54 2017 (r321162) @@ -373,7 +373,6 @@ space. .It Dv \e240 Represents Meta-space. .El -.Pp .It Dv VIS_CSTYLE Use C-style backslash sequences to represent standard non-printable characters. From owner-svn-src-stable-11@freebsd.org Tue Jul 18 18:48:59 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9C0C3D9D313; Tue, 18 Jul 2017 18:48:59 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 76BD27F393; Tue, 18 Jul 2017 18:48:59 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6IImwbg090987; Tue, 18 Jul 2017 18:48:58 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6IImwAR090984; Tue, 18 Jul 2017 18:48:58 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201707181848.v6IImwAR090984@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 18 Jul 2017 18:48:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r321164 - stable/11/usr.sbin/pw/tests X-SVN-Group: stable-11 X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: stable/11/usr.sbin/pw/tests X-SVN-Commit-Revision: 321164 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Jul 2017 18:48:59 -0000 Author: ngie Date: Tue Jul 18 18:48:58 2017 New Revision: 321164 URL: https://svnweb.freebsd.org/changeset/base/321164 Log: MFC r319026: pw: add some basic testcases for groupshow and usershow - groupshow: test out -a/-g/-n . - usershow: test out -a/-n/-u . Added: stable/11/usr.sbin/pw/tests/pw_groupshow_test.sh - copied unchanged from r319026, head/usr.sbin/pw/tests/pw_groupshow_test.sh stable/11/usr.sbin/pw/tests/pw_usershow_test.sh - copied unchanged from r319026, head/usr.sbin/pw/tests/pw_usershow_test.sh Modified: stable/11/usr.sbin/pw/tests/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/pw/tests/Makefile ============================================================================== --- stable/11/usr.sbin/pw/tests/Makefile Tue Jul 18 18:48:25 2017 (r321163) +++ stable/11/usr.sbin/pw/tests/Makefile Tue Jul 18 18:48:58 2017 (r321164) @@ -14,10 +14,12 @@ ATF_TESTS_SH= pw_etcdir_test \ pw_groupadd_test \ pw_groupdel_test \ pw_groupmod_test \ + pw_groupshow_test \ pw_useradd_test \ pw_userdel_test \ pw_usermod_test \ - pw_usernext_test + pw_usernext_test \ + pw_usershow_test .for tp in ${ATF_TESTS_SH} TEST_METADATA.${tp}+= required_user="root" Copied: stable/11/usr.sbin/pw/tests/pw_groupshow_test.sh (from r319026, head/usr.sbin/pw/tests/pw_groupshow_test.sh) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/usr.sbin/pw/tests/pw_groupshow_test.sh Tue Jul 18 18:48:58 2017 (r321164, copy of r319026, head/usr.sbin/pw/tests/pw_groupshow_test.sh) @@ -0,0 +1,56 @@ +# $FreeBSD$ + +# Import helper functions +. $(atf_get_srcdir)/helper_functions.shin + +atf_test_case group_show_all +group_show_all_body() { + populate_etc_skel + atf_check -o not-empty ${PW} groupshow -a +} + +atf_test_case group_show_gid +group_show_gid_body() { + populate_etc_skel + atf_check -o not-empty ${PW} groupshow -g 0 +} + +atf_test_case group_show_name +group_show_name_body() { + populate_etc_skel + atf_check -o not-empty ${PW} groupshow wheel +} + +atf_test_case group_show_nonexistent_gid +group_show_nonexistent_gid_body() { + populate_etc_skel + + nonexistent_gid=4242 + no_such_name_msg="pw: unknown gid \`$nonexistent_gid'\n" + + atf_check -e "inline:$no_such_name_msg" -s exit:65 ${PW} groupshow \ + $nonexistent_gid + atf_check -e "inline:$no_such_name_msg" -s exit:65 ${PW} groupshow \ + -g $nonexistent_gid +} + +atf_test_case group_show_nonexistent_name +group_show_nonexistent_name_body() { + populate_etc_skel + + nonexistent_name=bogus + no_such_name_msg="pw: unknown group \`$nonexistent_name'\n" + + atf_check -e "inline:$no_such_name_msg" -s exit:65 ${PW} groupshow \ + $nonexistent_name + atf_check -e "inline:$no_such_name_msg" -s exit:65 ${PW} groupshow \ + -n $nonexistent_name +} + +atf_init_test_cases() { + atf_add_test_case group_show_all + atf_add_test_case group_show_gid + atf_add_test_case group_show_name + atf_add_test_case group_show_nonexistent_gid + atf_add_test_case group_show_nonexistent_name +} Copied: stable/11/usr.sbin/pw/tests/pw_usershow_test.sh (from r319026, head/usr.sbin/pw/tests/pw_usershow_test.sh) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/usr.sbin/pw/tests/pw_usershow_test.sh Tue Jul 18 18:48:58 2017 (r321164, copy of r319026, head/usr.sbin/pw/tests/pw_usershow_test.sh) @@ -0,0 +1,56 @@ +# $FreeBSD$ + +# Import helper functions +. $(atf_get_srcdir)/helper_functions.shin + +atf_test_case user_show_all +user_show_all_body() { + populate_etc_skel + atf_check -o not-empty ${PW} usershow -a +} + +atf_test_case user_show_name +user_show_name_body() { + populate_etc_skel + atf_check -o not-empty ${PW} usershow root +} + +atf_test_case user_show_nonexistent_name +user_show_nonexistent_name_body() { + populate_etc_skel + + nonexistent_user=bogus + no_such_user_msg="pw: no such user \`$nonexistent_user'\n" + + atf_check -e "inline:$no_such_user_msg" -s exit:67 ${PW} usershow \ + $nonexistent_user + atf_check -e "inline:$no_such_user_msg" -s exit:67 ${PW} usershow \ + -n $nonexistent_user +} + +atf_test_case user_show_nonexistent_uid +user_show_nonexistent_uid_body() { + populate_etc_skel + + nonexistent_uid=4242 + no_such_uid_msg="pw: no such uid \`$nonexistent_uid'\n" + + atf_check -e "inline:$no_such_uid_msg" -s exit:67 ${PW} usershow \ + $nonexistent_uid + atf_check -e "inline:$no_such_uid_msg" -s exit:67 ${PW} usershow \ + -u $nonexistent_uid +} + +atf_test_case user_show_uid +user_show_uid_body() { + populate_etc_skel + atf_check -o not-empty ${PW} usershow -u 0 +} + +atf_init_test_cases() { + atf_add_test_case user_show_all + atf_add_test_case user_show_name + atf_add_test_case user_show_nonexistent_name + atf_add_test_case user_show_nonexistent_uid + atf_add_test_case user_show_uid +} From owner-svn-src-stable-11@freebsd.org Tue Jul 18 18:51:35 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ACA31D9D3C2; Tue, 18 Jul 2017 18:51:35 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 79C217F5C1; Tue, 18 Jul 2017 18:51:35 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6IIpYHF093469; Tue, 18 Jul 2017 18:51:34 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6IIpYJs093468; Tue, 18 Jul 2017 18:51:34 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201707181851.v6IIpYJs093468@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 18 Jul 2017 18:51:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r321165 - stable/11/tests/sys/kern X-SVN-Group: stable-11 X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: stable/11/tests/sys/kern X-SVN-Commit-Revision: 321165 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Jul 2017 18:51:35 -0000 Author: ngie Date: Tue Jul 18 18:51:34 2017 New Revision: 321165 URL: https://svnweb.freebsd.org/changeset/base/321165 Log: MFC r319063: Send all of `data`, not just a portion of it It was sending only a long's worth (4 or 8 bytes) of data previously (instead of the entire buffer) via send(2). CID: 1229966, 1229967, 1230004, 1230005 Modified: stable/11/tests/sys/kern/unix_seqpacket_test.c Directory Properties: stable/11/ (props changed) Modified: stable/11/tests/sys/kern/unix_seqpacket_test.c ============================================================================== --- stable/11/tests/sys/kern/unix_seqpacket_test.c Tue Jul 18 18:48:58 2017 (r321164) +++ stable/11/tests/sys/kern/unix_seqpacket_test.c Tue Jul 18 18:51:34 2017 (r321165) @@ -762,7 +762,7 @@ ATF_TC_BODY(shutdown_send, tc) /* ATF's isolation mechanisms will guarantee uniqueness of this file */ const char *path = "sock"; const char *data = "data"; - ssize_t ssize; + ssize_t datalen, ssize; int s, err, s2; s = socket(PF_LOCAL, SOCK_SEQPACKET, 0); @@ -786,8 +786,9 @@ ATF_TC_BODY(shutdown_send, tc) } ATF_CHECK_EQ(0, shutdown(s2, SHUT_RDWR)); + datalen = strlen(data) + 1; /* +1 for the null */ /* USE MSG_NOSIGNAL so we don't get SIGPIPE */ - ssize = send(s2, data, sizeof(data), MSG_EOR | MSG_NOSIGNAL); + ssize = send(s2, data, datalen, MSG_EOR | MSG_NOSIGNAL); ATF_CHECK_EQ(EPIPE, errno); ATF_CHECK_EQ(-1, ssize); close(s); @@ -802,6 +803,7 @@ ATF_TC_BODY(shutdown_send_sigpipe, tc) /* ATF's isolation mechanisms will guarantee uniqueness of this file */ const char *path = "sock"; const char *data = "data"; + ssize_t datalen; int s, err, s2; s = socket(PF_LOCAL, SOCK_SEQPACKET, 0); @@ -826,7 +828,8 @@ ATF_TC_BODY(shutdown_send_sigpipe, tc) ATF_CHECK_EQ(0, shutdown(s2, SHUT_RDWR)); ATF_REQUIRE(SIG_ERR != signal(SIGPIPE, shutdown_send_sigpipe_handler)); - (void)send(s2, data, sizeof(data), MSG_EOR); + datalen = strlen(data) + 1; /* +1 for the null */ + (void)send(s2, data, sizeof(*data), MSG_EOR); ATF_CHECK_EQ(1, got_sigpipe); close(s); close(s2); From owner-svn-src-stable-11@freebsd.org Tue Jul 18 18:54:55 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7B7CED9D660; Tue, 18 Jul 2017 18:54:55 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 453F57FA03; Tue, 18 Jul 2017 18:54:55 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6IIssbw095404; Tue, 18 Jul 2017 18:54:54 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6IIss2R095403; Tue, 18 Jul 2017 18:54:54 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201707181854.v6IIss2R095403@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 18 Jul 2017 18:54:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r321167 - stable/11/usr.bin/mkimg/tests X-SVN-Group: stable-11 X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: stable/11/usr.bin/mkimg/tests X-SVN-Commit-Revision: 321167 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Jul 2017 18:54:55 -0000 Author: ngie Date: Tue Jul 18 18:54:54 2017 New Revision: 321167 URL: https://svnweb.freebsd.org/changeset/base/321167 Log: MFC r319293: Formalize the dependent/dependency relationship for .gz.uu vs This helps ensure that the output files are regenerated if the input files change, after the output files have been created. Modified: stable/11/usr.bin/mkimg/tests/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.bin/mkimg/tests/Makefile ============================================================================== --- stable/11/usr.bin/mkimg/tests/Makefile Tue Jul 18 18:54:47 2017 (r321166) +++ stable/11/usr.bin/mkimg/tests/Makefile Tue Jul 18 18:54:54 2017 (r321167) @@ -1,5 +1,7 @@ # $FreeBSD$ +.PATH: ${.CURDIR} + PACKAGE= tests _REBASE_SCRIPT= mkimg_test @@ -8,8 +10,10 @@ ATF_TESTS_SH= ${_REBASE_SCRIPT} SOURCES!= cd ${.CURDIR}; echo *.uu ${PACKAGE}FILES+= ${SOURCES:S,.gz.uu,,g} -${${PACKAGE}FILES}: - uudecode -p ${.CURDIR}/${.TARGET}.gz.uu | gunzip -c > ${.TARGET} +.for f in ${${PACKAGE}FILES} +$f: $f.gz.uu + uudecode -p ${.ALLSRC} | gunzip -c > ${.TARGET} +.endfor CLEANFILES+= ${${PACKAGE}FILES}} From owner-svn-src-stable-11@freebsd.org Tue Jul 18 18:55:49 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 52DA1D9D708; Tue, 18 Jul 2017 18:55:49 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1FBBB7FC38; Tue, 18 Jul 2017 18:55:49 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6IItmeZ095554; Tue, 18 Jul 2017 18:55:48 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6IItmNB095553; Tue, 18 Jul 2017 18:55:48 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201707181855.v6IItmNB095553@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 18 Jul 2017 18:55:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r321168 - stable/11/usr.sbin/bsdinstall/partedit X-SVN-Group: stable-11 X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: stable/11/usr.sbin/bsdinstall/partedit X-SVN-Commit-Revision: 321168 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Jul 2017 18:55:49 -0000 Author: ngie Date: Tue Jul 18 18:55:48 2017 New Revision: 321168 URL: https://svnweb.freebsd.org/changeset/base/321168 Log: MFC r318693,r318694: r318693: Some minor style(9) fixes - Wrap at <80 columns. - Sort by type r318694: style(9): sort headers MFC with: r318693 Modified: stable/11/usr.sbin/bsdinstall/partedit/part_wizard.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/bsdinstall/partedit/part_wizard.c ============================================================================== --- stable/11/usr.sbin/bsdinstall/partedit/part_wizard.c Tue Jul 18 18:54:54 2017 (r321167) +++ stable/11/usr.sbin/bsdinstall/partedit/part_wizard.c Tue Jul 18 18:55:48 2017 (r321168) @@ -27,11 +27,10 @@ */ #include +#include #include -#include #include - -#include +#include #include #include @@ -47,11 +46,12 @@ static char *boot_disk(struct gmesh *mesh); static char *wizard_partition(struct gmesh *mesh, const char *disk); int -part_wizard(const char *fsreq) { - int error; - struct gmesh mesh; +part_wizard(const char *fsreq) +{ char *disk, *schemeroot; const char *fstype; + struct gmesh mesh; + int error; if (fsreq != NULL) fstype = fsreq; @@ -199,9 +199,9 @@ wizard_partition(struct gmesh *mesh, const char *disk) struct gclass *classp; struct ggeom *gpart = NULL; struct gconfig *gc; - char message[512]; - const char *scheme = NULL; char *retval = NULL; + const char *scheme = NULL; + char message[512]; int choice; LIST_FOREACH(classp, &mesh->lg_class, lg_class) @@ -295,15 +295,17 @@ query: } int -wizard_makeparts(struct gmesh *mesh, const char *disk, const char *fstype, int interactive) +wizard_makeparts(struct gmesh *mesh, const char *disk, const char *fstype, + int interactive) { - struct gmesh submesh; struct gclass *classp; struct ggeom *gp; struct gprovider *pp; - intmax_t swapsize, available; - char swapsizestr[10], rootsizestr[10], *fsname; char *fsnames[] = {"freebsd-ufs", "freebsd-zfs"}; + char *fsname; + struct gmesh submesh; + char swapsizestr[10], rootsizestr[10]; + intmax_t swapsize, available; int retval; if (strcmp(fstype, "zfs") == 0) { @@ -362,4 +364,3 @@ wizard_makeparts(struct gmesh *mesh, const char *disk, return (0); } - From owner-svn-src-stable-11@freebsd.org Tue Jul 18 18:56:52 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EE652D9D823; Tue, 18 Jul 2017 18:56:52 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BBF987FEC4; Tue, 18 Jul 2017 18:56:52 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6IIupMp095697; Tue, 18 Jul 2017 18:56:51 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6IIupeN095696; Tue, 18 Jul 2017 18:56:51 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201707181856.v6IIupeN095696@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 18 Jul 2017 18:56:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r321170 - stable/11/usr.sbin/bsdinstall/partedit X-SVN-Group: stable-11 X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: stable/11/usr.sbin/bsdinstall/partedit X-SVN-Commit-Revision: 321170 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Jul 2017 18:56:53 -0000 Author: ngie Date: Tue Jul 18 18:56:51 2017 New Revision: 321170 URL: https://svnweb.freebsd.org/changeset/base/321170 Log: MFC r318722: sade(8): start new sentence on new line Modified: stable/11/usr.sbin/bsdinstall/partedit/sade.8 Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/bsdinstall/partedit/sade.8 ============================================================================== --- stable/11/usr.sbin/bsdinstall/partedit/sade.8 Tue Jul 18 18:56:06 2017 (r321169) +++ stable/11/usr.sbin/bsdinstall/partedit/sade.8 Tue Jul 18 18:56:51 2017 (r321170) @@ -59,7 +59,8 @@ first appeared in .Fx 6.3 as a utility encapsulating features from the .Xr sysinstall 8 -installer. It was replaced in +installer. +It was replaced in .Fx 10.0 with the equivalent part of .Xr bsdinstall 8 . From owner-svn-src-stable-11@freebsd.org Tue Jul 18 20:40:38 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2C693D9FBDC; Tue, 18 Jul 2017 20:40:38 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EDDC382FD3; Tue, 18 Jul 2017 20:40:37 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6IKebIT036482; Tue, 18 Jul 2017 20:40:37 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6IKebAa036481; Tue, 18 Jul 2017 20:40:37 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201707182040.v6IKebAa036481@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Tue, 18 Jul 2017 20:40:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r321174 - stable/11/usr.sbin/nfsuserd X-SVN-Group: stable-11 X-SVN-Commit-Author: rmacklem X-SVN-Commit-Paths: stable/11/usr.sbin/nfsuserd X-SVN-Commit-Revision: 321174 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Jul 2017 20:40:38 -0000 Author: rmacklem Date: Tue Jul 18 20:40:36 2017 New Revision: 321174 URL: https://svnweb.freebsd.org/changeset/base/321174 Log: MFC: r320659 Add a Bugs section that indicates that the nfsuserd doesn't work when jails are being used on the system. It is hoped that the patches in PR#205193 will someday get tested/debugged so that they can be MFC'd to fix this. This is a content change. Modified: stable/11/usr.sbin/nfsuserd/nfsuserd.8 Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/nfsuserd/nfsuserd.8 ============================================================================== --- stable/11/usr.sbin/nfsuserd/nfsuserd.8 Tue Jul 18 20:26:41 2017 (r321173) +++ stable/11/usr.sbin/nfsuserd/nfsuserd.8 Tue Jul 18 20:40:36 2017 (r321174) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 21, 2017 +.Dd July 4, 2017 .Dt NFSUSERD 8 .Os .Sh NAME @@ -126,3 +126,9 @@ those requests fail and the library functions don't re and .Xr passwd 5 for more information on how the databases are accessed. +.Pp +Since the kernel communicates with the +.Nm +daemon via an upcall that uses the IP address 127.0.0.1, it does not work correctly when +.Xr jail 8 +are used and can crash the system. From owner-svn-src-stable-11@freebsd.org Tue Jul 18 23:02:36 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6E950DA1F74; Tue, 18 Jul 2017 23:02:36 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 386F52F80; Tue, 18 Jul 2017 23:02:36 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6IN2ZPQ096683; Tue, 18 Jul 2017 23:02:35 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6IN2Zjr096682; Tue, 18 Jul 2017 23:02:35 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201707182302.v6IN2Zjr096682@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Tue, 18 Jul 2017 23:02:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r321177 - stable/11/lib/libc/net X-SVN-Group: stable-11 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: stable/11/lib/libc/net X-SVN-Commit-Revision: 321177 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Jul 2017 23:02:36 -0000 Author: markj Date: Tue Jul 18 23:02:34 2017 New Revision: 321177 URL: https://svnweb.freebsd.org/changeset/base/321177 Log: MFC r320895: Don't dlclose NSS modules from nss_atexit(). Modified: stable/11/lib/libc/net/nsdispatch.c Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libc/net/nsdispatch.c ============================================================================== --- stable/11/lib/libc/net/nsdispatch.c Tue Jul 18 21:09:29 2017 (r321176) +++ stable/11/lib/libc/net/nsdispatch.c Tue Jul 18 23:02:34 2017 (r321177) @@ -525,8 +525,8 @@ fin: vector_sort(_nsmod, _nsmodsize, sizeof(*_nsmod), string_compare); } +static int exiting = 0; - static void ns_mod_free(ns_mod *mod) { @@ -536,12 +536,10 @@ ns_mod_free(ns_mod *mod) return; if (mod->unregister != NULL) mod->unregister(mod->mtab, mod->mtabsize); - if (mod->handle != nss_builtin_handle) + if (mod->handle != nss_builtin_handle && !exiting) (void)dlclose(mod->handle); } - - /* * Cleanup */ @@ -550,6 +548,7 @@ nss_atexit(void) { int isthreaded; + exiting = 1; isthreaded = __isthreaded; if (isthreaded) (void)_pthread_rwlock_wrlock(&nss_lock); @@ -560,8 +559,6 @@ nss_atexit(void) if (isthreaded) (void)_pthread_rwlock_unlock(&nss_lock); } - - /* * Finally, the actual implementation. From owner-svn-src-stable-11@freebsd.org Wed Jul 19 02:49:09 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3D734DA5EFF; Wed, 19 Jul 2017 02:49:09 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F11BB6792F; Wed, 19 Jul 2017 02:49:08 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6J2n7Vk085628; Wed, 19 Jul 2017 02:49:07 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6J2n7mm085627; Wed, 19 Jul 2017 02:49:07 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201707190249.v6J2n7mm085627@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Wed, 19 Jul 2017 02:49:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r321180 - stable/11/etc/pam.d X-SVN-Group: stable-11 X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: stable/11/etc/pam.d X-SVN-Commit-Revision: 321180 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Jul 2017 02:49:09 -0000 Author: ngie Date: Wed Jul 19 02:49:07 2017 New Revision: 321180 URL: https://svnweb.freebsd.org/changeset/base/321180 Log: MFC r316817: Derive {AT,RCMDS}{DIR,MODE} from FILE{DIR,MODE} This reduces duplicity a bit. Modified: stable/11/etc/pam.d/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/etc/pam.d/Makefile ============================================================================== --- stable/11/etc/pam.d/Makefile Wed Jul 19 01:49:01 2017 (r321179) +++ stable/11/etc/pam.d/Makefile Wed Jul 19 02:49:07 2017 (r321180) @@ -17,24 +17,25 @@ FILES= README \ telnetd \ xdm +FILESDIR= /etc/pam.d +FILESMODE= 644 + .if ${MK_AT} != "no" FILESGROUPS+= AT AT+= atrun ATPACKAGE+= at -ATDIR= /etc/pam.d -ATMODE= 644 +ATDIR= ${FILESDIR} +ATMODE= ${FILESMODE} .endif .if ${MK_RCMDS} != "no" FILESGROUPS+= RCMDS RCMDS+= rsh RCMDSPACKAGE+= rcmds -RCMDSDIR= /etc/pam.d -RCMDSMODE= 644 +RCMDSDIR= ${FILESDIR} +RCMDSMODE= ${FILESMODE} .endif -FILESDIR= /etc/pam.d -FILESMODE= 644 FILESMODE_README= 444 LINKS= ${FILESDIR}/ftpd ${FILESDIR}/ftp From owner-svn-src-stable-11@freebsd.org Wed Jul 19 02:50:09 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4F932DA5F92; Wed, 19 Jul 2017 02:50:09 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2BD7367A6E; Wed, 19 Jul 2017 02:50:09 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6J2o82C085816; Wed, 19 Jul 2017 02:50:08 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6J2o8Pw085815; Wed, 19 Jul 2017 02:50:08 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201707190250.v6J2o8Pw085815@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Wed, 19 Jul 2017 02:50:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r321182 - stable/11/usr.sbin/bsdinstall X-SVN-Group: stable-11 X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: stable/11/usr.sbin/bsdinstall X-SVN-Commit-Revision: 321182 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Jul 2017 02:50:09 -0000 Author: ngie Date: Wed Jul 19 02:50:08 2017 New Revision: 321182 URL: https://svnweb.freebsd.org/changeset/base/321182 Log: MFC r318723: bsdinstall(8): fix manpage issues - Start new sentences on new lines. - Separate e.g. (more of an igor thing) with commas, and rewrite some examples not to be enclosed in parentheses. Modified: stable/11/usr.sbin/bsdinstall/bsdinstall.8 Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/bsdinstall/bsdinstall.8 ============================================================================== --- stable/11/usr.sbin/bsdinstall/bsdinstall.8 Wed Jul 19 02:50:06 2017 (r321181) +++ stable/11/usr.sbin/bsdinstall/bsdinstall.8 Wed Jul 19 02:50:08 2017 (r321182) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 31, 2014 +.Dd May 23, 2017 .Dt BSDINSTALL 8 .Os .Sh NAME @@ -39,17 +39,18 @@ .Sh DESCRIPTION .Nm is used for installation of new systems, both for system setup from -installation media (e.g. CD-ROMs) and for use on live systems to prepare +installation media, e.g., CD-ROMs, and for use on live systems to prepare VM images and jails. .Pp Much like .Xr make 1 , Nm -takes a target and possible parameters of the target as arguments. If -invoked with no arguments, it will invoke the +takes a target and possible parameters of the target as arguments. +If invoked with no arguments, it will invoke the .Cm auto target, which provides a standard interactive installation, invoking the -others in sequence. To perform a scripted installation, these subtargets -can be invoked separately by an installation script. +others in sequence. +To perform a scripted installation, +these subtargets can be invoked separately by an installation script. .Sh OPTIONS .Nm supports the following options, global to all targets: @@ -115,7 +116,8 @@ If is set, also configures the network interfaces of the current system to match. .It Cm autopart Provides the installer's interactive guided disk partitioner for single-disk -installations. Defaults to UFS. +installations. +Defaults to UFS. .It Cm zfsboot Provides an alternative ZFS-only automatic interactive disk partitioner. Creates a single @@ -135,8 +137,8 @@ to encrypt the disk. Provides the installer's interactive manual disk partitioner with an interface identical to .Xr sade 8 . -Supports multiple disks as well as UFS, ZFS, and FAT file systems. ZFS -is set up with one pool and dataset per partition. +Supports multiple disks as well as UFS, ZFS, and FAT file systems. +ZFS is set up with one pool and dataset per partition. .It Cm scriptedpart Ar parameters Sets up disks like .Cm autopart @@ -150,14 +152,16 @@ Each disk setup is specified by a three-part argument: .Op Ar scheme .Op Ar {partitions} .Pp -Multiple disk setups are separated by semicolons. The +Multiple disk setups are separated by semicolons. +The .Ar disk argument specifies the disk on which to operate (which will be erased), while the .Ar scheme argument specifies the .Xr gpart 8 -partition scheme to apply to the disk. If +partition scheme to apply to the disk. +If .Ar scheme is unspecified, .Cm scriptedpart @@ -167,7 +171,8 @@ The argument is also optional and specifies how to partition .Ar disk . It consists of a comma-separated list of partitions to create enclosed in -curly braces. Each partition declaration takes the form +curly braces. +Each partition declaration takes the form .Pp .Ar size .Ar type @@ -178,15 +183,17 @@ specifies the partition size to create in bytes (K, M, can be appended to specify kilobytes, megabytes, and gigabytes respectively), while the .Em auto -keyword causes the partition to take all the remaining space on the disk. The +keyword causes the partition to take all the remaining space on the disk. +The .Ar type option chooses the .Xr gpart 8 -filesystem type (e.g. freebsd-ufs, freebsd-zfs, or freebsd-swap). +filesystem type, e.g., freebsd-ufs, freebsd-zfs, or freebsd-swap. The optional .Ar mount point argument sets where the created partition is to be mounted in the installed -system. As an example, a typical invocation looks like: +system. +As an example, a typical invocation looks like: .Pp bsdinstall scriptedpart ada0 { 20G freebsd-ufs /, 4G freebsd-swap, 20G freebsd-ufs /var, auto freebsd-ufs /usr } .Pp @@ -238,37 +245,43 @@ Reads a small amount of data from .Pa /dev/random and stores it in a file in the new system's root directory. .It Cm config -Installs the configuration files destined for the new system (e.g. rc.conf +Installs the configuration files destined for the new system, e.g., +.Xr rc.conf 5 fragments generated by .Cm netconfig , etc.) onto the new system. .El .Sh ENVIRONMENT VARIABLES The following environment variables control various aspects of the installation -process. Many are used internally during installation and have reasonable -default values for most installation scenarios. Others are set by various -interactive user prompts, and can be usefully overridden when making scripted -or customized installers. +process. +Many are used internally during installation and have reasonable default values +for most installation scenarios. +Others are set by various interactive user prompts, and can be usefully +overridden when making scripted or customized installers. .Bl -tag -width ".Ev BSDINSTALL_DISTSITE" .It Ev DISTRIBUTIONS -The set of distributions to install (e.g. "base kernel ports"). Default: none +The set of distributions to install, e.g., "base kernel ports". +Default: none .It Ev BSDINSTALL_DISTDIR The directory in which the distribution files can be found (or to which they -should be downloaded). Default: +should be downloaded). +Default: .Pa /usr/freebsd-dist .It Ev BSDINSTALL_DISTSITE URL from which the distribution files should be downloaded if they are not already present in the directory defined by .Ev BSDINSTALL_DISTDIR . This should be a full path to the files, including architecture and release -names. Most targets (e.g. +names. +Most targets, e.g., .Cm auto and -.Cm jail ) +.Cm jail , that prompt for a .Fx mirror will skip that step if this variable is already defined in the -environment. Example: +environment. +Example: .Pa ftp://ftp.freebsd.org/pub/FreeBSD/releases/powerpc/powerpc64/9.1-RELEASE .It Ev BSDINSTALL_CHROOT The directory into which the distribution files should be unpacked and the @@ -276,23 +289,26 @@ directory at which the root file system of the new sys Default: .Pa /mnt .It Ev BSDINSTALL_LOG -Path to a log file for the installation. Default: +Path to a log file for the installation. +Default: .Pa /tmp/bsdinstall_log .It Ev BSDINSTALL_TMPETC Directory where files destined for the new system's .Pa /etc will be stored until the .Cm config -target is executed. If this directory does not already exist, it will be -created. Default: +target is executed. +If this directory does not already exist, it will be created. +Default: .Pa /tmp/bsdinstall_etc .It Ev BSDINSTALL_TMPBOOT Directory where files destined for the new system's .Pa /boot will be stored until the .Cm config -target is executed. If this directory does not already exist, it will be -created. Default: +target is executed. +If this directory does not already exist, it will be created. +Default: .Pa /tmp/bsdinstall_boot .El .Sh SCRIPTING @@ -307,8 +323,9 @@ a shell script run under .Xr chroot 8 in the newly installed system before .Nm -exits. The two parts are separated by the usual script header (#!), which -also sets the interpreter for the setup script. +exits. +The two parts are separated by the usual script header (#!), which also sets +the interpreter for the setup script. .Pp A typical bsdinstall script looks like this: .Bd -literal -offset indent @@ -326,19 +343,21 @@ On release media, such a script placed at .Pa /etc/installerconfig will be run at boot time and the system will be rebooted automatically after -the installation has completed. This can be used for unattended network -installation of new systems; see +the installation has completed. +This can be used for unattended network installation of new systems; see .Xr diskless 8 for details. .Ss PREAMBLE -The preamble consists of installer settings. These control global installation -parameters (see +The preamble consists of installer settings. +These control global installation parameters (see .Sx ENVIRONMENT VARIABLES ) -as well as disk partitioning. The preamble is interpreted as a +as well as disk partitioning. +The preamble is interpreted as a .Xr sh 1 -script run at the very beginning of the install. If more complicated behavior -than setting these variables is desired, arbitrary commands can be run here -to extend the installer. In addition to the variables in +script run at the very beginning of the install. +If more complicated behavior than setting these variables is desired, +arbitrary commands can be run here to extend the installer. +In addition to the variables in .Sx ENVIRONMENT VARIABLES , in particular .Ev DISTRIBUTIONS , @@ -358,13 +377,14 @@ instead of .Ev PARTITIONS . .Ss SETUP SCRIPT Following the preamble is an optional shell script, beginning with a #! -declaration. This script will be run at the end of the installation process -inside a +declaration. +This script will be run at the end of the installation process inside a .Xr chroot 8 environment in the newly installed system and can be used to set up -configuration files, install packages, etc. Note that newly configured -system services (e.g. networking) have not been started in the installed -system at this time and only installation host services are available. +configuration files, install packages, etc. +Note that newly configured system services, e.g., networking have not +been started in the installed system at this time and only installation +host services are available. .Sh HISTORY This version of .Nm From owner-svn-src-stable-11@freebsd.org Wed Jul 19 03:19:45 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B1F37DA779B; Wed, 19 Jul 2017 03:19:45 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7B6C868E8D; Wed, 19 Jul 2017 03:19:45 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6J3JiAh098728; Wed, 19 Jul 2017 03:19:44 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6J3JiFF098727; Wed, 19 Jul 2017 03:19:44 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201707190319.v6J3JiFF098727@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 19 Jul 2017 03:19:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r321183 - stable/11/sys/conf X-SVN-Group: stable-11 X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: stable/11/sys/conf X-SVN-Commit-Revision: 321183 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Jul 2017 03:19:45 -0000 Author: emaste Date: Wed Jul 19 03:19:44 2017 New Revision: 321183 URL: https://svnweb.freebsd.org/changeset/base/321183 Log: MFC r320235: retire arm64 kernel module linker workaround Relocatable linking in aarch64 ld from binutils 2.25.1 does not work. The linker corrupts the references to the external symbols which are defined by other object in the linking set and should therefore lose the GOT entry. The problem is fixed in later versions of GNU ld and does not exist in the in-tree lld linker that we now use by default for arm64, so the workaround can be removed. Sponsored by: The FreeBSD Foundation Modified: stable/11/sys/conf/kmod.mk Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/conf/kmod.mk ============================================================================== --- stable/11/sys/conf/kmod.mk Wed Jul 19 02:50:08 2017 (r321182) +++ stable/11/sys/conf/kmod.mk Wed Jul 19 03:19:44 2017 (r321183) @@ -209,17 +209,7 @@ ${PROG}.debug: ${FULLPROG} .if ${__KLD_SHARED} == yes ${FULLPROG}: ${KMOD}.kld -.if ${MACHINE_CPUARCH} != "aarch64" ${LD} -Bshareable ${_LDFLAGS} -o ${.TARGET} ${KMOD}.kld -.else -#XXXKIB Relocatable linking in aarch64 ld from binutils 2.25.1 does -# not work. The linker corrupts the references to the external -# symbols which are defined by other object in the linking set -# and should therefore loose the GOT entry. The problem seems -# to be fixed in the binutils-gdb git HEAD as of 2015-10-04. Hack -# below allows to get partially functioning modules for now. - ${LD} -Bshareable ${_LDFLAGS} -o ${.TARGET} ${OBJS} -.endif .if !defined(DEBUG_FLAGS) ${OBJCOPY} --strip-debug ${.TARGET} .endif From owner-svn-src-stable-11@freebsd.org Wed Jul 19 13:28:26 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BB6EDC7D4E0; Wed, 19 Jul 2017 13:28:26 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8A9D47F2E3; Wed, 19 Jul 2017 13:28:26 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6JDSPO3044981; Wed, 19 Jul 2017 13:28:25 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6JDSPil044980; Wed, 19 Jul 2017 13:28:25 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201707191328.v6JDSPil044980@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 19 Jul 2017 13:28:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r321199 - stable/11/sys/dev/vt X-SVN-Group: stable-11 X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: stable/11/sys/dev/vt X-SVN-Commit-Revision: 321199 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Jul 2017 13:28:26 -0000 Author: emaste Date: Wed Jul 19 13:28:25 2017 New Revision: 321199 URL: https://svnweb.freebsd.org/changeset/base/321199 Log: MFC r313547, r313777: fix mouse selection when vt(4) scrolls r313547 (ray, submitted by hselasky): o Reset mouse selection when new lines reach selection lines. o Fix how selection handled on display. r313777 (rpokala): Un-break vt(4) for {powerpc,powerpc64,sparc64} LINT kernel builds The {powerpc,powerpc64,sparc64} LINT kernel builds fail with this error: sys/dev/vt/vt_buf.c:198: warning: 'vtbuf_htw' defined but not used Move vtbuf_htw() inside the '#if SC_NO_CUTPASTE' block where it belongs, and put it in the proper order. This fixes the immedate issue w/ vt(4), but all three then fail on different issues. PR: 211922 Relnotes: Yes Modified: stable/11/sys/dev/vt/vt_buf.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/vt/vt_buf.c ============================================================================== --- stable/11/sys/dev/vt/vt_buf.c Wed Jul 19 13:11:35 2017 (r321198) +++ stable/11/sys/dev/vt/vt_buf.c Wed Jul 19 13:28:25 2017 (r321199) @@ -54,6 +54,11 @@ static MALLOC_DEFINE(M_VTBUF, "vtbuf", "vt buffer"); (d).tp_row = (s).tp_row; \ } while (0) +#ifndef SC_NO_CUTPASTE +static int vtbuf_htw(const struct vt_buf *vb, int row); +static int vtbuf_wth(const struct vt_buf *vb, int row); +static int vtbuf_in_this_range(int begin, int test, int end, int sz); +#endif /* * line4 @@ -122,6 +127,9 @@ vthistory_seek(struct vt_buf *vb, int offset, int when void vthistory_addlines(struct vt_buf *vb, int offset) { +#ifndef SC_NO_CUTPASTE + int cur, sz; +#endif vb->vb_curroffset += offset; if (vb->vb_curroffset < 0) @@ -132,6 +140,17 @@ vthistory_addlines(struct vt_buf *vb, int offset) if ((vb->vb_flags & VBF_SCROLL) == 0) { vb->vb_roffset = vb->vb_curroffset; } + +#ifndef SC_NO_CUTPASTE + sz = vb->vb_history_size; + cur = vb->vb_roffset + vb->vb_scr_size.tp_row + sz - 1; + if (vtbuf_in_this_range(cur, vb->vb_mark_start.tp_row, cur + offset, sz) || + vtbuf_in_this_range(cur, vb->vb_mark_end.tp_row, cur + offset, sz)) { + /* clear screen selection */ + vb->vb_mark_start.tp_row = vb->vb_mark_end.tp_row; + vb->vb_mark_start.tp_col = vb->vb_mark_end.tp_col; + } +#endif } void @@ -142,15 +161,6 @@ vthistory_getpos(const struct vt_buf *vb, unsigned int } #ifndef SC_NO_CUTPASTE /* Only mouse support use it now. */ -/* Translate current view row number to history row. */ -static int -vtbuf_wth(struct vt_buf *vb, int row) -{ - - return ((vb->vb_roffset + row) % vb->vb_history_size); -} -#endif - /* Translate history row to current view row number. */ static int vtbuf_htw(const struct vt_buf *vb, int row) @@ -166,36 +176,78 @@ vtbuf_htw(const struct vt_buf *vb, int row) vb->vb_history_size); } +/* Translate current view row number to history row. */ +static int +vtbuf_wth(const struct vt_buf *vb, int row) +{ + + return ((vb->vb_roffset + row) % vb->vb_history_size); +} + +/* + * Test if an index in a circular buffer is within a range. + * + * begin - start index + * end - end index + * test - test index + * sz - size of circular buffer when it turns over + */ +static int +vtbuf_in_this_range(int begin, int test, int end, int sz) +{ + + begin %= sz; + end %= sz; + + /* check for inversion */ + if (begin > end) + return (test >= begin || test < end); + else + return (test >= begin && test < end); +} +#endif + int vtbuf_iscursor(const struct vt_buf *vb, int row, int col) { - int sc, sr, ec, er, tmp; +#ifndef SC_NO_CUTPASTE + int sc, sr, sz, ec, er, tmp; +#endif if ((vb->vb_flags & (VBF_CURSOR|VBF_SCROLL)) == VBF_CURSOR && (vb->vb_cursor.tp_row == row) && (vb->vb_cursor.tp_col == col)) return (1); +#ifndef SC_NO_CUTPASTE /* Mark cut/paste region. */ + if (vb->vb_mark_start.tp_col == vb->vb_mark_end.tp_col && + vb->vb_mark_start.tp_row == vb->vb_mark_end.tp_row) + return (0); - /* - * Luckily screen view is not like circular buffer, so we will - * calculate in screen coordinates. Translate first. - */ sc = vb->vb_mark_start.tp_col; - sr = vtbuf_htw(vb, vb->vb_mark_start.tp_row); + sr = vb->vb_mark_start.tp_row; ec = vb->vb_mark_end.tp_col; - er = vtbuf_htw(vb, vb->vb_mark_end.tp_row); + er = vb->vb_mark_end.tp_row; + /* + * Information about if the selection was made bottom-top or + * top-bottom is lost due to modulo arithmetics and needs to + * be recovered: + */ + sz = vb->vb_history_size; + tmp = (sz + er - sr) % sz; + row = vtbuf_wth(vb, row); - /* Swap start and end if start > end. */ - if (POS_INDEX(sc, sr) > POS_INDEX(ec, er)) { + /* Swap start and end if start > end */ + if ((2 * tmp) > sz || (tmp == 0 && sc > ec)) { tmp = sc; sc = ec; ec = tmp; tmp = sr; sr = er; er = tmp; } - if ((POS_INDEX(sc, sr) <= POS_INDEX(col, row)) && - (POS_INDEX(col, row) < POS_INDEX(ec, er))) + if (vtbuf_in_this_range(POS_INDEX(sc, sr), POS_INDEX(col, row), + POS_INDEX(ec, er), POS_INDEX(0, sz))) return (1); +#endif return (0); } @@ -627,8 +679,8 @@ vtbuf_flush_mark(struct vt_buf *vb) int s, e; /* Notify renderer to update marked region. */ - if (vb->vb_mark_start.tp_col || vb->vb_mark_end.tp_col || - vb->vb_mark_start.tp_row || vb->vb_mark_end.tp_row) { + if ((vb->vb_mark_start.tp_col != vb->vb_mark_end.tp_col) || + (vb->vb_mark_start.tp_row != vb->vb_mark_end.tp_row)) { s = vtbuf_htw(vb, vb->vb_mark_start.tp_row); e = vtbuf_htw(vb, vb->vb_mark_end.tp_row); From owner-svn-src-stable-11@freebsd.org Wed Jul 19 15:58:29 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 210A1CFC650; Wed, 19 Jul 2017 15:58:29 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E436884EB4; Wed, 19 Jul 2017 15:58:28 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6JFwSxg006884; Wed, 19 Jul 2017 15:58:28 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6JFwRJB006882; Wed, 19 Jul 2017 15:58:27 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201707191558.v6JFwRJB006882@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Wed, 19 Jul 2017 15:58:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r321208 - stable/11/usr.bin/sed/tests X-SVN-Group: stable-11 X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: stable/11/usr.bin/sed/tests X-SVN-Commit-Revision: 321208 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Jul 2017 15:58:29 -0000 Author: ngie Date: Wed Jul 19 15:58:27 2017 New Revision: 321208 URL: https://svnweb.freebsd.org/changeset/base/321208 Log: MFC r312521,r313397: r312521: Add testcases for -i with hardlinks and symlinks The symlink testcase is expected to fail, post-r312519 (the revert of r312404); mark it so. r313397: Don't expect :inplace_symlink_src to fail anymore (post-r313277) The S_ISREG check was restored, such that the code will again fail with in-place replacements on symlinks Added: stable/11/usr.bin/sed/tests/sed2_test.sh - copied, changed from r312521, head/usr.bin/sed/tests/sed2_test.sh Modified: stable/11/usr.bin/sed/tests/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.bin/sed/tests/Makefile ============================================================================== --- stable/11/usr.bin/sed/tests/Makefile Wed Jul 19 15:39:01 2017 (r321207) +++ stable/11/usr.bin/sed/tests/Makefile Wed Jul 19 15:58:27 2017 (r321208) @@ -2,6 +2,7 @@ PACKAGE= tests +ATF_TESTS_SH+= sed2_test NETBSD_ATF_TESTS_SH+= sed_test TAP_TESTS_SH= legacy_test TAP_TESTS_SH+= multi_test Copied and modified: stable/11/usr.bin/sed/tests/sed2_test.sh (from r312521, head/usr.bin/sed/tests/sed2_test.sh) ============================================================================== --- head/usr.bin/sed/tests/sed2_test.sh Fri Jan 20 07:11:21 2017 (r312521, copy source) +++ stable/11/usr.bin/sed/tests/sed2_test.sh Wed Jul 19 15:58:27 2017 (r321208) @@ -47,8 +47,6 @@ inplace_symlink_src_head() } inplace_symlink_src_body() { - atf_expect_fail "Check for S_IFREG reverted in r312404" - echo foo > a atf_check ln -s a b atf_check -e not-empty -s not-exit:0 sed -i '' -e 's,foo,bar,g' b From owner-svn-src-stable-11@freebsd.org Wed Jul 19 16:39:01 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8802ACFD0C8; Wed, 19 Jul 2017 16:39:01 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5FFA21EC4; Wed, 19 Jul 2017 16:39:01 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6JGd03h023840; Wed, 19 Jul 2017 16:39:00 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6JGd00O023839; Wed, 19 Jul 2017 16:39:00 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201707191639.v6JGd00O023839@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Wed, 19 Jul 2017 16:39:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r321213 - stable/11/sbin/savecore X-SVN-Group: stable-11 X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: stable/11/sbin/savecore X-SVN-Commit-Revision: 321213 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Jul 2017 16:39:01 -0000 Author: ngie Date: Wed Jul 19 16:39:00 2017 New Revision: 321213 URL: https://svnweb.freebsd.org/changeset/base/321213 Log: Relnotes: yes (subtle output/behavior change) MFC r316938,r316953: r316938: savecore: fix space calculation with respect to `minfree` in check_space(..) - Use strtoll(3) instead of atoi(3), because atoi(3) limits the representable data to INT_MAX. Check the values received from strtoll(3), trimming trailing whitespace off the end to maintain POLA. - Use `KiB` instead of `kB` when describing free space, total space, etc. I am now fully aware of `KiB` being the IEC standard for 1024 bytes and `kB` being the IEC standard for 1000 bytes. - Store available number of KiB in `available` so it can be more easily queried and compared to ensure that there are enough KiB to store the dump image on disk. - Print out the reserved space on disk, per `minfree`, so end-users can troubleshoot why check_space(..) is reporting that there isn't enough free space. Tested with: positive/negative cases (see review); make tinderbox r316953: Switch back to non-IEC units for 1024 bytes I was swayed a little too quickly when I saw the wiki page discussing kB vs KiB. Switch back as none of the code in base openly uses IEC units via humanize_number(3) (which was my next step), and there's a large degree of dislike with IEC vs more SI-like units. Modified: stable/11/sbin/savecore/savecore.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sbin/savecore/savecore.c ============================================================================== --- stable/11/sbin/savecore/savecore.c Wed Jul 19 16:38:55 2017 (r321212) +++ stable/11/sbin/savecore/savecore.c Wed Jul 19 16:39:00 2017 (r321213) @@ -68,6 +68,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -252,7 +253,7 @@ static int check_space(const char *savedir, off_t dumpsize, int bounds) { FILE *fp; - off_t minfree, spacefree, totfree, needed; + off_t available, minfree, spacefree, totfree, needed; struct statfs fsbuf; char buf[100]; @@ -268,19 +269,37 @@ check_space(const char *savedir, off_t dumpsize, int b else { if (fgets(buf, sizeof(buf), fp) == NULL) minfree = 0; - else - minfree = atoi(buf); + else { + char *endp; + + errno = 0; + minfree = strtoll(buf, &endp, 10); + if (minfree == 0 && errno != 0) + minfree = -1; + else { + while (*endp != '\0' && isspace(*endp)) + endp++; + if (*endp != '\0' || minfree < 0) + minfree = -1; + } + if (minfree < 0) + syslog(LOG_WARNING, + "`minfree` didn't contain a valid size " + "(`%s`). Defaulting to 0", buf); + } (void)fclose(fp); } + available = minfree > 0 ? spacefree - minfree : totfree; needed = dumpsize / 1024 + 2; /* 2 for info file */ needed -= saved_dump_size(bounds); - if ((minfree > 0 ? spacefree : totfree) - needed < minfree) { + if (available < needed) { syslog(LOG_WARNING, - "no dump: not enough free space on device (%lldkB " - "available; need at least %lldkB)", - (long long)(minfree > 0 ? spacefree : totfree), - (long long)needed); + "no dump: not enough free space on device (need at least " + "%jdkB for dump; %jdkB available; %jdkB reserved)", + (intmax_t)needed, + (intmax_t)available + minfree, + (intmax_t)minfree); return (0); } if (spacefree - needed < 0) From owner-svn-src-stable-11@freebsd.org Wed Jul 19 16:54:24 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5A225CFD486; Wed, 19 Jul 2017 16:54:24 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E00872915; Wed, 19 Jul 2017 16:54:23 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6JGsN2b031558; Wed, 19 Jul 2017 16:54:23 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6JGsNm1031557; Wed, 19 Jul 2017 16:54:23 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201707191654.v6JGsNm1031557@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Wed, 19 Jul 2017 16:54:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r321215 - stable/11 X-SVN-Group: stable-11 X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: stable/11 X-SVN-Commit-Revision: 321215 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Jul 2017 16:54:24 -0000 Author: ngie Date: Wed Jul 19 16:54:22 2017 New Revision: 321215 URL: https://svnweb.freebsd.org/changeset/base/321215 Log: Record merges for r319659 and r319660. Modified: Directory Properties: stable/11/ (props changed) From owner-svn-src-stable-11@freebsd.org Wed Jul 19 18:19:04 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A5D12CFED42; Wed, 19 Jul 2017 18:19:04 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6DC9B64D80; Wed, 19 Jul 2017 18:19:04 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6JIJ3FB066260; Wed, 19 Jul 2017 18:19:03 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6JIJ3aj066259; Wed, 19 Jul 2017 18:19:03 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201707191819.v6JIJ3aj066259@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Wed, 19 Jul 2017 18:19:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r321219 - stable/11/lib/libpmc X-SVN-Group: stable-11 X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: stable/11/lib/libpmc X-SVN-Commit-Revision: 321219 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Jul 2017 18:19:04 -0000 Author: ngie Date: Wed Jul 19 18:19:03 2017 New Revision: 321219 URL: https://svnweb.freebsd.org/changeset/base/321219 Log: MFC r316602: pmc_read(3): fix manlint error Remove spurious trailing comma from last .Nm entry in NAME section. Modified: stable/11/lib/libpmc/pmc_read.3 Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libpmc/pmc_read.3 ============================================================================== --- stable/11/lib/libpmc/pmc_read.3 Wed Jul 19 18:17:41 2017 (r321218) +++ stable/11/lib/libpmc/pmc_read.3 Wed Jul 19 18:19:03 2017 (r321219) @@ -29,7 +29,7 @@ .Sh NAME .Nm pmc_read , .Nm pmc_rw , -.Nm pmc_write , +.Nm pmc_write .Nd read and write hardware performance counters .Sh LIBRARY .Lb libpmc From owner-svn-src-stable-11@freebsd.org Wed Jul 19 18:19:52 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 65CBBCFEE09; Wed, 19 Jul 2017 18:19:52 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3370964FDA; Wed, 19 Jul 2017 18:19:52 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6JIJpt5066406; Wed, 19 Jul 2017 18:19:51 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6JIJpw2066405; Wed, 19 Jul 2017 18:19:51 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201707191819.v6JIJpw2066405@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Wed, 19 Jul 2017 18:19:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r321221 - stable/11/lib/libpmc X-SVN-Group: stable-11 X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: stable/11/lib/libpmc X-SVN-Commit-Revision: 321221 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Jul 2017 18:19:52 -0000 Author: ngie Date: Wed Jul 19 18:19:51 2017 New Revision: 321221 URL: https://svnweb.freebsd.org/changeset/base/321221 Log: MFC r316600: pmc(3): add additional references for libpmc functions in the SEE ALSO section These functions are already referenced throughout the manpage -- this makes their presence more apparent. Modified: stable/11/lib/libpmc/pmc.3 Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libpmc/pmc.3 ============================================================================== --- stable/11/lib/libpmc/pmc.3 Wed Jul 19 18:19:11 2017 (r321220) +++ stable/11/lib/libpmc/pmc.3 Wed Jul 19 18:19:51 2017 (r321221) @@ -23,7 +23,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 28, 2014 +.Dd April 6, 2017 .Dt PMC 3 .Os .Sh NAME @@ -546,6 +546,19 @@ API is .Xr pmc.westmere 3 , .Xr pmc.westmereuc 3 , .Xr pmc.xscale 3 , +.Xr pmc_allocate 3 , +.Xr pmc_attach 3 , +.Xr pmc_capabilities 3 , +.Xr pmc_configure_logfile 3 , +.Xr pmc_disable 3 , +.Xr pmc_event_names_of_class 3 , +.Xr pmc_get_driver_stats 3 , +.Xr pmc_get_msr 3 , +.Xr pmc_init 3 , +.Xr pmc_name_of_capability 3 , +.Xr pmc_read 3 , +.Xr pmc_set 3 , +.Xr pmc_start 3 , .Xr pmclog 3 , .Xr hwpmc 4 , .Xr pmccontrol 8 , From owner-svn-src-stable-11@freebsd.org Wed Jul 19 18:23:27 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6748CCFF174; Wed, 19 Jul 2017 18:23:27 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 444F0657A9; Wed, 19 Jul 2017 18:23:27 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6JINQ0Y070440; Wed, 19 Jul 2017 18:23:26 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6JINQkp070439; Wed, 19 Jul 2017 18:23:26 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201707191823.v6JINQkp070439@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Wed, 19 Jul 2017 18:23:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r321224 - stable/11/lib/libpmc X-SVN-Group: stable-11 X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: stable/11/lib/libpmc X-SVN-Commit-Revision: 321224 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Jul 2017 18:23:27 -0000 Author: ngie Date: Wed Jul 19 18:23:26 2017 New Revision: 321224 URL: https://svnweb.freebsd.org/changeset/base/321224 Log: MFC r316601: pmc.atomsilvermont(3): fix manlint warnings Start new sentences on new lines. Sentences affected by the change are wrapped at <80 columns. Other potentially offending lines have been left alone to reduce churn. Modified: stable/11/lib/libpmc/pmc.atomsilvermont.3 Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libpmc/pmc.atomsilvermont.3 ============================================================================== --- stable/11/lib/libpmc/pmc.atomsilvermont.3 Wed Jul 19 18:22:55 2017 (r321223) +++ stable/11/lib/libpmc/pmc.atomsilvermont.3 Wed Jul 19 18:23:26 2017 (r321224) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 20, 2014 +.Dd April 6, 2017 .Dt PMC.ATOMSILVERMONT 3 .Os .Sh NAME @@ -262,7 +262,8 @@ The number of store uops reissued from Rehabq. .It Li MEM_UOPS_RETIRED.L1_MISS_LOADS .Pq Event 04H , Umask 01H The number of load ops retired that miss in L1 -Data cache. Note that prefetch misses will not be counted. +Data cache. +Note that prefetch misses will not be counted. .It Li MEM_UOPS_RETIRED.L2_HIT_LOADS .Pq Event 04H , Umask 02H The number of load micro-ops retired that hit L2. @@ -287,26 +288,27 @@ The number of load ops retired. The number of store ops retired. .It Li PAGE_WALKS.D_SIDE_CYCLES .Pq Event 05H , Umask 01H -Every cycle when a D-side (walks due to a load) page walk -is in progress. Page walk duration divided by -number of page walks is the average duration of page-walks. -Edge trigger bit must be cleared. Set Edge to count the number -of page walks. +Every cycle when a D-side (walks due to a load) page walk is in progress. +Page walk duration divided by number of page walks is the average duration of +page-walks. +Edge trigger bit must be cleared. +Set Edge to count the number of page walks. .It Li PAGE_WALKS.I_SIDE_CYCLES .Pq Event 05H , Umask 02H -Every cycle when a I-side (walks due to an instruction fetch) -page walk is in progress. Page walk duration divided by number -of page walks is the average duration of page-walks. +Every cycle when a I-side (walks due to an instruction fetch) page walk is in +progress. +Page walk duration divided by number of page walks is the average duration of +page-walks. .It Li PAGE_WALKS.WALKS .Pq Event 05H , Umask 03H -The number of times a data (D) page walk or an instruction (I) -page walk is completed or started. Since a page walk implies a -TLB miss, the number of TLB misses can be counted by counting -the number of pagewalks. +The number of times a data (D) page walk or an instruction (I) page walk is +completed or started. +Since a page walk implies a TLB miss, the number of TLB misses can be counted +by counting the number of pagewalks. .It Li LONGEST_LAT_CACHE.MISS .Pq Event 2EH , Umask 41H -the total number of L2 cache references and -The number of L2 cache misses respectively. +the total number of L2 cache references and the number of L2 cache misses +respectively. L3 is not supported in Silvermont microarchitecture. .It Li LONGEST_LAT_CACHE.REFERENCE .Pq Event 2EH , Umask 4FH @@ -323,39 +325,39 @@ requests), BBS (L2 misses) and WOB (L2 write-back vict .It Li CORE_REJECT_L2Q.ALL .Pq Event 31H , Umask 00H The number of demand and L1 prefetcher -requests rejected by the L2Q due to a full or nearly full -condition which likely indicates back pressure from L2Q. -It also counts requests that would have gone directly to -the XQ, but are rejected due to a full or nearly full condition, -indicating back pressure from the IDI link. The L2Q may also -reject transactions from a core to insure fairness between -cores, or to delay a core's dirty eviction when the address -conflicts incoming external snoops. (Note that L2 prefetcher -requests that are dropped are not counted by this event.). +requests rejected by the L2Q due to a full or nearly full condition which +likely indicates back pressure from L2Q. +It also counts requests that would have gone directly to the XQ, but are +rejected due to a full or nearly full condition, indicating back pressure from +the IDI link. +The L2Q may also reject transactions from a core to insure fairness between +cores, or to delay a core's dirty eviction when the address conflicts incoming +external snoops. +(Note that L2 prefetcher requests that are dropped are not counted by this +event). .It Li CPU_CLK_UNHALTED.CORE_P .Pq Event 3CH , Umask 00H -The number of core cycles while the core is not in a halt -state. The core enters the halt state when it is running -the HLT instruction. In mobile systems the core frequency -may change from time to time. For this reason this event -may have a changing ratio with regards to time. +The number of core cycles while the core is not in a halt state. +The core enters the halt state when it is running the HLT instruction. +In mobile systems the core frequency may change from time to time. +For this reason this event may have a changing ratio with regards to time. .It Li CPU_CLK_UNHALTED.REF_P .Pq Event 3CH , Umask 01H -The number of reference cycles that the core is not in a halt -state. The core enters the halt state when it is running -the HLT instruction. +The number of reference cycles that the core is not in a halt state. +The core enters the halt state when it is running the HLT instruction. In mobile systems the core frequency may change from time. -This event is not affected by core frequency changes but counts -as if the core is running at the maximum frequency all the time. +This event is not affected by core frequency changes but counts as if the core +is running at the maximum frequency all the time. .It Li ICACHE.HIT .Pq Event 80H , Umask 01H The number of instruction fetches from the instruction cache. .It Li ICACHE.MISSES .Pq Event 80H , Umask 02H -The number of instruction fetches that miss the -Instruction cache or produce memory requests. This includes -uncacheable fetches. An instruction fetch miss is counted only -once and not once for every cycle it is outstanding. +The number of instruction fetches that miss the Instruction cache or produce +memory requests. +This includes uncacheable fetches. +An instruction fetch miss is counted only once and not once for every cycle +it is outstanding. .It Li ICACHE.ACCESSES .Pq Event 80H , Umask 03H The number of instruction fetches, including uncacheable fetches. @@ -372,10 +374,10 @@ Requires MSR_OFFCORE_RESP0 to specify request type and Requires MSR_OFFCORE_RESP to specify request type and response. .It Li INST_RETIRED.ANY_P .Pq Event C0H , Umask 00H -The number of instructions that retire execution. For instructions -that consist of multiple micro-ops, this event counts the -retirement of the last micro-op of the instruction. The counter -continues counting during hardware interrupts, traps, and inside +The number of instructions that retire execution. +For instructions that consist of multiple micro-ops, this event counts the +retirement of the last micro-op of the instruction. +The counter continues counting during hardware interrupts, traps, and inside interrupt handlers. .It Li UOPS_RETIRED.MS .Pq Event C2H , Umask 01H From owner-svn-src-stable-11@freebsd.org Wed Jul 19 18:59:27 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D59E3CFFD36; Wed, 19 Jul 2017 18:59:27 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AFD16670C6; Wed, 19 Jul 2017 18:59:27 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6JIxQV3083258; Wed, 19 Jul 2017 18:59:26 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6JIxQYp083252; Wed, 19 Jul 2017 18:59:26 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201707191859.v6JIxQYp083252@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Wed, 19 Jul 2017 18:59:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r321229 - stable/11/share/man/man9 X-SVN-Group: stable-11 X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: stable/11/share/man/man9 X-SVN-Commit-Revision: 321229 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Jul 2017 18:59:27 -0000 Author: ngie Date: Wed Jul 19 18:59:26 2017 New Revision: 321229 URL: https://svnweb.freebsd.org/changeset/base/321229 Log: MFC note: cnv(9) diff ignored since API/manpage not present on ^/stable/11. MFC r309066: r309066 (by brueffer): Fix various mdoc issues reported by mandoc -Tlint. Modified: stable/11/share/man/man9/bus_map_resource.9 stable/11/share/man/man9/counter.9 stable/11/share/man/man9/osd.9 stable/11/share/man/man9/pmap_zero_page.9 stable/11/share/man/man9/rman.9 stable/11/share/man/man9/tcp_functions.9 Directory Properties: stable/11/ (props changed) Modified: stable/11/share/man/man9/bus_map_resource.9 ============================================================================== --- stable/11/share/man/man9/bus_map_resource.9 Wed Jul 19 18:41:16 2017 (r321228) +++ stable/11/share/man/man9/bus_map_resource.9 Wed Jul 19 18:59:26 2017 (r321229) @@ -135,6 +135,8 @@ By default memory mappings use the .Dv VM_MEMATTR_UNCACHEABLE attribute. .El +.Sh RETURN VALUES +Zero is returned on success, otherwise an error is returned. .Sh EXAMPLES This maps a PCI memory BAR with the write-combining memory attribute and reads the first 32-bit word: @@ -153,9 +155,6 @@ reads the first 32-bit word: bus_map_resource(dev, SYS_RES_MEMORY, r, &args, &map); val = bus_read_4(&map, 0); .Ed -.Pp -.Sh RETURN VALUES -Zero is returned on success, otherwise an error is returned. .Sh SEE ALSO .Xr bus_activate_resource 9 , .Xr bus_alloc_resource 9 , Modified: stable/11/share/man/man9/counter.9 ============================================================================== --- stable/11/share/man/man9/counter.9 Wed Jul 19 18:41:16 2017 (r321228) +++ stable/11/share/man/man9/counter.9 Wed Jul 19 18:59:26 2017 (r321229) @@ -224,7 +224,6 @@ static counter_u64_t array[MY_SIZE]; SYSCTL_COUNTER_U64_ARRAY(_debug, OID_AUTO, counter_array, CTLFLAG_RW, &array[0], MY_SIZE, "Test counter array"); .Ed -.Pp .Sh SEE ALSO .Xr atomic 9 , .Xr critical 9 , Modified: stable/11/share/man/man9/osd.9 ============================================================================== --- stable/11/share/man/man9/osd.9 Wed Jul 19 18:41:16 2017 (r321228) +++ stable/11/share/man/man9/osd.9 Wed Jul 19 18:59:26 2017 (r321229) @@ -412,7 +412,8 @@ return zero on success or ENOMEM if the specified type triggered an internal .Xr realloc 9 which failed -.Fn ( osd_set_reserved +.Ns ( +.Fn osd_set_reserved will always succeed when .Fa rsv is non-NULL). Modified: stable/11/share/man/man9/pmap_zero_page.9 ============================================================================== --- stable/11/share/man/man9/pmap_zero_page.9 Wed Jul 19 18:41:16 2017 (r321228) +++ stable/11/share/man/man9/pmap_zero_page.9 Wed Jul 19 18:59:26 2017 (r321229) @@ -52,7 +52,6 @@ The function is used to zero-fill an area of a page. The range specified must not cross a page boundary; it must be contained entirely within a single page. -.Pp The .Fn pmap_zero_page_idle interface is used by the Modified: stable/11/share/man/man9/rman.9 ============================================================================== --- stable/11/share/man/man9/rman.9 Wed Jul 19 18:41:16 2017 (r321228) +++ stable/11/share/man/man9/rman.9 Wed Jul 19 18:59:26 2017 (r321229) @@ -468,8 +468,8 @@ function returns a pointer to the device which reserve .Xr bus_alloc_resource 9 , .Xr bus_map_resource 9 , .Xr bus_release_resource 9 , -.Xr bus_space 9 , .Xr bus_set_resource 9 , +.Xr bus_space 9 , .Xr mutex 9 .Sh AUTHORS This manual page was written by Modified: stable/11/share/man/man9/tcp_functions.9 ============================================================================== --- stable/11/share/man/man9/tcp_functions.9 Wed Jul 19 18:41:16 2017 (r321228) +++ stable/11/share/man/man9/tcp_functions.9 Wed Jul 19 18:59:26 2017 (r321229) @@ -268,6 +268,7 @@ the current default function block. The .Fa blk argument references a function block that is not currently registered. +.El .Sh SEE ALSO .Xr malloc 9 , .Xr tcp 4 From owner-svn-src-stable-11@freebsd.org Wed Jul 19 19:02:07 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F0852CFFF1A; Wed, 19 Jul 2017 19:02:07 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BD5D56765F; Wed, 19 Jul 2017 19:02:07 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6JJ26iV087336; Wed, 19 Jul 2017 19:02:06 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6JJ26Ub087335; Wed, 19 Jul 2017 19:02:06 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201707191902.v6JJ26Ub087335@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Wed, 19 Jul 2017 19:02:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r321231 - stable/11/share/man/man9 X-SVN-Group: stable-11 X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: stable/11/share/man/man9 X-SVN-Commit-Revision: 321231 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Jul 2017 19:02:08 -0000 Author: ngie Date: Wed Jul 19 19:02:06 2017 New Revision: 321231 URL: https://svnweb.freebsd.org/changeset/base/321231 Log: MFC note: content changes based on r309745 not included. MFC r315799: counter(9): fix igor/manlint warnings - Reword description of `counter_enter` slightly to fix wordiness [1]. - Expand "isn't" as "is not" [1]. - Add missing section number with .Xr sysctl calls [2]. Modified: stable/11/share/man/man9/counter.9 Directory Properties: stable/11/ (props changed) Modified: stable/11/share/man/man9/counter.9 ============================================================================== --- stable/11/share/man/man9/counter.9 Wed Jul 19 19:00:32 2017 (r321230) +++ stable/11/share/man/man9/counter.9 Wed Jul 19 19:02:06 2017 (r321231) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 14, 2016 +.Dd March 22, 2017 .Dt COUNTER 9 .Os .Sh NAME @@ -105,7 +105,7 @@ to .Fa c . The KPI does not guarantee any protection from wraparound. .It Fn counter_enter -Enter mode that would allow to safely update several counters via +Enter mode that would allow the safe update of several counters via .Fn counter_u64_add_protected . On some machines this expands to .Xr critical 9 @@ -130,7 +130,7 @@ Clear the counter and set it to zero. .It Fn SYSCTL_COUNTER_U64 parent nbr name access ptr descr Declare a static -.Xr sysctl +.Xr sysctl 9 oid that would represent a .Nm . The @@ -142,7 +142,7 @@ A read of the oid returns value obtained through Any write to the oid zeroes it. .It Fn SYSCTL_ADD_COUNTER_U64 ctx parent nbr name access ptr descr Create a -.Xr sysctl +.Xr sysctl 9 oid that would represent a .Nm . The @@ -154,7 +154,7 @@ A read of the oid returns value obtained through Any write to the oid zeroes it. .It Fn SYSCTL_COUNTER_U64_ARRAY parent nbr name access ptr len descr Declare a static -.Xr sysctl +.Xr sysctl 9 oid that would represent an array of .Nm . The @@ -171,7 +171,7 @@ values obtained through Any write to the oid zeroes all array elements. .It Fn SYSCTL_ADD_COUNTER_U64_ARRAY ctx parent nbr name access ptr len descr Create a -.Xr sysctl +.Xr sysctl 9 oid that would represent an array of .Nm . The From owner-svn-src-stable-11@freebsd.org Wed Jul 19 19:06:20 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DAF9DD7C132; Wed, 19 Jul 2017 19:06:20 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AA34C67908; Wed, 19 Jul 2017 19:06:20 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6JJ6Jwc087557; Wed, 19 Jul 2017 19:06:19 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6JJ6JNL087555; Wed, 19 Jul 2017 19:06:19 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201707191906.v6JJ6JNL087555@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Wed, 19 Jul 2017 19:06:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r321232 - stable/11/sys/boot/common X-SVN-Group: stable-11 X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: stable/11/sys/boot/common X-SVN-Commit-Revision: 321232 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Jul 2017 19:06:21 -0000 Author: ngie Date: Wed Jul 19 19:06:19 2017 New Revision: 321232 URL: https://svnweb.freebsd.org/changeset/base/321232 Log: MFC r316076: sys/boot/common: Make geli(4) support optional in MI sources This saves a negligible amount of memory for non-geli enabled bootloaders. Modified: stable/11/sys/boot/common/Makefile.inc stable/11/sys/boot/common/module.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/boot/common/Makefile.inc ============================================================================== --- stable/11/sys/boot/common/Makefile.inc Wed Jul 19 19:02:06 2017 (r321231) +++ stable/11/sys/boot/common/Makefile.inc Wed Jul 19 19:06:19 2017 (r321232) @@ -39,6 +39,9 @@ CFLAGS+= -DLOADER_GPT_SUPPORT CFLAGS+= -DLOADER_MBR_SUPPORT .endif .endif +.if !defined(LOADER_NO_GELI_SUPPORT) +CFLAGS+= -DLOADER_GELI_SUPPORT +.endif .if defined(HAVE_BCACHE) SRCS+= bcache.c Modified: stable/11/sys/boot/common/module.c ============================================================================== --- stable/11/sys/boot/common/module.c Wed Jul 19 19:02:06 2017 (r321231) +++ stable/11/sys/boot/common/module.c Wed Jul 19 19:06:19 2017 (r321232) @@ -180,6 +180,7 @@ command_load(int argc, char *argv[]) return (error == 0 ? CMD_OK : CMD_CRIT); } +#ifdef LOADER_GELI_SUPPORT COMMAND_SET(load_geli, "load_geli", "load a geli key", command_load_geli); static int @@ -217,6 +218,7 @@ command_load_geli(int argc, char *argv[]) sprintf(typestr, "%s:geli_keyfile%d", argv[1], num); return (file_loadraw(argv[2], typestr, 1) ? CMD_OK : CMD_ERROR); } +#endif void unload(void) From owner-svn-src-stable-11@freebsd.org Wed Jul 19 19:39:28 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 12068D7CCB3; Wed, 19 Jul 2017 19:39:28 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D492268F6D; Wed, 19 Jul 2017 19:39:27 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6JJdRaf000737; Wed, 19 Jul 2017 19:39:27 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6JJdRmw000736; Wed, 19 Jul 2017 19:39:27 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201707191939.v6JJdRmw000736@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Wed, 19 Jul 2017 19:39:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r321236 - stable/11/usr.sbin/cron/cron X-SVN-Group: stable-11 X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: stable/11/usr.sbin/cron/cron X-SVN-Commit-Revision: 321236 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Jul 2017 19:39:28 -0000 Author: ngie Date: Wed Jul 19 19:39:26 2017 New Revision: 321236 URL: https://svnweb.freebsd.org/changeset/base/321236 Log: MFC r321235: Fix trivial whitespace bug introduced in usage message changes for -n support (r304570). Modified: stable/11/usr.sbin/cron/cron/cron.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/cron/cron/cron.c ============================================================================== --- stable/11/usr.sbin/cron/cron/cron.c Wed Jul 19 19:38:25 2017 (r321235) +++ stable/11/usr.sbin/cron/cron/cron.c Wed Jul 19 19:39:26 2017 (r321236) @@ -59,7 +59,7 @@ usage() { #endif fprintf(stderr, "usage: cron [-j jitter] [-J rootjitter] " - "[-m mailto] [-n ] [-s] [-o] [-x debugflag[,...]]\n"); + "[-m mailto] [-n] [-s] [-o] [-x debugflag[,...]]\n"); #if DEBUGGING fprintf(stderr, "\ndebugflags: "); From owner-svn-src-stable-11@freebsd.org Wed Jul 19 20:22:17 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 87D19D7D7C4; Wed, 19 Jul 2017 20:22:17 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5EE076A87C; Wed, 19 Jul 2017 20:22:17 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6JKMGHW019832; Wed, 19 Jul 2017 20:22:16 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6JKMGgo019830; Wed, 19 Jul 2017 20:22:16 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201707192022.v6JKMGgo019830@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Wed, 19 Jul 2017 20:22:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r321241 - stable/11/usr.sbin/cron/crontab X-SVN-Group: stable-11 X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: stable/11/usr.sbin/cron/crontab X-SVN-Commit-Revision: 321241 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Jul 2017 20:22:17 -0000 Author: ngie Date: Wed Jul 19 20:22:16 2017 New Revision: 321241 URL: https://svnweb.freebsd.org/changeset/base/321241 Log: MFC r310329: r310329 (by cem): Add a 'force' option for non-interactive crontab removal Add a '-f' option to force crontab '-r' to be non-interactive. Modified: stable/11/usr.sbin/cron/crontab/crontab.1 stable/11/usr.sbin/cron/crontab/crontab.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/cron/crontab/crontab.1 ============================================================================== --- stable/11/usr.sbin/cron/crontab/crontab.1 Wed Jul 19 19:53:07 2017 (r321240) +++ stable/11/usr.sbin/cron/crontab/crontab.1 Wed Jul 19 20:22:16 2017 (r321241) @@ -17,7 +17,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 13, 2010 +.Dd December 20, 2016 .Dt CRONTAB 1 .Os .Sh NAME @@ -31,7 +31,8 @@ .Op Fl u Ar user { .Fl l | -.Fl r | +.Fl r Op Fl f +| .Fl e } .Sh DESCRIPTION @@ -97,6 +98,11 @@ option for safety's sake. Display the current crontab on standard output. .It Fl r Remove the current crontab. +By default the +.Fl r +option prompts for confirmation, adding the +.Fl f +option will attempt to remove the current crontab without confirmation. .It Fl e Edit the current crontab using the editor specified by the Modified: stable/11/usr.sbin/cron/crontab/crontab.c ============================================================================== --- stable/11/usr.sbin/cron/crontab/crontab.c Wed Jul 19 19:53:07 2017 (r321240) +++ stable/11/usr.sbin/cron/crontab/crontab.c Wed Jul 19 20:22:16 2017 (r321241) @@ -63,6 +63,7 @@ static char Filename[MAX_FNAME]; static FILE *NewCrontab; static int CheckErrorCount; static enum opt_t Option; +static int fflag; static struct passwd *pw; static void list_cmd(void), delete_cmd(void), @@ -79,7 +80,7 @@ usage(char *msg) fprintf(stderr, "crontab: usage error: %s\n", msg); fprintf(stderr, "%s\n%s\n", "usage: crontab [-u user] file", - " crontab [-u user] { -e | -l | -r }"); + " crontab [-u user] { -l | -r [-f] | -e }"); exit(ERROR_EXIT); } @@ -142,7 +143,7 @@ parse_args(argc, argv) strcpy(RealUser, User); Filename[0] = '\0'; Option = opt_unknown; - while ((argch = getopt(argc, argv, "u:lerx:")) != -1) { + while ((argch = getopt(argc, argv, "u:lerx:f")) != -1) { switch (argch) { case 'x': if (!set_debug_flags(optarg)) @@ -172,6 +173,9 @@ parse_args(argc, argv) usage("only one operation permitted"); Option = opt_edit; break; + case 'f': + fflag = 1; + break; default: usage("unrecognized option"); } @@ -282,7 +286,7 @@ delete_cmd() { char n[MAX_FNAME]; int ch, first; - if (isatty(STDIN_FILENO)) { + if (!fflag && isatty(STDIN_FILENO)) { (void)fprintf(stderr, "remove crontab for %s? ", User); first = ch = getchar(); while (ch != '\n' && ch != EOF) From owner-svn-src-stable-11@freebsd.org Wed Jul 19 20:49:05 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B3BDAD7E08C; Wed, 19 Jul 2017 20:49:05 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8212C6B86F; Wed, 19 Jul 2017 20:49:05 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6JKn4SH030029; Wed, 19 Jul 2017 20:49:04 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6JKn4vH030027; Wed, 19 Jul 2017 20:49:04 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201707192049.v6JKn4vH030027@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Wed, 19 Jul 2017 20:49:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r321246 - in stable/11: etc/pam.d tools/build/mk X-SVN-Group: stable-11 X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: in stable/11: etc/pam.d tools/build/mk X-SVN-Commit-Revision: 321246 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Jul 2017 20:49:05 -0000 Author: ngie Date: Wed Jul 19 20:49:04 2017 New Revision: 321246 URL: https://svnweb.freebsd.org/changeset/base/321246 Log: MFC r316818: Conditionally install /etc/pam.d/ftp* and /etc/pam.d/telnetd /etc/pam.d/ftp* should be installed with MK_FTP != no and /etc/pam.d/telnetd should be installed when MK_TELNET != no. Modified: stable/11/etc/pam.d/Makefile stable/11/tools/build/mk/OptionalObsoleteFiles.inc Directory Properties: stable/11/ (props changed) Modified: stable/11/etc/pam.d/Makefile ============================================================================== --- stable/11/etc/pam.d/Makefile Wed Jul 19 20:44:50 2017 (r321245) +++ stable/11/etc/pam.d/Makefile Wed Jul 19 20:49:04 2017 (r321246) @@ -8,13 +8,11 @@ FILESGROUPS= FILES FILES= README \ cron \ - ftpd \ imap \ login \ other \ passwd pop3 \ sshd su system \ - telnetd \ xdm FILESDIR= /etc/pam.d @@ -28,6 +26,15 @@ ATDIR= ${FILESDIR} ATMODE= ${FILESMODE} .endif +.if ${MK_FTP} != "no" +FILESGROUPS+= FTP +FTP+= ftpd +FTPPACKAGE+= ftp +FTPDIR= ${FILESDIR} +FTPMODE= ${FILESMODE} +LINKS= ${FILESDIR}/ftpd ${FILESDIR}/ftp +.endif + .if ${MK_RCMDS} != "no" FILESGROUPS+= RCMDS RCMDS+= rsh @@ -36,7 +43,14 @@ RCMDSDIR= ${FILESDIR} RCMDSMODE= ${FILESMODE} .endif +.if ${MK_TELNET} != "no" +FILESGROUPS+= TELNET +TELNET+= telnetd +TELNETPACKAGE+= telnet +TELNETDIR= ${FILESDIR} +TELNETMODE= ${FILESMODE} +.endif + FILESMODE_README= 444 -LINKS= ${FILESDIR}/ftpd ${FILESDIR}/ftp .include Modified: stable/11/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- stable/11/tools/build/mk/OptionalObsoleteFiles.inc Wed Jul 19 20:44:50 2017 (r321245) +++ stable/11/tools/build/mk/OptionalObsoleteFiles.inc Wed Jul 19 20:49:04 2017 (r321246) @@ -1607,6 +1607,8 @@ OLD_FILES+=usr/share/man/man8/fmtree.8.gz .if ${MK_FTP} == no OLD_FILES+=etc/ftpusers +OLD_FILES+=etc/pam.d/ftp +OLD_FILES+=etc/pam.d/ftpd OLD_FILES+=etc/rc.d/ftpd OLD_FILES+=usr/bin/ftp OLD_FILES+=usr/bin/gate-ftp @@ -7725,6 +7727,7 @@ OLD_FILES+=usr/share/nls/uk_UA.UTF-8/tcsh.cat .endif .if ${MK_TELNET} == no +OLD_FILES+=etc/pam.d/telnetd OLD_FILES+=usr/bin/telnet OLD_FILES+=usr/libexec/telnetd OLD_FILES+=usr/share/man/man1/telnet.1.gz From owner-svn-src-stable-11@freebsd.org Wed Jul 19 20:58:46 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 80059D7E4C0; Wed, 19 Jul 2017 20:58:46 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4ECFD6C280; Wed, 19 Jul 2017 20:58:46 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6JKwj4w034577; Wed, 19 Jul 2017 20:58:45 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6JKwjC0034576; Wed, 19 Jul 2017 20:58:45 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201707192058.v6JKwjC0034576@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Wed, 19 Jul 2017 20:58:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r321250 - stable/11/lib/libc/gen X-SVN-Group: stable-11 X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: stable/11/lib/libc/gen X-SVN-Commit-Revision: 321250 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Jul 2017 20:58:46 -0000 Author: ngie Date: Wed Jul 19 20:58:45 2017 New Revision: 321250 URL: https://svnweb.freebsd.org/changeset/base/321250 Log: MFC note: content changes of r317315 were reversed. .Dd is being updated for diff reduction purposes. MFC r317315,r317437: r317315: Note that getpagesize(3) can return -1 on failure r317437 (by kib): getpagesize(3) cannot fail. Modified: stable/11/lib/libc/gen/getpagesize.3 Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libc/gen/getpagesize.3 ============================================================================== --- stable/11/lib/libc/gen/getpagesize.3 Wed Jul 19 20:58:16 2017 (r321249) +++ stable/11/lib/libc/gen/getpagesize.3 Wed Jul 19 20:58:45 2017 (r321250) @@ -28,7 +28,7 @@ .\" @(#)getpagesize.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd June 4, 1993 +.Dd April 26, 2017 .Dt GETPAGESIZE 3 .Os .Sh NAME From owner-svn-src-stable-11@freebsd.org Wed Jul 19 21:06:32 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D0ADAD7E6CF; Wed, 19 Jul 2017 21:06:32 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9F8856C7F7; Wed, 19 Jul 2017 21:06:32 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6JL6VBH038838; Wed, 19 Jul 2017 21:06:31 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6JL6VE2038837; Wed, 19 Jul 2017 21:06:31 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201707192106.v6JL6VE2038837@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Wed, 19 Jul 2017 21:06:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r321252 - stable/11/etc X-SVN-Group: stable-11 X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: stable/11/etc X-SVN-Commit-Revision: 321252 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Jul 2017 21:06:32 -0000 Author: ngie Date: Wed Jul 19 21:06:31 2017 New Revision: 321252 URL: https://svnweb.freebsd.org/changeset/base/321252 Log: MFC note: only the newsyslog.conf.d change has been backported to unbreak "make distribution" with etc/newsyslog.conf.d/opensm.conf installation. The cron.d and syslog.d changes were omitted by request to avoid churn on ^/stable/{10,11}. Requested by: jhb, peter MFC r318545: Install {cron.d,newsyslog.conf.d,syslog.d} via `make distribution`, not `make install` I incorrectly started this pattern in r277541 with the opensm newsyslog.conf.d file, and continued using it in r318441 and r318443. This will fix the files being handled improperly via installworld, preventing tools like etcupdate, mergemaster, etc from functioning properly when comparing the installed contents on a system vs the contents in a source tree when doing merges. PR: 219404 MFC with: r277541, r318441, r318443 Modified: stable/11/etc/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/etc/Makefile ============================================================================== --- stable/11/etc/Makefile Wed Jul 19 21:06:05 2017 (r321251) +++ stable/11/etc/Makefile Wed Jul 19 21:06:31 2017 (r321252) @@ -7,8 +7,6 @@ FILESGROUPS= FILES # No need as it is empty and just causes rebuilds since this file does so much. UPDATE_DEPENDFILE= no -SUBDIR= \ - newsyslog.conf.d .if ${MK_SENDMAIL} != "no" SUBDIR+=sendmail @@ -255,6 +253,7 @@ distribution: ${_+_}cd ${.CURDIR}/defaults; ${MAKE} install ${_+_}cd ${.CURDIR}/devd; ${MAKE} install ${_+_}cd ${.CURDIR}/gss; ${MAKE} install + ${_+_}cd ${.CURDIR}/newsyslog.conf.d; ${MAKE} install .if ${MK_NTP} != "no" ${_+_}cd ${.CURDIR}/ntp; ${MAKE} install .endif From owner-svn-src-stable-11@freebsd.org Wed Jul 19 21:19:16 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 83F90D7EAA0; Wed, 19 Jul 2017 21:19:16 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3926C6D181; Wed, 19 Jul 2017 21:19:16 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6JLJFhc043177; Wed, 19 Jul 2017 21:19:15 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6JLJFbc043176; Wed, 19 Jul 2017 21:19:15 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201707192119.v6JLJFbc043176@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Wed, 19 Jul 2017 21:19:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r321254 - stable/11 X-SVN-Group: stable-11 X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: stable/11 X-SVN-Commit-Revision: 321254 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Jul 2017 21:19:16 -0000 Author: ngie Date: Wed Jul 19 21:19:15 2017 New Revision: 321254 URL: https://svnweb.freebsd.org/changeset/base/321254 Log: Record-only merge for ^/head@r312419 Modified: Directory Properties: stable/11/ (props changed) From owner-svn-src-stable-11@freebsd.org Thu Jul 20 00:33:06 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0A537D9B26D; Thu, 20 Jul 2017 00:33:06 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C02C272A9D; Thu, 20 Jul 2017 00:33:05 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6K0X4dZ025176; Thu, 20 Jul 2017 00:33:04 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6K0X4OH025175; Thu, 20 Jul 2017 00:33:04 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201707200033.v6K0X4OH025175@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Thu, 20 Jul 2017 00:33:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r321259 - stable/11/usr.sbin/periodic X-SVN-Group: stable-11 X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: stable/11/usr.sbin/periodic X-SVN-Commit-Revision: 321259 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Jul 2017 00:33:06 -0000 Author: ngie Date: Thu Jul 20 00:33:04 2017 New Revision: 321259 URL: https://svnweb.freebsd.org/changeset/base/321259 Log: MFC r320135: periodic(8): delete trailing whitespace Modified: stable/11/usr.sbin/periodic/periodic.sh Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/periodic/periodic.sh ============================================================================== --- stable/11/usr.sbin/periodic/periodic.sh Wed Jul 19 23:34:28 2017 (r321258) +++ stable/11/usr.sbin/periodic/periodic.sh Thu Jul 20 00:33:04 2017 (r321259) @@ -30,7 +30,7 @@ if [ $# -lt 1 ] ; then usage fi -# If possible, check the global system configuration file, +# If possible, check the global system configuration file, # to see if there are additional dirs to check if [ -r /etc/defaults/periodic.conf ]; then . /etc/defaults/periodic.conf @@ -43,7 +43,7 @@ export host # If we were called normally, then create a lock file for each argument # in turn and reinvoke ourselves with the LOCKED argument. This prevents # very long running jobs from being overlapped by another run as this is -# will lead the system running progressivly slower and more and more jobs +# will lead the system running progressivly slower and more and more jobs # are run at once. if [ $1 != "LOCKED" ]; then ret=0 @@ -102,7 +102,7 @@ case $arg in /*) if [ -d "$arg" ]; then dirlist="$arg" else - echo "$0: $arg not found" >&2 + echo "$0: $arg not found" >&2 continue fi ;; From owner-svn-src-stable-11@freebsd.org Thu Jul 20 00:41:48 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D531DD9B6C7; Thu, 20 Jul 2017 00:41:48 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 90A7D730E3; Thu, 20 Jul 2017 00:41:48 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6K0flFV028744; Thu, 20 Jul 2017 00:41:47 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6K0flVU028737; Thu, 20 Jul 2017 00:41:47 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201707200041.v6K0flVU028737@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Thu, 20 Jul 2017 00:41:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r321262 - in stable/11/usr.sbin/newsyslog: . tests X-SVN-Group: stable-11 X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: in stable/11/usr.sbin/newsyslog: . tests X-SVN-Commit-Revision: 321262 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Jul 2017 00:41:48 -0000 Author: ngie Date: Thu Jul 20 00:41:46 2017 New Revision: 321262 URL: https://svnweb.freebsd.org/changeset/base/321262 Log: MFC r318960,r319545,r319546,r319548,r321261: r318960 (by dab): Add newsyslog capability to write RFC5424 compliant rotation message. This modification adds the capability to newsyslog to write the rotation message in a format that is compliant with RFC5424. This capability is enabled on a per-log file basis through a new value ("T") in the flags field in newsyslog.conf. This is useful on systems that use the RFC5424 format for log files so that the rotation message format matches that of the other log messages. There has been recent mention of adding an RFC5424 compliant mode to syslogd and at least one alternative system log daemon (rsyslogd) that already has the capability to use that format. Relnotes: yes r319545: Don't execute the TODO cases in a subshell This messes up the testcase counter, as seen in bug 219756. PR: 212160, 219756 r319546: Fix the testplan after ^/head@r318960 The number of executed testcases is 128, not 126. MFC with: r318960 r319548: Remove TODO for sub testcases added for bug 212160 On closer inspection, the past failures no longer occur on ^/head. PR: 212160 r321261: Clean up leading whitespace (convert single column spaces to hard tabs) Modified: stable/11/usr.sbin/newsyslog/extern.h stable/11/usr.sbin/newsyslog/newsyslog.8 stable/11/usr.sbin/newsyslog/newsyslog.c stable/11/usr.sbin/newsyslog/newsyslog.conf.5 stable/11/usr.sbin/newsyslog/ptimes.c stable/11/usr.sbin/newsyslog/tests/legacy_test.sh Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/newsyslog/extern.h ============================================================================== --- stable/11/usr.sbin/newsyslog/extern.h Thu Jul 20 00:40:03 2017 (r321261) +++ stable/11/usr.sbin/newsyslog/extern.h Thu Jul 20 00:41:46 2017 (r321262) @@ -60,6 +60,8 @@ int ptime_free(struct ptime_data *_ptime); int ptime_relparse(struct ptime_data *_ptime, int _parseopts, time_t _basetime, const char *_str); const char *ptimeget_ctime(const struct ptime_data *_ptime); +char *ptimeget_ctime_rfc5424(const struct ptime_data *_ptime, + char *timebuf, size_t bufsize); double ptimeget_diff(const struct ptime_data *_minuend, const struct ptime_data *_subtrahend); time_t ptimeget_secs(const struct ptime_data *_ptime); Modified: stable/11/usr.sbin/newsyslog/newsyslog.8 ============================================================================== --- stable/11/usr.sbin/newsyslog/newsyslog.8 Thu Jul 20 00:40:03 2017 (r321261) +++ stable/11/usr.sbin/newsyslog/newsyslog.8 Thu Jul 20 00:41:46 2017 (r321262) @@ -17,7 +17,7 @@ .\" the suitability of this software for any purpose. It is .\" provided "as is" without express or implied warranty. .\" -.Dd September 23, 2014 +.Dd May 19, 2017 .Dt NEWSYSLOG 8 .Os .Sh NAME @@ -125,7 +125,8 @@ reasons for either trimming that log or skipping it. Cause .Nm not to trim the logs, but to print out what it would do if this option -were not specified. This option implies the +were not specified. +This option implies the .Fl r option. .It Fl r Modified: stable/11/usr.sbin/newsyslog/newsyslog.c ============================================================================== --- stable/11/usr.sbin/newsyslog/newsyslog.c Thu Jul 20 00:40:03 2017 (r321261) +++ stable/11/usr.sbin/newsyslog/newsyslog.c Thu Jul 20 00:41:46 2017 (r321262) @@ -79,6 +79,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -127,6 +128,8 @@ __FBSDID("$FreeBSD$"); #define CE_NODUMP 0x0200 /* Set 'nodump' on newly created log file. */ #define CE_PID2CMD 0x0400 /* Replace PID file with a shell command.*/ +#define CE_RFC5424 0x0800 /* Use RFC5424 format rotation message */ + #define MIN_PID 5 /* Don't touch pids lower than this */ #define MAX_PID 99999 /* was lower, see /usr/include/sys/proc.h */ @@ -241,6 +244,15 @@ static struct ptime_data *timenow; /* The time to use #define DAYTIME_LEN 16 static char daytime[DAYTIME_LEN];/* The current time in human readable form, * used for rotation-tracking messages. */ + +/* Another buffer to hold the current time in RFC5424 format. Fractional + * seconds are allowed by the RFC, but are not included in the + * rotation-tracking messages written by newsyslog and so are not accounted for + * in the length below. + */ +#define DAYTIME_RFC5424_LEN sizeof("YYYY-MM-DDTHH:MM:SS+00:00") +static char daytime_rfc5424[DAYTIME_RFC5424_LEN]; + static char hostname[MAXHOSTNAMELEN]; /* hostname */ static const char *path_syslogpid = _PATH_SYSLOGPID; @@ -624,6 +636,7 @@ parse_args(int argc, char **argv) timenow = ptime_init(NULL); ptimeset_time(timenow, time(NULL)); strlcpy(daytime, ptimeget_ctime(timenow) + 4, DAYTIME_LEN); + ptimeget_ctime_rfc5424(timenow, daytime_rfc5424, DAYTIME_RFC5424_LEN); /* Let's get our hostname */ (void)gethostname(hostname, sizeof(hostname)); @@ -1290,11 +1303,14 @@ no_trimat: case 'r': working->flags |= CE_PID2CMD; break; + case 't': + working->flags |= CE_RFC5424; + break; case 'u': working->flags |= CE_SIGNALGROUP; break; case 'w': - /* Depreciated flag - keep for compatibility purposes */ + /* Deprecated flag - keep for compatibility purposes */ break; case 'x': working->compress = COMPRESS_XZ; @@ -2092,7 +2108,7 @@ save_sigwork(const struct conf_entry *ent) tmpsiz = sizeof(struct sigwork_entry) + strlen(ent->pid_cmd_file) + 1; stmp = malloc(tmpsiz); - + stmp->sw_runcmd = 0; /* If this is a command to run we just set the flag and run command */ if (ent->flags & CE_PID2CMD) { @@ -2248,15 +2264,34 @@ log_trim(const char *logname, const struct conf_entry xtra = ""; if (log_ent->def_cfg) xtra = " using rule"; - if (log_ent->firstcreate) - fprintf(f, "%s %s newsyslog[%d]: logfile first created%s\n", - daytime, hostname, (int) getpid(), xtra); - else if (log_ent->r_reason != NULL) - fprintf(f, "%s %s newsyslog[%d]: logfile turned over%s%s\n", - daytime, hostname, (int) getpid(), log_ent->r_reason, xtra); - else - fprintf(f, "%s %s newsyslog[%d]: logfile turned over%s\n", - daytime, hostname, (int) getpid(), xtra); + if (log_ent->flags & CE_RFC5424) { + if (log_ent->firstcreate) { + fprintf(f, "<%d>1 %s %s newsyslog %d - - %s%s\n", + LOG_MAKEPRI(LOG_USER, LOG_INFO), + daytime_rfc5424, hostname, getpid(), + "logfile first created", xtra); + } else if (log_ent->r_reason != NULL) { + fprintf(f, "<%d>1 %s %s newsyslog %d - - %s%s%s\n", + LOG_MAKEPRI(LOG_USER, LOG_INFO), + daytime_rfc5424, hostname, getpid(), + "logfile turned over", log_ent->r_reason, xtra); + } else { + fprintf(f, "<%d>1 %s %s newsyslog %d - - %s%s\n", + LOG_MAKEPRI(LOG_USER, LOG_INFO), + daytime_rfc5424, hostname, getpid(), + "logfile turned over", xtra); + } + } else { + if (log_ent->firstcreate) + fprintf(f, "%s %s newsyslog[%d]: logfile first created%s\n", + daytime, hostname, getpid(), xtra); + else if (log_ent->r_reason != NULL) + fprintf(f, "%s %s newsyslog[%d]: logfile turned over%s%s\n", + daytime, hostname, getpid(), log_ent->r_reason, xtra); + else + fprintf(f, "%s %s newsyslog[%d]: logfile turned over%s\n", + daytime, hostname, getpid(), xtra); + } if (fclose(f) == EOF) err(1, "log_trim: fclose"); return (0); Modified: stable/11/usr.sbin/newsyslog/newsyslog.conf.5 ============================================================================== --- stable/11/usr.sbin/newsyslog/newsyslog.conf.5 Thu Jul 20 00:40:03 2017 (r321261) +++ stable/11/usr.sbin/newsyslog/newsyslog.conf.5 Thu Jul 20 00:41:46 2017 (r321262) @@ -21,7 +21,7 @@ .\" the suitability of this software for any purpose. It is .\" provided "as is" without express or implied warranty. .\" -.Dd October 24, 2015 +.Dd May 19, 2017 .Dt NEWSYSLOG.CONF 5 .Os .Sh NAME @@ -242,7 +242,7 @@ rotate at the first day of every month at midnight (i.e., the start of the day; same as .Li @01T00 ) .It Li $M5D6 -rotate on every 5th day of month at 6:00 +rotate on every fifth day of month at 6:00 (same as .Li @05T06 ) .El @@ -313,6 +313,11 @@ will run shell command defined in .Ar path_to_pid_cmd_file after rotation instead of trying to send signal to a process id stored in the file. +.It Cm T +if this flag is set the informational rotation message written to +the log file will be in the format specified by RFC5424. +Normally, the rotation message is written in the traditional (RFC3164) +syslog format. .It Cm U indicates that the file specified by .Ar path_to_pid_cmd_file @@ -389,6 +394,17 @@ entry: .Xr chown 8 , .Xr newsyslog 8 , .Xr syslogd 8 +.Pp +.Rs +.%A C. Lonvick +.%T The BSD syslog Protocol +.%O RFC3164 +.Re +.Rs +.%A R. Gerhards +.%T The Syslog Protocol +.%O RFC5424 +.Re .Sh HISTORY This manual page first appeared in .Fx 4.10 . Modified: stable/11/usr.sbin/newsyslog/ptimes.c ============================================================================== --- stable/11/usr.sbin/newsyslog/ptimes.c Thu Jul 20 00:40:03 2017 (r321261) +++ stable/11/usr.sbin/newsyslog/ptimes.c Thu Jul 20 00:41:46 2017 (r321262) @@ -478,6 +478,75 @@ ptimeget_ctime(const struct ptime_data *ptime) return (ctime(&ptime->tsecs)); } +/* + * Generate a time of day string in an RFC5424 compatible format. Return a + * pointer to the buffer with the timestamp string or NULL if an error. If the + * time is not supplied, cannot be converted to local time, or the resulting + * string would overflow the buffer, the returned string will be the RFC5424 + * NILVALUE. + */ +char * +ptimeget_ctime_rfc5424(const struct ptime_data *ptime, + char *timebuf, size_t bufsize) +{ + static const char NILVALUE[] = {"-"}; /* RFC5424 specified NILVALUE */ + int chars; + struct tm tm; + int tz_hours; + int tz_mins; + long tz_offset; + char tz_sign; + + if (timebuf == NULL) { + return (NULL); + } + + if (bufsize < sizeof(NILVALUE)) { + return (NULL); + } + + /* + * Convert to localtime. RFC5424 mandates the use of the NILVALUE if + * the time cannot be obtained, so use that if there is an error in the + * conversion. + */ + if (ptime == NULL || localtime_r(&(ptime->tsecs), &tm) == NULL) { + strlcpy(timebuf, NILVALUE, bufsize); + return (timebuf); + } + + /* + * Convert the time to a string in RFC5424 format. The conversion + * cannot be done with strftime() because it cannot produce the correct + * timezone offset format. + */ + if (tm.tm_gmtoff < 0) { + tz_sign = '-'; + tz_offset = -tm.tm_gmtoff; + } else { + tz_sign = '+'; + tz_offset = tm.tm_gmtoff; + } + + tz_hours = tz_offset / 3600; + tz_mins = (tz_offset % 3600) / 60; + + chars = snprintf(timebuf, bufsize, + "%04d-%02d-%02d" /* date */ + "T%02d:%02d:%02d" /* time */ + "%c%02d:%02d", /* time zone offset */ + tm.tm_year + 1900, tm.tm_mon + 1, tm.tm_mday, + tm.tm_hour, tm.tm_min, tm.tm_sec, + tz_sign, tz_hours, tz_mins); + + /* If the timestamp is too big for timebuf, return the NILVALUE. */ + if (chars >= (int)bufsize) { + strlcpy(timebuf, NILVALUE, bufsize); + } + + return (timebuf); +} + double ptimeget_diff(const struct ptime_data *minuend, const struct ptime_data *subtrahend) Modified: stable/11/usr.sbin/newsyslog/tests/legacy_test.sh ============================================================================== --- stable/11/usr.sbin/newsyslog/tests/legacy_test.sh Thu Jul 20 00:40:03 2017 (r321261) +++ stable/11/usr.sbin/newsyslog/tests/legacy_test.sh Thu Jul 20 00:41:46 2017 (r321262) @@ -2,11 +2,20 @@ # $FreeBSD$ +# A regular expression matching the format of an RFC-5424 log line header, +# including the timestamp up through the seconds indicator; it does not include +# the (optional) timezone offset. +RFC5424_FMT='^<[0-9][0-9]*>1 [0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}' + +# A regular expression matching the format of an RFC-3164 (traditional syslog) +# log line header, including the timestamp. +RFC3164_FMT='^[A-Z][a-z]{2} [ 0-9][0-9] [0-9]{2}:[0-9]{2}:[0-9]{2}' + COUNT=0 TMPDIR=$(pwd)/work if [ $? -ne 0 ]; then - echo "$0: Can't create temp dir, exiting..." - exit 1 + echo "$0: Can't create temp dir, exiting..." + exit 1 fi # Begin an individual test @@ -89,8 +98,34 @@ ckntfe() fi } +# Verify that the specified file has RFC-5424 rotation messages. +ckrfc5424() +{ + local lc=$(wc -l $1 | cut -w -f2) + local rc=$(grep -cE "${RFC5424_FMT}" $1) + if [ "$lc" -eq 0 -o "$rc" -eq 0 -o "$lc" -ne "$rc" ] + then + notok + else + ok + fi +} +# Verify that the specified file has RFC-3164 rotation messages. +ckrfc3164() +{ + local lc=$(wc -l $1 | cut -w -f2) + local rc=$(grep -cE "${RFC3164_FMT}" $1) + if [ "$lc" -eq 0 -o "$rc" -eq 0 -o "$lc" -ne "$rc" ] + then + notok + else + ok + fi +} + + # A part of a test succeeds ok() { @@ -368,13 +403,56 @@ tests_time_rotate() { tmpdir_clean } -echo 1..126 +tests_rfc5424() { + ext="$1" + dir="$2" + + if [ -n "$dir" ]; then + newsyslog_args=" -a ${dir}" + name_postfix="${ext} archive dir" + else + newsyslog_args="" + name_postfix="${ext}" + fi + + tmpdir_create + + begin "RFC-5424 - create file ${name_postfix}" -newdir + run_newsyslog -C + ckfe $LOGFNAME + cknt ${dir}${LOGFNAME}.0${ext} + ckfe $LOGFNAME5424 + cknt ${dir}${LOGFNAME5424}.0${ext} + ckrfc3164 ${LOGFNAME} + ckrfc5424 ${LOGFNAME5424} + end + + begin "RFC-5424 - rotate normal 1 ${name_postfix}" + run_newsyslog $newsyslog_args + ckfe ${LOGFNAME} + ckfe ${dir}${LOGFNAME}.0${ext} + ckfe $LOGFNAME5424 + ckfe ${dir}${LOGFNAME5424}.0${ext} + ckrfc3164 ${LOGFNAME} + ckrfc3164 ${dir}${LOGFNAME}.0${ext} + ckrfc5424 ${LOGFNAME5424} + ckrfc5424 ${dir}${LOGFNAME5424}.0${ext} + end + + tmpdir_clean +} + +echo 1..128 mkdir -p ${TMPDIR} cd ${TMPDIR} LOGFNAME=foo.log LOGFPATH=${TMPDIR}/log/${LOGFNAME} +# Log file for RFC-5424 testing +LOGFNAME5424=foo5424.log +LOGFPATH5424=${TMPDIR}/log/${LOGFNAME5424} + # Normal, no archive dir, keep X files echo "$LOGFPATH 640 0 * @T00 NC" > newsyslog.conf tests_normal_rotate_keepn 0 @@ -440,5 +518,10 @@ tests_time_rotate "gz" "${TMPDIR}/alog/" echo "$LOGFPATH 640 3 * @T00 NCJ" > newsyslog.conf tests_time_rotate "bz2" "${TMPDIR}/alog/" + +# RFC-5424; Normal, no archive dir +echo "$LOGFPATH5424 640 3 * @T00 NCT" > newsyslog.conf +echo "$LOGFPATH 640 3 * @T00 NC" >> newsyslog.conf +tests_rfc5424 rm -rf "${TMPDIR}" From owner-svn-src-stable-11@freebsd.org Thu Jul 20 00:47:51 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9F955D9B8B3; Thu, 20 Jul 2017 00:47:51 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 691207347D; Thu, 20 Jul 2017 00:47:51 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6K0lobj029881; Thu, 20 Jul 2017 00:47:50 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6K0loKf029880; Thu, 20 Jul 2017 00:47:50 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201707200047.v6K0loKf029880@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Thu, 20 Jul 2017 00:47:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r321264 - stable/11/sys/boot/common X-SVN-Group: stable-11 X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: stable/11/sys/boot/common X-SVN-Commit-Revision: 321264 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Jul 2017 00:47:51 -0000 Author: ngie Date: Thu Jul 20 00:47:50 2017 New Revision: 321264 URL: https://svnweb.freebsd.org/changeset/base/321264 Log: MFC r316102: Wrap bootcamp DEBUG statement with curly braces This fixes a -Wempty-body warning with gcc 6.3.0 when PART_DEBUG is undefined. Tested with: amd64-gcc-6.3.0 (devel/amd64-xtoolchain-gcc) Modified: stable/11/sys/boot/common/part.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/boot/common/part.c ============================================================================== --- stable/11/sys/boot/common/part.c Thu Jul 20 00:44:01 2017 (r321263) +++ stable/11/sys/boot/common/part.c Thu Jul 20 00:47:50 2017 (r321264) @@ -664,8 +664,9 @@ ptable_open(void *dev, off_t sectors, uint16_t sectors if (dp[1].dp_typ != DOSPTYP_HFS) { table->type = PTABLE_NONE; DEBUG("Incorrect PMBR, ignore it"); - } else + } else { DEBUG("Bootcamp detected"); + } } #ifdef LOADER_GPT_SUPPORT if (table->type == PTABLE_GPT) { From owner-svn-src-stable-11@freebsd.org Thu Jul 20 00:50:03 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 159DBD9B9CF; Thu, 20 Jul 2017 00:50:03 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D6146736E1; Thu, 20 Jul 2017 00:50:02 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6K0o1bG030102; Thu, 20 Jul 2017 00:50:01 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6K0o1rf030098; Thu, 20 Jul 2017 00:50:01 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201707200050.v6K0o1rf030098@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Thu, 20 Jul 2017 00:50:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r321266 - in stable/11/usr.bin/fortune: . datfiles fortune unstr X-SVN-Group: stable-11 X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: in stable/11/usr.bin/fortune: . datfiles fortune unstr X-SVN-Commit-Revision: 321266 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Jul 2017 00:50:03 -0000 Author: ngie Date: Thu Jul 20 00:50:01 2017 New Revision: 321266 URL: https://svnweb.freebsd.org/changeset/base/321266 Log: MFC r314893: usr.bin/fortune: convert to OBJTOP/SRCTOP idioms - Use OBJTOP/SRCTOP-relative paths when looking for include files and strfile. - Add FORTUNES_OBJ and FORTUNES_SRC to abbreviate usr.bin/fortune pathing. This is being done to simplify make output/idioms. Modified: stable/11/usr.bin/fortune/Makefile.inc stable/11/usr.bin/fortune/datfiles/Makefile stable/11/usr.bin/fortune/fortune/Makefile stable/11/usr.bin/fortune/unstr/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.bin/fortune/Makefile.inc ============================================================================== --- stable/11/usr.bin/fortune/Makefile.inc Thu Jul 20 00:48:04 2017 (r321265) +++ stable/11/usr.bin/fortune/Makefile.inc Thu Jul 20 00:50:01 2017 (r321266) @@ -1,3 +1,6 @@ -.if exists(${.CURDIR}/../../Makefile.inc) -.include "${.CURDIR}/../../Makefile.inc" -.endif +# $FreeBSD$ + +FORTUNE_SRC= ${SRCTOP}/usr.bin/fortune +FORTUNE_OBJ= ${OBJTOP}/usr.bin/fortune + +.include "${SRCTOP}/usr.bin/Makefile.inc" Modified: stable/11/usr.bin/fortune/datfiles/Makefile ============================================================================== --- stable/11/usr.bin/fortune/datfiles/Makefile Thu Jul 20 00:48:04 2017 (r321265) +++ stable/11/usr.bin/fortune/datfiles/Makefile Thu Jul 20 00:50:01 2017 (r321266) @@ -15,7 +15,7 @@ FILESDIR= ${SHAREDIR}/games/fortune .for f in ${DB} $f.dat: $f - PATH=$$PATH:/usr/bin:${.OBJDIR}/../strfile \ + PATH=$$PATH:/usr/bin:${FORTUNE_OBJ}/strfile \ strfile -Cs ${.ALLSRC} ${.TARGET} .endfor Modified: stable/11/usr.bin/fortune/fortune/Makefile ============================================================================== --- stable/11/usr.bin/fortune/fortune/Makefile Thu Jul 20 00:48:04 2017 (r321265) +++ stable/11/usr.bin/fortune/fortune/Makefile Thu Jul 20 00:50:01 2017 (r321266) @@ -3,7 +3,7 @@ PROG= fortune MAN= fortune.6 -CFLAGS+=-DDEBUG -I${.CURDIR}/../strfile +CFLAGS+=-DDEBUG -I${FORTUNE_SRC}/strfile .include Modified: stable/11/usr.bin/fortune/unstr/Makefile ============================================================================== --- stable/11/usr.bin/fortune/unstr/Makefile Thu Jul 20 00:48:04 2017 (r321265) +++ stable/11/usr.bin/fortune/unstr/Makefile Thu Jul 20 00:50:01 2017 (r321266) @@ -3,6 +3,6 @@ PROG= unstr MAN= -CFLAGS+= -I${.CURDIR}/../strfile +CFLAGS+= -I${FORTUNE_SRC}/strfile .include From owner-svn-src-stable-11@freebsd.org Thu Jul 20 00:53:54 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5F83CD9BC4D; Thu, 20 Jul 2017 00:53:54 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0F5C573B7F; Thu, 20 Jul 2017 00:53:53 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6K0rrt4034077; Thu, 20 Jul 2017 00:53:53 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6K0rolw034052; Thu, 20 Jul 2017 00:53:50 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201707200053.v6K0rolw034052@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Thu, 20 Jul 2017 00:53:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r321268 - in stable/11/cddl: lib/drti lib/libavl lib/libctf lib/libdtrace lib/libnvpair lib/libumem lib/libuutil lib/libzfs lib/libzfs_core lib/libzpool sbin/zfs sbin/zpool usr.bin/ctfc... X-SVN-Group: stable-11 X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: in stable/11/cddl: lib/drti lib/libavl lib/libctf lib/libdtrace lib/libnvpair lib/libumem lib/libuutil lib/libzfs lib/libzfs_core lib/libzpool sbin/zfs sbin/zpool usr.bin/ctfconvert usr.bin/ctfdump us... X-SVN-Commit-Revision: 321268 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Jul 2017 00:53:54 -0000 Author: ngie Date: Thu Jul 20 00:53:50 2017 New Revision: 321268 URL: https://svnweb.freebsd.org/changeset/base/321268 Log: MFC r314654: cddl: normalize paths using SRCTOP-relative paths or :H when possible This simplifies make logic/output While here, remove bogus CFLAGS which look for headers in cddl/lib/libumem. There aren't any source files there (just Makefiles) Modified: stable/11/cddl/lib/drti/Makefile stable/11/cddl/lib/libavl/Makefile stable/11/cddl/lib/libctf/Makefile stable/11/cddl/lib/libdtrace/Makefile stable/11/cddl/lib/libnvpair/Makefile stable/11/cddl/lib/libumem/Makefile stable/11/cddl/lib/libuutil/Makefile stable/11/cddl/lib/libzfs/Makefile stable/11/cddl/lib/libzfs_core/Makefile stable/11/cddl/lib/libzpool/Makefile stable/11/cddl/sbin/zfs/Makefile stable/11/cddl/sbin/zpool/Makefile stable/11/cddl/usr.bin/ctfconvert/Makefile stable/11/cddl/usr.bin/ctfdump/Makefile stable/11/cddl/usr.bin/ctfmerge/Makefile stable/11/cddl/usr.bin/zinject/Makefile stable/11/cddl/usr.bin/zlook/Makefile stable/11/cddl/usr.bin/zstreamdump/Makefile stable/11/cddl/usr.bin/ztest/Makefile stable/11/cddl/usr.sbin/dtrace/Makefile stable/11/cddl/usr.sbin/lockstat/Makefile stable/11/cddl/usr.sbin/plockstat/Makefile stable/11/cddl/usr.sbin/zdb/Makefile stable/11/cddl/usr.sbin/zhack/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/cddl/lib/drti/Makefile ============================================================================== --- stable/11/cddl/lib/drti/Makefile Thu Jul 20 00:52:11 2017 (r321267) +++ stable/11/cddl/lib/drti/Makefile Thu Jul 20 00:53:50 2017 (r321268) @@ -1,6 +1,6 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libdtrace/common +.PATH: ${SRCTOP}/cddl/contrib/opensolaris/lib/libdtrace/common SRCS= drti.c FILES= ${SRCS:R:S/$/.o/g} @@ -12,8 +12,8 @@ CLEANFILES= ${FILES} # These FILES qualify as libraries for the purpose of LIBRARIES_ONLY. .undef LIBRARIES_ONLY -CFLAGS+= -I${.CURDIR}/../../../sys/cddl/compat/opensolaris \ - -I${.CURDIR}/../../../cddl/compat/opensolaris/include \ +CFLAGS+= -I${SRCTOP}/sys/cddl/compat/opensolaris \ + -I${SRCTOP}/cddl/compat/opensolaris/include \ -I${OPENSOLARIS_USR_DISTDIR}/head \ -I${OPENSOLARIS_USR_DISTDIR}/lib/libctf/common \ -I${OPENSOLARIS_USR_DISTDIR}/lib/libdtrace/common \ Modified: stable/11/cddl/lib/libavl/Makefile ============================================================================== --- stable/11/cddl/lib/libavl/Makefile Thu Jul 20 00:52:11 2017 (r321267) +++ stable/11/cddl/lib/libavl/Makefile Thu Jul 20 00:53:50 2017 (r321268) @@ -1,11 +1,11 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../../../sys/cddl/contrib/opensolaris/common/avl +.PATH: ${SRCTOP}/sys/cddl/contrib/opensolaris/common/avl LIB= avl SRCS= avl.c WARNS?= 3 -CFLAGS+= -I${.CURDIR}/../../../sys/cddl/compat/opensolaris -CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/uts/common +CFLAGS+= -I${SRCTOP}/sys/cddl/compat/opensolaris +CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common .include Modified: stable/11/cddl/lib/libctf/Makefile ============================================================================== --- stable/11/cddl/lib/libctf/Makefile Thu Jul 20 00:52:11 2017 (r321267) +++ stable/11/cddl/lib/libctf/Makefile Thu Jul 20 00:53:50 2017 (r321268) @@ -1,8 +1,8 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../../../cddl/contrib/opensolaris/common/ctf -.PATH: ${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libctf/common -.PATH: ${.CURDIR}/../../../sys/cddl/contrib/opensolaris/common/ctf +.PATH: ${SRCTOP}/cddl/contrib/opensolaris/common/ctf +.PATH: ${SRCTOP}/cddl/contrib/opensolaris/lib/libctf/common +.PATH: ${SRCTOP}/sys/cddl/contrib/opensolaris/common/ctf LIB= ctf SRCS= ctf_create.c \ @@ -21,8 +21,8 @@ MAN= ctf.5 WARNS?= 2 CFLAGS+= -DCTF_OLD_VERSIONS -CFLAGS+= -I${.CURDIR}/../../../sys/cddl/compat/opensolaris \ - -I${.CURDIR}/../../../cddl/compat/opensolaris/include \ +CFLAGS+= -I${SRCTOP}/sys/cddl/compat/opensolaris \ + -I${SRCTOP}/cddl/compat/opensolaris/include \ -I${OPENSOLARIS_USR_DISTDIR}/head \ -I${OPENSOLARIS_USR_DISTDIR}/common/ctf \ -I${OPENSOLARIS_USR_DISTDIR}/lib/libctf/common \ Modified: stable/11/cddl/lib/libdtrace/Makefile ============================================================================== --- stable/11/cddl/lib/libdtrace/Makefile Thu Jul 20 00:52:11 2017 (r321267) +++ stable/11/cddl/lib/libdtrace/Makefile Thu Jul 20 00:53:50 2017 (r321268) @@ -1,7 +1,7 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libdtrace/common -.PATH: ${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libgen/common +.PATH: ${SRCTOP}/cddl/contrib/opensolaris/lib/libdtrace/common +.PATH: ${SRCTOP}/cddl/contrib/opensolaris/lib/libgen/common LIB= dtrace SRCS= dt_aggregate.c \ @@ -63,9 +63,9 @@ FILESMODE= ${NOBINMODE} WARNS?= 1 CFLAGS+= -I${.OBJDIR} -I${.CURDIR} \ - -I${.CURDIR}/../../../sys/cddl/dev/dtrace/${MACHINE_ARCH} \ - -I${.CURDIR}/../../../sys/cddl/compat/opensolaris \ - -I${.CURDIR}/../../../cddl/compat/opensolaris/include \ + -I${SRCTOP}/sys/cddl/dev/dtrace/${MACHINE_ARCH} \ + -I${SRCTOP}/sys/cddl/compat/opensolaris \ + -I${SRCTOP}/cddl/compat/opensolaris/include \ -I${OPENSOLARIS_USR_DISTDIR}/head \ -I${OPENSOLARIS_USR_DISTDIR}/lib/libctf/common \ -I${OPENSOLARIS_USR_DISTDIR}/lib/libdtrace/common \ @@ -75,33 +75,33 @@ CFLAGS+= -I${.OBJDIR} -I${.CURDIR} \ .if ${MACHINE_CPUARCH} == "aarch64" CFLAGS+= -I${OPENSOLARIS_SYS_DISTDIR}/uts/aarch64 -.PATH: ${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libdtrace/aarch64 -.PATH: ${.CURDIR}/../../../sys/cddl/dev/dtrace/aarch64 +.PATH: ${SRCTOP}/cddl/contrib/opensolaris/lib/libdtrace/aarch64 +.PATH: ${SRCTOP}/sys/cddl/dev/dtrace/aarch64 .elif ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386" -CFLAGS+= -I${.CURDIR}/../../../sys/cddl/dev/dtrace/x86 +CFLAGS+= -I${SRCTOP}/sys/cddl/dev/dtrace/x86 CFLAGS+= -I${OPENSOLARIS_SYS_DISTDIR}/uts/intel -DDIS_MEM -.PATH: ${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libdtrace/i386 -.PATH: ${.CURDIR}/../../../sys/cddl/dev/dtrace/${MACHINE_ARCH} -.PATH: ${.CURDIR}/../../../sys/cddl/dev/dtrace/x86 +.PATH: ${SRCTOP}/cddl/contrib/opensolaris/lib/libdtrace/i386 +.PATH: ${SRCTOP}/sys/cddl/dev/dtrace/${MACHINE_ARCH} +.PATH: ${SRCTOP}/sys/cddl/dev/dtrace/x86 .elif ${MACHINE_CPUARCH} == "arm" CFLAGS+= -I${OPENSOLARIS_SYS_DISTDIR}/uts/arm -.PATH: ${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libdtrace/arm -.PATH: ${.CURDIR}/../../../sys/cddl/dev/dtrace/arm +.PATH: ${SRCTOP}/cddl/contrib/opensolaris/lib/libdtrace/arm +.PATH: ${SRCTOP}/sys/cddl/dev/dtrace/arm .elif ${MACHINE_CPUARCH} == "mips" CFLAGS+= -I${OPENSOLARIS_SYS_DISTDIR}/uts/mips -.PATH: ${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libdtrace/mips -.PATH: ${.CURDIR}/../../../sys/cddl/dev/dtrace/mips +.PATH: ${SRCTOP}/cddl/contrib/opensolaris/lib/libdtrace/mips +.PATH: ${SRCTOP}/sys/cddl/dev/dtrace/mips .elif ${MACHINE_CPUARCH} == "powerpc" CFLAGS+= -I${OPENSOLARIS_SYS_DISTDIR}/uts/powerpc -.PATH: ${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libdtrace/powerpc -.PATH: ${.CURDIR}/../../../sys/cddl/dev/dtrace/powerpc +.PATH: ${SRCTOP}/cddl/contrib/opensolaris/lib/libdtrace/powerpc +.PATH: ${SRCTOP}/sys/cddl/dev/dtrace/powerpc .elif ${MACHINE_CPUARCH} == "riscv" CFLAGS+= -I${OPENSOLARIS_SYS_DISTDIR}/uts/riscv -.PATH: ${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libdtrace/riscv -.PATH: ${.CURDIR}/../../../sys/cddl/dev/dtrace/riscv +.PATH: ${SRCTOP}/cddl/contrib/opensolaris/lib/libdtrace/riscv +.PATH: ${SRCTOP}/sys/cddl/dev/dtrace/riscv .elif ${MACHINE_CPUARCH} == "sparc64" CFLAGS+= -I${OPENSOLARIS_SYS_DISTDIR}/uts/sparc -.PATH: ${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libdtrace/sparc +.PATH: ${SRCTOP}/cddl/contrib/opensolaris/lib/libdtrace/sparc .else # temporary hack CFLAGS+= -I${OPENSOLARIS_SYS_DISTDIR}/uts/intel Modified: stable/11/cddl/lib/libnvpair/Makefile ============================================================================== --- stable/11/cddl/lib/libnvpair/Makefile Thu Jul 20 00:52:11 2017 (r321267) +++ stable/11/cddl/lib/libnvpair/Makefile Thu Jul 20 00:53:50 2017 (r321268) @@ -1,7 +1,7 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libnvpair -.PATH: ${.CURDIR}/../../../sys/cddl/contrib/opensolaris/common/nvpair +.PATH: ${SRCTOP}/cddl/contrib/opensolaris/lib/libnvpair +.PATH: ${SRCTOP}/sys/cddl/contrib/opensolaris/common/nvpair LIB= nvpair @@ -13,18 +13,18 @@ SRCS= libnvpair.c \ opensolaris_nvpair_alloc_fixed.c WARNS?= 1 -CFLAGS+= -I${.CURDIR}/../../../cddl/compat/opensolaris/include -CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libzpool/common -CFLAGS+= -I${.CURDIR}/../../../sys/cddl/compat/opensolaris -CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/uts/common -CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/uts/common/fs/zfs -CFLAGS+= -I${.CURDIR}/../../../sys -CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/head -CFLAGS+= -I${.CURDIR}/../../../cddl/compat/opensolaris/lib/libumem +CFLAGS+= -I${SRCTOP}/cddl/compat/opensolaris/include +CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libzpool/common +CFLAGS+= -I${SRCTOP}/sys/cddl/compat/opensolaris +CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common +CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common/fs/zfs +CFLAGS+= -I${SRCTOP}/sys +CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/head +CFLAGS+= -I${SRCTOP}/cddl/compat/opensolaris/lib/libumem # This library uses macros to define fprintf behavior for several object types # The compiler will see the non-string literal arguments to the fprintf calls and -# omit warnings for them. Quiesce these warnings in contrib code: +# omit warnings for them. Quiesce these warnings in contrib code: # # cddl/contrib/opensolaris/lib/libnvpair/libnvpair.c:743:12: warning: format # string is not a string literal (potentially insecure) [-Wformat-security] Modified: stable/11/cddl/lib/libumem/Makefile ============================================================================== --- stable/11/cddl/lib/libumem/Makefile Thu Jul 20 00:52:11 2017 (r321267) +++ stable/11/cddl/lib/libumem/Makefile Thu Jul 20 00:53:50 2017 (r321268) @@ -1,10 +1,10 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../../../cddl/compat/opensolaris/lib/libumem +.PATH: ${SRCTOP}/cddl/compat/opensolaris/lib/libumem LIB= umem SRCS= umem.c WARNS?= 3 -CFLAGS+= -I${.CURDIR}/../../../cddl/compat/opensolaris/lib/libumem +CFLAGS+= -I${SRCTOP}/cddl/compat/opensolaris/lib/libumem .include Modified: stable/11/cddl/lib/libuutil/Makefile ============================================================================== --- stable/11/cddl/lib/libuutil/Makefile Thu Jul 20 00:52:11 2017 (r321267) +++ stable/11/cddl/lib/libuutil/Makefile Thu Jul 20 00:53:50 2017 (r321268) @@ -1,7 +1,7 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libuutil/common -.PATH: ${.CURDIR}/../../../sys/cddl/contrib/opensolaris/common/avl +.PATH: ${SRCTOP}/cddl/contrib/opensolaris/lib/libuutil/common +.PATH: ${SRCTOP}/sys/cddl/contrib/opensolaris/common/avl LIB= uutil SRCS= avl.c \ @@ -17,10 +17,10 @@ SRCS= avl.c \ WARNS?= 1 CFLAGS+= -DNATIVE_BUILD -CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libuutil/common -CFLAGS+= -I${.CURDIR}/../../../sys/cddl/compat/opensolaris -CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/uts/common -CFLAGS+= -I${.CURDIR}/../../../cddl/compat/opensolaris/include -CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/head +CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libuutil/common +CFLAGS+= -I${SRCTOP}/sys/cddl/compat/opensolaris +CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common +CFLAGS+= -I${SRCTOP}/cddl/compat/opensolaris/include +CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/head .include Modified: stable/11/cddl/lib/libzfs/Makefile ============================================================================== --- stable/11/cddl/lib/libzfs/Makefile Thu Jul 20 00:52:11 2017 (r321267) +++ stable/11/cddl/lib/libzfs/Makefile Thu Jul 20 00:53:50 2017 (r321268) @@ -1,9 +1,9 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../../../cddl/compat/opensolaris/misc -.PATH: ${.CURDIR}/../../../sys/cddl/contrib/opensolaris/common/zfs -.PATH: ${.CURDIR}/../../../sys/cddl/contrib/opensolaris/uts/common/fs/zfs -.PATH: ${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libzfs/common +.PATH: ${SRCTOP}/cddl/compat/opensolaris/misc +.PATH: ${SRCTOP}/sys/cddl/contrib/opensolaris/common/zfs +.PATH: ${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common/fs/zfs +.PATH: ${SRCTOP}/cddl/contrib/opensolaris/lib/libzfs/common LIB= zfs LIBADD= md pthread umem util uutil m avl bsdxml geom nvpair z zfs_core @@ -39,20 +39,19 @@ SRCS+= libzfs_changelist.c \ WARNS?= 0 CSTD= c99 CFLAGS+= -DZFS_NO_ACL -CFLAGS+= -I${.CURDIR}/../../../sbin/mount -CFLAGS+= -I${.CURDIR}/../../../cddl/lib/libumem -CFLAGS+= -I${.CURDIR}/../../../sys/cddl/compat/opensolaris -CFLAGS+= -I${.CURDIR}/../../../cddl/compat/opensolaris/include -CFLAGS+= -I${.CURDIR}/../../../cddl/compat/opensolaris/lib/libumem -CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libzpool/common -CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/common/zfs -CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/uts/common/fs/zfs -CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/uts/common/sys -CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/head -CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/uts/common -CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libnvpair -CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libuutil/common -CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libzfs/common -CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libzfs_core/common +CFLAGS+= -I${SRCTOP}/sbin/mount +CFLAGS+= -I${SRCTOP}/sys/cddl/compat/opensolaris +CFLAGS+= -I${SRCTOP}/cddl/compat/opensolaris/include +CFLAGS+= -I${SRCTOP}/cddl/compat/opensolaris/lib/libumem +CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libzpool/common +CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/common/zfs +CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common/fs/zfs +CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common/sys +CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/head +CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common +CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libnvpair +CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libuutil/common +CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libzfs/common +CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libzfs_core/common .include Modified: stable/11/cddl/lib/libzfs_core/Makefile ============================================================================== --- stable/11/cddl/lib/libzfs_core/Makefile Thu Jul 20 00:52:11 2017 (r321267) +++ stable/11/cddl/lib/libzfs_core/Makefile Thu Jul 20 00:53:50 2017 (r321268) @@ -1,10 +1,10 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../../../cddl/compat/opensolaris/misc -.PATH: ${.CURDIR}/../../../sys/cddl/contrib/opensolaris/common/zfs -.PATH: ${.CURDIR}/../../../sys/cddl/contrib/opensolaris/uts/common/fs/zfs -.PATH: ${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libzfs_core/common -.PATH: ${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libzfs/common +.PATH: ${SRCTOP}/cddl/compat/opensolaris/misc +.PATH: ${SRCTOP}/sys/cddl/contrib/opensolaris/common/zfs +.PATH: ${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common/fs/zfs +.PATH: ${SRCTOP}/cddl/contrib/opensolaris/lib/libzfs_core/common +.PATH: ${SRCTOP}/cddl/contrib/opensolaris/lib/libzfs/common LIB= zfs_core LIBADD= nvpair @@ -18,20 +18,19 @@ SRCS+= libzfs_compat.c WARNS?= 0 CSTD= c99 CFLAGS+= -DZFS_NO_ACL -CFLAGS+= -I${.CURDIR}/../../../sbin/mount -CFLAGS+= -I${.CURDIR}/../../../cddl/lib/libumem -CFLAGS+= -I${.CURDIR}/../../../sys/cddl/compat/opensolaris -CFLAGS+= -I${.CURDIR}/../../../cddl/compat/opensolaris/include -CFLAGS+= -I${.CURDIR}/../../../cddl/compat/opensolaris/lib/libumem -CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libzpool/common -CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/common/zfs -CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/uts/common/fs/zfs -CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/uts/common/sys -CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/head -CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/uts/common -CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libnvpair -CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libuutil/common -CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libzfs_core/common -CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libzfs/common +CFLAGS+= -I${SRCTOP}/sbin/mount +CFLAGS+= -I${SRCTOP}/sys/cddl/compat/opensolaris +CFLAGS+= -I${SRCTOP}/cddl/compat/opensolaris/include +CFLAGS+= -I${SRCTOP}/cddl/compat/opensolaris/lib/libumem +CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libzpool/common +CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/common/zfs +CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common/fs/zfs +CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common/sys +CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/head +CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common +CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libnvpair +CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libuutil/common +CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libzfs_core/common +CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libzfs/common .include Modified: stable/11/cddl/lib/libzpool/Makefile ============================================================================== --- stable/11/cddl/lib/libzpool/Makefile Thu Jul 20 00:52:11 2017 (r321267) +++ stable/11/cddl/lib/libzpool/Makefile Thu Jul 20 00:53:50 2017 (r321268) @@ -1,28 +1,28 @@ # $FreeBSD$ -.include "${.CURDIR}/../../../sys/cddl/contrib/opensolaris/uts/common/Makefile.files" +.include "${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common/Makefile.files" # ZFS_COMMON_SRCS -.PATH: ${.CURDIR}/../../../sys/cddl/contrib/opensolaris/uts/common/fs/zfs +.PATH: ${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common/fs/zfs # ZFS_SHARED_SRCS -.PATH: ${.CURDIR}/../../../sys/cddl/contrib/opensolaris/common/zfs +.PATH: ${SRCTOP}/sys/cddl/contrib/opensolaris/common/zfs # KERNEL_SRCS -.PATH: ${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libzpool/common +.PATH: ${SRCTOP}/cddl/contrib/opensolaris/lib/libzpool/common # LIST_SRCS -.PATH: ${.CURDIR}/../../../sys/cddl/contrib/opensolaris/uts/common/os +.PATH: ${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common/os # ATOMIC_SRCS -.if exists(${.CURDIR}/../../../sys/cddl/contrib/opensolaris/common/atomic/${MACHINE_ARCH}/opensolaris_atomic.S) -.PATH: ${.CURDIR}/../../../sys/cddl/contrib/opensolaris/common/atomic/${MACHINE_ARCH} +.if exists(${SRCTOP}/sys/cddl/contrib/opensolaris/common/atomic/${MACHINE_ARCH}/opensolaris_atomic.S) +.PATH: ${SRCTOP}/sys/cddl/contrib/opensolaris/common/atomic/${MACHINE_ARCH} ATOMIC_SRCS= opensolaris_atomic.S .if ${MACHINE_ARCH} != "sparc64" ACFLAGS+= -Wa,--noexecstack .endif .else -.PATH: ${.CURDIR}/../../../sys/cddl/compat/opensolaris/kern +.PATH: ${SRCTOP}/sys/cddl/compat/opensolaris/kern ATOMIC_SRCS= opensolaris_atomic.c .endif # UNICODE_SRCS -.PATH: ${.CURDIR}/../../../sys/cddl/contrib/opensolaris/common/unicode +.PATH: ${SRCTOP}/sys/cddl/contrib/opensolaris/common/unicode LIB= zpool @@ -37,24 +37,23 @@ SRCS= ${ZFS_COMMON_SRCS} ${ZFS_SHARED_SRCS} \ ${UNICODE_SRCS} WARNS?= 0 -CFLAGS+= -I${.CURDIR}/../../../sys/cddl/compat/opensolaris -CFLAGS+= -I${.CURDIR}/../../compat/opensolaris/include -CFLAGS+= -I${.CURDIR}/../../compat/opensolaris/lib/libumem -CFLAGS+= -I${.CURDIR}/../../contrib/opensolaris/lib/libzpool/common -CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/uts/common/sys -CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/uts/common/fs/zfs -CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/common/zfs -CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/uts/common -CFLAGS+= -I${.CURDIR}/../../contrib/opensolaris/head -CFLAGS+= -I${.CURDIR}/../../lib/libumem -CFLAGS+= -I${.CURDIR}/../../contrib/opensolaris/lib/libnvpair +CFLAGS+= -I${SRCTOP}/sys/cddl/compat/opensolaris +CFLAGS+= -I${SRCTOP}/cddl/compat/opensolaris/include +CFLAGS+= -I${SRCTOP}/cddl/compat/opensolaris/lib/libumem +CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libzpool/common +CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common/sys +CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common/fs/zfs +CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/common/zfs +CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common +CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/head +CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libnvpair # XXX: pthread doesn't have mutex_owned() equivalent, so we need to look # into libthr private structures. That's sooo evil, but it's only for # ZFS debugging tools needs. CFLAGS+= -DWANTS_MUTEX_OWNED -CFLAGS+= -I${.CURDIR}/../../../lib/libpthread/thread -CFLAGS+= -I${.CURDIR}/../../../lib/libpthread/sys -CFLAGS+= -I${.CURDIR}/../../../lib/libthr/arch/${MACHINE_CPUARCH}/include +CFLAGS+= -I${SRCTOP}/lib/libpthread/thread +CFLAGS+= -I${SRCTOP}/lib/libpthread/sys +CFLAGS+= -I${SRCTOP}/lib/libthr/arch/${MACHINE_CPUARCH}/include LIBADD= md pthread z nvpair avl umem Modified: stable/11/cddl/sbin/zfs/Makefile ============================================================================== --- stable/11/cddl/sbin/zfs/Makefile Thu Jul 20 00:52:11 2017 (r321267) +++ stable/11/cddl/sbin/zfs/Makefile Thu Jul 20 00:53:50 2017 (r321268) @@ -1,26 +1,26 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../../../cddl/contrib/opensolaris/cmd/zfs +.PATH: ${SRCTOP}/cddl/contrib/opensolaris/cmd/zfs PROG= zfs MAN= zfs.8 SRCS= zfs_main.c zfs_iter.c WARNS?= 0 -CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libzpool/common -CFLAGS+= -I${.CURDIR}/../../../cddl/compat/opensolaris/include -CFLAGS+= -I${.CURDIR}/../../../cddl/compat/opensolaris/lib/libumem -CFLAGS+= -I${.CURDIR}/../../../sys/cddl/compat/opensolaris -CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/head -CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libuutil/common -CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libzfs/common -CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libzfs_core/common -CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libumem/common -CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libnvpair -CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/uts/common -CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/uts/common/fs/zfs -CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/uts/common/sys -CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/common/zfs +CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libzpool/common +CFLAGS+= -I${SRCTOP}/cddl/compat/opensolaris/include +CFLAGS+= -I${SRCTOP}/cddl/compat/opensolaris/lib/libumem +CFLAGS+= -I${SRCTOP}/sys/cddl/compat/opensolaris +CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/head +CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libuutil/common +CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libzfs/common +CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libzfs_core/common +CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libumem/common +CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libnvpair +CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common +CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common/fs/zfs +CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common/sys +CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/common/zfs LIBADD= jail nvpair uutil zfs_core zfs Modified: stable/11/cddl/sbin/zpool/Makefile ============================================================================== --- stable/11/cddl/sbin/zpool/Makefile Thu Jul 20 00:52:11 2017 (r321267) +++ stable/11/cddl/sbin/zpool/Makefile Thu Jul 20 00:53:50 2017 (r321268) @@ -1,8 +1,8 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../../../cddl/contrib/opensolaris/cmd/zpool -.PATH: ${.CURDIR}/../../../cddl/contrib/opensolaris/cmd/stat/common -.PATH: ${.CURDIR}/../../../sys/cddl/contrib/opensolaris/common/zfs +.PATH: ${SRCTOP}/cddl/contrib/opensolaris/cmd/zpool +.PATH: ${SRCTOP}/cddl/contrib/opensolaris/cmd/stat/common +.PATH: ${SRCTOP}/sys/cddl/contrib/opensolaris/common/zfs PROG= zpool MAN= zpool.8 zpool-features.7 @@ -10,22 +10,22 @@ SRCS= zpool_main.c zpool_vdev.c zpool_iter.c zpool_uti SRCS+= timestamp.c WARNS?= 0 -CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libzpool/common -CFLAGS+= -I${.CURDIR}/../../../cddl/compat/opensolaris/include -CFLAGS+= -I${.CURDIR}/../../../cddl/compat/opensolaris/lib/libumem -CFLAGS+= -I${.CURDIR}/../../../sys/cddl/compat/opensolaris -CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/head -CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libuutil/common -CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libumem/common -CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libzfs/common -CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libzfs_core/common -CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libnvpair -CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/common/zfs -CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/uts/common -CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/uts/common/fs/zfs -CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/uts/common/sys -CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libzpool/common -CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/cmd/stat/common +CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libzpool/common +CFLAGS+= -I${SRCTOP}/cddl/compat/opensolaris/include +CFLAGS+= -I${SRCTOP}/cddl/compat/opensolaris/lib/libumem +CFLAGS+= -I${SRCTOP}/sys/cddl/compat/opensolaris +CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/head +CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libuutil/common +CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libumem/common +CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libzfs/common +CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libzfs_core/common +CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libnvpair +CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/common/zfs +CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common +CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common/fs/zfs +CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common/sys +CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libzpool/common +CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/cmd/stat/common LIBADD= geom nvpair uutil zfs Modified: stable/11/cddl/usr.bin/ctfconvert/Makefile ============================================================================== --- stable/11/cddl/usr.bin/ctfconvert/Makefile Thu Jul 20 00:52:11 2017 (r321267) +++ stable/11/cddl/usr.bin/ctfconvert/Makefile Thu Jul 20 00:53:50 2017 (r321268) @@ -1,7 +1,7 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../../../cddl/contrib/opensolaris/tools/ctf/common -.PATH: ${.CURDIR}/../../../cddl/contrib/opensolaris/tools/ctf/cvt +.PATH: ${SRCTOP}/cddl/contrib/opensolaris/tools/ctf/common +.PATH: ${SRCTOP}/cddl/contrib/opensolaris/tools/ctf/cvt PROG= ctfconvert SRCS= alist.c \ @@ -25,8 +25,8 @@ SRCS= alist.c \ traverse.c \ util.c -CFLAGS+= -I${.CURDIR}/../../../sys/cddl/compat/opensolaris \ - -I${.CURDIR}/../../../cddl/compat/opensolaris/include \ +CFLAGS+= -I${SRCTOP}/sys/cddl/compat/opensolaris \ + -I${SRCTOP}/cddl/compat/opensolaris/include \ -I${OPENSOLARIS_USR_DISTDIR} \ -I${OPENSOLARIS_SYS_DISTDIR} \ -I${OPENSOLARIS_USR_DISTDIR}/head \ Modified: stable/11/cddl/usr.bin/ctfdump/Makefile ============================================================================== --- stable/11/cddl/usr.bin/ctfdump/Makefile Thu Jul 20 00:52:11 2017 (r321267) +++ stable/11/cddl/usr.bin/ctfdump/Makefile Thu Jul 20 00:53:50 2017 (r321268) @@ -1,7 +1,7 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../../../cddl/contrib/opensolaris/tools/ctf/common -.PATH: ${.CURDIR}/../../../cddl/contrib/opensolaris/tools/ctf/dump +.PATH: ${SRCTOP}/cddl/contrib/opensolaris/tools/ctf/common +.PATH: ${SRCTOP}/cddl/contrib/opensolaris/tools/ctf/dump PROG= ctfdump SRCS= dump.c \ @@ -12,8 +12,8 @@ CFLAGS+= -I${OPENSOLARIS_USR_DISTDIR} \ -I${OPENSOLARIS_SYS_DISTDIR} \ -I${OPENSOLARIS_USR_DISTDIR}/head \ -I${OPENSOLARIS_USR_DISTDIR}/cmd/mdb/tools/common \ - -I${.CURDIR}/../../../sys/cddl/compat/opensolaris \ - -I${.CURDIR}/../../../cddl/compat/opensolaris/include \ + -I${SRCTOP}/sys/cddl/compat/opensolaris \ + -I${SRCTOP}/cddl/compat/opensolaris/include \ -I${OPENSOLARIS_USR_DISTDIR}/tools/ctf/common \ -I${OPENSOLARIS_SYS_DISTDIR}/uts/common Modified: stable/11/cddl/usr.bin/ctfmerge/Makefile ============================================================================== --- stable/11/cddl/usr.bin/ctfmerge/Makefile Thu Jul 20 00:52:11 2017 (r321267) +++ stable/11/cddl/usr.bin/ctfmerge/Makefile Thu Jul 20 00:53:50 2017 (r321268) @@ -1,7 +1,7 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../../../cddl/contrib/opensolaris/tools/ctf/common -.PATH: ${.CURDIR}/../../../cddl/contrib/opensolaris/tools/ctf/cvt +.PATH: ${SRCTOP}/cddl/contrib/opensolaris/tools/ctf/common +.PATH: ${SRCTOP}/cddl/contrib/opensolaris/tools/ctf/cvt PROG= ctfmerge SRCS= alist.c \ @@ -24,8 +24,8 @@ SRCS= alist.c \ WARNS?= 1 -CFLAGS+= -I${.CURDIR}/../../../sys/cddl/compat/opensolaris \ - -I${.CURDIR}/../../../cddl/compat/opensolaris/include \ +CFLAGS+= -I${SRCTOP}/sys/cddl/compat/opensolaris \ + -I${SRCTOP}/cddl/compat/opensolaris/include \ -I${OPENSOLARIS_USR_DISTDIR} \ -I${OPENSOLARIS_SYS_DISTDIR} \ -I${OPENSOLARIS_USR_DISTDIR}/head \ Modified: stable/11/cddl/usr.bin/zinject/Makefile ============================================================================== --- stable/11/cddl/usr.bin/zinject/Makefile Thu Jul 20 00:52:11 2017 (r321267) +++ stable/11/cddl/usr.bin/zinject/Makefile Thu Jul 20 00:53:50 2017 (r321268) @@ -1,25 +1,24 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../../contrib/opensolaris/cmd/zinject +.PATH: ${SRCTOP}/cddl/contrib/opensolaris/cmd/zinject PROG= zinject SRCS= zinject.c translate.c MAN= WARNS?= 0 -CFLAGS+= -I${.CURDIR}/../../../sys/cddl/compat/opensolaris -CFLAGS+= -I${.CURDIR}/../../compat/opensolaris/include -CFLAGS+= -I${.CURDIR}/../../compat/opensolaris/lib/libumem -CFLAGS+= -I${.CURDIR}/../../contrib/opensolaris/lib/libzfs/common -CFLAGS+= -I${.CURDIR}/../../contrib/opensolaris/lib/libzfs_core/common -CFLAGS+= -I${.CURDIR}/../../contrib/opensolaris/lib/libzpool/common -CFLAGS+= -I${.CURDIR}/../../contrib/opensolaris/lib/libnvpair -CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/uts/common/fs/zfs -CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/uts/common/sys -CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/uts/common -CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/common/zfs/ -CFLAGS+= -I${.CURDIR}/../../contrib/opensolaris/head -CFLAGS+= -I${.CURDIR}/../../lib/libumem +CFLAGS+= -I${SRCTOP}/sys/cddl/compat/opensolaris +CFLAGS+= -I${SRCTOP}/cddl/compat/opensolaris/include +CFLAGS+= -I${SRCTOP}/cddl/compat/opensolaris/lib/libumem +CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libzfs/common +CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libzfs_core/common +CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libzpool/common +CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libnvpair +CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common/fs/zfs +CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common/sys +CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common +CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/common/zfs/ +CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/head LIBADD= geom m nvpair umem uutil zfs_core zfs zpool Modified: stable/11/cddl/usr.bin/zlook/Makefile ============================================================================== --- stable/11/cddl/usr.bin/zlook/Makefile Thu Jul 20 00:52:11 2017 (r321267) +++ stable/11/cddl/usr.bin/zlook/Makefile Thu Jul 20 00:53:50 2017 (r321268) @@ -1,25 +1,12 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../../contrib/opensolaris/cmd/zlook +.PATH: ${SRCTOP}/cddl/contrib/opensolaris/cmd/zlook PROG= zlook MAN= WARNS?= 0 -CFLAGS+= -I${.CURDIR}/../../../sys/cddl/compat/opensolaris -#CFLAGS+= -I${.CURDIR}/../../compat/opensolaris/include -#CFLAGS+= -I${.CURDIR}/../../compat/opensolaris/lib/libumem -#CFLAGS+= -I${.CURDIR}/../../contrib/opensolaris/lib/libzfs/common -#CFLAGS+= -I${.CURDIR}/../../contrib/opensolaris/lib/libzpool/common -#CFLAGS+= -I${.CURDIR}/../../contrib/opensolaris/lib/libnvpair -#CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/uts/common/fs/zfs -#CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/uts/common/sys -CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/uts/common -#CFLAGS+= -I${.CURDIR}/../../contrib/opensolaris/head -#CFLAGS+= -I${.CURDIR}/../../lib/libumem -# -#DPADD= ${LIBAVL} ${LIBGEOM} ${LIBM} ${LIBNVPAIR} ${LIBUMEM} ${LIBUUTIL} \ -# ${LIBZFS} ${LIBZPOOL} -#LDADD= -lavl -lgeom -lm -lnvpair -lumem -luutil -lzfs -lzpool +CFLAGS+= -I${SRCTOP}/sys/cddl/compat/opensolaris +CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common .include Modified: stable/11/cddl/usr.bin/zstreamdump/Makefile ============================================================================== --- stable/11/cddl/usr.bin/zstreamdump/Makefile Thu Jul 20 00:52:11 2017 (r321267) +++ stable/11/cddl/usr.bin/zstreamdump/Makefile Thu Jul 20 00:53:50 2017 (r321268) @@ -1,22 +1,21 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../..//contrib/opensolaris/cmd/zstreamdump +.PATH: ${SRCTOP}/cddl/contrib/opensolaris/cmd/zstreamdump PROG= zstreamdump MAN= zstreamdump.1 WARNS?= 0 -CFLAGS+= -I${.CURDIR}/../../../sys/cddl/compat/opensolaris -CFLAGS+= -I${.CURDIR}/../../compat/opensolaris/include -CFLAGS+= -I${.CURDIR}/../../compat/opensolaris/lib/libumem -CFLAGS+= -I${.CURDIR}/../../contrib/opensolaris/lib/libzpool/common -CFLAGS+= -I${.CURDIR}/../../contrib/opensolaris/lib/libnvpair -CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/common/zfs -CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/uts/common/fs/zfs -CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/uts/common/sys -CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/uts/common -CFLAGS+= -I${.CURDIR}/../../contrib/opensolaris/head -CFLAGS+= -I${.CURDIR}/../../lib/libumem +CFLAGS+= -I${SRCTOP}/sys/cddl/compat/opensolaris +CFLAGS+= -I${SRCTOP}/cddl/compat/opensolaris/include +CFLAGS+= -I${SRCTOP}/cddl/compat/opensolaris/lib/libumem +CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libzpool/common +CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libnvpair +CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/common/zfs +CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common/fs/zfs +CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common/sys +CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common +CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/head LIBADD= m nvpair umem zpool pthread z avl Modified: stable/11/cddl/usr.bin/ztest/Makefile ============================================================================== --- stable/11/cddl/usr.bin/ztest/Makefile Thu Jul 20 00:52:11 2017 (r321267) +++ stable/11/cddl/usr.bin/ztest/Makefile Thu Jul 20 00:53:50 2017 (r321268) @@ -1,22 +1,21 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../..//contrib/opensolaris/cmd/ztest +.PATH: ${SRCTOP}/cddl/contrib/opensolaris/cmd/ztest PROG= ztest MAN= WARNS?= 0 -CFLAGS+= -I${.CURDIR}/../../../sys/cddl/compat/opensolaris -CFLAGS+= -I${.CURDIR}/../../compat/opensolaris/include -CFLAGS+= -I${.CURDIR}/../../compat/opensolaris/lib/libumem -CFLAGS+= -I${.CURDIR}/../../contrib/opensolaris/lib/libzpool/common -CFLAGS+= -I${.CURDIR}/../../contrib/opensolaris/lib/libnvpair -CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/common/zfs -CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/uts/common/fs/zfs -CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/uts/common/sys -CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/uts/common -CFLAGS+= -I${.CURDIR}/../../contrib/opensolaris/head -CFLAGS+= -I${.CURDIR}/../../lib/libumem +CFLAGS+= -I${SRCTOP}/sys/cddl/compat/opensolaris +CFLAGS+= -I${SRCTOP}/cddl/compat/opensolaris/include +CFLAGS+= -I${SRCTOP}/cddl/compat/opensolaris/lib/libumem +CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libzpool/common +CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libnvpair +CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/common/zfs +CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common/fs/zfs +CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common/sys +CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common +CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/head LIBADD= geom m nvpair umem zpool pthread avl zfs_core zfs uutil Modified: stable/11/cddl/usr.sbin/dtrace/Makefile ============================================================================== --- stable/11/cddl/usr.sbin/dtrace/Makefile Thu Jul 20 00:52:11 2017 (r321267) +++ stable/11/cddl/usr.sbin/dtrace/Makefile Thu Jul 20 00:53:50 2017 (r321268) @@ -2,7 +2,7 @@ .include -.PATH: ${.CURDIR}/../../../cddl/contrib/opensolaris/cmd/dtrace +.PATH: ${SRCTOP}/cddl/contrib/opensolaris/cmd/dtrace PROG= dtrace SRCS= dtrace.c @@ -10,8 +10,8 @@ BINDIR?= /usr/sbin WARNS?= 1 -CFLAGS+= -I${.CURDIR}/../../../sys/cddl/compat/opensolaris \ - -I${.CURDIR}/../../../cddl/compat/opensolaris/include \ +CFLAGS+= -I${SRCTOP}/sys/cddl/compat/opensolaris \ + -I${SRCTOP}/cddl/compat/opensolaris/include \ -I${OPENSOLARIS_USR_DISTDIR}/head \ -I${OPENSOLARIS_USR_DISTDIR}/lib/libdtrace/common \ -I${OPENSOLARIS_USR_DISTDIR}/lib/libproc/common \ Modified: stable/11/cddl/usr.sbin/lockstat/Makefile ============================================================================== --- stable/11/cddl/usr.sbin/lockstat/Makefile Thu Jul 20 00:52:11 2017 (r321267) +++ stable/11/cddl/usr.sbin/lockstat/Makefile Thu Jul 20 00:53:50 2017 (r321268) @@ -1,6 +1,6 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../../../cddl/contrib/opensolaris/cmd/lockstat +.PATH: ${SRCTOP}/cddl/contrib/opensolaris/cmd/lockstat PROG= lockstat SRCS= lockstat.c sym.c @@ -8,14 +8,14 @@ BINDIR?= /usr/sbin WARNS?= 1 -CFLAGS+= -I${.CURDIR}/../../../sys/cddl/compat/opensolaris \ - -I${.CURDIR}/../../../cddl/compat/opensolaris/include \ +CFLAGS+= -I${SRCTOP}/sys/cddl/compat/opensolaris \ + -I${SRCTOP}/cddl/compat/opensolaris/include \ -I${OPENSOLARIS_USR_DISTDIR}/head \ -I${OPENSOLARIS_USR_DISTDIR}/lib/libdtrace/common \ -I${OPENSOLARIS_USR_DISTDIR}/lib/libproc/common \ -I${OPENSOLARIS_SYS_DISTDIR}/uts/common \ -I${OPENSOLARIS_SYS_DISTDIR}/compat \ - -I${.CURDIR}/../../../sys + -I${SRCTOP}/sys CFLAGS+= -DNEED_ERRLOC -g Modified: stable/11/cddl/usr.sbin/plockstat/Makefile ============================================================================== --- stable/11/cddl/usr.sbin/plockstat/Makefile Thu Jul 20 00:52:11 2017 (r321267) +++ stable/11/cddl/usr.sbin/plockstat/Makefile Thu Jul 20 00:53:50 2017 (r321268) @@ -1,22 +1,22 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../../../cddl/contrib/opensolaris/cmd/plockstat +.PATH: ${SRCTOP}/cddl/contrib/opensolaris/cmd/plockstat PROG= plockstat -SRCS= plockstat.c +SRCS= plockstat.c BINDIR?= /usr/sbin WARNS?= 1 -CFLAGS+= -I${.CURDIR}/../../../sys/cddl/compat/opensolaris \ - -I${.CURDIR}/../../../cddl/compat/opensolaris/include \ +CFLAGS+= -I${SRCTOP}/sys/cddl/compat/opensolaris \ + -I${SRCTOP}/cddl/compat/opensolaris/include \ -I${OPENSOLARIS_USR_DISTDIR}/head \ -I${OPENSOLARIS_USR_DISTDIR}/lib/libdtrace/common \ -I${OPENSOLARIS_USR_DISTDIR}/lib/libproc/common \ -I${OPENSOLARIS_SYS_DISTDIR}/uts/common \ -I${OPENSOLARIS_SYS_DISTDIR}/compat \ - -I${.CURDIR}/../../../cddl/lib/libdtrace \ - -I${.CURDIR}/../../../sys + -I${SRCTOP}/cddl/lib/libdtrace \ + -I${SRCTOP}/sys LIBADD= dtrace proc Modified: stable/11/cddl/usr.sbin/zdb/Makefile ============================================================================== --- stable/11/cddl/usr.sbin/zdb/Makefile Thu Jul 20 00:52:11 2017 (r321267) +++ stable/11/cddl/usr.sbin/zdb/Makefile Thu Jul 20 00:53:50 2017 (r321268) @@ -1,6 +1,6 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../../../cddl/contrib/opensolaris/cmd/zdb +.PATH: ${SRCTOP}/cddl/contrib/opensolaris/cmd/zdb PROG= zdb MAN= zdb.8 @@ -9,20 +9,19 @@ SRCS= zdb.c zdb_il.c WARNS?= 0 CSTD= c99 -CFLAGS+= -I${.CURDIR}/../../../sys/cddl/compat/opensolaris -CFLAGS+= -I${.CURDIR}/../../../cddl/compat/opensolaris/include -CFLAGS+= -I${.CURDIR}/../../../cddl/compat/opensolaris/lib/libumem -CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libnvpair -CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libuutil/common -CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libzfs/common -CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libzfs_core/common -CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libzpool/common -CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/uts/common/fs/zfs -CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/uts/common -CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/uts/common/sys -CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/common/zfs -CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/head -CFLAGS+= -I${.CURDIR}/../../lib/libumem +CFLAGS+= -I${SRCTOP}/sys/cddl/compat/opensolaris +CFLAGS+= -I${SRCTOP}/cddl/compat/opensolaris/include +CFLAGS+= -I${SRCTOP}/cddl/compat/opensolaris/lib/libumem +CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libnvpair +CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libuutil/common +CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libzfs/common +CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libzfs_core/common +CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libzpool/common +CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common/fs/zfs +CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common +CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common/sys +CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/common/zfs +CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/head LIBADD= nvpair umem uutil zfs zpool Modified: stable/11/cddl/usr.sbin/zhack/Makefile ============================================================================== --- stable/11/cddl/usr.sbin/zhack/Makefile Thu Jul 20 00:52:11 2017 (r321267) +++ stable/11/cddl/usr.sbin/zhack/Makefile Thu Jul 20 00:53:50 2017 (r321268) @@ -1,6 +1,6 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../../../cddl/contrib/opensolaris/cmd/zhack +.PATH: ${SRCTOP}/cddl/contrib/opensolaris/cmd/zhack PROG= zhack MAN= @@ -8,20 +8,19 @@ MAN= WARNS?= 0 CSTD= c99 -CFLAGS+= -I${.CURDIR}/../../../sys/cddl/compat/opensolaris -CFLAGS+= -I${.CURDIR}/../../../cddl/compat/opensolaris/include -CFLAGS+= -I${.CURDIR}/../../../cddl/compat/opensolaris/lib/libumem -CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libnvpair -CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libuutil/common -CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libzfs/common -CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libzfs_core/common -CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libzpool/common -CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/uts/common/fs/zfs -CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/uts/common -CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/uts/common/sys -CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/common/zfs -CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/head -CFLAGS+= -I${.CURDIR}/../../lib/libumem +CFLAGS+= -I${SRCTOP}/sys/cddl/compat/opensolaris +CFLAGS+= -I${SRCTOP}/cddl/compat/opensolaris/include +CFLAGS+= -I${SRCTOP}/cddl/compat/opensolaris/lib/libumem +CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libnvpair +CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libuutil/common +CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libzfs/common +CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libzfs_core/common +CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libzpool/common +CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common/fs/zfs +CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common +CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common/sys +CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/common/zfs +CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/head LIBADD= nvpair zfs zpool From owner-svn-src-stable-11@freebsd.org Thu Jul 20 00:58:21 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D76D4D9BDD5; Thu, 20 Jul 2017 00:58:21 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B13B473DAA; Thu, 20 Jul 2017 00:58:21 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6K0wKUY034336; Thu, 20 Jul 2017 00:58:20 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6K0wJZv034325; Thu, 20 Jul 2017 00:58:19 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201707200058.v6K0wJZv034325@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Thu, 20 Jul 2017 00:58:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r321269 - in stable/11/libexec: atrun dma ftpd hyperv mail.local smrsh talkd tcpd telnetd tftp-proxy ypxfr X-SVN-Group: stable-11 X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: in stable/11/libexec: atrun dma ftpd hyperv mail.local smrsh talkd tcpd telnetd tftp-proxy ypxfr X-SVN-Commit-Revision: 321269 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Jul 2017 00:58:21 -0000 Author: ngie Date: Thu Jul 20 00:58:19 2017 New Revision: 321269 URL: https://svnweb.freebsd.org/changeset/base/321269 Log: MFC r314653: libexec: normalize paths using SRCTOP-relative paths or :H when possible This simplifies make logic/output Modified: stable/11/libexec/atrun/Makefile stable/11/libexec/dma/Makefile.inc stable/11/libexec/ftpd/Makefile stable/11/libexec/hyperv/Makefile stable/11/libexec/mail.local/Makefile stable/11/libexec/smrsh/Makefile stable/11/libexec/talkd/Makefile stable/11/libexec/tcpd/Makefile stable/11/libexec/telnetd/Makefile stable/11/libexec/tftp-proxy/Makefile stable/11/libexec/ypxfr/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/libexec/atrun/Makefile ============================================================================== --- stable/11/libexec/atrun/Makefile Thu Jul 20 00:53:50 2017 (r321268) +++ stable/11/libexec/atrun/Makefile Thu Jul 20 00:58:19 2017 (r321269) @@ -1,7 +1,7 @@ # $FreeBSD$ PACKAGE=at -MAINSRC=${.CURDIR}/../../usr.bin/at +MAINSRC=${SRCTOP}/usr.bin/at .include "${MAINSRC}/Makefile.inc" Modified: stable/11/libexec/dma/Makefile.inc ============================================================================== --- stable/11/libexec/dma/Makefile.inc Thu Jul 20 00:53:50 2017 (r321268) +++ stable/11/libexec/dma/Makefile.inc Thu Jul 20 00:58:19 2017 (r321269) @@ -1,7 +1,7 @@ # $FreeBSD$ -.sinclude "${.CURDIR}/../../Makefile.inc" -DMA_SOURCES= ${.CURDIR}/../../../contrib/dma +.sinclude "${.CURDIR:H:H}/Makefile.inc" +DMA_SOURCES= ${SRCTOP}/contrib/dma .PATH: ${DMA_SOURCES} CFLAGS+= -I${DMA_SOURCES} \ Modified: stable/11/libexec/ftpd/Makefile ============================================================================== --- stable/11/libexec/ftpd/Makefile Thu Jul 20 00:53:50 2017 (r321268) +++ stable/11/libexec/ftpd/Makefile Thu Jul 20 00:58:19 2017 (r321269) @@ -18,10 +18,9 @@ LIBADD= crypt xo util # XXX Kluge! Conversation mechanism needs to be fixed. LIBADD+= opie md -LSDIR= ../../bin/ls -.PATH: ${.CURDIR}/${LSDIR} +.PATH: ${SRCTOP}/bin/ls SRCS+= ls.c cmp.c print.c util.c -CFLAGS+=-Dmain=ls_main -I${.CURDIR}/${LSDIR} +CFLAGS+=-Dmain=ls_main -I${SRCTOP}/bin/ls LIBADD+= m .if ${MK_BLACKLIST_SUPPORT} != "no" Modified: stable/11/libexec/hyperv/Makefile ============================================================================== --- stable/11/libexec/hyperv/Makefile Thu Jul 20 00:53:50 2017 (r321268) +++ stable/11/libexec/hyperv/Makefile Thu Jul 20 00:58:19 2017 (r321269) @@ -1,6 +1,6 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../../contrib/hyperv/tools/scripts +.PATH: ${SRCTOP}/contrib/hyperv/tools/scripts BINDIR= ${LIBEXECDIR}/hyperv Modified: stable/11/libexec/mail.local/Makefile ============================================================================== --- stable/11/libexec/mail.local/Makefile Thu Jul 20 00:53:50 2017 (r321268) +++ stable/11/libexec/mail.local/Makefile Thu Jul 20 00:58:19 2017 (r321269) @@ -2,7 +2,7 @@ # $FreeBSD$ PACKAGE=sendmail -SENDMAIL_DIR=${.CURDIR}/../../contrib/sendmail +SENDMAIL_DIR=${SRCTOP}/contrib/sendmail .PATH: ${SENDMAIL_DIR}/mail.local PROG= mail.local Modified: stable/11/libexec/smrsh/Makefile ============================================================================== --- stable/11/libexec/smrsh/Makefile Thu Jul 20 00:53:50 2017 (r321268) +++ stable/11/libexec/smrsh/Makefile Thu Jul 20 00:58:19 2017 (r321269) @@ -2,7 +2,7 @@ # $FreeBSD$ PACKAGE=sendmail -SENDMAIL_DIR=${.CURDIR}/../../contrib/sendmail +SENDMAIL_DIR=${SRCTOP}/contrib/sendmail .PATH: ${SENDMAIL_DIR}/smrsh PROG= smrsh Modified: stable/11/libexec/talkd/Makefile ============================================================================== --- stable/11/libexec/talkd/Makefile Thu Jul 20 00:53:50 2017 (r321268) +++ stable/11/libexec/talkd/Makefile Thu Jul 20 00:58:19 2017 (r321269) @@ -3,8 +3,8 @@ PROG= ntalkd SRCS= talkd.c announce.c process.c table.c print.c ttymsg.c -.PATH: ${.CURDIR}/../../usr.bin/wall +.PATH: ${SRCTOP}/usr.bin/wall MAN= talkd.8 -CFLAGS+=-I${.CURDIR}/../../usr.bin/wall +CFLAGS+=-I${SRCTOP}/usr.bin/wall .include Modified: stable/11/libexec/tcpd/Makefile ============================================================================== --- stable/11/libexec/tcpd/Makefile Thu Jul 20 00:53:50 2017 (r321268) +++ stable/11/libexec/tcpd/Makefile Thu Jul 20 00:58:19 2017 (r321269) @@ -2,7 +2,7 @@ .include -.PATH: ${.CURDIR}/../../contrib/tcp_wrappers +.PATH: ${SRCTOP}/contrib/tcp_wrappers PROG= tcpd MAN= tcpd.8 Modified: stable/11/libexec/telnetd/Makefile ============================================================================== --- stable/11/libexec/telnetd/Makefile Thu Jul 20 00:53:50 2017 (r321268) +++ stable/11/libexec/telnetd/Makefile Thu Jul 20 00:58:19 2017 (r321269) @@ -5,7 +5,7 @@ .include -TELNETDIR= ${.CURDIR}/../../contrib/telnet +TELNETDIR= ${SRCTOP}/contrib/telnet .PATH: ${TELNETDIR}/telnetd PROG= telnetd @@ -27,7 +27,7 @@ CFLAGS+= -DINET6 CFLAGS+= -I${TELNETDIR} CFLAGS+= -I${TELNETDIR}/telnet -LIBTELNET= ${.OBJDIR}/../../lib/libtelnet/libtelnet.a +LIBTELNET= ${OBJTOP}/lib/libtelnet/libtelnet.a LIBADD= telnet util ncursesw Modified: stable/11/libexec/tftp-proxy/Makefile ============================================================================== --- stable/11/libexec/tftp-proxy/Makefile Thu Jul 20 00:53:50 2017 (r321268) +++ stable/11/libexec/tftp-proxy/Makefile Thu Jul 20 00:58:19 2017 (r321269) @@ -1,6 +1,6 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../../contrib/pf/tftp-proxy +.PATH: ${SRCTOP}/contrib/pf/tftp-proxy PROG= tftp-proxy SRCS= tftp-proxy.c filter.c Modified: stable/11/libexec/ypxfr/Makefile ============================================================================== --- stable/11/libexec/ypxfr/Makefile Thu Jul 20 00:53:50 2017 (r321268) +++ stable/11/libexec/ypxfr/Makefile Thu Jul 20 00:58:19 2017 (r321269) @@ -7,7 +7,7 @@ SRCS= yp_dblookup.c yp_dbwrite.c yp_error.c \ ${GENSRCS} GENSRCS=yp.h yp_clnt.c ypxfr_clnt.c -.PATH: ${.CURDIR}/../../usr.sbin/ypserv +.PATH: ${SRCTOP}/usr.sbin/ypserv MAN= ypxfr.8 @@ -20,7 +20,7 @@ LIBADD= rpcsvc CLEANFILES= ${GENSRCS} -RPCDIR= ${.CURDIR}/../../include/rpcsvc +RPCDIR= ${SRCTOP}/include/rpcsvc RPCGEN= RPCGEN_CPP=${CPP:Q} rpcgen -I -C ypxfr_clnt.c: ${RPCDIR}/yp.x From owner-svn-src-stable-11@freebsd.org Thu Jul 20 01:02:31 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BF301D9D06C; Thu, 20 Jul 2017 01:02:31 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8DD52742B8; Thu, 20 Jul 2017 01:02:31 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6K12UMs038385; Thu, 20 Jul 2017 01:02:30 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6K12U2I038382; Thu, 20 Jul 2017 01:02:30 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201707200102.v6K12U2I038382@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Thu, 20 Jul 2017 01:02:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r321271 - in stable/11/usr.sbin/fifolog: fifolog_create fifolog_reader fifolog_writer X-SVN-Group: stable-11 X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: in stable/11/usr.sbin/fifolog: fifolog_create fifolog_reader fifolog_writer X-SVN-Commit-Revision: 321271 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Jul 2017 01:02:31 -0000 Author: ngie Date: Thu Jul 20 01:02:30 2017 New Revision: 321271 URL: https://svnweb.freebsd.org/changeset/base/321271 Log: MFC r314479: Use :H to manipulate .CURDIR-relative paths instead of ../ This simplifies make output Modified: stable/11/usr.sbin/fifolog/fifolog_create/Makefile stable/11/usr.sbin/fifolog/fifolog_reader/Makefile stable/11/usr.sbin/fifolog/fifolog_writer/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/fifolog/fifolog_create/Makefile ============================================================================== --- stable/11/usr.sbin/fifolog/fifolog_create/Makefile Thu Jul 20 01:01:16 2017 (r321270) +++ stable/11/usr.sbin/fifolog/fifolog_create/Makefile Thu Jul 20 01:02:30 2017 (r321271) @@ -2,7 +2,7 @@ PROG= fifolog_create -CFLAGS+= -I${.CURDIR}/../lib +CFLAGS+= -I${.CURDIR:H}/lib LIBADD= util fifolog Modified: stable/11/usr.sbin/fifolog/fifolog_reader/Makefile ============================================================================== --- stable/11/usr.sbin/fifolog/fifolog_reader/Makefile Thu Jul 20 01:01:16 2017 (r321270) +++ stable/11/usr.sbin/fifolog/fifolog_reader/Makefile Thu Jul 20 01:02:30 2017 (r321271) @@ -2,7 +2,7 @@ PROG= fifolog_reader -CFLAGS+= -I${.CURDIR}/../lib +CFLAGS+= -I${.CURDIR:H}/lib MAN= Modified: stable/11/usr.sbin/fifolog/fifolog_writer/Makefile ============================================================================== --- stable/11/usr.sbin/fifolog/fifolog_writer/Makefile Thu Jul 20 01:01:16 2017 (r321270) +++ stable/11/usr.sbin/fifolog/fifolog_writer/Makefile Thu Jul 20 01:02:30 2017 (r321271) @@ -2,7 +2,7 @@ PROG= fifolog_writer -CFLAGS+= -I${.CURDIR}/../lib +CFLAGS+= -I${.CURDIR:H}/lib MAN= From owner-svn-src-stable-11@freebsd.org Thu Jul 20 01:03:45 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 225EED9D19A; Thu, 20 Jul 2017 01:03:45 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E30DD74572; Thu, 20 Jul 2017 01:03:44 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6K13iHl038593; Thu, 20 Jul 2017 01:03:44 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6K13hmk038591; Thu, 20 Jul 2017 01:03:43 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201707200103.v6K13hmk038591@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Thu, 20 Jul 2017 01:03:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r321273 - in stable/11/usr.sbin: rpc.lockd rpc.statd X-SVN-Group: stable-11 X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: in stable/11/usr.sbin: rpc.lockd rpc.statd X-SVN-Commit-Revision: 321273 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Jul 2017 01:03:45 -0000 Author: ngie Date: Thu Jul 20 01:03:43 2017 New Revision: 321273 URL: https://svnweb.freebsd.org/changeset/base/321273 Log: MFC r314454,r314455: r314454: Use .ALLSRC instead of RPCSRC This is a trivial simplification in the Makefile, meant to serve as a good example for what to do with rules like this. r314455: Use .ALLSRC instead of RPCSRC This is a trivial simplification in the Makefile, meant to serve as a good example for what to do with rules like this. Modified: stable/11/usr.sbin/rpc.lockd/Makefile stable/11/usr.sbin/rpc.statd/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/rpc.lockd/Makefile ============================================================================== --- stable/11/usr.sbin/rpc.lockd/Makefile Thu Jul 20 01:02:37 2017 (r321272) +++ stable/11/usr.sbin/rpc.lockd/Makefile Thu Jul 20 01:03:43 2017 (r321273) @@ -17,10 +17,10 @@ RPCSRC= ${DESTDIR}/usr/include/rpcsvc/nlm_prot.x RPCGEN= RPCGEN_CPP=${CPP:Q} rpcgen -L -C nlm_prot_svc.c: ${RPCSRC} - ${RPCGEN} -m -o ${.TARGET} ${RPCSRC} + ${RPCGEN} -m -o ${.TARGET} ${.ALLSRC} nlm_prot.h: ${RPCSRC} - ${RPCGEN} -h -o ${.TARGET} ${RPCSRC} + ${RPCGEN} -h -o ${.TARGET} ${.ALLSRC} test: ${.CURDIR}/test.c cc -o test ${.CURDIR}/test.c -lrpcsvc Modified: stable/11/usr.sbin/rpc.statd/Makefile ============================================================================== --- stable/11/usr.sbin/rpc.statd/Makefile Thu Jul 20 01:02:37 2017 (r321272) +++ stable/11/usr.sbin/rpc.statd/Makefile Thu Jul 20 01:03:43 2017 (r321273) @@ -15,10 +15,10 @@ RPCSRC= ${DESTDIR}/usr/include/rpcsvc/sm_inter.x RPCGEN= RPCGEN_CPP=${CPP:Q} rpcgen -L -C sm_inter_svc.c: ${RPCSRC} - ${RPCGEN} -m -o ${.TARGET} ${RPCSRC} + ${RPCGEN} -m -o ${.TARGET} ${.ALLSRC} sm_inter.h: ${RPCSRC} - ${RPCGEN} -h -o ${.TARGET} ${RPCSRC} + ${RPCGEN} -h -o ${.TARGET} ${.ALLSRC} test: test.c cc -o test test.c -lrpcsvc From owner-svn-src-stable-11@freebsd.org Thu Jul 20 01:07:17 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C7554D9D42E; Thu, 20 Jul 2017 01:07:17 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A38E474957; Thu, 20 Jul 2017 01:07:17 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6K17GQ4038975; Thu, 20 Jul 2017 01:07:16 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6K17FNM038964; Thu, 20 Jul 2017 01:07:15 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201707200107.v6K17FNM038964@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Thu, 20 Jul 2017 01:07:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r321276 - in stable/11/usr.sbin/lpr: chkprintcap filters filters.ru/koi2855 filters.ru/koi2alt lpc lpd lpq lpr lprm lptest pac X-SVN-Group: stable-11 X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: in stable/11/usr.sbin/lpr: chkprintcap filters filters.ru/koi2855 filters.ru/koi2alt lpc lpd lpq lpr lprm lptest pac X-SVN-Commit-Revision: 321276 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Jul 2017 01:07:17 -0000 Author: ngie Date: Thu Jul 20 01:07:15 2017 New Revision: 321276 URL: https://svnweb.freebsd.org/changeset/base/321276 Log: MFC r314475: Simplify idioms in usr.sbin/lpr Makefiles Use :H instead of .CURDIR-relative pathing to simplify make output, etc. Modified: stable/11/usr.sbin/lpr/chkprintcap/Makefile stable/11/usr.sbin/lpr/filters.ru/koi2855/Makefile stable/11/usr.sbin/lpr/filters.ru/koi2alt/Makefile stable/11/usr.sbin/lpr/filters/Makefile stable/11/usr.sbin/lpr/lpc/Makefile stable/11/usr.sbin/lpr/lpd/Makefile stable/11/usr.sbin/lpr/lpq/Makefile stable/11/usr.sbin/lpr/lpr/Makefile stable/11/usr.sbin/lpr/lprm/Makefile stable/11/usr.sbin/lpr/lptest/Makefile stable/11/usr.sbin/lpr/pac/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/lpr/chkprintcap/Makefile ============================================================================== --- stable/11/usr.sbin/lpr/chkprintcap/Makefile Thu Jul 20 01:07:02 2017 (r321275) +++ stable/11/usr.sbin/lpr/chkprintcap/Makefile Thu Jul 20 01:07:15 2017 (r321276) @@ -1,12 +1,12 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../common_source +.PATH: ${.CURDIR:H}/common_source PROG= chkprintcap MAN= chkprintcap.8 SRCS= chkprintcap.c skimprintcap.c -CFLAGS+= -I${.CURDIR}/../common_source +CFLAGS+= -I${.CURDIR:H}/common_source LIBADD= lpr Modified: stable/11/usr.sbin/lpr/filters.ru/koi2855/Makefile ============================================================================== --- stable/11/usr.sbin/lpr/filters.ru/koi2855/Makefile Thu Jul 20 01:07:02 2017 (r321275) +++ stable/11/usr.sbin/lpr/filters.ru/koi2855/Makefile Thu Jul 20 01:07:15 2017 (r321276) @@ -3,6 +3,6 @@ PROG= koi2855 MAN= -CFLAGS+= -I${.CURDIR}/../../common_source +CFLAGS+= -I${.CURDIR:H:H}/common_source .include Modified: stable/11/usr.sbin/lpr/filters.ru/koi2alt/Makefile ============================================================================== --- stable/11/usr.sbin/lpr/filters.ru/koi2alt/Makefile Thu Jul 20 01:07:02 2017 (r321275) +++ stable/11/usr.sbin/lpr/filters.ru/koi2alt/Makefile Thu Jul 20 01:07:15 2017 (r321276) @@ -3,6 +3,6 @@ PROG= koi2alt MAN= -CFLAGS+= -I${.CURDIR}/../../common_source +CFLAGS+= -I${.CURDIR:H:H}/common_source .include Modified: stable/11/usr.sbin/lpr/filters/Makefile ============================================================================== --- stable/11/usr.sbin/lpr/filters/Makefile Thu Jul 20 01:07:02 2017 (r321275) +++ stable/11/usr.sbin/lpr/filters/Makefile Thu Jul 20 01:07:15 2017 (r321276) @@ -6,6 +6,6 @@ BINDIR= ${LIBEXECDIR}/lpr PROG= lpf MAN= -CFLAGS+= -I${.CURDIR}/../common_source +CFLAGS+= -I${.CURDIR:H}/common_source .include Modified: stable/11/usr.sbin/lpr/lpc/Makefile ============================================================================== --- stable/11/usr.sbin/lpr/lpc/Makefile Thu Jul 20 01:07:02 2017 (r321275) +++ stable/11/usr.sbin/lpr/lpc/Makefile Thu Jul 20 01:07:15 2017 (r321276) @@ -1,7 +1,7 @@ # From: @(#)Makefile 8.1 (Berkeley) 6/6/93 # $FreeBSD$ -.PATH: ${.CURDIR}/../common_source +.PATH: ${.CURDIR:H}/common_source PROG= lpc MAN= lpc.8 @@ -9,7 +9,7 @@ SRCS= lpc.c cmds.c cmdtab.c movejobs.c BINGRP= daemon BINMODE= 2555 -CFLAGS+= -I${.CURDIR}/../common_source +CFLAGS+= -I${.CURDIR:H}/common_source WARNS?= 0 Modified: stable/11/usr.sbin/lpr/lpd/Makefile ============================================================================== --- stable/11/usr.sbin/lpr/lpd/Makefile Thu Jul 20 01:07:02 2017 (r321275) +++ stable/11/usr.sbin/lpr/lpd/Makefile Thu Jul 20 01:07:15 2017 (r321276) @@ -5,7 +5,7 @@ PROG= lpd MAN= lpd.8 SRCS= lpd.c printjob.c recvjob.c lpdchar.c modes.c -CFLAGS+= -I${.CURDIR}/../common_source +CFLAGS+= -I${.CURDIR:H}/common_source WARNS?= 1 Modified: stable/11/usr.sbin/lpr/lpq/Makefile ============================================================================== --- stable/11/usr.sbin/lpr/lpq/Makefile Thu Jul 20 01:07:02 2017 (r321275) +++ stable/11/usr.sbin/lpr/lpq/Makefile Thu Jul 20 01:07:15 2017 (r321276) @@ -8,7 +8,7 @@ BINOWN= root BINGRP= daemon BINMODE= 6555 -CFLAGS+= -I${.CURDIR}/../common_source +CFLAGS+= -I${.CURDIR:H}/common_source LIBADD= lpr Modified: stable/11/usr.sbin/lpr/lpr/Makefile ============================================================================== --- stable/11/usr.sbin/lpr/lpr/Makefile Thu Jul 20 01:07:02 2017 (r321275) +++ stable/11/usr.sbin/lpr/lpr/Makefile Thu Jul 20 01:07:15 2017 (r321276) @@ -1,7 +1,7 @@ # From: @(#)Makefile 8.1 (Berkeley) 6/6/93 # $FreeBSD$ -.PATH: ${.CURDIR}/../common_source +.PATH: ${.CURDIR:H}/common_source BINDIR= /usr/bin @@ -11,7 +11,7 @@ BINOWN= root BINGRP= daemon BINMODE= 6555 -CFLAGS+= -I${.CURDIR}/../common_source +CFLAGS+= -I${.CURDIR:H}/common_source WARNS?= 2 Modified: stable/11/usr.sbin/lpr/lprm/Makefile ============================================================================== --- stable/11/usr.sbin/lpr/lprm/Makefile Thu Jul 20 01:07:02 2017 (r321275) +++ stable/11/usr.sbin/lpr/lprm/Makefile Thu Jul 20 01:07:15 2017 (r321276) @@ -1,7 +1,7 @@ # From: @(#)Makefile 8.1 (Berkeley) 6/6/93 # $FreeBSD$ -.PATH: ${.CURDIR}/../common_source +.PATH: ${.CURDIR:H}/common_source BINDIR= /usr/bin @@ -10,7 +10,7 @@ BINOWN= root BINGRP= daemon BINMODE= 6555 -CFLAGS+= -I${.CURDIR}/../common_source +CFLAGS+= -I${.CURDIR:H}/common_source LIBADD= lpr Modified: stable/11/usr.sbin/lpr/lptest/Makefile ============================================================================== --- stable/11/usr.sbin/lpr/lptest/Makefile Thu Jul 20 01:07:02 2017 (r321275) +++ stable/11/usr.sbin/lpr/lptest/Makefile Thu Jul 20 01:07:15 2017 (r321276) @@ -3,6 +3,6 @@ PROG= lptest -CFLAGS+= -I${.CURDIR}/../common_source +CFLAGS+= -I${.CURDIR:H}/common_source .include Modified: stable/11/usr.sbin/lpr/pac/Makefile ============================================================================== --- stable/11/usr.sbin/lpr/pac/Makefile Thu Jul 20 01:07:02 2017 (r321275) +++ stable/11/usr.sbin/lpr/pac/Makefile Thu Jul 20 01:07:15 2017 (r321276) @@ -1,12 +1,12 @@ # From: @(#)Makefile 8.1 (Berkeley) 6/6/93 # $FreeBSD$ -.PATH: ${.CURDIR}/../common_source +.PATH: ${.CURDIR:H}/common_source PROG= pac MAN= pac.8 -CFLAGS+= -I${.CURDIR}/../common_source +CFLAGS+= -I${.CURDIR:H}/common_source LIBADD= lpr From owner-svn-src-stable-11@freebsd.org Thu Jul 20 01:07:53 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 02D85D9D4E7; Thu, 20 Jul 2017 01:07:53 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C60A674AE9; Thu, 20 Jul 2017 01:07:52 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6K17plM039072; Thu, 20 Jul 2017 01:07:51 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6K17pZm039071; Thu, 20 Jul 2017 01:07:51 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201707200107.v6K17pZm039071@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Thu, 20 Jul 2017 01:07:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r321277 - stable/11/share/man/man4 X-SVN-Group: stable-11 X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: stable/11/share/man/man4 X-SVN-Commit-Revision: 321277 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Jul 2017 01:07:53 -0000 Author: ngie Date: Thu Jul 20 01:07:51 2017 New Revision: 321277 URL: https://svnweb.freebsd.org/changeset/base/321277 Log: MFC r314543: Add missing section when referencing ctl(4) via .Xr macro Modified: stable/11/share/man/man4/cfumass.4 Directory Properties: stable/11/ (props changed) Modified: stable/11/share/man/man4/cfumass.4 ============================================================================== --- stable/11/share/man/man4/cfumass.4 Thu Jul 20 01:07:15 2017 (r321276) +++ stable/11/share/man/man4/cfumass.4 Thu Jul 20 01:07:51 2017 (r321277) @@ -72,7 +72,7 @@ The USB OTG port must be working in USB device-side mo This happens automatically upon connection to a USB host. .It There must be a -.Xr ctl +.Xr ctl 4 LUN configured for the .Pa cfumass port. From owner-svn-src-stable-11@freebsd.org Thu Jul 20 01:12:00 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 53558D9D9A2; Thu, 20 Jul 2017 01:12:00 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0591374E0A; Thu, 20 Jul 2017 01:11:59 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6K1BxPJ043000; Thu, 20 Jul 2017 01:11:59 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6K1BxGN042999; Thu, 20 Jul 2017 01:11:59 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201707200111.v6K1BxGN042999@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Thu, 20 Jul 2017 01:11:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r321278 - stable/11 X-SVN-Group: stable-11 X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: stable/11 X-SVN-Commit-Revision: 321278 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Jul 2017 01:12:00 -0000 Author: ngie Date: Thu Jul 20 01:11:58 2017 New Revision: 321278 URL: https://svnweb.freebsd.org/changeset/base/321278 Log: MFC r314543: Add missing section when referencing ctl(4) via .Xr macro Modified: Directory Properties: stable/11/ (props changed) From owner-svn-src-stable-11@freebsd.org Thu Jul 20 01:13:11 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 22668D9DB7E; Thu, 20 Jul 2017 01:13:11 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C8B3475202; Thu, 20 Jul 2017 01:13:10 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6K1D9xK043143; Thu, 20 Jul 2017 01:13:09 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6K1D9OK043142; Thu, 20 Jul 2017 01:13:09 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201707200113.v6K1D9OK043142@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Thu, 20 Jul 2017 01:13:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r321280 - stable/11 X-SVN-Group: stable-11 X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: stable/11 X-SVN-Commit-Revision: 321280 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Jul 2017 01:13:11 -0000 Author: ngie Date: Thu Jul 20 01:13:09 2017 New Revision: 321280 URL: https://svnweb.freebsd.org/changeset/base/321280 Log: Revert r321278 I accidentally merged a mergeinfo change to this branch with a bad commit message. Modified: Directory Properties: stable/11/ (props changed) From owner-svn-src-stable-11@freebsd.org Thu Jul 20 06:54:59 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D2D59DAA365; Thu, 20 Jul 2017 06:54:59 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9FC18830FA; Thu, 20 Jul 2017 06:54:59 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6K6swco080501; Thu, 20 Jul 2017 06:54:58 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6K6swaP080500; Thu, 20 Jul 2017 06:54:58 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201707200654.v6K6swaP080500@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 20 Jul 2017 06:54:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r321285 - stable/11/sys/amd64/amd64 X-SVN-Group: stable-11 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/11/sys/amd64/amd64 X-SVN-Commit-Revision: 321285 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Jul 2017 06:54:59 -0000 Author: kib Date: Thu Jul 20 06:54:58 2017 New Revision: 321285 URL: https://svnweb.freebsd.org/changeset/base/321285 Log: MFC r320936,r320937,r320938: Fix size argument to vm_pager_allocate(). Modified: stable/11/sys/amd64/amd64/efirt.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/amd64/amd64/efirt.c ============================================================================== --- stable/11/sys/amd64/amd64/efirt.c Thu Jul 20 06:47:06 2017 (r321284) +++ stable/11/sys/amd64/amd64/efirt.c Thu Jul 20 06:54:58 2017 (r321285) @@ -192,8 +192,8 @@ efi_create_1t1_map(struct efi_md *map, int ndesc, int uint64_t idx; int bits, i, mode; - obj_1t1_pt = vm_pager_allocate(OBJT_PHYS, NULL, 1 + NPML4EPG + - NPML4EPG * NPDPEPG + NPML4EPG * NPDPEPG * NPDEPG, + obj_1t1_pt = vm_pager_allocate(OBJT_PHYS, NULL, ptoa(1 + + NPML4EPG + NPML4EPG * NPDPEPG + NPML4EPG * NPDPEPG * NPDEPG), VM_PROT_ALL, 0, NULL); VM_OBJECT_WLOCK(obj_1t1_pt); efi_pml4_page = efi_1t1_page(0); From owner-svn-src-stable-11@freebsd.org Thu Jul 20 08:11:08 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5E6A0DAB86A; Thu, 20 Jul 2017 08:11:08 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0E93D123F; Thu, 20 Jul 2017 08:11:07 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6K8B79H011327; Thu, 20 Jul 2017 08:11:07 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6K8B67r011321; Thu, 20 Jul 2017 08:11:06 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201707200811.v6K8B67r011321@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Thu, 20 Jul 2017 08:11:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r321287 - stable/11/usr.sbin/sesutil X-SVN-Group: stable-11 X-SVN-Commit-Author: bapt X-SVN-Commit-Paths: stable/11/usr.sbin/sesutil X-SVN-Commit-Revision: 321287 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Jul 2017 08:11:08 -0000 Author: bapt Date: Thu Jul 20 08:11:06 2017 New Revision: 321287 URL: https://svnweb.freebsd.org/changeset/base/321287 Log: MFC r320267, r320270-r320271, r320478 r320267: Do not use sprintf(3) when not needed, while here, prefer snprintf(3) over sprintf(3) r320270: Directly print the extra status instead of filling a buffer then printing it. This prepares the code to make it libxo friendly Reviewed by: manu, Nikita Kozlov (nikita elyzion.net) Sponsored by: Gandi.net r320271: sesutil no longer depends on libsbuf Sponsored by: Gandi.net r320478: Add libxo(3) support to sesutil(8) This is useful to simplify parsing "sesutil map" Submitted by: nikita.kozlov@blade-group.com Relnotes: yes Reviewed by: Allanjude, bapt Differential revision: https://reviews.freebsd.org/D11372 Sponsored by: blade Modified: stable/11/usr.sbin/sesutil/Makefile stable/11/usr.sbin/sesutil/Makefile.depend stable/11/usr.sbin/sesutil/eltsub.c stable/11/usr.sbin/sesutil/eltsub.h stable/11/usr.sbin/sesutil/sesutil.8 stable/11/usr.sbin/sesutil/sesutil.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/sesutil/Makefile ============================================================================== --- stable/11/usr.sbin/sesutil/Makefile Thu Jul 20 07:13:26 2017 (r321286) +++ stable/11/usr.sbin/sesutil/Makefile Thu Jul 20 08:11:06 2017 (r321287) @@ -4,6 +4,6 @@ PROG= sesutil SRCS= sesutil.c eltsub.c MAN= sesutil.8 -LIBADD= sbuf +LIBADD= xo .include Modified: stable/11/usr.sbin/sesutil/Makefile.depend ============================================================================== --- stable/11/usr.sbin/sesutil/Makefile.depend Thu Jul 20 07:13:26 2017 (r321286) +++ stable/11/usr.sbin/sesutil/Makefile.depend Thu Jul 20 08:11:06 2017 (r321287) @@ -8,8 +8,7 @@ DIRDEPS = \ include/xlocale \ lib/${CSU_DIR} \ lib/libc \ - lib/libcompiler_rt \ - lib/libsbuf \ + lib/libcompiler_rt .include Modified: stable/11/usr.sbin/sesutil/eltsub.c ============================================================================== --- stable/11/usr.sbin/sesutil/eltsub.c Thu Jul 20 07:13:26 2017 (r321286) +++ stable/11/usr.sbin/sesutil/eltsub.c Thu Jul 20 08:11:06 2017 (r321287) @@ -32,15 +32,14 @@ * mjacob@feral.com */ -#include #include -#include #include #include #include #include #include +#include #include "eltsub.h" @@ -51,181 +50,95 @@ */ #define TEMPERATURE_OFFSET 20 -char * +const char * geteltnm(int type) { static char rbuf[132]; switch (type) { case ELMTYP_UNSPECIFIED: - sprintf(rbuf, "Unspecified"); - break; + return ("Unspecified"); case ELMTYP_DEVICE: - sprintf(rbuf, "Device Slot"); - break; + return ("Device Slot"); case ELMTYP_POWER: - sprintf(rbuf, "Power Supply"); - break; + return ("Power Supply"); case ELMTYP_FAN: - sprintf(rbuf, "Cooling"); - break; + return ("Cooling"); case ELMTYP_THERM: - sprintf(rbuf, "Temperature Sensors"); - break; + return ("Temperature Sensors"); case ELMTYP_DOORLOCK: - sprintf(rbuf, "Door Lock"); - break; + return ("Door Lock"); case ELMTYP_ALARM: - sprintf(rbuf, "Audible alarm"); - break; + return ("Audible alarm"); case ELMTYP_ESCC: - sprintf(rbuf, "Enclosure Services Controller Electronics"); - break; + return ("Enclosure Services Controller Electronics"); case ELMTYP_SCC: - sprintf(rbuf, "SCC Controller Electronics"); - break; + return ("SCC Controller Electronics"); case ELMTYP_NVRAM: - sprintf(rbuf, "Nonvolatile Cache"); - break; + return ("Nonvolatile Cache"); case ELMTYP_INV_OP_REASON: - sprintf(rbuf, "Invalid Operation Reason"); - break; + return ("Invalid Operation Reason"); case ELMTYP_UPS: - sprintf(rbuf, "Uninterruptible Power Supply"); - break; + return ("Uninterruptible Power Supply"); case ELMTYP_DISPLAY: - sprintf(rbuf, "Display"); - break; + return ("Display"); case ELMTYP_KEYPAD: - sprintf(rbuf, "Key Pad Entry"); - break; + return ("Key Pad Entry"); case ELMTYP_ENCLOSURE: - sprintf(rbuf, "Enclosure"); - break; + return ("Enclosure"); case ELMTYP_SCSIXVR: - sprintf(rbuf, "SCSI Port/Transceiver"); - break; + return ("SCSI Port/Transceiver"); case ELMTYP_LANGUAGE: - sprintf(rbuf, "Language"); - break; + return ("Language"); case ELMTYP_COMPORT: - sprintf(rbuf, "Communication Port"); - break; + return ("Communication Port"); case ELMTYP_VOM: - sprintf(rbuf, "Voltage Sensor"); - break; + return ("Voltage Sensor"); case ELMTYP_AMMETER: - sprintf(rbuf, "Current Sensor"); - break; + return ("Current Sensor"); case ELMTYP_SCSI_TGT: - sprintf(rbuf, "SCSI Target Port"); - break; + return ("SCSI Target Port"); case ELMTYP_SCSI_INI: - sprintf(rbuf, "SCSI Initiator Port"); - break; + return ("SCSI Initiator Port"); case ELMTYP_SUBENC: - sprintf(rbuf, "Simple Subenclosure"); - break; + return ("Simple Subenclosure"); case ELMTYP_ARRAY_DEV: - sprintf(rbuf, "Array Device Slot"); - break; + return ("Array Device Slot"); case ELMTYP_SAS_EXP: - sprintf(rbuf, "SAS Expander"); - break; + return ("SAS Expander"); case ELMTYP_SAS_CONN: - sprintf(rbuf, "SAS Connector"); - break; + return ("SAS Connector"); default: - (void) sprintf(rbuf, "", type); - break; + snprintf(rbuf, sizeof(rbuf), "", type); + return (rbuf); } - return (rbuf); } -char * +const char * scode2ascii(u_char code) { static char rbuf[32]; switch (code & 0xf) { case SES_OBJSTAT_UNSUPPORTED: - sprintf(rbuf, "Unsupported"); - break; + return ("Unsupported"); case SES_OBJSTAT_OK: - sprintf(rbuf, "OK"); - break; + return ("OK"); case SES_OBJSTAT_CRIT: - sprintf(rbuf, "Critical"); - break; + return ("Critical"); case SES_OBJSTAT_NONCRIT: - sprintf(rbuf, "Noncritical"); - break; + return ("Noncritical"); case SES_OBJSTAT_UNRECOV: - sprintf(rbuf, "Unrecoverable"); - break; + return ("Unrecoverable"); case SES_OBJSTAT_NOTINSTALLED: - sprintf(rbuf, "Not Installed"); - break; + return ("Not Installed"); case SES_OBJSTAT_UNKNOWN: - sprintf(rbuf, "Unknown"); - break; + return ("Unknown"); case SES_OBJSTAT_NOTAVAIL: - sprintf(rbuf, "Not Available"); - break; + return ("Not Available"); case SES_OBJSTAT_NOACCESS: - sprintf(rbuf, "No Access Allowed"); - break; + return ("No Access Allowed"); default: - sprintf(rbuf, "", code & 0xf); - break; + snprintf(rbuf, sizeof(rbuf), "", code & 0xf); + return (rbuf); } - return (rbuf); -} - -struct sbuf * -stat2sbuf(int eletype, u_char *cstat) -{ - struct sbuf *buf; - - buf = sbuf_new_auto(); - if (buf == NULL) - err(EXIT_FAILURE, "sbuf_new_auto()"); - - if (cstat[0] & 0x40) - sbuf_printf(buf, "\t\t- Predicted Failure\n"); - if (cstat[0] & 0x20) - sbuf_printf(buf, "\t\t- Disabled\n"); - if (cstat[0] & 0x10) - sbuf_printf(buf, "\t\t- Swapped\n"); - switch (eletype) { - case ELMTYP_DEVICE: - if (cstat[2] & 0x02) - sbuf_printf(buf, "\t\t- LED=locate\n"); - if (cstat[2] & 0x20) - sbuf_printf(buf, "\t\t- LED=fault\n"); - break; - case ELMTYP_ARRAY_DEV: - if (cstat[2] & 0x02) - sbuf_printf(buf, "\t\t- LED=locate\n"); - if (cstat[2] & 0x20) - sbuf_printf(buf, "\t\t- LED=fault\n"); - break; - case ELMTYP_FAN: - sbuf_printf(buf, "\t\t- Speed: %d rpm\n", - (((0x7 & cstat[1]) << 8) + cstat[2]) * 10); - break; - case ELMTYP_THERM: - if (cstat[2]) { - sbuf_printf(buf, "\t\t- Temperature: %d C\n", - cstat[2] - TEMPERATURE_OFFSET); - } else { - sbuf_printf(buf, "\t\t- Temperature: -reserved-\n"); - } - break; - case ELMTYP_VOM: - sbuf_printf(buf, "\t\t- Voltage: %.2f V\n", - be16dec(cstat + 2) / 100.0); - break; - } - sbuf_finish(buf); - return (buf); } Modified: stable/11/usr.sbin/sesutil/eltsub.h ============================================================================== --- stable/11/usr.sbin/sesutil/eltsub.h Thu Jul 20 07:13:26 2017 (r321286) +++ stable/11/usr.sbin/sesutil/eltsub.h Thu Jul 20 08:11:06 2017 (r321287) @@ -32,6 +32,5 @@ * mjacob@feral.com */ -char *geteltnm(int); -char *scode2ascii(u_char); -struct sbuf *stat2sbuf(int, u_char *); +const char *geteltnm(int); +const char *scode2ascii(u_char); Modified: stable/11/usr.sbin/sesutil/sesutil.8 ============================================================================== --- stable/11/usr.sbin/sesutil/sesutil.8 Thu Jul 20 07:13:26 2017 (r321286) +++ stable/11/usr.sbin/sesutil/sesutil.8 Thu Jul 20 08:11:06 2017 (r321287) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 6, 2015 +.Dd June 29, 2017 .Dt SESUTIL 8 .Os .Sh NAME @@ -43,9 +43,11 @@ .Op on | off .Nm .Cm map +.Op Fl -libxo Ar options .Op Fl u Ar /dev/sesN .Nm .Cm status +.Op Fl -libxo Ar options .Op Fl u Ar /dev/sesN .Sh DESCRIPTION The @@ -55,6 +57,12 @@ Services (SES) devices. .Pp List of supported commands: .Bl -tag -width indent +.It Fl -libxo +Generate output via +.Xr libxo 3 +in a selection of different human and machine readable formats. +See +.Xr xo_parse_args 3 .It Cm fault Oo Fl u Ar /dev/sesN Oc Ao Ar disk | Li all Ac Op on | off Change the state of the external fault LED associated with .Ar disk . @@ -114,6 +122,8 @@ Turn on the fault LED for a drive bay not associated w .Pp .Dl Nm Cm fault -u /dev/ses2 7 on .Sh SEE ALSO +.Xr libxo 3 , +.Xr xo_parse_args 3 , .Xr ses 4 .Sh HISTORY The Modified: stable/11/usr.sbin/sesutil/sesutil.c ============================================================================== --- stable/11/usr.sbin/sesutil/sesutil.c Thu Jul 20 07:13:26 2017 (r321286) +++ stable/11/usr.sbin/sesutil/sesutil.c Thu Jul 20 08:11:06 2017 (r321287) @@ -29,10 +29,10 @@ #include __FBSDID("$FreeBSD$"); +#include #include #include #include -#include #include #include @@ -46,16 +46,20 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include "eltsub.h" +#define SESUTIL_XO_VERSION "1" + static int encstatus(int argc, char **argv); static int fault(int argc, char **argv); static int locate(int argc, char **argv); static int objmap(int argc, char **argv); static int sesled(int argc, char **argv, bool fault); +static void sesutil_print(bool *title, const char *fmt, ...) __printflike(2,3); static struct command { const char *name; @@ -115,7 +119,7 @@ do_led(int fd, unsigned int idx, bool onoff, bool setf o.elm_idx = idx; if (ioctl(fd, ENCIOC_GETELMSTAT, (caddr_t) &o) < 0) { close(fd); - err(EXIT_FAILURE, "ENCIOC_GETELMSTAT"); + xo_err(EXIT_FAILURE, "ENCIOC_GETELMSTAT"); } o.cstat[0] |= 0x80; if (setfault) { @@ -132,7 +136,7 @@ do_led(int fd, unsigned int idx, bool onoff, bool setf if (ioctl(fd, ENCIOC_SETELMSTAT, (caddr_t) &o) < 0) { close(fd); - err(EXIT_FAILURE, "ENCIOC_SETELMSTAT"); + xo_err(EXIT_FAILURE, "ENCIOC_SETELMSTAT"); } } @@ -178,7 +182,7 @@ sesled(int argc, char **argv, bool setfault) if (*endptr == '\0') { endptr = strrchr(uflag, '*'); if (endptr != NULL && *endptr == '*') { - warnx("Must specifying a SES device (-u) to use a SES " + xo_warnx("Must specifying a SES device (-u) to use a SES " "id# to identify a disk"); usage(stderr, (setfault ? "fault" : "locate")); } @@ -202,7 +206,7 @@ sesled(int argc, char **argv, bool setfault) if (glob((uflag != NULL ? uflag : "/dev/ses[0-9]*"), 0, NULL, &g) == GLOB_NOMATCH) { globfree(&g); - errx(EXIT_FAILURE, "No SES devices found"); + xo_errx(EXIT_FAILURE, "No SES devices found"); } ndisks = 0; @@ -218,32 +222,32 @@ sesled(int argc, char **argv, bool setfault) * accessing all devices */ if (errno == EACCES && g.gl_pathc > 1) { - err(EXIT_FAILURE, "unable to access SES device"); + xo_err(EXIT_FAILURE, "unable to access SES device"); } - warn("unable to access SES device: %s", g.gl_pathv[i]); + xo_warn("unable to access SES device: %s", g.gl_pathv[i]); continue; } if (ioctl(fd, ENCIOC_GETNELM, (caddr_t) &nobj) < 0) { close(fd); - err(EXIT_FAILURE, "ENCIOC_GETNELM"); + xo_err(EXIT_FAILURE, "ENCIOC_GETNELM"); } objp = calloc(nobj, sizeof(encioc_element_t)); if (objp == NULL) { close(fd); - err(EXIT_FAILURE, "calloc()"); + xo_err(EXIT_FAILURE, "calloc()"); } if (ioctl(fd, ENCIOC_GETELMMAP, (caddr_t) objp) < 0) { close(fd); - err(EXIT_FAILURE, "ENCIOC_GETELMMAP"); + xo_err(EXIT_FAILURE, "ENCIOC_GETELMMAP"); } if (isses) { if (sesid > nobj) { close(fd); - errx(EXIT_FAILURE, + xo_errx(EXIT_FAILURE, "Requested SES ID does not exist"); } do_led(fd, sesid, onoff, setfault); @@ -262,7 +266,7 @@ sesled(int argc, char **argv, bool setfault) objdn.elm_devnames = calloc(128, sizeof(char)); if (objdn.elm_devnames == NULL) { close(fd); - err(EXIT_FAILURE, "calloc()"); + xo_err(EXIT_FAILURE, "calloc()"); } if (ioctl(fd, ENCIOC_GETELMDEVNAMES, (caddr_t) &objdn) <0) { @@ -282,7 +286,7 @@ sesled(int argc, char **argv, bool setfault) } globfree(&g); if (ndisks == 0 && all == false) { - errx(EXIT_FAILURE, "Count not find the SES id of device '%s'", + xo_errx(EXIT_FAILURE, "Count not find the SES id of device '%s'", disk); } @@ -303,10 +307,71 @@ fault(int argc, char **argv) return (sesled(argc, argv, true)); } +#define TEMPERATURE_OFFSET 20 +static void +sesutil_print(bool *title, const char *fmt, ...) +{ + va_list args; + + if (!*title) { + xo_open_container("extra_status"); + xo_emit("\t\tExtra status:\n"); + *title = true; + } + va_start(args, fmt); + xo_emit_hv(NULL, fmt, args); + va_end(args); +} + +static void +print_extra_status(int eletype, u_char *cstat) +{ + bool title = false; + + if (cstat[0] & 0x40) { + sesutil_print(&title, "\t\t-{e:predicted_failure/true} Predicted Failure\n"); + } + if (cstat[0] & 0x20) { + sesutil_print(&title, "\t\t-{e:disabled/true} Disabled\n"); + } + if (cstat[0] & 0x10) { + sesutil_print(&title, "\t\t-{e:swapped/true} Swapped\n"); + } + switch (eletype) { + case ELMTYP_DEVICE: + case ELMTYP_ARRAY_DEV: + if (cstat[2] & 0x02) { + sesutil_print(&title, "\t\t- LED={q:led/locate}\n"); + } + if (cstat[2] & 0x20) { + sesutil_print(&title, "\t\t- LED={q:led/fault}\n"); + } + break; + case ELMTYP_FAN: + sesutil_print(&title, "\t\t- Speed: {:speed/%d}{Uw:rpm}\n", + (((0x7 & cstat[1]) << 8) + cstat[2]) * 10); + break; + case ELMTYP_THERM: + if (cstat[2]) { + sesutil_print(&title, "\t\t- Temperature: {:temperature/%d}{Uw:C}\n", + cstat[2] - TEMPERATURE_OFFSET); + } else { + sesutil_print(&title, "\t\t- Temperature: -{q:temperature/reserved}-\n"); + } + break; + case ELMTYP_VOM: + sesutil_print(&title, "\t\t- Voltage: {:voltage/%.2f}{Uw:V}\n", + be16dec(cstat + 2) / 100.0); + break; + } + if (title) { + xo_close_container("extra_status"); + } +} + static int objmap(int argc, char **argv __unused) { - struct sbuf *extra; encioc_string_t stri; encioc_elm_devnames_t e_devname; encioc_elm_status_t e_status; @@ -325,8 +390,11 @@ objmap(int argc, char **argv __unused) /* Get the list of ses devices */ if (glob(uflag, 0, NULL, &g) == GLOB_NOMATCH) { globfree(&g); - errx(EXIT_FAILURE, "No SES devices found"); + xo_errx(EXIT_FAILURE, "No SES devices found"); } + xo_set_version(SESUTIL_XO_VERSION); + xo_open_container("sesutil"); + xo_open_list("enclosures"); for (i = 0; i < g.gl_pathc; i++) { /* ensure we only got numbers after ses */ if (strspn(g.gl_pathv[i] + 8, "0123456789") != @@ -339,38 +407,40 @@ objmap(int argc, char **argv __unused) * accessing all devices */ if (errno == EACCES && g.gl_pathc > 1) { - err(EXIT_FAILURE, "unable to access SES device"); + xo_err(EXIT_FAILURE, "unable to access SES device"); } - warn("unable to access SES device: %s", g.gl_pathv[i]); + xo_warn("unable to access SES device: %s", g.gl_pathv[i]); continue; } if (ioctl(fd, ENCIOC_GETNELM, (caddr_t) &nobj) < 0) { close(fd); - err(EXIT_FAILURE, "ENCIOC_GETNELM"); + xo_err(EXIT_FAILURE, "ENCIOC_GETNELM"); } e_ptr = calloc(nobj, sizeof(encioc_element_t)); if (e_ptr == NULL) { close(fd); - err(EXIT_FAILURE, "calloc()"); + xo_err(EXIT_FAILURE, "calloc()"); } if (ioctl(fd, ENCIOC_GETELMMAP, (caddr_t) e_ptr) < 0) { close(fd); - err(EXIT_FAILURE, "ENCIOC_GETELMMAP"); + xo_err(EXIT_FAILURE, "ENCIOC_GETELMMAP"); } - printf("%s:\n", g.gl_pathv[i] + 5); + xo_open_instance("enclosures"); + xo_emit("{t:enc/%s}:\n", g.gl_pathv[i] + 5); stri.bufsiz = sizeof(str); stri.buf = &str[0]; if (ioctl(fd, ENCIOC_GETENCNAME, (caddr_t) &stri) == 0) - printf("\tEnclosure Name: %s\n", stri.buf); + xo_emit("\tEnclosure Name: {t:name/%s}\n", stri.buf); stri.bufsiz = sizeof(str); stri.buf = &str[0]; if (ioctl(fd, ENCIOC_GETENCID, (caddr_t) &stri) == 0) - printf("\tEnclosure ID: %s\n", stri.buf); + xo_emit("\tEnclosure ID: {t:id/%s}\n", stri.buf); + xo_open_list("elements"); for (j = 0; j < nobj; j++) { /* Get the status of the element */ memset(&e_status, 0, sizeof(e_status)); @@ -378,7 +448,7 @@ objmap(int argc, char **argv __unused) if (ioctl(fd, ENCIOC_GETELMSTAT, (caddr_t) &e_status) < 0) { close(fd); - err(EXIT_FAILURE, "ENCIOC_GETELMSTAT"); + xo_err(EXIT_FAILURE, "ENCIOC_GETELMSTAT"); } /* Get the description of the element */ memset(&e_desc, 0, sizeof(e_desc)); @@ -387,12 +457,12 @@ objmap(int argc, char **argv __unused) e_desc.elm_desc_str = calloc(UINT16_MAX, sizeof(char)); if (e_desc.elm_desc_str == NULL) { close(fd); - err(EXIT_FAILURE, "calloc()"); + xo_err(EXIT_FAILURE, "calloc()"); } if (ioctl(fd, ENCIOC_GETELMDESC, (caddr_t) &e_desc) < 0) { close(fd); - err(EXIT_FAILURE, "ENCIOC_GETELMDESC"); + xo_err(EXIT_FAILURE, "ENCIOC_GETELMDESC"); } /* Get the device name(s) of the element */ memset(&e_devname, 0, sizeof(e_devname)); @@ -401,39 +471,40 @@ objmap(int argc, char **argv __unused) e_devname.elm_devnames = calloc(128, sizeof(char)); if (e_devname.elm_devnames == NULL) { close(fd); - err(EXIT_FAILURE, "calloc()"); + xo_err(EXIT_FAILURE, "calloc()"); } if (ioctl(fd, ENCIOC_GETELMDEVNAMES, (caddr_t) &e_devname) <0) { /* We don't care if this fails */ e_devname.elm_devnames[0] = '\0'; } - printf("\tElement %u, Type: %s\n", e_ptr[j].elm_idx, + xo_open_instance("elements"); + xo_emit("\tElement {:id/%u}, Type: {:type/%s}\n", e_ptr[j].elm_idx, geteltnm(e_ptr[j].elm_type)); - printf("\t\tStatus: %s (0x%02x 0x%02x 0x%02x 0x%02x)\n", + xo_emit("\t\tStatus: {:status/%s} ({q:status_code/0x%02x 0x%02x 0x%02x 0x%02x})\n", scode2ascii(e_status.cstat[0]), e_status.cstat[0], e_status.cstat[1], e_status.cstat[2], e_status.cstat[3]); if (e_desc.elm_desc_len > 0) { - printf("\t\tDescription: %s\n", + xo_emit("\t\tDescription: {:description/%s}\n", e_desc.elm_desc_str); } if (e_devname.elm_names_len > 0) { - printf("\t\tDevice Names: %s\n", + xo_emit("\t\tDevice Names: {:device_names/%s}\n", e_devname.elm_devnames); } - extra = stat2sbuf(e_ptr[j].elm_type, e_status.cstat); - if (sbuf_len(extra) > 0) { - printf("\t\tExtra status:\n%s", - sbuf_data(extra)); - } - sbuf_delete(extra); + print_extra_status(e_ptr[j].elm_type, e_status.cstat); + xo_close_instance("elements"); free(e_devname.elm_devnames); } + xo_close_list("elements"); free(e_ptr); close(fd); } globfree(&g); + xo_close_list("enclosures"); + xo_close_container("sesutil"); + xo_finish(); return (EXIT_SUCCESS); } @@ -454,8 +525,12 @@ encstatus(int argc, char **argv __unused) /* Get the list of ses devices */ if (glob(uflag, 0, NULL, &g) == GLOB_NOMATCH) { globfree(&g); - errx(EXIT_FAILURE, "No SES devices found"); + xo_errx(EXIT_FAILURE, "No SES devices found"); } + + xo_set_version(SESUTIL_XO_VERSION); + xo_open_container("sesutil"); + xo_open_list("enclosures"); for (i = 0; i < g.gl_pathc; i++) { /* ensure we only got numbers after ses */ if (strspn(g.gl_pathv[i] + 8, "0123456789") != @@ -468,56 +543,61 @@ encstatus(int argc, char **argv __unused) * accessing all devices */ if (errno == EACCES && g.gl_pathc > 1) { - err(EXIT_FAILURE, "unable to access SES device"); + xo_err(EXIT_FAILURE, "unable to access SES device"); } - warn("unable to access SES device: %s", g.gl_pathv[i]); + xo_warn("unable to access SES device: %s", g.gl_pathv[i]); continue; } if (ioctl(fd, ENCIOC_GETENCSTAT, (caddr_t) &estat) < 0) { + xo_err(EXIT_FAILURE, "ENCIOC_GETENCSTAT"); close(fd); - err(EXIT_FAILURE, "ENCIOC_GETENCSTAT"); } - printf("%s: ", g.gl_pathv[i] + 5); + xo_open_instance("enclosures"); + xo_emit("{:enc/%s}: ", g.gl_pathv[i] + 5); e = 0; if (estat == 0) { if (status == 0) { status = 1; } - printf("OK"); + xo_emit("{q:status/OK}"); } else { if (estat & SES_ENCSTAT_INFO) { - printf("INFO"); + xo_emit("{lq:status/INFO}"); e++; } if (estat & SES_ENCSTAT_NONCRITICAL) { if (e) - printf(","); - printf("NONCRITICAL"); + xo_emit(","); + xo_emit("{lq:status/NONCRITICAL}"); e++; } if (estat & SES_ENCSTAT_CRITICAL) { if (e) - printf(","); - printf("CRITICAL"); + xo_emit(","); + xo_emit("{lq:status/CRITICAL}"); e++; status = -1; } if (estat & SES_ENCSTAT_UNRECOV) { if (e) - printf(","); - printf("UNRECOV"); + xo_emit(","); + xo_emit("{lq:status/UNRECOV}"); e++; status = -1; } } - printf("\n"); - + xo_close_instance("enclosures"); + xo_emit("\n"); close(fd); } globfree(&g); + xo_close_list("enclosures"); + xo_close_container("sesutil"); + xo_finish(); + if (status == 1) { return (EXIT_SUCCESS); } else { @@ -530,6 +610,10 @@ main(int argc, char **argv) { int i, ch; struct command *cmd = NULL; + + argc = xo_parse_args(argc, argv); + if (argc < 0) + exit(1); uflag = "/dev/ses[0-9]*"; while ((ch = getopt_long(argc, argv, "u:", NULL, NULL)) != -1) { From owner-svn-src-stable-11@freebsd.org Thu Jul 20 11:36:27 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 101F8C0A4ED; Thu, 20 Jul 2017 11:36:27 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CD98267843; Thu, 20 Jul 2017 11:36:26 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6KBaP5D095205; Thu, 20 Jul 2017 11:36:25 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6KBaP8n095204; Thu, 20 Jul 2017 11:36:25 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201707201136.v6KBaP8n095204@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Thu, 20 Jul 2017 11:36:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r321290 - stable/11/sys/geom X-SVN-Group: stable-11 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/11/sys/geom X-SVN-Commit-Revision: 321290 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Jul 2017 11:36:27 -0000 Author: mav Date: Thu Jul 20 11:36:25 2017 New Revision: 321290 URL: https://svnweb.freebsd.org/changeset/base/321290 Log: MFC r320729: Add GEOM::descr attribute for symmetry with GEOM::ident. Modified: stable/11/sys/geom/geom_disk.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/geom/geom_disk.c ============================================================================== --- stable/11/sys/geom/geom_disk.c Thu Jul 20 11:09:33 2017 (r321289) +++ stable/11/sys/geom/geom_disk.c Thu Jul 20 11:36:25 2017 (r321290) @@ -497,6 +497,8 @@ g_disk_start(struct bio *bp) break; else if (g_handleattr_str(bp, "GEOM::ident", dp->d_ident)) break; + else if (g_handleattr_str(bp, "GEOM::descr", dp->d_descr)) + break; else if (g_handleattr_uint16_t(bp, "GEOM::hba_vendor", dp->d_hba_vendor)) break; From owner-svn-src-stable-11@freebsd.org Thu Jul 20 17:15:20 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 03763C7C4C9; Thu, 20 Jul 2017 17:15:20 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C654F70C46; Thu, 20 Jul 2017 17:15:19 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6KHFJ85034830; Thu, 20 Jul 2017 17:15:19 GMT (envelope-from kp@FreeBSD.org) Received: (from kp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6KHFJrn034829; Thu, 20 Jul 2017 17:15:19 GMT (envelope-from kp@FreeBSD.org) Message-Id: <201707201715.v6KHFJrn034829@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kp set sender to kp@FreeBSD.org using -f From: Kristof Provost Date: Thu, 20 Jul 2017 17:15:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r321296 - stable/11/sys/netpfil/pf X-SVN-Group: stable-11 X-SVN-Commit-Author: kp X-SVN-Commit-Paths: stable/11/sys/netpfil/pf X-SVN-Commit-Revision: 321296 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Jul 2017 17:15:20 -0000 Author: kp Date: Thu Jul 20 17:15:18 2017 New Revision: 321296 URL: https://svnweb.freebsd.org/changeset/base/321296 Log: MFC r312943 Do not run the pf purge thread while the VNET variables are not initialized, this can cause a divide by zero (if the VNET initialization takes to long to complete). PR: 220830 Modified: stable/11/sys/netpfil/pf/pf.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/netpfil/pf/pf.c ============================================================================== --- stable/11/sys/netpfil/pf/pf.c Thu Jul 20 16:24:29 2017 (r321295) +++ stable/11/sys/netpfil/pf/pf.c Thu Jul 20 17:15:18 2017 (r321296) @@ -129,6 +129,8 @@ VNET_DEFINE(int, pf_tcp_secret_init); #define V_pf_tcp_secret_init VNET(pf_tcp_secret_init) VNET_DEFINE(int, pf_tcp_iss_off); #define V_pf_tcp_iss_off VNET(pf_tcp_iss_off) +VNET_DECLARE(int, pf_vnet_active); +#define V_pf_vnet_active VNET(pf_vnet_active) /* * Queue for pf_intr() sends. @@ -1439,6 +1441,12 @@ pf_purge_thread(void *unused __unused) pf_end_threads++; wakeup(pf_purge_thread); kproc_exit(0); + } + + /* Wait while V_pf_default_rule.timeout is initialized. */ + if (V_pf_vnet_active == 0) { + CURVNET_RESTORE(); + continue; } /* Process 1/interval fraction of the state table every run. */ From owner-svn-src-stable-11@freebsd.org Thu Jul 20 17:22:11 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A2DDEC7C77E; Thu, 20 Jul 2017 17:22:11 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 668B871080; Thu, 20 Jul 2017 17:22:11 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6KHMA6c038799; Thu, 20 Jul 2017 17:22:10 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6KHMAsK038798; Thu, 20 Jul 2017 17:22:10 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201707201722.v6KHMAsK038798@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Thu, 20 Jul 2017 17:22:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r321297 - stable/11/sys/sys X-SVN-Group: stable-11 X-SVN-Commit-Author: pfg X-SVN-Commit-Paths: stable/11/sys/sys X-SVN-Commit-Revision: 321297 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Jul 2017 17:22:11 -0000 Author: pfg Date: Thu Jul 20 17:22:10 2017 New Revision: 321297 URL: https://svnweb.freebsd.org/changeset/base/321297 Log: Revert r316779: Remove (yet again) the definition for the GCC __nonnull() attribute. While GCC's __nonnull__ attribute is generally useful to prevent misuse of some functions it also tends to do rather dangerous "optimizations". Now that we have replaced all such uses with the clang nullability qualifiers, the GCC attribute is unnecessary. The version was left around and kept for 11.1-Release for old versions of GCC from ports. Newer versions of GCC are not attempting to "fix" the system includes so this should not have any side effect and matches what we do in -current. Modified: stable/11/sys/sys/cdefs.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/sys/cdefs.h ============================================================================== --- stable/11/sys/sys/cdefs.h Thu Jul 20 17:15:18 2017 (r321296) +++ stable/11/sys/sys/cdefs.h Thu Jul 20 17:22:10 2017 (r321297) @@ -376,14 +376,6 @@ #define __noinline #endif -#if __GNUC_PREREQ__(3, 3) -#define __nonnull(x) __attribute__((__nonnull__(x))) -#define __nonnull_all __attribute__((__nonnull__)) -#else -#define __nonnull(x) -#define __nonnull_all -#endif - #if __GNUC_PREREQ__(3, 4) #define __fastcall __attribute__((__fastcall__)) #define __result_use_check __attribute__((__warn_unused_result__)) From owner-svn-src-stable-11@freebsd.org Thu Jul 20 20:15:40 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3C39DC7F530; Thu, 20 Jul 2017 20:15:40 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 05CB176B7B; Thu, 20 Jul 2017 20:15:39 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6KKFd2d010195; Thu, 20 Jul 2017 20:15:39 GMT (envelope-from mm@FreeBSD.org) Received: (from mm@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6KKFcjV010188; Thu, 20 Jul 2017 20:15:38 GMT (envelope-from mm@FreeBSD.org) Message-Id: <201707202015.v6KKFcjV010188@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mm set sender to mm@FreeBSD.org using -f From: Martin Matuska Date: Thu, 20 Jul 2017 20:15:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r321303 - in stable/11: contrib/libarchive contrib/libarchive/libarchive contrib/libarchive/libarchive/test usr.bin/bsdcat usr.bin/cpio usr.bin/tar X-SVN-Group: stable-11 X-SVN-Commit-Author: mm X-SVN-Commit-Paths: in stable/11: contrib/libarchive contrib/libarchive/libarchive contrib/libarchive/libarchive/test usr.bin/bsdcat usr.bin/cpio usr.bin/tar X-SVN-Commit-Revision: 321303 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Jul 2017 20:15:40 -0000 Author: mm Date: Thu Jul 20 20:15:38 2017 New Revision: 321303 URL: https://svnweb.freebsd.org/changeset/base/321303 Log: MFC r320927,320931,320932: Bump libarchive to 3.3.2 Vendor changes: PR #901: don't depend on stdin in a testcase Relnotes: yes Modified: stable/11/contrib/libarchive/NEWS stable/11/contrib/libarchive/libarchive/archive.h stable/11/contrib/libarchive/libarchive/archive_entry.h stable/11/contrib/libarchive/libarchive/test/test_archive_read_close_twice_open_filename.c stable/11/usr.bin/bsdcat/Makefile stable/11/usr.bin/cpio/Makefile stable/11/usr.bin/tar/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/contrib/libarchive/NEWS ============================================================================== --- stable/11/contrib/libarchive/NEWS Thu Jul 20 18:22:49 2017 (r321302) +++ stable/11/contrib/libarchive/NEWS Thu Jul 20 20:15:38 2017 (r321303) @@ -1,3 +1,5 @@ +Jul 09, 2017: libarchive 3.3.2 released + Mar 16, 2017: NFSv4 ACL support for Linux (librichacl) Feb 26, 2017: libarchive 3.3.1 released Modified: stable/11/contrib/libarchive/libarchive/archive.h ============================================================================== --- stable/11/contrib/libarchive/libarchive/archive.h Thu Jul 20 18:22:49 2017 (r321302) +++ stable/11/contrib/libarchive/libarchive/archive.h Thu Jul 20 20:15:38 2017 (r321303) @@ -36,7 +36,7 @@ * assert that ARCHIVE_VERSION_NUMBER >= 2012108. */ /* Note: Compiler will complain if this does not match archive_entry.h! */ -#define ARCHIVE_VERSION_NUMBER 3003001 +#define ARCHIVE_VERSION_NUMBER 3003002 #include #include /* for wchar_t */ @@ -155,7 +155,7 @@ __LA_DECL int archive_version_number(void); /* * Textual name/version of the library, useful for version displays. */ -#define ARCHIVE_VERSION_ONLY_STRING "3.3.1" +#define ARCHIVE_VERSION_ONLY_STRING "3.3.2" #define ARCHIVE_VERSION_STRING "libarchive " ARCHIVE_VERSION_ONLY_STRING __LA_DECL const char * archive_version_string(void); Modified: stable/11/contrib/libarchive/libarchive/archive_entry.h ============================================================================== --- stable/11/contrib/libarchive/libarchive/archive_entry.h Thu Jul 20 18:22:49 2017 (r321302) +++ stable/11/contrib/libarchive/libarchive/archive_entry.h Thu Jul 20 20:15:38 2017 (r321303) @@ -30,7 +30,7 @@ #define ARCHIVE_ENTRY_H_INCLUDED /* Note: Compiler will complain if this does not match archive.h! */ -#define ARCHIVE_VERSION_NUMBER 3003001 +#define ARCHIVE_VERSION_NUMBER 3003002 /* * Note: archive_entry.h is for use outside of libarchive; the Modified: stable/11/contrib/libarchive/libarchive/test/test_archive_read_close_twice_open_filename.c ============================================================================== --- stable/11/contrib/libarchive/libarchive/test/test_archive_read_close_twice_open_filename.c Thu Jul 20 18:22:49 2017 (r321302) +++ stable/11/contrib/libarchive/libarchive/test/test_archive_read_close_twice_open_filename.c Thu Jul 20 20:15:38 2017 (r321303) @@ -28,10 +28,12 @@ __FBSDID("$FreeBSD$"); DEFINE_TEST(test_archive_read_close_twice_open_filename) { + const char *filename = "empty.file"; struct archive* a = archive_read_new(); + assertMakeFile(filename, 0644, ""); assertEqualInt(ARCHIVE_OK, archive_read_support_format_empty(a)); - assertEqualInt(ARCHIVE_OK, archive_read_open_filename(a, 0, 0)); + assertEqualInt(ARCHIVE_OK, archive_read_open_filename(a, filename, 0)); assertEqualInt(0, archive_errno(a)); assertEqualString(NULL, archive_error_string(a)); Modified: stable/11/usr.bin/bsdcat/Makefile ============================================================================== --- stable/11/usr.bin/bsdcat/Makefile Thu Jul 20 18:22:49 2017 (r321302) +++ stable/11/usr.bin/bsdcat/Makefile Thu Jul 20 20:15:38 2017 (r321303) @@ -6,7 +6,7 @@ _LIBARCHIVEDIR= ${SRCTOP}/contrib/libarchive _LIBARCHIVECONFDIR= ${SRCTOP}/lib/libarchive PROG= bsdcat -BSDCAT_VERSION_STRING= 3.3.1 +BSDCAT_VERSION_STRING= 3.3.2 .PATH: ${_LIBARCHIVEDIR}/cat SRCS= bsdcat.c cmdline.c Modified: stable/11/usr.bin/cpio/Makefile ============================================================================== --- stable/11/usr.bin/cpio/Makefile Thu Jul 20 18:22:49 2017 (r321302) +++ stable/11/usr.bin/cpio/Makefile Thu Jul 20 20:15:38 2017 (r321303) @@ -6,7 +6,7 @@ _LIBARCHIVEDIR= ${SRCTOP}/contrib/libarchive _LIBARCHIVECONFDIR= ${SRCTOP}/lib/libarchive PROG= bsdcpio -BSDCPIO_VERSION_STRING= 3.3.1 +BSDCPIO_VERSION_STRING= 3.3.2 .PATH: ${_LIBARCHIVEDIR}/cpio SRCS= cpio.c cmdline.c Modified: stable/11/usr.bin/tar/Makefile ============================================================================== --- stable/11/usr.bin/tar/Makefile Thu Jul 20 18:22:49 2017 (r321302) +++ stable/11/usr.bin/tar/Makefile Thu Jul 20 20:15:38 2017 (r321303) @@ -4,7 +4,7 @@ _LIBARCHIVEDIR= ${SRCTOP}/contrib/libarchive PROG= bsdtar -BSDTAR_VERSION_STRING= 3.3.1 +BSDTAR_VERSION_STRING= 3.3.2 .PATH: ${_LIBARCHIVEDIR}/tar SRCS= bsdtar.c \ From owner-svn-src-stable-11@freebsd.org Thu Jul 20 23:44:41 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 07B6BCFEA2A; Thu, 20 Jul 2017 23:44:41 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C82E280EA8; Thu, 20 Jul 2017 23:44:40 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6KNieib097062; Thu, 20 Jul 2017 23:44:40 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6KNidgJ097060; Thu, 20 Jul 2017 23:44:39 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201707202344.v6KNidgJ097060@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 20 Jul 2017 23:44:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r321310 - in stable/11: release/doc/share/xml sys/conf X-SVN-Group: stable-11 X-SVN-Commit-Author: gjb X-SVN-Commit-Paths: in stable/11: release/doc/share/xml sys/conf X-SVN-Commit-Revision: 321310 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Jul 2017 23:44:41 -0000 Author: gjb Date: Thu Jul 20 23:44:39 2017 New Revision: 321310 URL: https://svnweb.freebsd.org/changeset/base/321310 Log: - Set stable/11 from -PRERELEASE back to -STABLE. - Update version entities in release.ent. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/share/xml/release.ent stable/11/sys/conf/newvers.sh Modified: stable/11/release/doc/share/xml/release.ent ============================================================================== --- stable/11/release/doc/share/xml/release.ent Thu Jul 20 23:39:50 2017 (r321309) +++ stable/11/release/doc/share/xml/release.ent Thu Jul 20 23:44:39 2017 (r321310) @@ -6,7 +6,7 @@ - + - + - + Modified: stable/11/sys/conf/newvers.sh ============================================================================== --- stable/11/sys/conf/newvers.sh Thu Jul 20 23:39:50 2017 (r321309) +++ stable/11/sys/conf/newvers.sh Thu Jul 20 23:44:39 2017 (r321310) @@ -44,7 +44,7 @@ TYPE="FreeBSD" REVISION="11.1" -BRANCH="PRERELEASE" +BRANCH="STABLE" if [ -n "${BRANCH_OVERRIDE}" ]; then BRANCH=${BRANCH_OVERRIDE} fi From owner-svn-src-stable-11@freebsd.org Thu Jul 20 23:54:19 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A3792CFEC41; Thu, 20 Jul 2017 23:54:19 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 72F9081296; Thu, 20 Jul 2017 23:54:19 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6KNsIlt001272; Thu, 20 Jul 2017 23:54:18 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6KNsItI001270; Thu, 20 Jul 2017 23:54:18 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201707202354.v6KNsItI001270@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 20 Jul 2017 23:54:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r321311 - in stable/11/release/doc: en_US.ISO8859-1/errata share/xml X-SVN-Group: stable-11 X-SVN-Commit-Author: gjb X-SVN-Commit-Paths: in stable/11/release/doc: en_US.ISO8859-1/errata share/xml X-SVN-Commit-Revision: 321311 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Jul 2017 23:54:19 -0000 Author: gjb Date: Thu Jul 20 23:54:18 2017 New Revision: 321311 URL: https://svnweb.freebsd.org/changeset/base/321311 Log: - Fix the 'release.prev' entity for the 11.1-RELEASE errata. - Prune stale entries from 11.0-RELEASE. - Bump copyright year. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/errata/article.xml stable/11/release/doc/share/xml/release.ent Modified: stable/11/release/doc/en_US.ISO8859-1/errata/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/errata/article.xml Thu Jul 20 23:44:39 2017 (r321310) +++ stable/11/release/doc/en_US.ISO8859-1/errata/article.xml Thu Jul 20 23:54:18 2017 (r321311) @@ -23,7 +23,7 @@ $FreeBSD$ - 2016 + 2017 The &os; Documentation Project @@ -95,17 +95,6 @@ - An issue was discovered with Amazon® EC2™ - images which would cause the virtual machine to hang during - boot when upgrading from previous FreeBSD versions. New - EC2™ installations are not affected, but existing - installations running earlier releases are advised to wait - until the issue is resolved in an Errata Notice before - upgrading. An Errata Notice to address this is planned - following the release. - - - &os;/&arch.i386; installed on ZFS may crash during boot when the ZFS pool mount is attempted while booting an unmodified GENERIC kernel. @@ -131,35 +120,6 @@ boot - A bug was diagnosed in interaction of the - pmap_activate() function and - TLB shootdown IPI - handler on amd64 systems which have PCID - features but do not implement the INVPCID - instruction. On such machines, such as SandyBridge™ - and IvyBridge™ microarchitectures, set the loader - tunable vm.pmap.pcid_enabled=0 during - boot: - - set vm.pmap.pcid_enabled=0 -boot - - Add this line to - /boot/loader.conf for the change to - persist across reboots: - - To check if the system is affected, check - &man.dmesg.8; for PCID listed in the - "Features2", and absence of - INVPCID in the "Structured Extended - Features". If the PCID feature is - not present, or INVPCID is present, - system is not affected. - - vm.pmap.pcid_enabled=0 - - - The Release Notes erroneously states the WITH_SYSTEM_COMPILER &man.src.conf.5; option is enabled by default, however this was disabled @@ -167,89 +127,7 @@ boot - The release announcement stated "Wireless support - for 802.11n has been added." This was intended to - state "Wireless support for 802.11n has been added for - additional wireless network drivers." - - - - Some release notes pertaining to the Cavium ThunderX - platform (the &os;/&arch.arm64; reference platform) were - omitted: - - - - Support for the Cavium Virtualized - NIC ethernet driver has been added. - - - - Support for the GICv3 and ITS device - drivers has been added. - - - - Support for PCI Enhanced Allocation - support has been added. - - - - - - [2016-10-20] Several recent Dell - systems fail to find a bootable disk when the system boots - in Legacy/BIOS/CSM mode, the boot disk is partitioned with - GPT, and the Active flag in the - Protective MBR is not set. To work - around this issue, either configure the system to boot in - UEFI mode, or choose the "GPT - + Active" scheme. - - - - [2016-10-21] Support for sha512 and - skein checksumming has been added to the - ZFS filesystem. This was not mentioned - in the release notes. - - Systems being upgraded from earlier &os; releases with - ZFS will see a message in zpool - status output noting the pool is not at the - latest version, and some features may not be enabled. - Additional instructions on how to update - ZFS pools to the latest version and - update the boot blocks for all boot drives in the pool will - also be provided in the output. - - This information is also documented in - /usr/src/UPDATING, which is included if - the src component is selected during - installation. - - - - [2016-10-21] The size of the GPT - enabled ZFS boot blocks - (/boot/gptzfsboot) has increased past - 64K. Systems upgraded from older releases may experience - a problem where the size of the existing - "freebsd-boot" partition is too small to hold the - new gptzfsboot. - - Systems where the boot partition is immediately followed - by the swap partition, such as those installed via - &man.bsdinstall.8;, can resize the swap partition slightly - using the &man.gpart.8; resize command, - so space can be reclaimed to increase the size of the - freebsd-boot partition. - - - - [2016-10-21] Due to a bug in earlier versions of + [2017-07-21] Due to a bug in earlier versions of &man.clang.1; that is difficult to work around in the upgrade process, to upgrade the system from sources via buildworld to -CURRENT or &release;, it is necessary to Modified: stable/11/release/doc/share/xml/release.ent ============================================================================== --- stable/11/release/doc/share/xml/release.ent Thu Jul 20 23:44:39 2017 (r321310) +++ stable/11/release/doc/share/xml/release.ent Thu Jul 20 23:54:18 2017 (r321311) @@ -11,7 +11,7 @@ - +