summaryrefslogtreecommitdiffstats
path: root/sbin
Commit message (Collapse)AuthorAgeFilesLines
* Prefer snprintf() over sprintf().pjd2012-12-161-5/+5
| | | | Obtained from: WHEEL Systems
* When growing a filesystem, don't leave unused space at the endtrasz2012-12-161-7/+10
| | | | | | if there is not enough room for a full cylinder group. Reviewed by: mckusick@
* Fix extending filesystems of weird size by making sure the actual sizetrasz2012-12-151-0/+6
| | | | is always multiple of fragment size.
* - When checking if a dump exists on the given device there is no need topjd2012-12-142-5/+7
| | | | | | | | | | | | | | | | provide dump directory. Eliminate this redundant argument. This changes the usage, but the only risk here is that a warning will be printed about directory given as device. - Update usage of -C option. - When clearing dump header from the given device there is also no need to provide dump directory, although additional arguments for -c were not documented. - Document that -v can be used with -c and that list of devices can be given. Obtained from: WHEEL Systems
* The clear option (-c) is not compatible with keep (-k) and compress (-z)pjd2012-12-141-0/+2
| | | | | | options. Obtained from: WHEEL Systems
* If we are not going to clear the dump (we are either just checking if the dumppjd2012-12-141-2/+2
| | | | | | exists or we want to keep it), open device read-only. Obtained from: WHEEL Systems
* Whitespace cleanups.pjd2012-12-141-6/+6
|
* Teach sysctl(8) about parsing a file (while I'm there also give itdelphij2012-12-132-62/+175
| | | | | | | capability of parsing both = and : formats). Submitted by: hrs (initial version, bugs are mine) MFC after: 3 months
* Make Tflag and Wflag filters work for more sysctl options.alfred2012-12-121-11/+11
| | | | | To do this move the Tflag and Wflag checks earlier in show_var() so we bail earlier for variables not matching our query.
* Allow sysctl to filter boot and runtime tunables.alfred2012-12-112-6/+30
| | | | | | | | | | | Add the following flags to sysctl: -W - show only writable sysctls -T - show only tuneable sysctls This can be used to create a /var/run/sysctl.boot to compare set tunables versus booted tunables. Sponsored by: iXsystems
* In parse():delphij2012-12-111-6/+5
| | | | | | | | - Only operate on copy, don't operate on source. - Eliminate home-rolled strsep(). - Constify the parameter. MFC after: 2 weeks
* Document the new NFS mount options added by r244042.rmacklem2012-12-091-1/+13
| | | | This is a content change.
* A number of places in the source tree still reference cuad.* aftereadler2012-12-081-1/+1
| | | | | | | | | | | sio(4) was deprecated by uart(4). s/cuad/cuau/g/ PR: docs/171533 Reviewed by: imp Approved by: cperciva (implicit) MFC after: 3 weeks
* Prefer the use of initalizer lists to ctor assignment.eadler2012-12-062-3/+2
| | | | | Approved by: cperciva MFC after: 2 weeks
* Avoid the creation of a temporary object by using the prefix operatoreadler2012-12-061-9/+9
| | | | | | | for non-primitive types. Approved by: cperciva MFC after: 2 weeks
* Constify where possibleeadler2012-12-062-7/+7
| | | | | Approved by: cperciva MFC after: 2 weeks
* Fix an old bug in devd, where it uses std::sort() to sort the variousdim2012-12-051-1/+1
| | | | | | | | | | | | | | | | | | | | | lists it reads from its configuration files on the priority field. Because some items in the lists have the same priority, and std::sort() is not stable, the exact order in which the items are enumerated does not have to correspond to the order they appear in the configuration files. Apparently this was never noticed with libstdc++, but with libc++ it could cause the "uhid" entry from /etc/devd/usb.conf to be used instead of the "ums" entry (which is earlier in the file). This caused the problem described in the PR: the USB mouse module was never loaded, and the other actions (such as starting moused) were not executed. To fix the problem, make devd use std:stable_sort() instead. Reported by: Jan Beich <jbeich@tormail.org> PR: bin/172958 MFC after: 2 weeks
* - Move definition of V_deembed_scopeid to scope6_var.h.hrs2012-12-051-10/+0
| | | | | | - Deembed scope id in L3 address in in6_lltable_dump(). - Simplify scope id recovery in rtsock routines. - Remove embedded scope id handling in ndp(8) and route(8) completely.
* Fix fallout from r243019, which broke parsing of shortened networkglebius2012-12-041-0/+7
| | | | | | prefixes. Reported and tested by: delphij
* - Fix LOR in sa6_recoverscope() in rt_msg2()[1].hrs2012-12-042-2/+13
| | | | | | | - Check V_deembed_scopeid before checking if sa_family == AF_INET6. - Fix scope id handing in route(8)[2] and ifconfig(8). Reported by: rpaulo[1], Mateusz Guzik[1], peter[2]
* Flush stdout after RTM_IFANNOUNCE message.glebius2012-12-041-0/+1
| | | | | PR: bin/151600 Submitted by: Eric van Gyzen <eric vangyzen.net>
* No need to be root when running with -t or -d.glebius2012-12-041-2/+2
|
* Mark non-returning function as sucheadler2012-11-291-1/+1
| | | | | | PR: bin/172978 Approved by: cperciva MFC after: 3 days
* Disallow attaching preloaded memory disks via ioctl.jh2012-11-211-3/+1
| | | | | | | | | | | | - The feature is dangerous because the kernel code didn't check validity of the memory address provided from user space. - It seems that mdconfig(8) never really supported attaching preloaded memory disks. - Preloaded memory disks are automatically attached during md(4) initialization. Thus there shouldn't be much use for the feature. PR: kern/169683 Discussed on: freebsd-hackers
* Remove superfluous paragraph macro.joel2012-11-181-1/+0
|
* Make it possible to resize filesystems mounted read-write, using newlytrasz2012-11-182-7/+29
| | | | | | | introduced UFS write suspension mechanism. Reviewed by: kib, mckusick Sponsored by: FreeBSD Foundation
* Fill sin6_scope_id in sockaddr_in6 before passing it from the kernel tohrs2012-11-172-75/+2
| | | | | | | | | | | | userland via routing socket or sysctl. This eliminates the following KAME-specific sin6_scope_id handling routine from each userland utility: sin6.sin6_scope_id = ntohs(*(u_int16_t *)&sin6.sin6_addr.s6_addr[2]); This behavior can be controlled by net.inet6.ip6.deembed_scopeid. This is set to 1 by default (sin6_scope_id will be filled in the kernel). Reviewed by: bz
* Add -fib modifier to specify FIB number. The FIB number can be in ahrs2012-11-173-114/+440
| | | | | | | | | | | comma-separated list and/or range specification: # route add -inet 192.0.2.0/24 198.51.100.1 -fib 1,3-5,6 Although all of the subcommands supports the modifier, "monitor" does not support the list or range specification at this moment. Reviewed by: bz
* Fix memory leak in umount.ceadler2012-11-151-3/+10
| | | | | | | PR: bin/172553 Submitted by: Erik Cederstrand <erik@cederstrand.dk> Approved by: cperciva MFC after: 3 days
* Remove remnants of classful addressing. These magic transformationsglebius2012-11-141-41/+8
| | | | of supplied arguments is not what a modern sysadmin expect.
* - blk_equals() is too strict. If the journal entry defines more fragsjeff2012-11-141-10/+8
| | | | | | | | | | than we're claiming it should still be considered an exact match. This would previously leak frags that had been extended. - If there is a sequence number problem in the journal print the sequence numbers we've seen so far for debugging. - Clean up the block mask related debuging printfs. Some are redundant. MFC after: 1 week
* Actually change "silent" to "silence" this time (reviewed by adri@).wblock2012-11-071-1/+1
| | | | MFC after: 1 week
* Remove fifteen-year-old notes on media selection (suggested by simon@).wblock2012-11-071-20/+17
| | | | | | | Add commas after "e.g." and "i.e.". Change "silent" to "silence" in wireless create section (reviewed by adri@). MFC after: 1 week
* Add devd.conf(5) and devd(8) to SEE ALSO xrefs. Give users a pointer towblock2012-11-071-1/+3
| | | | | | | | | seemingly mysterious actions that are not done by ifconfig itself, but by devd triggering on events caused by ifconfig. PR: docs/173405 Submitted by: Mateusz Kwiatkowski <mateusz.kwiatkowski@atlashost.eu> MFC after: 1 week
* Revert r228695. We use __func__ here as a format to distinguish betweenpjd2012-11-051-1/+1
| | | | | abort and assert. It would be cleaner to use NULL or "" here, but gcc complains in both cases.
* Add an example showing the use of gnop(8) to skip over header data.wblock2012-11-041-1/+13
| | | | | | PR: kern/145999 Reviewed by: mjg MFC after: 1 week
* Print a newline after the error message.jh2012-11-031-0/+1
| | | | | PR: bin/168447 Submitted by: Boris Kochergin
* Document that you can use -v along with -l.alfred2012-11-022-1/+2
| | | | Noticed by: pjd
* Remove the recently added sysctl variable net.pfil.forward.ae2012-11-021-8/+0
| | | | | | | | | Instead, add protocol specific mbuf flags M_IP_NEXTHOP and M_IP6_NEXTHOP. Use them to indicate that the mbuf's chain contains the PACKET_TAG_IPFORWARD tag. And do a tag lookup only when this flag is set. Suggested by: andre
* Add an option to display the current dump device via dumpon -l.alfred2012-11-012-3/+49
| | | | MFC after: 2 weeks
* Fix problem with geom_label(4) not recognizing UFS labels on filesystemstrasz2012-10-305-3/+7
| | | | | | | | | | | | | | | | | | extended using growfs(8). The problem here is that geom_label checks if the filesystem size recorded in UFS superblock is equal to the provider (i.e. device) size. This check cannot be removed due to backward compatibility. On the other hand, in most cases growfs(8) cannot set fs_size in the superblock to match the provider size, because, differently from newfs(8), it cannot recompute cylinder group sizes. To fix this problem, add another superblock field, fs_providersize, used only for this purpose. The geom_label(4) will attach if either fs_size (filesystem created with newfs(8)) or fs_providersize (filesystem expanded using growfs(8)) matches the device size. PR: kern/165962 Reviewed by: mckusick Sponsored by: FreeBSD Foundation
* Declare functions as static and move global variables to the top;trasz2012-10-281-13/+12
| | | | no functional changes.
* Remove the IPFIREWALL_FORWARD kernel option and make possible to turnae2012-10-251-3/+6
| | | | | | | | | on the related functionality in the runtime via the sysctl variable net.pfil.forward. It is turned off by default. Sponsored by: Yandex LLC Discussed with: net@ MFC after: 2 weeks
* Check the return error of set[ug]id. While this can never fail in theeadler2012-10-222-3/+6
| | | | | | | | | | | | | | current version of FreeBSD, this isn't guarenteed by the API. Custom security modules, or future implementations of the setuid and setgid may fail. PR: bin/172289 PR: bin/172290 PR: bin/172291 Submittud by: Erik Cederstrand <erik@cederstrand.dk> Discussed by: freebsd-security Approved by: cperciva MFC after: 1 week
* Check the return error of set[e][ug]id. While this can never fail in theeadler2012-10-222-4/+11
| | | | | | | | | | current version of FreeBSD, this isn't guarenteed by the API. Custom security modules, or future implementations of the setuid and setgid may fail. Submitted by: Erik Cederstrand Approved by: cperciva MFC after: 3 days
* remove duplicate semicolons where possible.eadler2012-10-222-2/+2
| | | | | Approved by: cperciva MFC after: 1 week
* Add support for gjournal to dumpfseadler2012-10-221-0/+2
| | | | | | | PR: 165821 Submitted by: Andreas Longwitz <longwitz@incore.de> Approved by: cperciva MFC after: 3 days
* Make fsck and fsck_msdosfs WARNS=6 cleanuqs2012-10-218-17/+16
| | | | | | | | | - sprinkle const - add volatile qualifier to avoid vfork clobbering Inspired by: NetBSD PR: bin/139802 Reviewed by: ed
* sbin/fsck: s/perror/perr/ to avoid shadowinguqs2012-10-218-79/+74
| | | | | | | | | - rename some other vars too - merge NetBSD license changes Obtained from: NetBSD PR: bin/139802 Reviewed by: ed
* document acpi_cpu devd notification about _CST changeavg2012-10-201-0/+2
| | | | | | Based on prodding and a submission by Lars Engels <lars.engels@0x20.net>. MFC after: 5 days
OpenPOWER on IntegriCloud