summaryrefslogtreecommitdiffstats
path: root/tools
Commit message (Collapse)AuthorAgeFilesLines
* This is a full 32 bit field for kite.adrian2011-05-091-1/+1
|
* sh: Add \u/\U support (in $'...') for UTF-8.jilles2011-05-082-0/+18
| | | | | | | | | | Because we have no iconv in base, support for other charsets is not possible. Note that \u/\U are processed using the locale that was active when the shell started. This is necessary to avoid behaviour that depends on the parse/execute split (for example when placing braces around an entire script). Therefore, UTF-8 encoding is implemented manually.
* sh: Add UTF-8 support to pattern matching.jilles2011-05-082-0/+132
| | | | | | | | | | ?, [...] patterns match codepoints instead of bytes. They do not match invalid sequences. [...] patterns must not contain invalid sequences otherwise they will not match anything. This is so that ${var#?} removes the first codepoint, not the first byte, without putting UTF-8 knowledge into the ${var#pattern} code. However, * continues to match any string and an invalid sequence matches an identical invalid sequence. (This differs from fnmatch(3).)
* sh: Add UTF-8 support to ${#var}.jilles2011-05-072-0/+28
| | | | | If the current locale uses UTF-8, ${#var} counts codepoints (more precisely, bytes b with (b & 0xc0) != 0x80).
* MK_GPIO changed its default; reflect.ru2011-05-062-2/+4
|
* Removed trailing whitespace.ru2011-05-062-2/+2
|
* Tidy up formatting.ru2011-05-061-2/+2
|
* sh: Add $'quoting' (C-style escape sequences).jilles2011-05-059-0/+100
| | | | | | | | | | | | | | | | | | | | | | | | A string between $' and ' may contain backslash escape sequences similar to the ones in a C string constant (except that a single-quote must be escaped and a double-quote need not be). Details are in the sh(1) man page. This construct is useful to include unprintable characters, tabs and newlines in strings; while this can be done with a command substitution containing a printf command, that needs ugly workarounds if the result is to end with a newline as command substitution removes all trailing newlines. The construct may also be useful in future to describe unprintable characters without needing to write those characters themselves in 'set -x', 'export -p' and the like. The implementation attempts to comply to the proposal for the next issue of the POSIX specification. Because this construct is not in POSIX.1-2008, using it in scripts intended to be portable is unwise. Matching the minimal locale support in the rest of sh, the \u and \U sequences are currently not useful. Exp-run done by: pav (with some other sh(1) changes)
* sh: Apply set -u to variables in arithmetic.jilles2011-05-041-0/+6
| | | | | | | Note that this only applies to variables that are actually used. Things like (0 && unsetvar) do not cause an error. Exp-run done by: pav (with some other sh(1) changes)
* sh: Detect an error for ${#var<GARBAGE>}.jilles2011-05-042-0/+3
| | | | | | | | | In particular, this makes things like ${#foo[0]} and ${#foo[@]} errors rather than silent equivalents of ${#foo}. PR: bin/151720 Submitted by: Mark Johnston Exp-run done by: pav (with some other sh(1) changes)
* Regression tests for Capsicum capability mode.jonathan2011-05-045-0/+587
| | | | | | | Ensure that system calls that access global namespaces, e.g. open(2), are not permitted, and that whitelisted sysctls like kern.osreldate are. Approved by: rwatson Sponsored by: Google, Inc.
* Give some sort of message when the program is not run as root.gnn2011-05-031-0/+10
| | | | | | | Root privileges are required to talk to the device. Submitted by: Sriram Rapuru at Wipro for Exar Inc. MFC after: 2 weeks
* Introduce two new options MK_INET and MK_INET_SUPPORT analogicallybz2011-04-302-0/+4
| | | | | | | | | | with INET6 equivalents. Patch reather than re-genenerating src.conf (given the current problem with the script that does the re-gen). Reviewed by: gnn Sponsored by: The FreeBSD Foundation Sponsored by: iXsystems MFC after: 2 weeks
* A diagnostic tool to go along with the vxge(4) 10GbE driver.gnn2011-04-287-0/+3681
| | | | | | | | | This tool can be used to print statistics, registers, and other device specific information once the driver is loaded into the kernel. Submitted by: Sriram Rapuru from Exar MFC after: 2 weeks
* executabledes2011-04-281-0/+0
|
* sh: Set $? to 0 for background commands.jilles2011-04-253-0/+13
| | | | | | | | | | For backgrounded pipelines and subshells, the previous value of $? was being preserved, which is incorrect. For backgrounded simple commands containing a command substitution, the status of the last command substitution was returned instead of 0. If fork() fails, this is an error.
* sh: Allow EV_EXIT through function calls, make {...} <redir more consistent.jilles2011-04-233-0/+46
| | | | | | | | | | | | | | | | | | | | | If EV_EXIT causes an exit, use the exception mechanism to unwind redirections and local variables. This way, if the final command is a redirected command, an EXIT trap now executes without the redirections. Because of these changes, EV_EXIT can now be inherited by the body of a function, so do so. This means that a function no longer prevents a fork before an exec being skipped, such as in f() { head -1 /etc/passwd; }; echo $(f) Wrapping a single builtin in a function may still cause an otherwise unnecessary fork with command substitution, however. An exit command or -e failure still invokes the EXIT trap with the original redirections and local variables in place. Note: this depends on SHELLPROC being gone. A SHELLPROC depended on keeping the redirections and local variables and only cleaning up the state to restore them.
* Expand / correct newsyslog regression tests:simon2011-04-211-9/+120
| | | | | | | | - Test newslog with clasic naming of rotates files to actually test the correct number of log files as newsyslog now does the correct thing post r220926. - Add some more newsyslog tests which tests keeping 0, 1, and 2 logfiles.
* sh: Do not word split "${#parameter}".jilles2011-04-201-0/+8
| | | | | | | | | | | | | This is only a problem if IFS contains digits, which is unusual but valid. Because of an incorrect fix for PR bin/12137, "${#parameter}" was treated as ${#parameter}. The underlying problem was that "${#parameter}" erroneously added CTLESC bytes before determining the length. This was properly fixed for PR bin/56147 but the incorrect fix was not backed out. Reported by: Seeker on forums.freebsd.org MFC after: 2 weeks
* sh: Add test for bin/12137.jilles2011-04-151-0/+27
|
* sh: Add test for obscure and ambiguous ${#?}.jilles2011-04-151-0/+11
|
* sh: Add test for bin/56147.jilles2011-04-151-0/+6
|
* Generate opt_ah.h now for all ath tools, a recent HAL change of mineadrian2011-04-115-0/+44
| | | | now requires it.
* Regenerate after r220401. It turns out makeman is clever about implieduqs2011-04-061-5/+1
| | | | | | | flags, so remove that part from WITHOUT_CXX again. This is only partially regenerated, as the entries for FDT and GPIO seem to have switched their default state, too.
* Complete WITHOUT_CXX support. It implies WITHOUT_GROFF anduqs2011-04-062-3/+577
| | | | | | | | WITHOUT_CLANG. Don't build clang bootstrap/build-tools depending on this flag. We also keep gperf, devd and libstdc++ around to prevent foot-shooting and to make this a two-way street.
* Allow strerror(0) and strerror_r(0, ...).jilles2011-04-051-8/+13
| | | | | | | | | | | | | Of course, strerror_r() may still fail with ERANGE. Although the POSIX specification said this could fail with EINVAL and doing this likely indicates invalid use of errno, most other implementations permitted it, various POSIX testsuites require it to work (matching the older sys_errlist array) and apparently some applications depend on it. PR: standards/151316 MFC after: 1 week
* * re-enable marker stuff, I accidentally disabled it during debuggingadrian2011-04-051-4/+2
| | | | * correct arg check
* Flesh out a simple tool to print the ALQ dump generated by the HAL.adrian2011-04-053-1/+126
|
* Use ${NANO_WORLDDIR}/var/empty as copy source since it has no schg flag set.mr2011-03-281-2/+2
| | | | | Copying over /var/empty's schg flag had unpleasant side effects (schg flag on /etc and /cfg) during nanobsd boot before.
* Oops, fix badness i must've introduced earlier.adrian2011-03-231-4/+4
|
* Add test for acl_is_trivial_np(3).trasz2011-03-222-0/+151
|
* Delete all GPT partitions at once. (Suggested by Andrey V. Elsukov ↵mr2011-03-212-4/+8
| | | | | | <bu7cher@yandex.ru>) Fix amd64 merge script.
* Add a file with some remarks for setting up a zfs boot environmentmr2011-03-201-0/+35
|
* - Add script for preparing disks in GPT/ZFS boot environmentmr2011-03-202-0/+64
| | | | - Add merge script for integrating amd64 slice into i386 disk image
* - Build disk image (for USB sticks) and iso imagemr2011-03-183-11/+29
| | | | | | | - Change name to reflect this - Install all kernel modules - Choose image size that i386 and amd64 can be combined into one image - Mount tmpfs over /boot/zfs for zpool imports
* sh: Fix some parameter expansion variants ${#...}.jilles2011-03-132-0/+21
| | | | | | | | | These already worked: $# ${#} ${##} ${#-} ${#?} These now work as well: ${#+word} ${#-word} ${##word} ${#%word} There is an ambiguity in the standard with ${#?}: it could be the length of $? or it could be $# giving an error in the (impossible) case that it is not set. We continue to use the former interpretation as it seems more useful.
* POSIX accepts only ELOOP if O_NOFOLLOW is specified and target is a symlink.pjd2011-03-131-5/+5
|
* sh: Add some tests for ${#parameter}.jilles2011-03-133-0/+26
|
* Fix warnings and style(9) issues.brucec2011-03-122-27/+33
| | | | Set WARNS to 6.
* Add some missing consts.pjd2011-03-121-4/+4
|
* Fix warnings and style(9) issues.brucec2011-03-112-4/+6
| | | | Set WARNS to 6.
* Fix the build: we have snprintf(3).brucec2011-03-111-0/+1
| | | | MFC after: 1 week
* Fix warnings and set WARNS to 6.brucec2011-03-112-0/+5
| | | | MFC after: 1 week
* Fix warnings and set WARNS to 6.brucec2011-03-112-3/+5
| | | | MFC after: 1 week
* mptable.h is now in include/x86.brucec2011-03-111-1/+1
|
* Fix warnings and style(9) issues.brucec2011-03-112-14/+16
| | | | | | Set WARNS to 6. MFC after: 1 week
* Add support for *at syscalls:pjd2011-03-101-25/+173
| | | | | | | | | | | | | | - openat(2) - unlinkat(2) - mkdirat(2) - linkat(2) - symlinkat(2) - renameat(2) - mkfifoat(2) - mknodat(2) - fchmodat(2) - fchownat(2) - fstatat(2)
* Improve test a bit, now that we have fstat(2) support.pjd2011-03-101-3/+9
| | | | | | | | | The test was support to check if SUID/SGID bits are removed on first write, but actually we were checking if they were removed after close. Now we can check if SUID/SGID bits are gone after first write. While here add checks to see if when both SUID and SGID bits are set they are both cleared on first write.
* Few initial ftruncate(2) tests. One of them covers stand/154873.pjd2011-03-091-0/+58
| | | | PR: stand/154873
* Pass descriptor number to write(2), now that it is possible.pjd2011-03-092-4/+4
|
OpenPOWER on IntegriCloud