aboutsummaryrefslogtreecommitdiff
path: root/sbin
Commit message (Collapse)AuthorAgeFilesLines
* First pass to fix the 'tests' packages.Glen Barber2016-02-025-0/+20
| | | | | | | Sponsored by: The FreeBSD Foundation Notes: svn path=/projects/release-pkg/; revision=295171
* Add pidfile support to ggated(8)Enji Cooper2016-01-283-25/+52
| | | | | | | | | | | | | | | | | | | | The tests will manipulate the system daemon today, which can cause undesired service interruption when the tests are run. This change allows the geom_gate tests to be run with an arbitrary ggated(8) daemon / geom_gate(4) device pairing. Other changes: - Sort #includes - Use a more common idiom for parsing options with getopt(3) Differential Revision: https://reviews.freebsd.org/D4836 MFC after: 2 weeks Reviewed by: bjk (manpages), pjd (maintainer timeout) Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=294973
* Add "kldstat -h"; showing module sizes in hex is rather weird.Edward Tomasz Napierala2016-01-233-12/+35
| | | | | | | | | | Reviewed by: emaste@ (earlier version) MFC after: 1 month Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D4969 Notes: svn path=/head/; revision=294624
* Add an IOCTL rr_limit to let users fine tuning the number of packets to beMarcelo Araujo2016-01-231-0/+16
| | | | | | | | | | | | | | | | | | | | | | sent using roundrobin protocol and set a better granularity and distribution among the interfaces. Tuning the number of packages sent by interface can increase throughput and reduce unordered packets as well as reduce SACK. Example of usage: # ifconfig bge0 up # ifconfig bge1 up # ifconfig lagg0 create # ifconfig lagg0 laggproto roundrobin laggport bge0 laggport bge1 \ 192.168.1.1 netmask 255.255.255.0 # ifconfig lagg0 rr_limit 500 Reviewed by: thompsa, glebius, adrian (old patch) Approved by: bapt (mentor) Relnotes: Yes Differential Revision: https://reviews.freebsd.org/D540 Notes: svn path=/head/; revision=294615
* Add ldconfig -soft to process the soft float abi libraries and put itWarner Losh2016-01-181-1/+9
| | | | | | | into startup scripts for armv6. It acts much like ldconfig -32 does. Notes: svn path=/head/; revision=294295
* Make additional parts of sys/geom/eli more usable in userspaceAllan Jude2016-01-071-0/+1
| | | | | | | | | | | | | | | | | | | | | The upcoming GELI support in the loader reuses parts of this code Some ifdefs are added, and some code is moved outside of existing ifdefs The HMAC parts of GELI are broken out into their own file, to separate them from the kernel crypto/openssl dependant parts that are replaced in the boot code. Passed the GELI regression suite (tools/regression/geom/eli) Files=20 Tests=14996 Result: PASS Reviewed by: pjd, delphij MFC after: 1 week Sponsored by: ScaleEngine Inc. Differential Revision: https://reviews.freebsd.org/D4699 Notes: svn path=/head/; revision=293306
* Fix use of uninitialised NflagSteven Hartland2015-12-301-1/+1
| | | | | | | | | | | | | Initialise Nflag to 0 preventing use of uninitialised value. Reported by: uqs MFC after: 1 week X-MFC-With: r292266 Sponsored by: Multiplay Differential Revision: https://reviews.freebsd.org/D4449 Notes: svn path=/head/; revision=292947
* Fix type mismatches for malloc(3) and Co.Ulrich Spörlein2015-12-292-2/+2
| | | | | | | | | Found by: clang static analyzer Reviewed by: ed Differential Revision: https://reviews.freebsd.org/D4722 Notes: svn path=/head/; revision=292863
* Add SFF-8024 Extended Specification ComplianceAlexander V. Chernikov2015-12-281-4/+44
| | | | | | | | | Submitted by: markb_mellanox.com MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D4666 Notes: svn path=/head/; revision=292831
* Replace sys/crypto/sha2/sha2.c with lib/libmd/sha512c.cAllan Jude2015-12-276-7/+33
| | | | | | | | | | | | | | | | | | | | | cperciva's libmd implementation is 5-30% faster The same was done for SHA256 previously in r263218 cperciva's implementation was lacking SHA-384 which I implemented, validated against OpenSSL and the NIST documentation Extend sbin/md5 to create sha384(1) Chase dependancies on sys/crypto/sha2/sha2.{c,h} and replace them with sha512{c.c,.h} Reviewed by: cperciva, des, delphij Approved by: secteam, bapt (mentor) MFC after: 2 weeks Sponsored by: ScaleEngine Inc. Differential Revision: https://reviews.freebsd.org/D3929 Notes: svn path=/head/; revision=292782
* Reduce overlinkingBaptiste Daroussin2015-12-241-1/+1
| | | | | | | ifconfig does not need libbsdxml and libsbuf only lib80211 needs it Notes: svn path=/head/; revision=292684
* Fix "mount -a" for NFS and ZFS filesystems with shared mountpointsAlan Somers2015-12-211-1/+9
| | | | | | | | | | | | | | | | | | | | sbin/mount.c Check whether an fstab entry has the same fstype as a mounted filesystem before declaring it to be mounted. This will allow NFS filesystems that share a mountpoint with a local filesystem to be automatically mounted at boot. This is not such an unusual situation. For example, if somebody uses the standard installer with a ZFS root, he'll get a /usr/home filesystem, even though he may choose to mount /usr/home over NFS. Reviewed by: trasz MFC after: 4 weeks Sponsored by: Spectra Logic Corp Differential Revision: https://reviews.freebsd.org/D4556 Notes: svn path=/head/; revision=292573
* Add flag to disable inital reboot(8) userland syncSteven Hartland2015-12-152-7/+23
| | | | | | | | | | | | | | | | | | Add -N flag to reboot(8) which bypasses the userland sync(2) during reboot(8) while still allow the kernel sync during the reboot(2) syscall to occur. An example use of this is when rebooting with disconnected iSCSI sessions which would otherwise cause the reboot to hang on BIOs that will never complete. Reviewed by: bjk MFC after: 2 weeks Sponsored by: Multiplay Differential Revision: https://reviews.freebsd.org/D4449 Notes: svn path=/head/; revision=292266
* Remove a note about damaged PMBR. Now GPT will be detected automaticallyAndrey V. Elsukov2015-12-101-11/+1
| | | | | | | | | with such corruption. MFC after: 1 month Notes: svn path=/head/; revision=292058
* Don't leak rsector/sector in mp_label(..)Enji Cooper2015-12-101-5/+6
| | | | | | | | | | | | | Use calloc instead of malloc + memset(.., 0, ..) when allocating sector Differential Revision: https://reviews.freebsd.org/D4450 MFC after: 1 week Reported by: cppcheck Reviewed by: mav Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=292048
* Add -t option to display field types.Marcelo Araujo2015-12-102-12/+30
| | | | | | | | | | | PR: bin/203918 Submitted by: ota <ota@j.email.ne.jp> Reviewed by: cem Approved by: bapt (mentor) Differential Revision: https://reviews.freebsd.org/D4451 Notes: svn path=/head/; revision=292045
* Increase devd's client socket buffer size to 256KB. This is not as large asAlan Somers2015-12-091-6/+17
| | | | | | | | | | | | | it looks, because we'll hit the sockbuf's mbuf limit long before hitting its data limit. A 256KB data limit allows creating a ZFS pool on about 450 drives without overflowing the client socket buffers. MFC after: 4 weeks Sponsored by: Spectra Logic Corp Differential Revision: https://reviews.freebsd.org/D4476 Notes: svn path=/head/; revision=292020
* Call va_end on ap when vsnprintf fails in run_cmd(..) to clean upEnji Cooper2015-12-091-0/+1
| | | | | | | | | | | the variable state MFC after: 1 week Reported by: cppcheck Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=292005
* Fix leak in mkfs_msdos(..) by initializing img to NULL and free'ing at the endEnji Cooper2015-12-061-40/+47
| | | | | | | | | | | | | | of the function Differential Revision: https://reviews.freebsd.org/D4405 MFC after: 1 week PR: 204943 Reviewed by: emaste, jilles Reported by: David Binderman <dcb314@hotmail.com> Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=291908
* Fix LDADD/DPADD that should be LIBADD.Bryan Drewery2015-12-041-2/+1
| | | | | | | Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=291738
* For INTERNALLIB always add in the corresponding _DP_ and use LIBADD inBryan Drewery2015-12-041-0/+2
| | | | | | | | | | | | the real build file. This lessens the need to define DPADD_<lib> and LDADD_<lib> to just very special cases. Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=291735
* META MODE: Connect MK_NAND directories.Bryan Drewery2015-12-022-0/+40
| | | | | | | Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=291640
* Don't add LIBADD=ipf to libipf itself.Bryan Drewery2015-12-011-0/+2
| | | | | | | | | | This had no real impact since libipf is a static INTERNALLIB. It does conflict with an assertion I am adding for LIBADD though. Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=291621
* Add more text to explain --libxo flag.Craig Rodrigues2015-12-011-1/+11
| | | | Notes: svn path=/head/; revision=291607
* META MODE: Update dependencies with 'the-lot' and add missing directories.Bryan Drewery2015-12-013-0/+26
| | | | | | | | | | | | | | | | | This is not properly respecting WITHOUT or ARCH dependencies in target/. Doing so requires a massive effort to rework targets/ to do so. A better approach will be to either include the SUBDIR Makefiles directly and map to DIRDEPS or just dynamically lookup the SUBDIR. These lose the benefit of having a userland/lib, userland/libexec, etc, though and results in a massive package. The current implementation of targets/ is very unmaintainable. Currently rescue/rescue and sys/modules are still not connected. Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=291563
* Update dependencies after r291406 added libelf to libkvm.Bryan Drewery2015-12-0110-0/+10
| | | | | | | | | | | Unfortunately filemon/meta mode tracks all indirect dependencies here since ld(1) is reading libelf when linking in libkvm. Churn would be reduced if this was able to be limited to direct dependencies. Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=291558
* Convert ifconfig to use lib80211.Adrian Chadd2015-11-304-864/+11
| | | | | | | | | * remove regdomain.[ch] - it's now part of lib80211. * convert ifieee80211.c to use the ioctl routines in lib80211 and implement the "error? exit" wrapper behaviour the callers expect. Notes: svn path=/head/; revision=291470
* Use netbsd usage() implementation in newfs_msdosEd Maste2015-11-271-27/+14
| | | | | | | | | | In r289629 newfs_msdos option descriptions are available in mkfs_msdos.h. Obtained from: NetBSD Notes: svn path=/head/; revision=291385
* mkfs_msdos: sync with NetBSDEd Maste2015-11-271-3/+8
| | | | | | | | | Add a sanity test and clean up whitespace. Obtained from: NetBSD Notes: svn path=/head/; revision=291382
* [ifconfig] handle IBSS mediatype correctly.Adrian Chadd2015-11-261-0/+2
| | | | | | | | | Right now net80211 is configured as type IBSS but then treats it as mediatype ADHOC. This doesn't change that; it just correctly handles being given a mediatype of IBSS. Notes: svn path=/head/; revision=291352
* Remove redundant DPSRCS which were already in SRCS.Bryan Drewery2015-11-255-9/+0
| | | | | | | | | | DPSRCS already contains all of SRCS. MFC after: 1 week Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=291329
* newfs_msdos: rework error handling for eventual use in makefsEd Maste2015-11-232-98/+191
| | | | | | | | | | | Return -1 on errors from mkfs_msdos() instead of err()/errx(), to allow different consumers to handle errors as appropriate. Obtained from: NetBSD Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=291219
* Update $NetBSD$ IDEd Maste2015-11-231-1/+1
| | | | | | | | | NetBSD mkfs_msdos.h rev 1.3 removed the no-endorsement clause from the license block, which had already been done in the source I imported in r289629. Notes: svn path=/head/; revision=291218
* Fix dumpon compatibility with dumpdev kenvSteven Hartland2015-11-231-4/+19
| | | | | | | | | | | The dumpdev kenv supports devices without the /dev/ prefix, fix dumpon to also support this which is required after r288153. MFC after: 1 week Sponsored by: Multiplay Notes: svn path=/head/; revision=291207
* Convert to SUBDIR.yes format.Bryan Drewery2015-11-181-60/+20
| | | | | | | | | Reviewed by: imp Sponsored by: EMC / Isilon Storage Division Differential Revision: https://reviews.freebsd.org/D4182 Notes: svn path=/head/; revision=291021
* If you backup a large file that is mostly holes, previously we'd issueJohn-Mark Gurney2015-11-161-3/+27
| | | | | | | | | | | | | a seek for every block... For large (Exabyte sized files) this would issue lots of unneeded seeks, so combine them... Thanks for the work Jan, sorry took so long to commit... And an item completed off the IdeasPage! Submitted by: Jan Sucan Notes: svn path=/head/; revision=290900
* Fix resource leaks in error cases.Edward Tomasz Napierala2015-11-111-8/+9
| | | | | | | | MFC after: 1 month Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=290689
* Userspace part of reroot support. This makes it possible to changeEdward Tomasz Napierala2015-11-085-22/+316
| | | | | | | | | | | | | | | | the root filesystem without full reboot, using "reboot -r". This can be used to to eg. boot from a temporary md_image preloaded by loader(8), setup an iSCSI session, and continue booting from rootfs mounted over iSCSI. Reviewed by: kib@, bapt@ MFC after: 1 month Relnotes: yes Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D3693 Notes: svn path=/head/; revision=290548
* savecore(8): Be quiet unless the user asks for verboseConrad Meyer2015-11-071-7/+10
| | | | | | | | | | Make savecore(8) more suitable for init-time scripts; be quiet by default. Sponsored by: EMC / Isilon Storage Division Differential Revision: https://reviews.freebsd.org/D3229 Notes: svn path=/head/; revision=290520
* Follow-up to r290475: Add sysctl(8) support for added typesConrad Meyer2015-11-071-28/+81
| | | | | | | Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=290476
* Always check the return value of lseek.Alan Somers2015-11-061-6/+4
| | | | | | | | | | | | | | | This is a follow-up to r289845, which only fixed one occurence of CID 1009429. Coverity CID: 1009429 Reviewed by: markj MFC after: 2 weeks X-MFC-With: r289845 Sponsored by: Spectra Logic Differential Revision: https://reviews.freebsd.org/D4096 Notes: svn path=/head/; revision=290463
* Add sysctl to control LACP strict compliance defaultSteven Hartland2015-11-061-1/+16
| | | | | | | | | | | | | | | | Add net.link.lagg.lacp.default_strict_mode which defines the default value for LACP strict compliance for created lagg devices. Also: * Add lacp_strict option to ifconfig(8). * Fix lagg(4) creation examples. * Minor style(9) fix. MFC after: 1 week Notes: svn path=/head/; revision=290450
* ifconfig: fix padding for '<ifname> scan' command outputAndriy Voskoboinyk2015-11-061-2/+2
| | | | | | | | | | (S:N and beacon interval fields). Approved by: adrian (mentor) Differential Revision: https://reviews.freebsd.org/D4085 Notes: svn path=/head/; revision=290438
* Implement `ipfw internal olist` command to list named objects.Andrey V. Elsukov2015-11-032-0/+42
| | | | | | | | | Reviewed by: melifaro Obtained from: Yandex LLC Sponsored by: Yandex LLC Notes: svn path=/head/; revision=290330
* pfctl: Fix uninitialised veriableKristof Provost2015-11-011-0/+1
| | | | | | | | | | | | In pfctl_set_debug() we used 'level' without ever initialising it. We correctly parsed the option, but them failed to actually assign the parsed value to 'level' before performing to ioctl() to configure the debug level. PR: 202996 Submitted by: Andrej Kolontai Notes: svn path=/head/; revision=290236
* Use more appropriate ${SHAREDIR} rather than /usr/share.Bryan Drewery2015-10-271-2/+2
| | | | | | | | MFC after: 2 weeks Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=290083
* Limit RESOLUTION_MAX to INT_MAX, not UINT_MAX (all spelled out) so theEnji Cooper2015-10-251-1/+1
| | | | | | | | | | | | | | | | | mode value isn't always clipped to -1 when (resolution * size) == 32, which would have been the case with values => {4i,32b,32t}. This seems to have been broken in r64382. MFC after: 1 week X-MFC with: r289915 PR: 200619 Reported by: Michael Baptist Submitted by: Lars Skodje Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=289916
* Fix various Coverity issues in sbin/savecore/savecore.c:Alan Somers2015-10-231-6/+6
| | | | | | | | | | | | | | | | CID1009429: Fix unchecked return value from lseek while clearing dump CID1007781: Fix file descriptor leak in DoFile CID1007261: Don't send potentially unterminated string to syslog(3) Coverity CID: 1009429 Coverity CID: 1007781 Coverity CID: 1007261 MFC after: 2 weeks Sponsored by: Spectra Logic Differential Revision: https://reviews.freebsd.org/D3991 Notes: svn path=/head/; revision=289845
* sysctl(8): Fix style nitsConrad Meyer2015-10-231-5/+6
| | | | | | | | Suggested by: bde Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=289835
* Sysctl: Add common support for U8, U16 typesConrad Meyer2015-10-221-0/+28
| | | | | | | Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=289773