summaryrefslogtreecommitdiffstats
path: root/usr.sbin
Commit message (Collapse)AuthorAgeFilesLines
* Rework all non-contributed files that use `struct timezone'.ed2012-09-019-52/+43
| | | | | | | | | | | | | | This structure is not part of POSIX. According to POSIX, gettimeofday() has the following prototype: int gettimeofday(struct timeval *restrict tp, void *restrict tzp); Also, POSIX states that gettimeofday() shall return 0 (as long as tzp is not used). Remove dead error handling code. Also use NULL for a nul-pointer instead of integer 0. While there, change all pieces of code that only use tv_sec to use time(3), as this provides less overhead.
* Rework time handling.ed2012-09-011-8/+7
| | | | | | | | | After I made the previous commit, I noticed the code does some things it shouldn't. It casts a struct timeval to a time_t, assuming tv_sec is the first member. Also, we are not interested in microseconds, so it is better to just call time(NULL). MFC after: 1 month
* Remove unneeded struct timezone.ed2012-09-011-2/+1
| | | | We're only interested in a timestamp -- not the timezone.
* Also relicense the ac(8) man page.ed2012-08-311-5/+0
| | | | | MFC after: 1 month Discussed with: Simon Gerraty and Chris Demetriou
* Relicense ac(8).ed2012-08-311-12/+25
| | | | | | | | | | | | | | | | | | | Though the license of the original ac(8) source code provides many liberties, we are already somewhat violating it. The license requires us to clearly comment any modifications to the source code, as the original authors of course do not want to get bug reports for modified versions of ac(8). This is something we have not done consistently. The need for such a license clause has become less over time. It is very unlikely that end users will contact the original authors, as the copyright is from 1994. I contacted both the copyright holders. They responded in a timely fashion and were more than willing to relicense it to a 2-clause BSD license. To address any concerns about bug reports going to the original authors instead of me, add my own name and email address to the copyright statements as well. MFC after: 1 month Special thanks to: Christopher Demetriou and Simon Gerraty
* Remove trailing whitespace.joel2012-08-311-1/+1
|
* Use better variable naming.ed2012-08-311-12/+7
| | | | MFC after: 1 month
* Massively refactor ac(8).ed2012-08-302-316/+189
| | | | | | | | | | | | | | | | | | | | | | | | | | | | - Use queue(3) -- not some homegrown implementation of linked lists. - Rename structures to _entry, as they are entries in the linked list -- not the lists themselves. - Don't store entire copies of struct utmpx in utmpx_entry, but only the members we're interested in. Large fields such as hostnames are not needed during the execution of the program. - Give structure members useful names, instead of `name'. - While there, use struct timevals instead of time_t's internally. This is not strictly useful, but while we're at it... - Mark stuff static. - Add missing const keywords. - Remove unneeded prototypes. - Remove workaround for sparc64-specific utmp problems. These don't apply to utmpx. - Don't discard entries when timestamps are not monotone. This shouldn't ever happen with utmpx, but discarding them is a bit too harsh. - Remove debug code. We nowadays have `getent utmpx', which can be used to analyze logfiles in depth. - Use proper uppercasing/periods in comments. - Print output of `ac -p' sorted alphabetically, instead of first occurrence. - Properly check against pts/* instead of tty[PQRSpqrs]* to determine whether a TTY is a pseudo-terminal. MFC after: 1 month
* - It's also need to lock current memory.zont2012-08-301-1/+1
| | | | | Approved by: kib (mentor) MFC after: 1 week
* Fix whitespace.ed2012-08-291-2/+1
|
* - Don't allow watchdogd(8) to be swapped out.zont2012-08-281-0/+2
| | | | | | | | | On machines with huge amount of swap and high IO activity, watchdogd(8) may wait for a swap memory longer than timeout and sometimes fires. Approved by: kib (mentor) MFC after: 1 week
* Show error messages if nmount() failed.delphij2012-08-271-4/+4
| | | | MFC after: 1 month
* Dont cast from char* to struct chrp_header* which has a bigger alignmentrdivacky2012-08-271-4/+8
| | | | | | | requirements. Copy it via union instead. Fixes a clang warning about alignment. Reviewed by: sobomax
* Add isf(4), a driver for the Intel StrataFlash family of NOR flash parts.brooks2012-08-254-0/+212
| | | | | | | | | | | The driver attempts to support all documented parts, but has only been tested with the 512Mbit part on the Terasic DE4 FPGA board. It should be trivial to adapt the driver's attach routine to other embedded boards using with any parts in the family. Also import isfctl(8) which can be used to erase sections of the flash. Sponsored by: DARPA, AFRL
* Fix confirmation logic when detecting a ttybapt2012-08-241-3/+3
| | | | Reported by: mjg
* - change ALWAYS_ASSUME_YES to ASSUME_ALWAYS_YES for consistency with pkg(8)bapt2012-08-241-3/+5
| | | | | | | - if not on a tty prompt about the missing pkg(8) but default on 'no' except if ASSUME_ALWAYS_YES is set MFC after: 2 days
* Partially roll back r239601 - keep parameter strings both length-delimitedjamie2012-08-231-4/+5
| | | | | | | | and null-terminated at the same time, because they're later passed to libjail as null-terminated. That means I also need to add a nul byte when comma-combining array parameters. MFC after: 6 days
* Pre-separate IP addresses passed on the command line, so they can bejamie2012-08-231-2/+26
| | | | | | | | properly parsed for interface prefixes and netmask suffixes. This was already done for the old-style (fixed) command line, but missed for the new-style. MFC after: 1 week
* Remember that I'm using length-defined strings in parameters:jamie2012-08-231-5/+3
| | | | | | | | | | | Remove a bogus null terminator when stripping the netmask from IP addresses. This was causing later addresses in a comma-separated string to disappear. Use memcpy instead of strcpy. This could just cause Bad Things. PR: 170832 MFC after: 1 week
* Sort options.hrs2012-08-222-3/+2
|
* Add -m option (for printing sampled PCs to a file) to pmcstat usagejimharris2012-08-221-0/+1
| | | | | | | message. Sponsored by: Intel MFC after: 3 days
* Add -p flag to create the image as a sparse file.hrs2012-08-224-11/+31
| | | | | Submitted by: Shesha Sreenivasamurthy PR: bin/167779
* Fix "unexpected operator" error when passed multi-word first-argumentdteske2012-08-211-4/+3
| | | | | | | | | | | containing whitespace. Also make other changes to support multi-word arguments. PR: bin/170759 Submitted by: dteske Reviewed by: emaste (mentor) Approved by: emaste (mentor) MFC after: 3 days
* Upgrade our copy of llvm/clang to trunk r162107. With thanks todim2012-08-201-0/+2
| | | | Benjamin Kramer and Joerg Sonnenberger for their input and fixes.
* Remove unused member of struct indir (in_exists) from UFS and EXT2 code.mjg2012-08-172-3/+0
| | | | | | Reviewed by: mckusick Approved by: trasz (mentor) MFC after: 1 week
* Merge ACPICA 20120816.jkim2012-08-161-1/+1
|
* Correct description of minfree to kilobytes rather than blocks.wblock2012-08-131-1/+1
| | | | | | PR: 125921 Submitted by: Andre Albsmeier <Andre.Albsmeier@siemens.com> MFC after: 3 days
* Add interactive option to override portsnap's automagical detection ofeadler2012-08-052-4/+24
| | | | | | | | a terminal. Submitted by: Hannes h2+fbsdports@fsfe.org Approved by: cperciva MFC after: 1 week
* In usr.sbin/ctladm/ctladm.c, function cctl_error_inject(), initializedim2012-08-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the 'retval' variable to zero, to avoid returning garbage in several cases. This fixes the following clang 3.2 warnings: usr.sbin/ctladm/ctladm.c:1234:6: error: variable 'retval' is used uninitialized whenever 'if' condition is false [-Werror,-Wsometimes-uninitialized] if (ioctl(fd, CTL_ERROR_INJECT, &err_desc) == -1) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ usr.sbin/ctladm/ctladm.c:1243:10: note: uninitialized use occurs here return (retval); ^~~~~~ usr.sbin/ctladm/ctladm.c:1234:2: note: remove the 'if' if its condition is always true if (ioctl(fd, CTL_ERROR_INJECT, &err_desc) == -1) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ usr.sbin/ctladm/ctladm.c:1161:7: error: variable 'retval' is used uninitialized whenever 'if' condition is false [-Werror,-Wsometimes-uninitialized] if (ioctl(fd, CTL_ERROR_INJECT_DELETE, &err_desc) == -1) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ usr.sbin/ctladm/ctladm.c:1243:10: note: uninitialized use occurs here return (retval); ^~~~~~ usr.sbin/ctladm/ctladm.c:1161:3: note: remove the 'if' if its condition is always true if (ioctl(fd, CTL_ERROR_INJECT_DELETE, &err_desc) == -1) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ usr.sbin/ctladm/ctladm.c:1029:12: note: initialize the variable 'retval' to silence this warning int retval; ^ = 0 MFC after: 1 week
* Update my e-mail to my FreeBSD one.zeising2012-07-191-2/+2
| | | | Approved by: joel (mentor)
* Xref mwl(4) and rum(4) in hostapd(8).gjb2012-07-181-1/+3
| | | | MFC after: 3 days
* Make sure that arraysz is initialized to a value larger than zero.jh2012-07-171-0/+2
| | | | | | | | | arraysz could get initialized to zero on ZFS because ZFS reports directory sizes differently compared to UFS. PR: bin/169493 Tested by: swills MFC after: 2 weeks
* Remove trailing whitespace.jh2012-07-171-4/+4
| | | | MFC after: 2 weeks
* Make pkg bootstrap program ask for confirmation before proceeding.kan2012-07-151-1/+35
| | | | | | | | The previous behaviour was to silently download and install the pkg package, without ever telling user about what it was doing and why. Discussed with: bapt Reviewed by: kib
* Mdoc and whitespace fixes.joel2012-07-141-16/+9
|
* Import bsdconfig(8) as a replacement for the post-install abilities ofdteske2012-07-14135-0/+19431
| | | | | | | | deprecated sysinstall(8). NOTE: WITH_BSDCONFIG is currently required. Submitted by: Devin Teske (dteske), Ron McDowell <rcm@fuzzwad.org> Reviewed by: Ron McDowell <rcm@fuzzwad.org> Approved by: Ed Maste (emaste)
* Add HISTORY section.joel2012-07-131-0/+5
|
* Minor mdoc, spelling and end of line whitespace fixes.joel2012-07-131-6/+6
|
* The etcupdate utility is a tool for managing updates to files that arejhb2012-07-134-0/+2466
| | | | | | | | | | | | | | | not updated as part of `make installworld' such as files in /etc. It manages updates by doing a three-way merge of changes made to these files against the local versions. It is also designed to minimize the amount of user intervention with the goal of simplifying upgrades for clusters of machines. The primary difference from mergemaster is that etcupdate requires less manual work. The primary difference from etcmerge is that etcupdate updates files in-place similar to mergemaster rather than building a separate /etc tree. Requested by: obrien, kib, theraven, joeld (among others)
* Merge ACPICA 20120711.jkim2012-07-112-6/+7
|
* Remove end of line whitespace.joel2012-07-091-1/+1
|
* Add range and table revision checking to avoid abend.takawata2012-07-091-1/+9
| | | | | | PR:bin/169707 Submitted by:Dan Lukes <dan@obluda.cz> MFC after:3 days.
* - Add IFT_L2VLAN (vlan(4)) support.hrs2012-07-093-18/+79
| | | | | | - Add -P option to support PID file. When -a is specified /var/run/rarpd.pid is used, and when an interface is specified /var/run/rarpd.<ifname>.pid is used by default.
* We don't need to check the result of sending signal when -R option isae2012-07-091-1/+2
| | | | | | | specified. Submitted by: Ilya A. Arkhipov MFC after: 1 week
* Make usbusN logging pseudo-interface used by usbdump(8) clonable. One ishrs2012-07-091-1/+25
| | | | | | | | now created/destroyed automatically by usbdump(8). Note that "hw.usb.no_pf" loader tunable is now obsolete. Reviewed by: hselasky
* Remove "prefer_source" address selection option. FreeBSD has had anhrs2012-07-092-17/+1
| | | | | implementation of RFC 3484 for this purpose for a long time and "prefer_source" was never implemented actually. ND6_IFF_PREFER_SOURCE macro is left intact.
* Fix always 0 tautologly revealed by gcc46eadler2012-07-081-1/+1
| | | | | Approved by: cperciva MFC after: 1 week
* Remove end of line whitespace.joel2012-07-041-5/+5
|
* Add the possibility to specify a threshold for the number of negative cachese2012-07-046-0/+87
| | | | | | | | | | | | | | | | | | | | | | | results required to have the cache return lookup failure. A new configuration parameter is introduced, which must be set to a value greater than 1 to activate this feature. The default behavior is unchanged. The purpose of this change is to allow probes for the existence of an entry (which are expected to fail), before that entry is added to one of the queried databases, without the cache returning the stale information from the probe query until that cache entry expires. If, for example, a new user account is created after checking that the new account name is available, the negative cache entry would prevent immediate access to the account. For that example, the new configuration option negative-confidence-threshold passwd 2 will require a second negative query result to consider the negative cache entry for a passwd entry valid, but if the user account has been created between the queries, then the positive query result from the second query will be cached and returned.
* Add a one second sleep before touching the spool directory. If the touchjhb2012-07-021-0/+9
| | | | | | | | | occurs in the same second as the earlier operations to create the temporary file and the cron(8) daemon is rescans the spool directory during that second, then the daemon may miss a cron edit and not properly update its internal database. MFC after: 1 month
OpenPOWER on IntegriCloud