summaryrefslogtreecommitdiffstats
path: root/sbin
Commit message (Collapse)AuthorAgeFilesLines
* Get rid of major/minor number distinction.ed2011-09-281-4/+2
| | | | | | | | | | | | | | | | | | | | | | As of FreeBSD 6, devices can only be opened through devfs. These device nodes don't have major and minor numbers anymore. The st_rdev field in struct stat is simply based a copy of st_ino. Simply display device numbers as hexadecimal, using "%#jx". This is allowed by POSIX, since it explicitly states things like the following (example taken from ls(1)): "If the file is a character special or block special file, the size of the file may be replaced with implementation-defined information associated with the device in question." This makes the output of these commands more compact. For example, ls(1) now uses approximately four columns less. While there, simplify the column length calculation from ls(1) by calling snprintf() with a NULL buffer. Don't be afraid; if needed one can still obtain individual major/minor numbers using stat(1).
* Correct typo.pjd2011-09-281-1/+1
| | | | MFC after: 3 days
* If the underlying provider doesn't support BIO_FLUSH, log it only oncepjd2011-09-284-4/+24
| | | | | | and don't bother trying in the future. MFC after: 3 days
* Break a bit earlier.pjd2011-09-281-0/+1
| | | | MFC after: 3 days
* After every activemap change flush disk's write cache, so that writepjd2011-09-286-7/+118
| | | | | | | | | | | | reordering won't make the actual write to be committed before marking the coresponding extent as dirty. It can be disabled in configuration file. If BIO_FLUSH is not supported by the underlying file system we log a warning and never send BIO_FLUSH again to that GEOM provider. MFC after: 3 days
* Use PJDLOG_ASSERT() and PJDLOG_ABORT() everywhere instead of assert().pjd2011-09-279-161/+192
| | | | MFC after: 3 days
* No need to wrap pjdlog functions around with KEEP_ERRNO() macro.pjd2011-09-271-2/+1
| | | | MFC after: 3 days
* Prefer PJDLOG_ASSERT()/PJDLOG_ABORT() over assert().pjd2011-09-271-6/+5
| | | | MFC after: 3 days
* - Convert some impossible conditions into assertions.pjd2011-09-271-11/+10
| | | | | | - Add missing 'if' in comment. MFC after: 3 days
* Correct two mistakes when converting asserts to PJDLOG_ASSERT()/PJDLOG_ABORT().pjd2011-09-271-4/+2
| | | | MFC after: 3 days
* Prefer PJDLOG_ASSERT() and PJDLOG_ABORT() over assert() and abort().pjd2011-09-273-33/+31
| | | | | | | pjdlog versions will log problem to syslog when application is running in background. MFC after: 3 days
* No need to use KEEP_ERRNO() macro around pjdlog functions, as they don'tpjd2011-09-272-23/+20
| | | | | | modify errno. MFC after: 3 days
* Ensure that pjdlog functions don't modify errno.pjd2011-09-271-0/+25
| | | | MFC after: 3 days
* - Document inet6 no_radr flag.hrs2011-09-191-1/+26
| | | | | | | - Add descriptions of sysctl(8) variables which can control the default configuration of the inet6 flags. Approved by: re (kib)
* Do not try to change the mode or ownership of the root of the mountpointkib2011-09-131-0/+27
| | | | | | | | | when newly established mdmfs mount is readonly. PR: bin/128427 Tested and reviewed by: jchandra MFC after: 1 week Approved by: re (bz)
* Don't use the whole free space when resizing partition to a larger sizeae2011-09-081-6/+6
| | | | | | | | | | | on a disk with non zero stripesize (e.g. disks with 4k sector size)[1]. Also do not use automatic alignment when size is exactly specified, but an alignment is not. Use automatic alignment only for case when user omits both "-s" and "-a" options. Reported by: Mikael Fridh <frimik at gmail> [1] Approved by: re (kib) MFC after: 1 week
* dd -t switch for mdmfs to enable TRIM on the configured filesystem.kib2011-09-062-6/+16
| | | | | | | | While there, fix minor style issues. Submitted by: Alex Kozlov <spam rm-rf kiev ua> MFC after: 1 week Approved by: re (bz)
* Forgot this nit in r221107.des2011-09-031-1/+1
| | | | Approved by: re (kib)
* Clear the mountprog variable after each mountfs() call so that mountprogjhb2011-09-021-0/+5
| | | | | | | | | options don't leak over into subsequent mounts listed in /etc/fstab. While here, fix a memory leak in debug mode. Reported by: rank1seeker @ gmail Approved by: re (kib) MFC after: 1 week
* Fix the check in dircheck() on namlen.delphij2011-09-021-2/+2
| | | | | | | | | | | | | | The value of namlen is copied from on-disk d_namlen, which is a 8-bit unsigned integer which can never exceed MAXNAMLEN (255) so the test is always true. Moreover, UFS does not allow d_namelen being zero. Change namlen from u_int to u_int8_t, and replace the unneeded test with a useful test. PR: bin/160339 Submitted by: Eugene Grosbein <eugen grosbein.pp.ru> MFC after: 2 weeks Approved by: re (kib)
* Add support for IPv6 to ipfw fwd:bz2011-08-202-22/+90
| | | | | | | | | | | | | | | | | | | Distinguish IPv4 and IPv6 addresses and optional port numbers in user space to set the option for the correct protocol family. Add support in the kernel for carrying the new IPv6 destination address and port. Add support to TCP and UDP for IPv6 and fix UDP IPv4 to not change the address in the IP header. Add support for IPv6 forwarding to a non-local destination. Add a regession test uitilizing VIMAGE to check all 20 possible combinations I could think of. Obtained from: David Dolson at Sandvine Incorporated (original version for ipfw fwd IPv6 support) Sponsored by: Sandvine Incorporated PR: bin/117214 MFC after: 4 weeks Approved by: re (kib)
* o Fix mdoc formatting for the '.Fx' macro. [1]ae2011-08-201-3/+13
| | | | | | | | o Add information about APM scheme and fix typos. [2] Submitted by: gjb [1], nwhitehorn [2] Approved by: re (kib) MFC after: 1 week
* Fix WWN printing in `camcontrol identify` output.mav2011-08-191-1/+1
| | | | | Approved by: re (kib) MFC after: 1 week
* The decimal() function was changed in r217808 to take theae2011-08-191-1/+1
| | | | | | | | | | maximum value instead of number of bits. But for case when limitation is not needed it erroneously skips conversion to number and always returns zero. So, don't skip conversion for case when limitation is not needed. PR: bin/159765 Approved by: re (kib)
* Add new section "BOOTSTRAPPING" to the gpart(8), that describesae2011-08-191-12/+90
| | | | | | | | | bootstrap code images used to boot from MBR, GPT, BSD and VTOC8 schemes. Reviewed by: marius (previous version) Approved by: re (kib) MFC after: 1 week
* Fix a regression where a rule containing a source port option after ajhb2011-08-171-0/+2
| | | | | | | | | destination IP would incorrectly display the source port as a destination port. Reviewed by: luigi Approved by: re (kib) MFC after: 1 week
* Gavin documented these alternate options in good faith in r222751dougb2011-08-061-7/+4
| | | | | | | | | based on the patch in the PR, however he was unaware that they were undocumented intentionally. This patch moves the information about these alternates into a comment which also explains why they are undocumented. Approved by: re (hrs)
* Update to -r224294 to ensure that only one of MNT_SUJ or MNT_SOFTDEPmckusick2011-07-301-2/+2
| | | | | | | is set so that mount can revert back to using MNT_NOWAIT when doing getmntinfo. Approved by: re (kib)
* Move the MNTK_SUJ flag in mnt_kern_flag to MNT_SUJ in mnt_flagmckusick2011-07-241-2/+3
| | | | | | | | | so that it is visible to userland programs. This change enables the `mount' command with no arguments to be able to show if a filesystem is mounted using journaled soft updates as opposed to just normal soft updates. Approved by: re (bz)
* This patch removes a check in ifconfig which disables HT/40 channelsadrian2011-07-201-12/+0
| | | | | | | | | | | | | on frequency bands with DFS. All Atheros chipsets >= AR9001 support radar event detection on HT40 extension channels. This should be a chipset specific item rather than enforced in the regulatory domain database. In addition, it's irrelevant for STA mode, as the radar detection is done by the access point, not the STA. Approved by: re (kib)
* This patch enables listing DFS related flags when 'ifconfig -v wlanXadrian2011-07-191-3/+14
| | | | | | | | | | | | | | | list channel' is run. The following new options are introduced: * D: channel requires DFS * R: channel has a radar event * I: channel has detected inteference * C: the CAC period has completed on a channel that requires it (ie, DFS + PASSIVE.) It's relevant for developing, debugging and using the DFS and interference options. Approved by: re (bz)
* If compiling RESCUE always ignore feature_present(3) calls so thatbz2011-07-183-0/+7
| | | | | | | | | | a /rescue/ifconfig more modern than the kernel could still configure IPv4 or IPv6 addresses. Reported by: Andrzej Tobola (ato iem.pw.edu.pl) Reported by: gcooper MFC after: 1 day X-MFC: will not MFC any time soon, just reminder for r222527
* The MBR uses a 32-bit unsigned integer to store the size of a slice, butrstone2011-07-171-4/+4
| | | | | | | | | | | | | | | | fdisk(1) internally uses a signed int. Should a user attempt to specify a slice containing more than 2^31 - 1 sectors, an error will be reported on systems with sizeof(long) == 4 and the slice size will be silently truncated on systems with sizeof(long) > 4. Instead use an unsigned long to store the slice size in fdisk(1). This allows the user to specify a slice size up to the maximum permitted by the MBR on-disk format and does not have any problems with silent truncation should the use specify an slice size larger than 2^32 on systems with sizeof(long) > 4. Submitted by: Mark Johnston (markjdb AT gmail DOT com) MFC after: 2 weeks
* Break out the pass 5 inode and block map updating into a separate functionmckusick2011-07-152-28/+45
| | | | so that the function can be used by the journaling soft updates recovery.
* When using -A option (unmount all mounted filesystems), do not attemptmckusick2011-07-141-0/+2
| | | | to unmount /dev as it will always fail.
* Use _PATH_DEV and make the format more consistent with GEOM_LABEL.delphij2011-07-141-1/+2
| | | | Submitted by: ivoras
* Add a -l option to show file system's corresponding /dev/ufsid path.delphij2011-07-142-5/+26
| | | | | | | This is useful for scripts that converts existing system's fstab to use their /dev/ufsid devices. MFC after: 2 weeks
* Remove trailing whitespace in the shutdown(8) manual.gjb2011-07-141-2/+2
| | | | MFC after: 1 week
* Improvements to the shutdown(8) manual.gjb2011-07-141-12/+14
| | | | | | PR: 158807 Submitted by: arundel MFC after: 1 week
* When exiting with error because of an invalid command line argumenttrociny2011-07-131-3/+3
| | | | | | use errx(3), not err(3), and the exit code from sysexits(3). Approved by: pjd (mentor)
* Fix indentation.trociny2011-07-131-1/+1
| | | | Approved by: pjd (mentor)
* Use NULL instead of 0 for third argument of sigaction(2).ae2011-07-121-1/+1
| | | | | Pointed by: kib MFC after: 2 weeks
* Add SIGINFO handler.ae2011-07-121-0/+24
| | | | | | Reviewed by: kib Obtained from: NetBSD (partly) MFC after: 2 weeks
* Remove useless initialization.trociny2011-07-051-2/+1
| | | | | Approved by: pjd (mentor) MFC after: 3 days
* Add infrastructure to allow all frames/packets received on an interfacebz2011-07-033-1/+118
| | | | | | | | | | | | | | to be assigned to a non-default FIB instance. You may need to recompile world or ports due to the change of struct ifnet. Submitted by: cjsp Submitted by: Alexander V. Chernikov (melifaro ipfw.ru) (original versions) Reviewed by: julian Reviewed by: Alexander V. Chernikov (melifaro ipfw.ru) MFC after: 2 weeks X-MFC: use spare in struct ifnet
* Fix a typo.sem2011-07-011-1/+1
| | | | Approved by: kib
* - Handle the JOP_SYNC case as appropriate.jeff2011-06-301-0/+1
| | | | Reported by: pho
* Add new rule actions "call" and "return" to ipfw. They makeae2011-06-293-1/+106
| | | | | | | | | | | | | possible to organize subroutines with rules. The "call" action saves the current rule number in the internal stack and rules processing continues from the first rule with specified number (similar to skipto action). If later a rule with "return" action is encountered, the processing returns to the first rule with number of "call" rule saved in the stack plus one or higher. Submitted by: Vadim Goncharov Discussed by: ipfw@, luigi@
* Improve error reporting. Use corresponding error message when file to beae2011-06-291-4/+11
| | | | | | | | preprocessed is missing. Also suggest to use absolute pathname if -p option is specified. PR: bin/156653 MFC after: 2 weeks
* Check the returned value of activemap_write_complete() and update matadata ontrociny2011-06-281-2/+5
| | | | | | | | disk if needed. This should fix a potential case when extents are cleared in activemap but metadata is not updated on disk. Suggested by: pjd Approved by: pjd (mentor)
OpenPOWER on IntegriCloud