summaryrefslogtreecommitdiffstats
path: root/bin
Commit message (Collapse)AuthorAgeFilesLines
...
* static and const.jmallett2004-03-151-10/+10
|
* And a bandaid so that the output of "available space" is correct whenle2004-03-091-1/+2
| | | | | | | | | | using -m and -g switches and "available space" is negative (i.e. when the file system is already using the root-reserved minimum free space). Obtained from: Stefan Farfeleder <stefan@fafoe.narf.at> PR: bin/62536 Submitted by: Peter van Dijk <peter@dataloss.nl> Approved by: grog (mentor), bde
* Remove a.out at the end of 'make test'ache2004-03-081-1/+1
|
* Fixed some style bugs (mainly unsorting and tab lossage in previous commit).bde2004-03-061-16/+15
|
* Add a.out to CLEANFILESache2004-03-061-0/+1
|
* Change locale name from non-existent ASCII to en_US.US-ASCIIache2004-03-061-2/+2
|
* Teach dd(1) about parity bits.phk2004-03-059-21/+157
|
* Add a test-target and reference vectors for the character converions.phk2004-03-0511-0/+194
|
* Make NULL a (void*)0 whereever possible, and fix the warnings(-Werror)markm2004-03-052-2/+2
| | | | | | | | | | | | | | | that this provokes. "Wherever possible" means "In the kernel OR NOT C++" (implying C). There are places where (void *) pointers are not valid, such as for function pointers, but in the special case of (void *)0, agreement settles on it being OK. Most of the fixes were NULL where an integer zero was needed; many of the fixes were NULL where ascii <nul> ('\0') was needed, and a few were just "other". Tested on: i386 sparc64
* Rev. 1.32 moved a comment to the wrong line. The hack refered tomtm2004-03-041-2/+2
| | | | | | | | | | in the comment applies to a decision that needs to be made in relation to the year 2000. In fact, that statement probably should be changed to be more generic (getting the year from the current time perhaps). Otherwise, starting in 2069 two digit year conversions in date(1) will start assuming 1900 instead of 2000. hehe.
* Fixes to output of `ls -lh` for certain file sizes:cperciva2004-03-011-4/+4
| | | | | | | | | | | | | | | | | | | | | 1. Sizes in the range 1000 -- 1023 units require four characters width for the integer; increase the field width to accomodate this. 2. Sizes in the range 9.95 -- 10 units were being displayed as "10.0" units; adjust the logic to fix this, and now that we've got an extra character of field width, print fractional units if the size is less than 99.95 units. 3. Don't display sub-byte precision. This should mean that the following sizes are displayed: 0B .. 1023B 1.0U .. 9.9U 10.0U .. 99.9U 100U .. 1023U for values of U in "KMGTPE". PR: bin/63547 Pointy hat to: cperciva Approved by: rwatson (mentor)
* style.Makefile:johan2004-02-234-4/+4
| | | | Use WARNS?= instead of WARNS=
* Allow the -H option to show threads when selecting by uid, tty,deischen2004-02-221-8/+6
| | | | and pid.
* Only call chflags() on directories once.ceri2004-02-181-5/+4
| | | | | Approved by: ru MFC after: 1 week
* style(9): wrap at 80 columns.njl2004-02-121-3/+5
|
* Handle proper formatting and a buffer overrun when running an old sh onnjl2004-02-121-7/+28
| | | | | | | a system that has sys_nsig > NSIG (i.e. when libc is upgraded.) Submitted by: Matt Dillon Reviewed by: bde
* MFp4 @46705:jmallett2004-02-081-0/+2
| | | | | | | Support "uprocp" exactly like "paddr" with the former having been documented in the manual but not implemented. PR: 42484
* Use int rather than size_t storage for printf field widths to avoidiedowse2004-02-081-43/+41
| | | | | | many casts. Reviewed by: bde
* Fixed style of DPADD and LDADD assignments as per style.Makefile(5).ru2004-02-051-2/+2
|
* Commit fix sent by Tor Egge <Tor.Egge@cvsup.no.freebsd.org>cracauer2004-02-051-1/+1
| | | | | | | | | | Only use return value from system call if system call succeeded. Tested with `make world` and some of my own scripts. This should be MFCed soon. While /bin/sh is hard to test the fix is obviously correct and can be assumed not to break something else (famous last words...).
* Use sys_nsig instead of the static NSIG. DragonflyBSD kill.c:1.3njl2004-01-281-5/+5
| | | | Obtained from: DragonflyBSD
* Use sys_nsig instead of NSIG for the length of the signal arrays. Thisnjl2004-01-282-6/+6
| | | | | | | is important if we add new signals later. From DragonflyBSD: jobs.c:1.4, trap.c:1.3. Obtained from: DragonflyBSD
* The PR diff I committed recently had one bug noticed bycracauer2004-01-281-1/+2
| | | | | | | | | | | | | | | | | | | | | | | Joe Marcus Clarke <marcus@FreeBSD.ORG>, subshells could lose a non-zero exit status. This commit is Joe's proposed patch. Thanks! I verified that the problem Joe found is fixed and I ran a full world with this patch. I don't plan to ever commit language patches to /bin/sh again. It is a minefield too big to navigate without a full-time committment, which I am not willing to do on our /bin/sh. Under normal circumstances I would recommend using NetBSD's sh which has a lot of language fixes (like the ones what these patches were about) but unfortunately they had implemented broken signal behaviour for shellscript containing interactive programs. Similar issues apply to pdksh which is OpenBSD's sh. From my perspective bash2 is the only really working bourne sh out there and that one is GPLed. Oh well.
* Fix alignment of size field in `ls -lh` -- the width was being computedcperciva2004-01-221-2/+2
| | | | | | | | from log[10](largest file size), but when outputting in human-friendly format the width is always at most 4. (eg. "123K", " 12K", "1.2K".) PR: bin/59320 Approved by: rwatson (mentor)
* Bring ps.1 up to date with changes in the past seven years:cperciva2004-01-211-33/+22
| | | | | | | | | | * Remove mention of '>', 'A', and 'S' states * Mention 'W' state. * List 'J' state in the correct location. * Sync with flags in sys/proc.h Approved by: rwatson (mentor) MFC after: 7 days
* Replace home-grown dup2() implementation with actual dup2() calls. Thisdes2004-01-215-43/+13
| | | | | | | should slightly reduce the number of system calls in critical portions of the shell, and select a more efficient path through the fdalloc code. Reviewed by: bde
* Removed duplicate y.tab.h from SRCS and CLEANFILES.ru2004-01-201-1/+1
|
* - Build things in pure dictionary order (see sort(1)).ru2004-01-161-5/+8
| | | | | | | | | | - Unify the conditional assignments section so that architectural exclusions come first, then options and !options, sorted by the option name, also in directory order, then architecture specific sections, sorted by the architecture name, with i386 being a traditional exception. Prodded by: bde
* Note the Linux required format.obrien2004-01-061-0/+1
|
* o Fix a style bug and poor wording in comment.kuriyama2004-01-011-2/+10
| | | | | | | | | o When fts_read() cannot stat the file, it can't be unlinked. At that case, don't display error message when -f flag is used. Obtained from: bde PR: kern/16815, bin/35842 Reported by: kuriyama, Aleksandr A. Babaylov <.@babolo.ru>
* o Spell 'diretories' correctly.maxim2003-12-301-1/+1
| | | | | | PR: misc/60730 Submitted by: Eugene Grosbein MFC after: 3 days
* PR 28852cracauer2003-12-281-24/+1
| | | | | | | | | | | | | | | sh -e behaviour was incorrect when && and || statements where used in "if" clauses. This is the patch submitted by MORI Kouji <mori@tri.asanuma.co.jp>. It fixes the issue at hand, but sh fixes like this are super-hard to verify that they don't break anything else. I ran some of my old test cases and a few big GNU configure scripts that detected mistakes before, with the previous sh, patched sh and bash. No differences in behaviour found. MFC recommended after longer than usual time. Compiles on i386 and sledge.
* Print unambiguous paths with -R -v.ru2003-12-161-1/+1
|
* The uuidgen(1) program is WARNS=6 clean, so flag it as such.mux2003-12-071-1/+1
| | | | Tested on: i386, sparc64
* Do something sensible if both -h and -k are given.obrien2003-12-012-0/+9
| | | | Approved by: re(scottl)
* Force a staticly linked /bin and /sbin for ia64. The necessary changesmarcel2003-11-191-1/+1
| | | | | | | | | | | | to gcc have not been made for ia64, which means that executables still have /usr/libexec/ld-elf.so.1 as the dynamic linker. This simply does not work if /usr is a seperate filesystem not mounted when the kernel tries to execute init(8). Note that this is a temporary fix until a new gcc has been imported that does have the required changes. Approved: re@
* Change the default for binaries in /bin and /sbin from statically togordon2003-11-161-1/+1
| | | | | | | | | dynamically linked. This has been a long time coming with the move of critical libraries from /usr/lib to /lib. If you don't feel comfortable with dynamically linked binaries in your root partition, now is the time to define NO_DYNAMICROOT in your make.conf. Approved by: re
* Don't mmap(2) and munmap(2) zero-length files.alc2003-11-131-1/+2
| | | | Submitted by: Wiktor Niesiobedzki <bsd@w.evip.pl>
* Fix format strings (intmax_t is %jd, not %qd)kris2003-11-121-2/+2
| | | | Reviewed by: tjr
* Update the statfs structure with 64-bit fields to allowmckusick2003-11-121-23/+25
| | | | | | | | | | | | | | | | | accurate reporting of multi-terabyte filesystem sizes. You should build and boot a new kernel BEFORE doing a `make world' as the new kernel will know about binaries using the old statfs structure, but an old kernel will not know about the new system calls that support the new statfs structure. Running an old kernel after a `make world' will cause programs such as `df' that do a statfs system call to fail with a bad system call. Reviewed by: Bruce Evans <bde@zeta.org.au> Reviewed by: Tim Robbins <tjr@freebsd.org> Reviewed by: Julian Elischer <julian@elischer.org> Reviewed by: the hoards of <arch@freebsd.org> Sponsored by: DARPA & NAI Labs.
* When the P flag is set (i.e. Overwrite regular files before deleting them),guido2003-11-101-8/+14
| | | | | | | | | do only unlink the file if we could indeed overwrite the file. Old behaviour: rm -P /tmp/foo (foo mode 0444) would NOT overwrite foo, but still delete it (with a warning: rm: foo: Permission denied) New behaviour: Just the EPERM warning, but no deletion Reviewed by: bde
* 1. Fixed leakage of a file descriptor for every non-fatal failure inbde2003-11-081-1/+3
| | | | | | | | | | | | | | | rm_overwrite() (for rm -P). 2. Print the file name in the error message for (fatal) malloc() failures in rm_overwrite(). I first thought that malloc() failures should be non-fatal since they don't prevent proceeding the the next file, but making them non-fatal would normally give too much output for rm -Pr on a large tree in the unlikely event that even one occurs, since the malloc()ed amounts are usually the same. Just print the file name since the malloc()ed amounts are not always the same and it doesn't hurt to know where rm was when it quit. Submitted by: guido ((1) and original version of (2))
* Style.ru2003-11-021-1/+1
|
* Remove the code for parsing octal modes, since setmode(3) alreadytobez2003-10-311-22/+5
| | | | | | | handles them. Reviewed by: audit MFC after: 2 weeks
* Handle realloc() failure correctly.tjr2003-10-161-2/+5
|
* Turn malloc+snprintf into asnprintf.markm2003-10-141-14/+10
| | | | Submitted by: David Hill <hill at phobia dot em ess>
* - Check and report write(2) errors.dds2003-10-111-10/+59
| | | | | | | | | | | | | | - Issue a single writev(2) call instead of multiple write(2)s. This change improves the inefficiencies introduced when echo went on an stdio diet. The following figures are for echoing 1000 arguments. original stdio-based echo: 0.01 real 0.01 user 0.00 sys before: 0.05 real 0.00 user 0.04 sys after: 0.01 real 0.00 user 0.00 sys
* Check for write errors; report and exit with error value.dds2003-10-041-0/+2
|
* Be a little bit more correct WRT counting numbers vs. integer numbers.obrien2003-09-131-10/+10
|
* Do not assume there is only a space between #define and the macro nameschweikh2003-09-131-1/+1
| | | | | | | | when grepping for JOBS. The recent style cleanup replaced the space with a tab and broke job control detection. Little edits, disastrous consequences. Submitted by: Peter Edwards <pmedwards@eircom.net> X-MFC when: in about 5 weeks with the other sh arithmetic fixes.
OpenPOWER on IntegriCloud