summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ac
Commit message (Collapse)AuthorAgeFilesLines
* Move example to EXAMPLES.joel2013-03-171-11/+9
|
* Bump date missed in r202756eadler2012-09-141-1/+1
| | | | | | | PR: docs/171624 Submitted by: bdrewery Approved by: gabor MFC after: 3 days
* 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
* 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
* Fix whitespace.ed2012-08-291-2/+1
|
* mdoc: correct .Bd/.Bl arguments.joel2012-03-261-1/+1
| | | | Reviewed by: brueffer
* Fix double ;;kevlo2010-12-061-1/+1
|
* MFtbemd:imp2010-08-231-1/+1
| | | | | Prefer MACHNE_CPUARCH to MACHINE_ARCH in most contexts where you want to test of all the CPUs of a given family conform.
* Properly initialize the timestamp when using ac -w.ed2010-04-021-1/+2
| | | | | | | When using ac -w, we must use the last timestamp to terminate the log file. I accidentally removed this when I ported the code to use utmpx. Reported by: avg
* Remove stale references to utmp(5) and its corresponding filenames.ed2010-01-211-9/+9
| | | | I removed utmp and its manpage, but not other manpages referring to it.
* Port ac(8) to utmpx.ed2010-01-131-102/+69
| | | | | | | Similar to last(1), it must compare ut_id's instead of TTYs to determine whether a session has been terminated. It must also use ut_type to determine the type of the login record instead figuring it out by itself.
* The last big commit: let usr.sbin/ use WARNS=6 by default.ed2010-01-021-2/+0
|
* Sort sections.ru2005-01-181-2/+2
|
* Added the EXIT STATUS section where appropriate.ru2005-01-171-1/+1
|
* Mechanically kill hard sentence breaks.ru2004-07-021-2/+4
|
* Add a check for wtmp records which have invalid values for ut_time. Wtmpgad2004-03-081-12/+64
| | | | | | | | | | | | | | | records with time==0 get "the time of the last valid record", while records where time goes backwards (compared to the previous record) are skipped. Also prints a message saying how many records were changed or skipped due to these checks. Check was inspired by a simpler check in OpenBSD's version. This is all meant to sidestep problems that Tillman Hodgson noticed with 'ac' when running sparc64 with 64-bit time_t's. The real problem is whatever is creating wtmp records with ut_time==0, of course, but I have not yet figured out what is doing that. Reviewed by: no screams from freebsd-sparc64 or bde MFC after: 2 weeks
* Compile 'ac' with DEBUG when arch==sparc64.gad2004-03-081-0/+5
|
* Add a debug-statement from NetBSD, and then rework all debug-statementsgad2004-03-081-9/+82
| | | | | | | | | | so the program compiles without errors or warnings when DEBUG is defined on sparc64 with 64-bit time_t's. Also have debug statements include the year when printing records from a different year than 'now'. Also print out a special timestamp in debug statements when ut_time==0. Reviewed by: freebsd-sparc, bde MFC after: 2 weeks
* Minor style(9) fixes. remove a register keyword, correct two indents.gad2004-03-031-3/+3
| | | | Noticed while comparing to OpenBSD version.
* Convert K&R-style routine definitions to C89 style, partially to reducegad2004-03-031-33/+13
| | | | diffs with OpenBSD. This causes no changes to the object produced.
* Remove unused #includes. Eliminate castings by using size_t instead of int.charnier2002-10-171-8/+4
|
* The .Nm utilitycharnier2002-07-141-1/+3
|
* Fix indentation broken in previous __P removal.alfred2002-07-112-15/+15
| | | | Grumbled about by: bde
* de-__P()alfred2002-07-111-13/+13
|
* Fixed some world breakage caused by not updating clients when <timeconv.h>bde2002-07-081-0/+1
| | | | | was split off from <time.h>. This became fatal here when -Werror was reenabled.
* I've been meaning to do this for a while. Add an underscore to thedillon2002-01-191-2/+2
| | | | | | | | time_to_xxx() and xxx_to_time() functions. e.g. _time_to_xxx() instead of time_to_xxx(), to make it more obvious that these are stopgap functions & placemarkers and not meant to create a defacto standard. They will eventually be replaced when a real standard comes out of committee.
* localtime() was being called with an int-pointer due to recent utmpdillon2001-10-291-2/+4
| | | | fixes.
* Don't mention wtmp.[0-7] in the FILES section. This manual pagedd2001-09-051-3/+1
| | | | | | | | | doesn't talk about these files elsewhere, doesn't use the files by default, and the names are dependent on site-specific newsyslog configuration. PR: 30348 Submitted by: Giorgos Keramidas <charon@labs.gr>
* mdoc(7) police: utilize the new .Ex macro.ru2001-08-151-4/+2
|
* Fix logic error resulting in incorrect calculation of login timejon2001-08-051-2/+2
| | | | | | PR: bin/4204 Submitted by: Anatoly A. Orehovsky <tolik@www.tomsk.su> MFC after: 4 weeks
* Replace strncpy -> strlcpykris2001-07-241-6/+3
| | | | | Obtained from: OpenBSD MFC after: 1 week
* Perform a major cleanup of the usr.sbin Makefiles.obrien2001-07-201-1/+2
| | | | | These are not perfectly in agreement with each other style-wise, but they are orders of orders of magnitude more consistent style-wise than before.
* Remove whitespace at EOL.dd2001-07-151-4/+4
|
* Constify and set WARNS=2.dd2001-06-242-4/+5
| | | | | Submitted by: Mike Barcroft <mike@q9media.com> Reviewed by: md5(1)
* - Backout botched attempt to introduce MANSECT feature.ru2001-03-261-0/+1
| | | | - MAN[1-9] -> MAN.
* Use nl_langinfo instead of %Efache2001-03-211-2/+7
|
* Set the default manual section for usr.sbin/ to 8.ru2001-03-201-1/+0
|
* mdoc(7) police: use the new features of the Nm macro.ru2000-11-201-1/+1
|
* Use %Ef instead of hardcoded %b %eache2000-06-221-1/+1
|
* err -> errx for malloc failurecharnier1999-10-121-3/+3
|
* $Id$ -> $FreeBSD$peter1999-08-283-3/+3
|
* Back out previous commit. Allowing `-' as a pseudonym for /dev/stdin issheldonh1999-07-022-18/+7
| | | | | | legacy behaviour inherited from systems that don't have /dev/stdin. Requested by: bde
* Allow the use of `-' as an argument to the -w option so that standardsheldonh1999-06-302-7/+18
| | | | | | | input may be used (e.g. gunzip -c /var/log/wtmp.Jan.gz | ac -w - ). PR: 12467 Submitted by: wollman
* /var/log/wtmp entries for ptys are treated differently in ac, sincephk1998-07-021-3/+3
| | | | | | | | | they may not be logins. The code for determining whether it is a pty entry is broken. PR: 7137 Reviewed by: phk Submitted by: Tom Rush <tarush@mindspring.com>
* Give correct times with old wtmp files.steve1998-05-251-2/+3
| | | | | PR: 4732 Submitted by: Andrew Timonin <tim@pool1.convey.ru>
* Style in rcsid, sort #include.charnier1997-09-012-7/+8
|
* compare return value from getopt against -1 rather than EOF, per the finalimp1997-03-311-2/+2
| | | | posix standard on the topic.
* Revert $FreeBSD$ to $Id$peter1997-02-223-3/+3
|
OpenPOWER on IntegriCloud