aboutsummaryrefslogtreecommitdiff
path: root/lib/Makefile
Commit message (Collapse)AuthorAgeFilesLines
* Fix typo in lib/MakefileEnji Cooper2017-01-281-1/+1
| | | | | | | | | | | | The SUBDIR_DEPEND variable should be for librpcsec_gss, not liblibrpc_gss MFC after: 1 week PR: 216409 Reported by: mail@fbsd.e4m.org Notes: svn path=/head/; revision=312937
* Connect new LLVM-based libgcc_eh & libgcc_s to the buildEd Maste2016-11-041-0/+2
| | | | | | | | | | | | | | | Compiler-rt and LLVM's libunwind provide a suitable replacement for libgcc.a, libgcc_eh.a, and libgcc_s.so. Remove the now-unused LLVM_LIBUNWIND block from gnu/lib/libgcc. PR: 213480 [exp-run] Reviewed by: brooks, ed Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D8189 Notes: svn path=/head/; revision=308308
* Simplify logic for libproc and librtld_db in lib/MakefileEd Maste2016-10-141-14/+1
| | | | Notes: svn path=/head/; revision=307325
* partially convert lib/Makefile to SUBDIR.${MK_FOO} styleEd Maste2016-10-141-158/+32
| | | | | | | | | | | | Cases other than MK_* (e.g. ${MACHINE_CPUARCH} == "i386") have been left as is. Reviewed by: imp Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D8246 Notes: svn path=/head/; revision=307243
* garbage collect _libatm, missed in r179308Ed Maste2016-10-131-2/+0
| | | | Notes: svn path=/head/; revision=307237
* Fix building on i386 and arm. But 'public domain' headers on the filesWarner Losh2016-10-131-1/+1
| | | | | | | | | | | with no creative content. Include "lost" changes from git: o Use /dev/efi instead of /dev/efidev o Remove redundant NULL checks. Submitted by: kib@, dim@, zbb@, emaste@ Notes: svn path=/head/; revision=307189
* Create libefivar library. This library aims to provideWarner Losh2016-10-111-0/+5
| | | | | | | | | | | | | | | the same API as the GPL'd version of this library. It implements the common Linux API for programatically manipulating UEFI environment varibales using the UEFI Runtime Services the kernel provides. It replaces the old efi library since it is programmed to a different interface, but retails the CHAR16 to UTF-8 and vice versa conversion routines. The new name is to match Linux program's expectations. Differential Revision: https://reviews.freebsd.org/D8128 Reviewed by: kib@, wblock@, Ganael Laplanche Notes: svn path=/head/; revision=307071
* libcapsicum: introduce Capsicum helpersMariusz Zaborski2016-10-031-0/+1
| | | | | | | | | | | Capsicum helpers are a set of inline functions which goal is to reduce duplicated patterns used to Capsicumize applications. Reviewed by: cem, AllanJude, bapt, ed, emaste Differential Revision: https://reviews.freebsd.org/D8013 Notes: svn path=/head/; revision=306657
* Add librss, a simple wrapper around RSS APIs so applications can begin ↵Adrian Chadd2016-09-301-0/+1
| | | | | | | | | | | | | | | | | | | | | | auto-tuning. I've used this in a handful of RSS test applications. It is just some very simple functions to fetch the RSS configuration, query the per-bucket CPU set, and mark sockets as local to an RSS bucket. It should be sufficient for both thread-based and process-based workloads. (Yes, I wrote a manpage.) This is based on some early RSS API and wrapper API work I did whilst I was at Netflix. Thanks to Netflix for the very original work that spawned this; thanks to Peter Grehan for his feedback about RSS APIs and thanks to Jack Vogel and Navdeep Parhar for the NIC-facing side of the APIs. These fed into the simple userland API I wrote up here. Reviewed by: gallatin Notes: svn path=/head/; revision=306525
* Add a WITHOUT_DIALOG src.conf(5) knobEd Maste2016-09-271-1/+2
| | | | | | | | | | | It also turns off dependencies (bsdinstall, bsdconfig, dpv, tzsetup). Reviewed by: dteske Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D7969 Notes: svn path=/head/; revision=306375
* Renaming libifc to libifconfig in response to feedback on initial commit ofKristof Provost2016-09-021-1/+1
| | | | | | | | | | | | | this library. Sticking to 'libifconfig' (and 'ifconfig_' as function prefix) should reduce chances of namespace collisions, make it more clear what the library does, and be more in line with existing libraries. Submitted by: Marie Helene Kvello-Aune <marieheleneka@gmail.com> Differential Revision: https://reviews.freebsd.org/D7742 Reviewed by: cem, kp Notes: svn path=/head/; revision=305290
* Add libifc, a library implementing core functionality that exists in ↵Kristof Provost2016-08-251-0/+1
| | | | | | | | | | | | | | | | | | | | | ifconfig(8) today. libifc (pronounced lib-ifconfig) aims to be a light abstraction layer between programs and the kernel APIs for managing the network configuration. This should hopefully make programs easier to maintain, and reduce code duplication. Work will begin on making ifconfig(8) use this library in the near future. This code is still evolving. The interface should not be considered stable until it is announced as such. Submitted By: Marie Helene Kvello-Aune <marieheleneka@gmail.com> Reviewed By: kp Differential Revision: https://reviews.freebsd.org/D7529 Notes: svn path=/head/; revision=304815
* Don't build libdevdctl if MK_CXX is noEd Maste2016-08-241-1/+5
| | | | Notes: svn path=/head/; revision=304757
* Rename ORDERED to BOOTSTRAP since no order is respected in the list.Bryan Drewery2016-08-221-3/+4
| | | | | | | | | | | The directories in SUBDIR_ORDERED are built in parallel, so the name is misleading. MFC after: 3 days Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=304647
* Separate BLACKLIST vs BLACKLIST_SUPPORT properlyKurt Lidl2016-06-071-1/+1
| | | | | | | Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=301553
* Remove libstdc++ again.Bryan Drewery2016-06-021-1/+0
| | | | | | | This was mis-merged in r298107 which missed r289389. Notes: svn path=/head/; revision=301228
* Add basic blacklist build supportKurt Lidl2016-06-021-0/+5
| | | | | | | | | | | Reviewed by: rpaulo Approved by: rpaulo Relnotes: YES Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D5913 Notes: svn path=/head/; revision=301226
* zfsd(8), the ZFS fault management daemonAlan Somers2016-05-281-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add zfsd, which deals with hard drive faults in ZFS pools. It manages hotspares and replements in drive slots that publish physical paths. cddl/usr.sbin/zfsd Add zfsd(8) and its unit tests cddl/usr.sbin/Makefile Add zfsd to the build lib/libdevdctl A C++ library that helps devd clients process events lib/Makefile share/mk/bsd.libnames.mk share/mk/src.libnames.mk Add libdevdctl to the build. It's a private library, unusable by out-of-tree software. etc/defaults/rc.conf By default, set zfsd_enable to NO etc/mtree/BSD.include.dist Add a directory for libdevdctl's include files etc/mtree/BSD.tests.dist Add a directory for zfsd's unit tests etc/mtree/BSD.var.dist Add /var/db/zfsd/cases, where zfsd stores case files while it's shut down. etc/rc.d/Makefile etc/rc.d/zfsd Add zfsd's rc script sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c Fix the resource.fs.zfs.statechange message. It had a number of problems: It was only being emitted on a transition to the HEALTHY state. That made it impossible for zfsd to take actions based on drives getting sicker. It compared the new state to vdev_prevstate, which is the state that the vdev had the last time it was opened. That doesn't make sense, because a vdev can change state multiple times without being reopened. vdev_set_state contains logic that will change the device's new state based on various conditions. However, the statechange event was being posted _before_ that logic took effect. Now it's being posted after. Submitted by: gibbs, asomers, mav, allanjude Reviewed by: mav, delphij Relnotes: yes Sponsored by: Spectra Logic Corp, iX Systems Differential Revision: https://reviews.freebsd.org/D6564 Notes: svn path=/head/; revision=300906
* MFHGlen Barber2016-03-141-1/+1
|\ | | | | | | | | | | | | Sponsored by: The FreeBSD Foundation Notes: svn path=/projects/release-pkg/; revision=296869
| * Use the newly minted Makefile.libcompat to implement libsoft librariesWarner Losh2016-03-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | for the armv6 ABI switch. This also make WITH_LIBSOFT functional on the arm platform. As a transition thing, this seems to work even without switching the ABI (we basically build the same libraries twice when MK_LIBSOFT=yes until the ABI cut over next month). MK_LIBSOFT remains default no. Notes: svn path=/head/; revision=296779
| * Revert r296395.Bryan Drewery2016-03-051-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | This mistakenly removed the SUBDIR_PARALLEL but even worse is that the install (and build) order is not correct due to the lack of SUBDIR_DEPEND on the most critical libraries. The only reason they build correctly now is because buildworld's 'make libraries' orders them properly. Pointyhat to: bdrewery Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=296406
| * Parallel installation has been safe here since r267511 added SUBDIR_DEPEND.Bryan Drewery2016-03-041-4/+0
| | | | | | | | | | | | | | Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=296395
* | MFHGlen Barber2016-03-021-4/+1
|\| | | | | | | | | | | | | Sponsored by: The FreeBSD Foundation Notes: svn path=/projects/release-pkg/; revision=296318
| * Convert casperd(8) daemon to the libcasper.Mariusz Zaborski2016-02-251-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After calling the cap_init(3) function Casper will fork from it's original process, using pdfork(2). Forking from a process has a lot of advantages: 1. We have the same cwd as the original process. 2. The same uid, gid and groups. 3. The same MAC labels. 4. The same descriptor table. 5. The same routing table. 6. The same umask. 7. The same cpuset(1). From now services are also in form of libraries. We also removed libcapsicum at all and converts existing program using Casper to new architecture. Discussed with: pjd, jonathan, ed, drysdale@google.com, emaste Partially reviewed by: drysdale@google.com, bdrewery Approved by: pjd (mentor) Differential Revision: https://reviews.freebsd.org/D4277 Notes: svn path=/head/; revision=296047
* | MFHGlen Barber2016-02-151-0/+2
|\| | | | | | | | | | | | | Sponsored by: The FreeBSD Foundation Notes: svn path=/projects/release-pkg/; revision=295639
| * Add libpe for elfcopy(1) PE/COFF supportEd Maste2016-02-121-0/+2
| | | | | | | | | | | | | | Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=295581
* | Remove duplicate line, likely result of a mismerge.Glen Barber2016-02-041-1/+0
| | | | | | | | | | | | | | Sponsored by: The FreeBSD Foundation Notes: svn path=/projects/release-pkg/; revision=295268
* | MFHGlen Barber2016-01-251-1/+2
|\| | | | | | | | | | | | | Sponsored by: The FreeBSD Foundation Notes: svn path=/projects/release-pkg/; revision=294728
| * Style.Ruslan Bukin2016-01-251-1/+2
| | | | | | | | Notes: svn path=/head/; revision=294717
| * Do build libproc and librtld_db for RISC-V as well.Ruslan Bukin2016-01-251-1/+1
| | | | | | | | Notes: svn path=/head/; revision=294714
* | Fix svn:mergeinfo, and MFH a commit that was previously missed.Glen Barber2016-01-041-1/+1
|\ \ | | | | | | | | | | | | | | | | | | Sponsored by: The FreeBSD Foundation Notes: svn path=/projects/release-pkg/; revision=293184
* \ \ MFH r289384-r293170Glen Barber2016-01-041-21/+7
|\ \ \ | | |/ | |/| | | | | | | | | | | | | Sponsored by: The FreeBSD Foundation Notes: svn path=/projects/release-pkg/; revision=293172
| * | Make the building of libsmb and mount_smbfs unconditional, now that r292552Ian Lepore2015-12-211-8/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | has eliminated alignment and endian problems that were making it fail on some platforms. PR: 180438 PR: 189415 Notes: svn path=/head/; revision=292553
| * | Start on a new library (libsysdecode) that provides routines for decodingJohn Baldwin2015-12-151-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | system call information such as system call arguments. Initially this will consist of pulling duplicated code out of truss and kdump though it may prove useful for other utilities in the future. This commit moves the shared utrace(2) record parser out of kdump into the library and updates kdump and truss to use it. One difference from the previous version is that the library version treats unknown events that start with the "RTLD" signature as unknown events. This simplifies the interface and allows the consumer to decide how to handle all non-recognized events. Instead, this function only generates a string description for known malloc() and RTLD records. Reviewed by: bdrewery Differential Revision: https://reviews.freebsd.org/D4537 Notes: svn path=/head/; revision=292236
| * | Move obscure lib/ installation of /usr/lib/include symlink to include/.Bryan Drewery2015-12-041-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This avoids the need for an afterinstall: hook and a check for LIBRARIES_ONLY. It also now respects INCLUDEDIR. This came in r249484. Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=291740
| * | Add lib80211, a small (but hopefully soon to grow) set of libraryAdrian Chadd2015-11-301-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | routines to interface with net80211. This is all from the ifconfig program; the duplicate code from ifconfig will be removed when it starts using this API. Differential Revision: https://reviews.freebsd.org/D4290 Notes: svn path=/head/; revision=291464
| * | Always build libevent, which fixes the build for usr.sbin/ypldap after r291230.Bryan Drewery2015-11-261-5/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The dependency for ypldap is only with WITH_NIS, but libevent is small enough to not warrant the extra logic and maintenance cost here so just always build it. Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=291350
| * | Rename libohash to libopenbsd.Craig Rodrigues2015-11-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | libopenbsd is an internal library which to bring in compatibility stuff from OpenBSD. This will allow us to bring in more OpenBSD utilities into the FreeBSD base system. We similarly use libnetbsd for bringing in stuff from NetBSD. Reviewed by: bapt Differential Revision: https://reviews.freebsd.org/D4078 Notes: svn path=/head/; revision=290351
| * | libstdc++ also snook in incorrectly in r267511, despite not being a realBryan Drewery2015-10-151-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | subdir. Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=289389
| * | Remove unneeded libg++ reference that came in with r267511 based on a removedBryan Drewery2015-10-151-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | comment. Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=289388
| * | Fix another ++= parsed as '+=', missed in r289384.Bryan Drewery2015-10-151-1/+1
| |/ | | | | | | | | | | | | Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=289387
| * Let the SUBDIR_DEPEND*c++ variables actually work rather than being parsedBryan Drewery2015-10-151-2/+2
|/ | | | | | | | | as a +=. These were safe due to a .WAIT very early on. Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=289384
* Roll WITHOUT_ELFTOOLCHAIN_TOOLS into WITHOUT_TOOLCHAINEd Maste2015-08-131-1/+1
| | | | | | | | | | | | | | The option was added only to ease the transition from GNU Binutils to ELF Tool Chain tools, and that process is now complete (for the viable replacements). Noting the removal in UPDATING is sufficient as we have not shipped a release with the option. Reviewed by: brooks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D3240 Notes: svn path=/head/; revision=286730
* First cut of DTrace for AArch64.Ruslan Bukin2015-07-011-3/+4
| | | | | | | | | Reviewed by: andrew, emaste Sponsored by: ARM Limited Differential Revision: https://reviews.freebsd.org/D2738 Notes: svn path=/head/; revision=285009
* Remove SUBDIR_DEPEND for non-existent libreadline directoryEnji Cooper2015-05-241-1/+0
| | | | | | | | | libreadline lives under gnu/lib MFC after: 1 week Notes: svn path=/head/; revision=283502
* Drop libmandoc and incorporate it into the main mandoc MakefileBaptiste Daroussin2015-05-211-1/+0
| | | | | | | | This simplifies maintainance of mandoc(1). Note that the same direction was taken on OpenBSD Notes: svn path=/head/; revision=283220
* Remove redundant csu subdir logicEd Maste2015-05-121-11/+1
| | | | | | | | | | | | The appropriate subdirectories are handled by lib/csu/Makefile. There's no need to duplicate this logic in Makefile.inc1 and lib/Makefile. Reviewed by: imp Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D2523 Notes: svn path=/head/; revision=282821
* Significant upgrades to sa(4) and mt(1).Kenneth D. Merry2015-02-231-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The primary focus of these changes is to modernize FreeBSD's tape infrastructure so that we can take advantage of some of the features of modern tape drives and allow support for LTFS. Significant changes and new features include: o sa(4) driver status and parameter information is now exported via an XML structure. This will allow for changes and improvements later on that will not break userland applications. The old MTIOCGET status ioctl remains, so applications using the existing interface will not break. o 'mt status' now reports drive-reported tape position information as well as the previously available calculated tape position information. These numbers will be different at times, because the drive-reported block numbers are relative to BOP (Beginning of Partition), but the block numbers calculated previously via sa(4) (and still provided) are relative to the last filemark. Both numbers are now provided. 'mt status' now also shows the drive INQUIRY information, serial number and any position flags (BOP, EOT, etc.) provided with the tape position information. 'mt status -v' adds information on the maximum possible I/O size, and the underlying values used to calculate it. o The extra sa(4) /dev entries (/dev/saN.[0-3]) have been removed. The extra devices were originally added as place holders for density-specific device nodes. Some OSes (NetBSD, NetApp's OnTap and Solaris) have had device nodes that, when you write to them, will automatically select a given density for particular tape drives. This is a convenient way of switching densities, but it was never implemented in FreeBSD. Only the device nodes were there, and that sometimes confused users. For modern tape devices, the density is generally not selectable (e.g. with LTO) or defaults to the highest availble density when the tape is rewritten from BOT (e.g. TS11X0). So, for most users, density selection won't be necessary. If they do need to select the density, it is easy enough to use 'mt density' to change it. o Protection information is now supported. This is either a Reed-Solomon CRC or CRC32 that is included at the end of each block read and written. On write, the tape drive verifies the CRC, and on read, the tape drive provides a CRC for the userland application to verify. o New, extensible tape driver parameter get/set interface. o Density reporting information. For drives that support it, 'mt getdensity' will show detailed information on what formats the tape drive supports, and what formats the tape drive supports. o Some mt(1) functionality moved into a new mt(3) library so that external applications can reuse the code. o The new mt(3) library includes helper routines to aid in parsing the XML output of the sa(4) driver, and build a tree of driver metadata. o Support for the MTLOAD (load a tape in the drive) and MTWEOFI (write filemark immediate) ioctls needed by IBM's LTFS implementation. o Improve device departure behavior for the sa(4) driver. The previous implementation led to hangs when the device was open. o This has been tested on the following types of drives: IBM TS1150 IBM TS1140 IBM LTO-6 IBM LTO-5 HP LTO-2 Seagate DDS-4 Quantum DLT-4000 Exabyte 8505 Sony DDS-2 contrib/groff/tmac/doc-syms, share/mk/bsd.libnames.mk, lib/Makefile, Add libmt. lib/libmt/Makefile, lib/libmt/mt.3, lib/libmt/mtlib.c, lib/libmt/mtlib.h, New mt(3) library that contains functions moved from mt(1) and new functions needed to interact with the updated sa(4) driver. This includes XML parser helper functions that application writers can use when writing code to query tape parameters. rescue/rescue/Makefile: Add -lmt to CRUNCH_LIBS. src/share/man/man4/mtio.4 Clarify this man page a bit, and since it contains what is essentially the mtio.h header file, add new ioctls and structure definitions from mtio.h. src/share/man/man4/sa.4 Update BUGS and maintainer section. sys/cam/scsi/scsi_all.c, sys/cam/scsi/scsi_all.h: Add SCSI SECURITY PROTOCOL IN/OUT CDB definitions and CDB building functions. sys/cam/scsi/scsi_sa.c sys/cam/scsi/scsi_sa.h Many tape driver changes, largely outlined above. Increase the sa(4) driver read/write timeout from 4 to 32 minutes. This is based on the recommended values for IBM LTO 5/6 drives. This may also avoid timeouts for other tape hardware that can take a long time to do retries and error recovery. Longer term, a better way to handle this is to ask the drive for recommended timeout values using the REPORT SUPPORTED OPCODES command. Modern IBM and Oracle tape drives at least support that command, and it would allow for more accurate timeout values. Add XML status generation. This is done with a series of macros to eliminate as much duplicate code as possible. The new XML-based status values are reported through the new MTIOCEXTGET ioctl. Add XML driver parameter reporting, using the new MTIOCPARAMGET ioctl. Add a new driver parameter setting interface, using the new MTIOCPARAMSET and MTIOCSETLIST ioctls. Add a new MTIOCRBLIM ioctl to get block limits information. Add CCB/CDB building routines scsi_locate_16, scsi_locate_10, and scsi_read_position_10(). scsi_locate_10 implements the LOCATE command, as does the existing scsi_set_position() command. It just supports additional arguments and features. If/when we figure out a good way to provide backward compatibility for older applications using the old function API, we can just revamp scsi_set_position(). The same goes for scsi_read_position_10() and the existing scsi_read_position() function. Revamp sasetpos() to take the new mtlocate structure as an argument. It now will use either scsi_locate_10() or scsi_locate_16(), depending upon the arguments the user supplies. As before, once we change position we don't have a clear idea of what the current logical position of the tape drive is. For tape drives that support long form position data, we read the current position and store that for later reporting after changing the position. This should help applications like Bacula speed tape access under FreeBSD once they are modified to support the new ioctls. Add a new quirk, SA_QUIRK_NO_LONG_POS, that is set for all drives that report SCSI-2 or older, as well as drives that report an Illegal Request type error for READ POSITION with the long format. So we should automatically detect drives that don't support the long form and stop asking for it after an initial try. Add a partition number to the sa(4) softc. Improve device departure handling. The previous implementation led to hangs when the device was open. If an application had the sa(4) driver open, and attempted to close it after it went away, the cam_periph_release() call in saclose() would cause the periph to get destroyed because that was the last reference to it. Because destroy_dev() was called from the sa(4) driver's cleanup routine (sacleanup()), and would block waiting for the close to happen, a deadlock would result. So instead of calling destroy_dev() from the cleanup routine, call destroy_dev_sched_cb() from saoninvalidate() and wait for the callback. Acquire a reference for devfs in saregister(), and release it in the new sadevgonecb() routine when all devfs devices for the particular sa(4) driver instance are gone. Add a new function, sasetupdev(), to centralize setting per-instance devfs device parameters instead of repeating the code in saregister(). Add an open count to the softc, so we know how many peripheral driver references are a result of open sessions. Add the D_TRACKCLOSE flag to the cdevsw flags so that we get a 1:1 mapping of open to close calls instead of a N:1 mapping. This should be a no-op for everything except the control device, since we don't allow more than one open on non-control devices. However, since we do allow multiple opens on the control device, the combination of the open count and the D_TRACKCLOSE flag should result in an accurate peripheral driver reference count, and an accurate open count. The accurate open count allows us to release all peripheral driver references that are the result of open contexts once we get the callback from devfs. sys/sys/mtio.h: Add a number of new mt(4) ioctls and the requisite data structures. None of the existing interfaces been removed or changed. This includes definitions for the following new ioctls: MTIOCRBLIM /* get block limits */ MTIOCEXTLOCATE /* seek to position */ MTIOCEXTGET /* get tape status */ MTIOCPARAMGET /* get tape params */ MTIOCPARAMSET /* set tape params */ MTIOCSETLIST /* set N params */ usr.bin/mt/Makefile: mt(1) now depends on libmt, libsbuf and libbsdxml. usr.bin/mt/mt.1: Document new mt(1) features and subcommands. usr.bin/mt/mt.c: Implement support for mt(1) subcommands that need to use getopt(3) for their arguments. Implement a new 'mt status' command to replace the old 'mt status' command. The old status command has been renamed 'ostatus'. The new status function uses the MTIOCEXTGET ioctl, and therefore parses the XML data to determine drive status. The -x argument to 'mt status' allows the user to dump out the raw XML reported by the kernel. The new status display is mostly the same as the old status display, except that it doesn't print the redundant density mode information, and it does print the current partition number and position flags. Add a new command, 'mt locate', that will supersede the old 'mt setspos' and 'mt sethpos' commands. 'mt locate' implements all of the functionality of the MTIOCEXTLOCATE ioctl, and allows the user to change the logical position of the tape drive in a number of ways. (Partition, block number, file number, set mark number, end of data.) The immediate bit and the explicit address bits are implemented, but not documented in the man page. Add a new 'mt weofi' command to use the new MTWEOFI ioctl. This allows the user to ask the drive to write a filemark without waiting around for the operation to complete. Add a new 'mt getdensity' command that gets the XML-based tape drive density report from the sa(4) driver and displays it. This uses the SCSI REPORT DENSITY SUPPORT command to get comprehensive information from the tape drive about what formats it is able to read and write. Add a new 'mt protect' command that allows getting and setting tape drive protection information. The protection information is a CRC tacked on to the end of every read/write from and to the tape drive. Sponsored by: Spectra Logic MFC after: 1 month Notes: svn path=/head/; revision=279219
* Initial version of DTrace on ARM32.George V. Neville-Neil2015-02-101-0/+6
| | | | | | | | Submitted by: Howard Su based on work by Oleksandr Tymoshenko Reviewed by: ian, andrew, rpaulo, markj Notes: svn path=/head/; revision=278529
* Merge xz 5.2.0.Rui Paulo2015-02-091-0/+1
| | | | | | | | | | | | | | | | This brings support for multi-threaded compression. This brings close N times faster compression where N is the number of CPU cores. Because of this, liblzma now depends on libthr. Soon libarchive will be modified to use the new lzma API. Thanks to antoine@ for the exp-run. Differential Revision: https://reviews.freebsd.org/D1786 Reviewed by: bapt Notes: svn path=/head/; revision=278433