summaryrefslogtreecommitdiffstats
path: root/usr.bin
Commit message (Collapse)AuthorAgeFilesLines
* Plug a memory leak.delphij2009-12-211-0/+1
| | | | | | PR: bin/141836 Submitted by: Henning Petersen <henning.petersen at t-online.de> MFC after: 2 weeks
* Cast time_t values to intmax_t and use %jd with printf.jh2009-12-211-5/+5
| | | | | OK'ed by: delphij Approved by: trasz (mentor)
* Remove non-working special case for pipe(2) from amd64-fbsd32.c andjh2009-12-213-26/+8
| | | | | | | | | i386-fbsd.c. Add pipe(2) to syscall table to decode it's pointer argument properly and re-add special handling for pipe(2) return value to print_syscall_ret(). PR: bin/120870 Approved by: trasz (mentor)
* Note that sockstat(1) does not display kernel-owned sockets.des2009-12-211-0/+7
| | | | | Submitted by: infofarmer@ MFC after: 2 weeks
* Avoid sharing the file descriptor of the output file with tracedjh2009-12-201-0/+6
| | | | | | | | | processes by setting the FD_CLOEXEC flag for the output file. PR: bin/140493 Submitted by: Erik Lax OK'ed by: delphij Approved by: trasz (mentor)
* Add fork(2), getegid(2), geteuid(2), getgid(2), getpid(2), getpgid(2),jh2009-12-201-0/+12
| | | | | | | | getpgrp(2), getppid(2), getsid(2) and getuid(2) to syscall table to decode their arguments correctly. OK'ed by: delphij Approved by: trasz (mentor)
* Nationalise Easter -> Pasenedwin2009-12-171-15/+16
| | | | MFC after: 1 week
* Sync getline() with comm(1):jh2009-12-171-9/+14
| | | | | | | | | | - Prevent overflowing of the buffer length variable in getline() by limiting its maximum value. - Exit if reallocf(3) fails in getline(). Failure was silently considered as end-of-file. Reviewed by: ghelmer Approved by: trasz (mentor)
* The input line length limit mentioned on the manual page was removed byjh2009-12-171-5/+1
| | | | | | r176119. Approved by: trasz (mentor)
* - Partially revert r200417. config.h brings several definitions,stas2009-12-172-0/+2
| | | | | that appears to be actually used. Without config.h included cross-build of world failed (at least for ARM).
* rewind(3) is already declared to return 'void', so no need for an explicit castrse2009-12-171-1/+1
|
* DEBUG is either defined or not defined for the 'calender' sources, so use ↵rse2009-12-171-1/+1
| | | | #ifdef and not just #if -- both to be semantically correct and also to be aligned with the rest of the 'calendar' sources
* remove external reference to not (or at least no longer) existing variable ↵rse2009-12-171-1/+0
| | | | 'myname'
* Add Australian, New Zealand and Ukraian calendars to the "all" target".edwin2009-12-171-1/+4
| | | | MFC after: 1 week
* - Prevent overflowing of the buffer length variable in getline() byjh2009-12-161-6/+12
| | | | | | | | | limiting its maximum value. - Exit if reallocf(3) fails in getline(). Failure was silently considered as end-of-file. Reviewed by: ghelmer Approved by: trasz (mentor)
* Style improvements:delphij2009-12-141-11/+11
| | | | | | | | | | | | - Sort function prototypes; - Apply static on all function bodies. To quote bde@: > It is a good obfuscation to declare functions as static only in the > prototype, so that you can't see the static for the actual function. > The reverse obfuscation (with static only in the function definition) > would make more sense, but is a constraint error. Reviewed by: bde
* - Remove times.h from C programs that does not manipulate with time atdelphij2009-12-134-4/+0
| | | | | | all. - Remove pathnames.h from all but io.c since it's the only module that used these definations.
* egetopt.c does not use any stdlib.h definations, nor it referenced anydelphij2009-12-131-3/+0
| | | | | | symbol from other module, so remove reference of stdlib.h and extern.h. Verified with: md5(1)
* Use ANSI prototype for foldit().delphij2009-12-131-3/+1
|
* xinstall.c does not require ctype functions, so ctype.h is notdelphij2009-12-131-1/+0
| | | | | | | necessary here. Note: this would change the md5 checksum due to change caused by different register layout.
* Staticify internal functions and make usage() a prototype.delphij2009-12-131-11/+11
|
* Use prototype for usage().delphij2009-12-131-1/+1
|
* Revert most part of 200420 as requested, as more review and polish isdelphij2009-12-13120-17/+191
| | | | needed.
* Don't read the newline character to line buffer because lines are passedjh2009-12-121-16/+13
| | | | | | | | | | | | | | | to wcscoll(3). Newline characters could cause incorrect results when comparing lines. Also, if an input line didn't contain a newline character, it was omitted from the output. According to my interpretation, SUSv3 requires that the newline is always printed. Add regression tests for the cases. [1] PR: bin/140976 Submitted by: D'Arcy Cain (original version) [1] Approved by: trasz (mentor)
* The input line length limit mentioned on the manual page was removed byjh2009-12-121-5/+1
| | | | | | r179374. Approved by: trasz (mentor)
* Remove unneeded header includes from usr.bin/ except contributed code.delphij2009-12-11121-193/+19
| | | | Tested with: make universe
* Remove unnecessary termcap.h includes inherited from extern.h and otherdelphij2009-12-117-27/+16
| | | | | unneeded headers. While I'm there, make function definations ANSI prototypes.
* Move unistd.h includes to individual .c files and remove unnecessarydelphij2009-12-119-2/+7
| | | | includes.
* Remove unnecessary includes.delphij2009-12-1110-20/+0
| | | | Reviewed by: rodrigc
* Add my birthday.gavin2009-12-091-0/+1
| | | | Approved by: ed (mentor)
* Let w(1) use utmpx.ed2009-12-062-31/+28
| | | | | | | | | | We don't have UT_*SIZE anymore. One of the reasons for that is because all strings are null terminated, there is no need for apps to copy strings out of the utmpx structure. This means we can define W_DISP*SIZE lengths for all columns. While there, adjust the sizes a little. Steal some bytes from the username column, while extending the hostname column quite a bit.
* Let systat's vmstat use utmpx.ed2009-12-052-16/+9
|
* Port who(1) to utmpx.ed2009-12-052-58/+56
| | | | | | | | | | (Un)fortunately there is no standardized interface to switch between utmp database files, so we must call ulog_setutxfile() here. I'm also changing the column widths to magic numbers here. Display layout should in this case not be derived from structure fields sizes. Because I don't want struct utmpx ever to become too small, the fields are too big to reserve all the space.
* Let wall(1) use utmpx.ed2009-12-052-28/+29
| | | | | | | | Because our implementation guarantees the strings inside struct utmpx to be null terminated, we don't need to copy everything out, which makes the code nicer to read. Also set WARNS to 6 and add $FreeBSD$ to keep SVN happy.
* Let wall(1) use utmpx.ed2009-12-052-18/+17
| | | | | | | | Because our implementation guarantees the strings inside struct utmpx to be null terminated, we don't need to copy everything out, which makes the code nicer to read. Also set WARNS to 6 and add $FreeBSD$ to keep SVN silent.
* Add WARNS?=6, because it seems to build out of the box.ed2009-12-051-0/+2
|
* Use _ULOG_POSIX_NAMES here, to make eventual porting to <utmpx.h> easier.ed2009-12-051-4/+5
| | | | | By the time we gain a real <utmpx.h>, it's just a matter of changing the include at the top and -lulog from the Makefile.
* Add a missing space to the error message when execvp() failed.stefanf2009-12-051-1/+1
|
* Connect unzip to the build.rdivacky2009-12-031-0/+1
| | | | | | Approved by: ed (mentor) Approved by: des (unzip author) Tested by: exp ports build (miwi)
* Use USER_PROCESS instead of LOGIN_PROCESS.ed2009-12-031-1/+1
| | | | | | POSIX isn't clear about how the fields should be used, but according to utmpx(5) on Linux, LOGIN_PROCESS refers to a TTY that's still running a getty.
* Port users(1) to libulog.ed2009-12-032-22/+27
| | | | | | Instead of digging through the utmp database by hand, use proper API calls to do so. Instead of parsing entries with a non-empty ut_user, we now look at LOGIN_PROCESS entries.
* Remove -t from the manpage and usage.jhb2009-12-012-6/+3
|
* Unbreak user space after if_timer/if_watchdog removal in r199975.bz2009-12-013-11/+0
| | | | Tested by: glebius
* Add more statistics variables for IPcomp.bz2009-11-291-0/+10
| | | | | | | Try to version the struct in a backward compatible way. People asked for the versioning of the stats structs in general before. MFC after: 5 days
* - correctly render the provided exampledanger2009-11-281-1/+1
| | | | | PR: docs/140962 Submitted by: mharo
* unifdef: fix invalid array access when nesting limit exceededfanf2009-11-271-4/+8
| | | | | | | | | | | | If the number of nested #if blocks exceeds 64, nest() increments the nesting depth and then reports an error. The message includes the line number for the start of the current #if block, which is read from past the end of the relevant array. Avoid the out-of-bounds read by reporting the error and exiting before the nesting depth has a chance to increase. Submitted by: Jonathan Nieder <jrnieder@gmail.com>
* unifdefall: optimise the loop that builds the unifdef command.fanf2009-11-261-9/+17
| | | | | | | | | | | | | | The old code used a shell loop to convert each controlling macro definition into a command-line argument, reading the macro definitions file each time. The new code converts the list of controlling macros into a sed script which can run through the list of macro definitions in one go. Add some explanatory comments, since the code is quite meta. Use {} instead of () for redirecting a group of commands. Submitted by: Jonathan Nieder <jrnieder@gmail.com>
* Remove debugging remnants from unifdefall.fanf2009-11-261-2/+2
| | | | Submitted by: Jonathan Nieder <jrnieder@gmail.com>
* Update unifdef to my upstream version 1.188fanf2009-11-253-134/+300
| | | | | | | | | | | | | | | | | | | | | Main highlights: (A) The new -B option compresses blank lines around a deleted section so that blank lines around "paragraphs" of code don't get doubled. (B) Lenient evaluation of && and || so that #if expressions can be evaluated even when some of their sub-expressions cannot be. (C) The evaluator can now handle macros with arguments. (D) Portability fixes, especially for unifdefall. Contributions from: Ben Hutchings at Solarflare Communications (A and B) Anders H Kaseorg <andersk@mit.edu> (A and C) Jonathan Nieder <jrnieder@gmail.com> (D) Obtained from: http://dotat.at/prog/unifdef/
* Change gcore in order to get rid of the procfs accesses and use FreeBSD'sattilio2009-11-254-198/+185
| | | | | | | | | | | | | | | | | | | | | specific sysctls and ptrace interfaces. This change switches a bit gcore POLA that is summarized here: - now gcore can recognize threads within the process and handle dumps on thread-scope - the process to be analyzed will be stopped during its gcore run - gcore may not work with processes which are actively being analyzed by gdb or truss - the ptrace interface may cause syscalls to return EINTR, thus interferring with signals handling within the process Side note: <janitor task> the interface can be further lifted in order to get rid of the very last procfs interfaces remnants and made more suitable for copying with sysctl/ptrace interface </janitor task>. Obtained from: Sandvine Incorporated Reviewed by: emaste, rwatson Sponsored by: Sandvine Incorporated MFC: 1 month
OpenPOWER on IntegriCloud