summaryrefslogtreecommitdiffstats
path: root/bin
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* Add the -m, -w and -x options to ls's usage message.tjr2003-09-091-2/+2
| | | | | | PR: 51493 Submitted by: Walter Belgers MFC after: 1 month
* mdoc(7): Use the new feature of the .In macro.ru2003-09-082-2/+2
|
* Don't escape names in MLINKS: this won't work with bsd.man.mk,v 1.53.ru2003-09-071-1/+1
|
* Fix testing of arith_assign() value for $((a=15)).schweikh2003-09-071-1/+1
| | | | Submitted by: Enache Adrian <enache@rdslink.ro>
* #include <string.h> for prototypes for strcpy() and strlen().tjr2003-09-061-0/+2
| | | | Submitted by: Stefan Farfeleder
* Style cleanup, mostlyschweikh2003-09-044-207/+246
| | | | Requested by: bde
* Implement missing shell arithmetic operators in $(()) expansionschweikh2003-08-304-49/+236
| | | | | | | | | | and variable recognition. PR: standards/52972 Submitted by: Wartan Hachaturow <wart@tepkom.ru> Reviewed by: tjr (improved on original patch) Tested by: buildworld on CURRENT. MFC after: 6 weeks
* Stage 4 of dynamically linked root support. Add a big knob,gordon2003-08-171-1/+4
| | | | | | | | | | | WITH_DYNAMICROOT, which will toggle the generation of dynamically-linked binaries for installation in /bin and /sbin. It is currently off, meaning that /bin and /sbin are still statically linked by default. If something goes wrong (which I hope doesn't), this is what /rescue is all about. Please do not try to use WITH_DYNAMICROOT and NO_RESCUE to save space or some other equally silly reason. If you do and end up having problems, you have been warned.
* Implement the nwchan keyword that has been in the man page, but washarti2003-08-133-0/+15
| | | | | not implemented. This is just handy if you want to ddb the address some process is waiting on.
* Note in STANDARDS that -gno are not (yet?) POSIX conformant.schweikh2003-08-081-1/+6
| | | | | Spotted by: harti MFC after: 3 days
* Add additional documentation to setfacl(1) regarding the behavior ofrwatson2003-08-071-0/+18
| | | | | | | | | | | tools such as chmod(1) and ls(1) when it comes to acting on objects that have POSIX.1e extended ACLs. Specifically, discuss the substitution of the mask entry for the group entry in the mode representation of the ACL. Differently worded from the submission, and could probably use further refinement. PR: 55319 Submitted by: Grzegorz Czaplinski <G.Czaplinski@prioris.mini.pw.edu.pl>
* -v no longer a valid argument to setfacl(1) -- remove from usage().rwatson2003-08-071-1/+1
| | | | | PR: 55318 Submitted by: Grzegorz Czaplinski <G.Czaplinski@prioris.mini.pw.edu.pl>
* Clarify that the 'state' information consists of characters, notbrueffer2003-08-051-2/+2
| | | | | | | | only letters (e.g. IWs+) PR: 55221 Submitted by: Rich Morin <rdm@cfcl.com> MFC after: 3 days
* Remove collate_range_cmp() stabilization, it conflicts with rangesache2003-08-031-9/+2
|
OpenPOWER on IntegriCloud