summaryrefslogtreecommitdiffstats
path: root/usr.bin
Commit message (Collapse)AuthorAgeFilesLines
* Rename the tests to something more meaningful. I spent way too longmarcel2014-09-221-5/+2
| | | | | | | | | | | | trying to get the test name right, failed, gave up and used a sequence number instead. When I realized it wasn't because of the number of underscores in the name that I really started to think. I didn't have braces around the variable names ... Thus: test_1 is now called apm_1x1_512_qcow, which gives you all you need to run mkimg by hand. Dumb-ass: marcel
* Don't update the baseline file when the result of the test is identicalmarcel2014-09-221-5/+30
| | | | | | | | | | | | | | to the baseline. Since we don't run gzip with the -n option, the output of gzip varies for identical result files if and when they are created at different time. Ouch... Rather than add -n and commit a 600K+ diff for the changes to all the .uu files, it's less of a churn to uudecode and gunzip the baseline file and compare that to the new result file to determine if the baseline file needs to be updated. This way, "atf-sh mkimg.sh rebase" can be run as many times as people like and a subsequent "svn status" will not show unnecessary diffs.
* Don't echo '# $FreeBSD$' as the first line into the .uu file. Keywordmarcel2014-09-221-1/+2
| | | | | substitution applies to this file, including the echo command. Avoid the match (and substitution) by breaking the string up into 3 parts.
* Update the unit tests to include the QCOW (version 1) format.marcel2014-09-2229-1/+1579
| | | | This is a good safety net for when V2 is added.
* Add support for QCOW version 1. Version 2 is partially implemented.marcel2014-09-222-0/+315
| | | | | | | | | | | | | | | | | | | And because of that, it's entirely disabled for now. Both versions are similar enough that a single header definition works for both of them. The only "diverting" side-effect is that the union of the two is larger than the official V1 header. What this means for our V1 support is that we can't put the L1 table adjacent to the V1 header (i.e. at offset 0x30 in the file), unless we revert to hackery and klugery. Let's not. Instead, we align the L1 table at the cluster boundary. This is in line with the V2 layout and perfectly ok for V1 anyway (ok -- as far as I've seen so far). Due to the alignment, our V1 image seems to be 1 cluster larger than the V1 image created by qemu-img (on average). Compression of the clusters is not supported at this time. MFC after: 2 months
* Add unit tests for mkimg(1):marcel2014-09-20115-0/+3757
|
* Fix partition alignment and image rounding when any of -P (block size),marcel2014-09-1910-54/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | -T (track size) or -H (number of heads) is given: o scheme_metadata() always rounded to the block size. This is not always valid (e.g. vtoc8 that must have partitions start at cylinder boundaries). o The bsd and vtoc8 schemes "resized" the image to make it match the geometry, but since the geometry is an approximation and the size of the image computed from cylinders * heads * sectors is always smaller than the original image size, the partition information ran out of bounds. The fix is to have scheme_metadata() simply pass it's arguments to the per-scheme metadata callback, so that schemes not only know where the metadata is to go, but also what the current block address is. It's now up to the per-scheme callback to reserve room for metadata and to make sure alignment and rounding is applied. The BSD scheme now has the most elaborate alignment and rounding. Just to make the point: partitions are aligned on block boundaries, but the image is rounded to the next cyclinder boundary. vtoc8 now properly has all partitions aligned (and rounded) to the cyclinder boundary. Obtained from: Juniper Networks, Inc. MFC after: 3 days
* Fix incremental builds involving non-root users with read-only source files.will2014-09-181-1/+1
| | | | | | | | | | | Makefiles should not assume that source files can be overwritten. This is the common case for Perforce source trees. This is a followup commit to r211243 in the same vein. MFC after: 1 month Sponsored by: Spectra Logic MFSpectraBSD: r1036319 on 2014/01/29, r1046711 on 2014/03/06
* Fix a typo.markj2014-09-161-1/+1
| | | | MFC after: 3 days
* Add the new iscsi(4) man pageallanjude2014-09-131-2/+3
| | | | | | | | | Cross reference it from iscsid(8) and iscsictl(8) Reviewed by: trasz Approved by: bcr (mentor), wblock (mentor) Sponsored by: ScaleEngine Inc. CR: https://reviews.freebsd.org/D741
* Add support for adding empty partition entries. I.e. skip partitionmarcel2014-09-122-1/+29
| | | | | | | | | | numbers or names. This gives more control over the actual layout and helps to construct BSD disklabels with /usr or /var at dedicated partitions. Obtained from: Juniper Networks, Inc. MFC after: 3 days Relnotes: yes
* Be compatible with boot code that starts right after the disk label inmarcel2014-09-121-1/+4
| | | | | | | | | | | | | | | | | | | | | the second sector by only clearing the amount of bytes needed for the disklabel in the second sector. Previously we were clearing exactly 1 sector worth of bytes and as such writing over boot code that may have been there. Since we do support more than 8 partitions, make sure to set all fields in d_partitions. For the first 8 partitions this is unneeded, but for partitioons 9 and up this compensates for the fact that we don't clear an entire sector anymore. Obviously, one cannot use more than 8 partitions when using boot code that starts right after the disk label. Relevant GRNs: 107879 - Employ unused bytes after the disklabel in the second sector. 189500 - Revert the part of change 107879 that employs the unused bytes after the disklabel in the 2nd sector for boot code. Obtained from: Juniper Networks, Inc. MFC after: 3 days
* Fix checksum calculation:marcel2014-09-121-4/+7
| | | | | | | | | | | 1. Iterate over all partitions counted in the label, which can be more than the number of partitions given to mkimg(1). 2. Start the checksum from the beginning of the label; not the beginning of the bootarea. Tested with bsdlabel(8). MFC after: 3 days
* Fix typo.trasz2014-09-111-2/+2
| | | | | MFC after: 3 days Sponsored by: The FreeBSD Foundation
* Fix header output when -P is specified and (ncpus - 1) != maxid.hrs2014-09-101-6/+10
| | | | | Reported by: Hiroaki Shimizu PR: 152738
* Unify interrupts bit definition and usage. While here remove PSR_C_bit.andrew2014-09-101-1/+1
| | | | | | Submitted by: Svatopluk Kraus <onwahe at gmail.com>, Michal Meloun <meloun at miracle.cz> Differential Revision: https://reviews.freebsd.org/D754
* Stop accessing the saved stack pointer by looking past the end of theandrew2014-09-101-1/+1
| | | | | | array of registers. Submitted by: Michal Meloun <meloun at miracle.cz>
* Add the ability to set `prefer_source' flag to an IPv6 address.ae2014-09-091-1/+1
| | | | | | | | | | | It affects the IPv6 source address selection algorithm (RFC 6724) and allows override the last rule ("longest matching prefix") for choosing among equivalent addresses. The address with `prefer_source' will be preferred source address. Obtained from: Yandex LLC MFC after: 1 month Sponsored by: Yandex LLC
* Add the reverse part to rule #9. Also change its description in theae2014-09-011-1/+1
| | | | | | netstat(8) output. MFC after: 1 week
* Clarify that the -c argument clears the list of tracepoints specified byjhb2014-08-261-4/+6
| | | | | | | -t (it does not clear all tracepoints). Submitted by: jmg, Eric van Gyzen <eric@vangyzen.net> MFC after: 1 week
* Add svnlite.1 to CLEANFILES.gjb2014-08-261-0/+1
| | | | | | MFC after: 3 days X-MFC-To: stable/10 only Sponsored by: The FreeBSD Foundation
* Add host.1 to CLEANFILES.gjb2014-08-261-0/+1
| | | | | | MFC after: 3 days X-MFC-To: stable/10 only Sponsored by: The FreeBSD Foundation
* Missed comma.pluknet2014-08-261-1/+1
|
* More man pages that need to know about vt in addition to syscons.se2014-08-261-0/+3
| | | | MFC after: 3 dayS
* Convert LIBCURSES to LIBNCURSES to fix "make checkdpadd"ngie2014-08-263-6/+6
| | | | | | | | | | Also, add a missing LIBPANEL dependency for lldb Approved by: rpaulo (mentor) Suggested by: brooks MFC after: 5 days Phabric: D675 (as part of a larger diff) PR: 192762
* Fix "make checkdpadd" in usr.bin/iscsictl by removing -lfl dependencyngie2014-08-232-1/+2
| | | | | Approved by: rpaulo (mentor) MFC after: 1 week
* Suppress warnings when retrieving protocol stats from interfaces thatmarkj2014-08-221-6/+6
| | | | | | | don't support IPv6 (e.g. pflog(4)). Reviewed by: hrs MFC after: 2 weeks
* elfdump: Remove extraneous _SUNW_ in reported DT_ namesemaste2014-08-211-5/+5
| | | | Sponsored by: The FreeBSD Foundation
* Rename DT_FEATURE_1 to DT_FEATUREemaste2014-08-211-1/+1
| | | | | | | | This provides a minor cleanup in elfdump; there are otherwise no consumers in the tree. Old SUN documentation can be found for either variant, but GNU binutils switched to DT_FEATURE around 2000. Sponsored by: The FreeBSD Foundation
* Make the iSCSI stack use __FBSDID() properly.trasz2014-08-211-1/+3
| | | | | MFC after: 2 weeks Sponsored by: The FreeBSD Foundation
* Always check the limits of array index variables before using them.pfg2014-08-211-1/+1
| | | | | Obtained from: DragonFlyBSD MFC after: 1 week
* Revert r267233 for now. PIE support needs to be reworked.bdrewery2014-08-1916-32/+0
| | | | | | | | | | | | | | | | | | | | | | | | 1. 50+% of NO_PIE use is fixed by adding -fPIC to INTERNALLIB and other build-only utility libraries. 2. Another 40% is fixed by generating _pic.a variants of various libraries. 3. Some of the NO_PIE use is a bit absurd as it is disabling PIE (and ASLR) where it never would work anyhow, such as csu or loader. This suggests there may be better ways of adding support to the tree. Many of these cases can be fixed such that -fPIE will work but there is really no reason to have it in those cases. 4. Some of the uses are working around hacks done to some Makefiles that are really building libraries but have been using bsd.prog.mk because the code is cleaner. Had they been using bsd.lib.mk then NO_PIE would not have been needed. We likely do want to enable PIE by default (opt-out) for non-tree consumers (such as ports). For in-tree though we probably want to only enable PIE (opt-in) for common attack targets such as remote service daemons and setuid utilities. This is also a great performance compromise since ASLR is expected to reduce performance. As such it does not make sense to enable it in all utilities such as ls(1) that have little benefit to having it enabled. Reported by: kib
* - Do not look for more matching lines if -L is specifiedgabor2014-08-181-1/+1
| | | | | Submitted by: eadler (based on) MFC after: 2 weeks
* Remove LOG_ODELAY because it does nothing.neel2014-08-172-2/+2
| | | | | Reviewed by: jilles CR: https://reviews.freebsd.org/D611
* Use mount protocol version 3 by default for showmount and umount.peter2014-08-162-6/+10
| | | | | | mount_nfs effectively uses mount protocol v3 by default already. v1 mount protocol is being removed along with nfsv2 by a high profile NFS appliance vendor and our legacy v1 mount protocol usage causes rpc errors.
* Complete the usr.bin/yacc kyua integration work I originallyngie2014-08-122-43/+34
| | | | | | | | | | | | | | | | | | | | | | | | | submitted via r268811 - Install the Kyuafile by adding FILES to FILESGROUPS - Run the testcases with an unprivileged user Some of the testcases depend upon behavior that's broken when run as root on FreeBSD because of how permissions are treated with access(2) vs eaccess(2), open(2), etc - Simplify the test driver to just inspect the exit code from run_test because it now exits with 0 if successful and exits with !0 if unsuccessful - Don't do ad hoc temporary directory creation/deletion; let Kyua handle that - Add entries for files removed in r268811 to OptionalObsoleteFiles.inc PR: 191020 X-MFC with: r268811 Approved by: jmmv (mentor) Reviewed by: bapt Sponsored by: EMC / Isilon Storage Division
* Update serf-1.3.6 -> 1.3.7peter2014-08-111-2/+2
| | | | | | Update subversion-1.8.9 -> 1.8.10 Security: CVE-2014-3504, CVE-2014-3522, CVE-2014-3528
* Link otp-sha1 to match real challenge prompt, not otp-shaache2014-08-111-2/+2
| | | | MFC after: 1 week
* Create a redundant grain directory and table. Previously we weremarcel2014-08-091-5/+23
| | | | | | | | | cheating by assigning the same sector offset to both directories, but it seems that VirtualBox doesn't like that. Neither does qemu from the looks of it. We now actually write the directory and table twice. MFC after: 3 days
* sed(1): Don't force a newline on last line, if input stream doesn't have onedumbbell2014-08-084-8/+61
| | | | | | | | | | | | | | | | While here, change how we check if the current line is the last one. Before, we just checked if there were more files after the current one. Now, we check the actual content of those files: they files may not have a line at all. This matches the definition of the "last line" by the Open Group. The new behavior is closer to GNU sed. PR: 160745 Phabric: https://phabric.freebsd.org/D431 Reviewed by: jilles Approved by: jilles Exp-run by: antoine
* Update vmstat usage for last-argument count/wait parametersbjk2014-08-082-11/+26
| | | | | | | | | | | | | | | | | | | | Correct the usage in both the manpage and in usage() to indicate that the wait interval and repetition count may be given either with the respective -w/-c arguments, or as the final positional arguments. [0] The corresponding code to implement the positional arguments has been conditional on the (always-enabled) BACKWARD_COMPATIBILITY macro since the original 4.4-lite import. It's no longer reasonable to remove the functionality, so remove the macro and conditional instead. Note that multiple disks may be given on the command line. While here, sort arguments and apply minor mdoc fixes. PR: 184755 [0] Approved by: hrs (mentor, src committer)
* Avoid name shadowing to fix build under powerpc64.jmmv2014-08-071-2/+2
| | | | | | | | | Error was: cc1: warnings being treated as errors .../usr.bin/m4/misc.c: In function 'm4errx': .../usr.bin/m4/misc.c:268: warning: declaration of 'eval' shadows a global declaration .../usr.bin/m4/extern.h:40: warning: shadowed declaration is here
* Lower warnings again to 3 the right thing would be to fix the warningsbapt2014-08-071-0/+2
| | | | | which will be done by discussing with upstream I want the m4 code to stay as close as possible to upstream.
* Make libohash a proper internallib instead of hidding it in m4bapt2014-08-065-779/+3
| | | | | mandoc development seems to be also using ohash so prepare to share the code when needed
* Rework privatelib/internallibbapt2014-08-062-2/+2
| | | | | | | | | | | | | | Make sure everything linking to a privatelib and/or an internallib does it directly from the OBJDIR rather than DESTDIR. Add src.libnames.mk so bsd.libnames.mk is not polluted by libraries not existsing in final installation Introduce the LD* variable which is what ld(1) is expecting (via LDADD) to link to internal/privatelib Directly link to the .so in case of private library to avoid having to complexify LDFLAGS. Phabric: https://phabric.freebsd.org/D553 Reviewed by: imp, emaste
* Add myself to calendar.freebsd and committers-src.dotngie2014-08-021-0/+1
| | | | | | Phabric: D522 Reviewed by: jmmv Approved by: jmmv (co-mentor)
* Add kdump support for shm_open().rpaulo2014-08-011-0/+8
| | | | MFC after: 1 week
* elfdump: use existing ELF constants where availableemaste2014-07-311-101/+103
| | | | Sponsored by: The FreeBSD Foundation
* elfdump: add EM_AARCH64 64-bit ARM machine architectureemaste2014-07-311-0/+1
|
* lower warning level to fix build with gccbapt2014-07-311-0/+1
|
OpenPOWER on IntegriCloud