summaryrefslogtreecommitdiffstats
path: root/bin
Commit message (Collapse)AuthorAgeFilesLines
* Minimal take on previous commit -- remove getopt and printf. Static sizenjl2002-11-141-15/+9
| | | | | | | | | is reduced by 40k, dynamic by a few bytes. Functional changes: * "sleep -- arg" now returns usage() instead of ignoring the -- * "sleep -1" now returns immediately instead of returning usage() Reviewed by: jmallett
* Back out previous commit since there is controversy about changing so muchnjl2002-11-141-24/+30
| | | | | in sleep including duping strtol(3). Code changes also increased dynamic size of sleep(1).
* Remove getopt and strtol dependencies, reducing size of static exe.njl2002-11-131-30/+24
| | | | | | | | | | | | Preserve older desired behavior, accept [+-]*[0-9]*\.[0-9]* Remove a few unnecessary casts. %ls -l /bin/sleep -r-xr-xr-x 1 root wheel 61332 Oct 28 05:16 /bin/sleep %ls -l /usr/obj/usr/src/bin/sleep/sleep -rwxr-xr-x 1 root wheel 19124 Nov 13 12:12 /usr/obj/usr/src/bin/sleep/sleep Submitted by: Tim Kientzle <kientzle@acm.org>
* Put echo on a diet, removing unnecessary use of stdio and getopt.njl2002-11-131-9/+8
| | | | | | | | | Before... -r-xr-xr-x 1 root wheel 58636 Oct 28 05:16 /bin/echo After... -rwxr-xr-x 1 root wheel 12824 Nov 12 17:39 /usr/obj/usr/src/bin/echo/echo Submitted by: Tim Kientzle <kientzle@acm.org>
* Use warn() instead of perror() or fprintf() where appropriate.tjr2002-11-062-14/+8
|
* Cross-reference setfacl(1).tjr2002-11-041-0/+1
|
* - Consistent use of warn() vs. perror().tjr2002-11-032-9/+10
| | | | | | | | | | - Gracefully handle the case where standard input is missing a newline at EOF. - Exit with status 1 instead of -1 (really 255) on error. - Add a Diagnostics section to the manual page documenting exit status. Approved by: rwatson
* Print a `+' character after the standard UNIX permission fields in longtjr2002-11-032-2/+73
| | | | | | | | listings if the file has an extended ACL (more than the required 3 entries). This is what Solaris and IRIX do, and what the withdrawn POSIX.2c standard required. Reviewed by: rwatson (an earlier version of the patch)
* The hw.availpages sysctl has an unsigned long value now, fix the retrievaltmm2002-11-012-2/+3
| | | | to match that.
* o Remove $Id$ from copyright; there's $FreeBSD$,marcel2002-11-012-18/+8
| | | | | | | o Remove static function uuid_print(); use uuid_to_string(3) in combination with printf(3) to achieve the same, o Remove unneeded includes, o Add a reference to uuid(3) to the manpage.
* Do not print a header line if it would be empty; required by 1003.1-2001.tjr2002-10-311-0/+9
|
* Delete worthless comments.tjr2002-10-301-5/+1
|
* Create a small library function, check_utility_compat(3), to determinewollman2002-10-282-32/+34
| | | | | | | | whether a named utility should behave in FreeBSD 4.x-compatible mode or in a standard mode (default standard). The configuration is done malloc(3)-style, with either an environment variable or a symlink. Update expr(1) to use this new interface.
* Do not include <sys/syslimits.h> directly; it is not intended for generalwollman2002-10-271-1/+0
| | | | consumption.
* Attempt improved use of fts results: use the correct path to therwatson2002-10-241-4/+14
| | | | | | | | | | object to retrieve label information on, rather than directly consuming the fts-provided paths (none of which are quite right). This is based on the similar readlink() code, and may contain the same bugs. Obtained from: TrustedBSD Project Sponsored by: DARPA, Network Associates Laboratories
* Teach "ls -Z" to use the policy-agnostic MAC label interfaces ratherrwatson2002-10-247-238/+69
| | | | | | | | | | | than the LOMAC-specific interfaces for listing MAC labels. This permits ls to view MAC labels in a manner similar to getfmac, when ls is used with the -l argument. Next generation LOMAC will use the MAC Framework so should "just" work with this and other policies. Not the prettiest code in the world, but then, neither is ls(1). Obtained from: TrustedBSD Project Sponsored by: DARPA, Network Associates Laboratories
* Use the MAC interface to list process MAC labels rather than usingrwatson2002-10-248-172/+58
| | | | | | | | | | the LOMAC-specific interface (which is being deprecated). The revised LOMAC using the MAC framework will export levels listable using this mechanism. Approved by: re Obtained from: TrustedBSD Project Sponsored by: DARPA, Network Associates Laboratories
* Fix for changed getbsize arg type.markm2002-10-231-3/+4
|
* Be consistent about declaring a function "static", and consistentmarkm2002-10-231-3/+3
| | | | about the type of argv.
* Constify, staticify, rationalise types and fix other related warnings.markm2002-10-231-8/+8
|
* Constify to squash some warnings.markm2002-10-232-2/+2
|
* Staticify for lint.markm2002-10-181-2/+2
|
* Constify and staticify for lint.markm2002-10-183-6/+6
|
* Print non-printing characters in directory names, as well as file names,tjr2002-10-183-5/+9
| | | | | | | as `?' or `\ooo', depending on whether the -b or -B flags were used. PR: 43995 MFC after: 1 month
* Avoid accidentally making "-h" a synonym for "fc".tjr2002-10-181-1/+1
| | | | Obtained from: NetBSD
* Output "human-readable" values with a non-0 precision wheredd2002-10-181-7/+9
| | | | | | | | appropriate. Before this, a 2.9 GB file was misleadingly reported as "2G". This mostly brings unit_adjust() in line with what is in du(1). Reviewed by: jmallett Approved by: nik
* Dekerberise. The corresponding userland stuff has been dekerberisedmarkm2002-10-163-169/+6
| | | | for ages, and no-one seems to have noticed. Viva PAM!
* Do not strip CTL* escapes from redirection filenames in argstr(); theytjr2002-10-081-1/+1
| | | | | | | | are later stripped with rmescapes() in expandarg(). If the filename has already been unescaped, doing it again in rmescapes() can walk off the end of the string, leading to memory corruption and eventually SIGSEGV. Noticed by: kris
* Clean up use of <stdarg.h> macros: always call va_end after va_start,tjr2002-10-061-2/+6
| | | | | | reset with a call to va_start before each use of the va_list. Obtained from: NetBSD
* Ensure all va_starts have a matching va_end.tjr2002-10-061-1/+1
| | | | Obtained from: NetBSD
* While removing a memory leak, rev 1.32 introduced acharnier2002-10-061-16/+11
| | | | | free-memory-and-reuse-it-after. Correct both problems and make rcp -r work again under /etc/malloc.conf -> AJ.
* /dev/sa0 is the default tape device, not /dev/rst0.tjr2002-10-062-6/+6
|
* Disallow empty condition parts of "if", "while" and "until" compoundtjr2002-10-061-3/+6
| | | | | | commands. Commands like "if then ... fi" and "while do ... done" are no longer accepted. Bodies of compound commands are still allowed to be empty, because even though POSIX does not allow them, most shells do.
* Use %jd in format string and cast argument to intmax_t instead of usingtjr2002-10-062-4/+3
| | | | | | | %qd to print struct stat.st_size. Remove WARNS=0 and WFORMAT=0 from Makefile. Tested on: alpha, sparc64, i386
* Fix format string errors relating mainly to the use of %qu to print off_t's.tjr2002-10-064-9/+15
| | | | | | | | | Instead use %ju and cast the argument. WFORMAT=0 is still required in the Makefile because gcc warns about some strftime() calls (I don't think this behaviour is useful.) Tested on: sparc64, alpha, i386
* Oops, the previous version was a last minute test version with off_tbde2002-10-031-1/+1
| | | | | | replaced by int instead of size_t. Spotted by: fanf
* Use a non-bogus type for representing the values of offsets in structs.bde2002-10-031-1/+1
| | | | | | | off_t is for offsets in files, and it is signed so it was no better than the original type of int for avoiding warnings from broken lints, except accidentally on machines like i386's where size_t is smaller than off_t.
* Fix some twelve hour clock braindamage. The range for hours is 0-23 not 1-12.fanf2002-10-031-1/+1
| | | | MFC After: 1 week
* Catch up to SMTX -> SLOCK changes.jhb2002-10-024-25/+22
|
* Use %d in a printf() format string and cast the argument to int instead oftjr2002-10-021-1/+1
| | | | | using %td when we know that the number is between 0 and 9; mksyntax is a build tool and needs to work on -stable.
* Return the ``u''trhodes2002-10-011-1/+1
|
* Back out experimental changes to fmtstr() that I didn't mean to includetjr2002-10-011-1/+9
| | | | in the previous commit.
* Replace a home-grown printf() clone with a fwopen() wrapper aroundtjr2002-10-011-190/+23
| | | | | libc's vfprintf() that writes to a `struct output' instead of a file. Inspired by NetBSD's similar changes (they used asprintf() instead).
* It is now safe to remove WARNS=0 and WFORMAT=0.mux2002-10-011-2/+0
| | | | Tested on: alpha, i386, sparc64
* Restore "not found" error message when searching for (or executing)tjr2002-10-011-2/+8
| | | | | | a program fails because the file or a path component does not exist. Suggested by: bde
* - Don't use quad_t when we really mean rlim_t.mux2002-10-011-5/+6
| | | | | | | | - Cast rlim_t to intmax_t when printing it. This should fix the last format errors in sh(1). Tested on: i386, sparc64
* Add back WARNS=0 and WFORMAT=0; gcc is finding nonexistent format stringtjr2002-10-011-0/+2
| | | | errors with %qd formats.
* Use the %t format modifier to print differences betweenmux2002-10-012-2/+2
| | | | | | | | | | | pointers. This fixes two format warnings on 64 bits archs which are fatal now that WFORMAT=0 has been removed. It doesn't fully fix the sh(1) build on 64 bits platforms though, there is still some quad_t issues that need to be fixed. Tested on: i386, sparc64
* Remove WARNS=0 and WFORMAT=0. The shell compiles cleanly at WARNS=2tjr2002-10-011-2/+0
| | | | | on at least i386. If there are warnings on other archs, I'd rather hear about them than pretend they didn't exist.
* Remove some kind of profiling support that required the 4.2BSD monitor()tjr2002-10-011-12/+0
| | | | function in libc.
OpenPOWER on IntegriCloud