Commit Graph

11206 Commits

Author SHA1 Message Date
Julio Merino
e40b4bf801 Fix structure of new tests (r268794) for usr.bin/units.
- Make sure the tests go into the right directory.  The location was
  wrong so they were overwriting the bin/chown tests!
- Use the right naming scheme for the test program.
- Remove the svn:executable property from the shell script.
2014-07-25 01:29:22 +00:00
Ed Maste
cb5249a242 vtfontcvt will first ship in FreeBSD 10.1 2014-07-24 15:16:03 +00:00
Devin Teske
be44449f2d When producing fmake(1), `make clean' should remove fmake.1 (a copy of
make.1). Introduced initially via SVN r250699 (sjg).

Reviewed by:	sjg, gjb
MFC after:	3 days
X-MFC-to:	stable/10
2014-07-23 23:01:54 +00:00
Marcel Moolenaar
7ea7f92899 Fix builds on older FreeBSD versions and/or non-FreeBSD machines:
don't use _Static_assert unconditionally.
2014-07-23 18:05:39 +00:00
Ed Maste
0dfe37f8f3 Remove redundant return statement after errx
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
2014-07-21 17:43:37 +00:00
Ed Maste
54a7138bd8 Use the standard way of printing the usage string
Sponsored by:	The FreeBSD Foundation
2014-07-21 17:18:00 +00:00
Robert Watson
587be2d8fe In "procstat -v" (VM), spell out 'FL' to 'FLAG' since there are two extra
columns available anyway.  Also left align as we tend to do for flags
fields, although you can't see that currently as the string fully fills
that available columns.

MFC after:	3 days
Sponsored by:	DARPA, AFRL
2014-07-20 20:11:34 +00:00
Robert Watson
9fa958082f Better align headers and data for 'procstat -f' with and without '-C'.
MFC after:	3 days
Sponsored by:	DARPA, AFRL
2014-07-19 15:09:53 +00:00
Baptiste Daroussin
56793850d8 Improve timeout(1) man page
Document the exit values and the duration format
Improve wording
Pet mandoc -Tlint
Sort SEE ALSO

Phabric:	https://phabric.freebsd.org/D432
Reviewed by:	wblock
2014-07-18 22:56:59 +00:00
Gavin Atkinson
ee3a0d1c0f Fix two typos in iscsictl.8
PR:		191581
Submitted by:	Jimmy Olgeni
MFC after:	3 days
2014-07-18 12:51:35 +00:00
Baptiste Daroussin
bb9eb45ab4 Update to byacc 20140715 (only concerns regression tests being fixed)
Directly use regression test from upstream

PR:		191020
Submitted by:	gcooper (yaneurabeya@gmail.com)
2014-07-17 22:22:38 +00:00
Brooks Davis
80189b3b09 Replace all uses of libncurses and libtermcap with their wide character
variants.  This allows usable file system images (i.e. those with both a
shell and an editor) to be created with only one copy of the curses library.

Exp-run:	antoine
PR:		189842
Discussed with:	bapt
Sponsored by:	DARPA, AFRL
2014-07-17 18:24:34 +00:00
Marcel Moolenaar
a1afbf00f6 Add support for the fixed image type. The fixed image is effectively
a raw image with a VHD footer appended. There's little value that I
can see to use the fixed image type, but in order to make VHD images
for use by Microsoft's Azure platform, they must be fixed VHD images.

Support has been added by refactoring the code to re-use common code
and by adding a second output format structure.  To created fixed VHD
images, specify "vhdf" as the output format.
2014-07-17 16:33:38 +00:00
Pedro F. Giffuni
8e5fc70f15 grep: fix some memory leaks.
Add memory leak fix missing from r268799.

Obtained from:	NetBSD
2014-07-17 15:59:13 +00:00
Pedro F. Giffuni
f3f50de623 grep: fix some memory leaks.
Bring a couple of changes from NetBSD:

queue.c (CVS Rev. 1.4. 1.5)
Fix memory leaks.
NULL does not need a cast.

grep.c (CVS Rev. 1.6)
Use the more portable getline.

Obtained from:	NetBSD
MFC after:	3 days
2014-07-17 15:48:11 +00:00
Pedro F. Giffuni
78bef01fe4 grep: Fix type.
Obtained from:	NetBSD (CVS rev. 1.17)
MFC after:	3 days
2014-07-17 14:51:50 +00:00
Eitan Adler
40dd6f486b units(1): Add basic tests
Add some tests to help avoid breaking units
2014-07-17 07:12:12 +00:00
Eitan Adler
cae148478c units(1): Add support for output-format
Add support for the output-format argument.  This also exposes subtle
	rounding differences between GNU units and our units.
2014-07-17 06:54:12 +00:00
Baptiste Daroussin
f62bbc4d90 Sort properly the headers
While here space/tabs cleanup

Reviewed by:	kib
2014-07-16 13:52:05 +00:00
Baptiste Daroussin
5b8b238645 White space fixes 2014-07-16 12:09:12 +00:00
Baptiste Daroussin
86b0545ed1 Sort headers
Constify long options
Remove useless call to sigemptyset
properly check errno when waiting for a process status when a SIGCHLD is received
2014-07-16 11:41:28 +00:00
Baptiste Daroussin
a2072d9e0f Fix typo 2014-07-16 11:30:04 +00:00
Baptiste Daroussin
565b379f4b Style(9) fix 2014-07-16 11:28:53 +00:00
Baptiste Daroussin
d8d685e828 Fix build with gcc 2014-07-16 10:37:05 +00:00
Baptiste Daroussin
8b705cd9a2 Fix indentation 2014-07-16 10:34:55 +00:00
Baptiste Daroussin
42148fc49d New BSDL timeout(1) utility compatible with GNU timeout
it fully passes the GNU timeout regression tests, it is written in a mostly
portable way (only signal parsing is relying on non portable structures)

Phabric:	D377
2014-07-16 09:55:36 +00:00
Xin LI
a11d210986 Add a bandaid to fix GCC build (on sparc64 et al). 2014-07-15 23:35:06 +00:00
Marcel Moolenaar
a0f136e1c5 Add image_data() for checking whether a sequence of blocks has data.
Use this for VHD and VMDK to avoid allocating space in the image
for empty sectors.

Note that this negatively affects performance because mkimg uses a
temporary file for the intermediate storage. When mkimg has better
internal book keeping, performance can be significantly improved.
2014-07-15 04:39:23 +00:00
Pietro Cerutti
2d2187338e Unbreak the build by re-enabling exceptions.
Disabling them breaks build on archs using GCC. The problem is at line 156 of
bits/basic_ios.h:

	if (this->exceptions() & __state)
		__throw_exception_again;

With exceptions disabled __throw_exception_again is defined as

#define __throw_exception_again

at line 45 of exception_defines.h and the code results in an empty loop body,
which fails because of -Werror.

Approved by:	cognet
2014-07-14 12:24:38 +00:00
David Chisnall
f2b893a0c6 Turn off exceptions and rtti when building the c++ version of users.
Neither is used in the program and this saves us 10KB (around 40%) in binary
size.
2014-07-12 07:47:50 +00:00
Bryan Drewery
1d212ea524 Fix vmstat -M after r263620 renamed 'cnt' to 'vm_cnt'.
This was showing as:
  vmstat: undefined symbols:
   _cnt

To remain backwards compatible with older dumps, if 'vm_cnt' symbol is not
found then try again with 'cnt'.

Reported by:	pho
Sponsored by:	EMC / Isilon Storage Division
2014-07-11 16:45:55 +00:00
Marcel Moolenaar
5d4393ed1f Make this compile on older FreeBSD versions that don't have
APM_ENT_TYPE_APPLE_BOOT.
2014-07-11 01:49:25 +00:00
Ed Schouten
e8df2232e0 Fix a couple of style nits.
- Use set instead of std::set, to be consistent with the rest of the file.
- Remove return (0); it's not required.
- Add a dash at the beginning of the copyright, per style(9).
2014-07-10 16:10:39 +00:00
Ed Schouten
63cdd39993 Don't use auto, as we also need to support GCC 4.2. 2014-07-10 15:58:28 +00:00
Ed Schouten
975f912456 Let users(1) use an std::set, instead of std::{vector,sort,unique}.
Reviewed by:	gahr
2014-07-10 15:56:15 +00:00
Pietro Cerutti
33aa643fa0 Reimplements users(1) in C++.
This reduces the lines of code by roughly 50% (not counting the COPYRIGHT
header) and makes it more readable by using standard algorithms.

Approved by:	bapt
2014-07-10 12:15:02 +00:00
Simon J. Gerraty
5bcb74248e Update to bmake-20140620
Main change is detection of malformed variable references.

Reviewed by:	obrien
2014-07-08 22:27:50 +00:00
Warren Block
edcb40eb4e Make synopsis version of -3 flag match other uses in the page.
MFC after:	1 week
2014-07-08 02:43:04 +00:00
Marcel Moolenaar
e7d939bda2 Remove ia64.
This includes:
o   All directories named *ia64*
o   All files named *ia64*
o   All ia64-specific code guarded by __ia64__
o   All ia64-specific makefile logic
o   Mention of ia64 in comments and documentation

This excludes:
o   Everything under contrib/
o   Everything under crypto/
o   sys/xen/interface
o   sys/sys/elf_common.h

Discussed at: BSDcan
2014-07-07 00:27:09 +00:00
Gavin Atkinson
6c17b5fab9 Dominion Day became Canada Day in 1982, update the holiday calendar.
PR:		191533
Submitted by:	db
Obtained from:	http://www.pch.gc.ca/eng/1359137387574/1359137429809
MFC after:	3 days
2014-07-05 19:02:53 +00:00
Eitan Adler
1dd5886f98 units(1): Clean up
Remove unused constant.  Add 'static' where able.
2014-07-05 03:49:20 +00:00
Eitan Adler
fa3fb62bff units(1): Convert units.lib to use '#' instead of '/'.
This allows us to run GNU units against our data files and compare the output.
	In addition, current units(1) does not support '/' as a comment at all.
2014-07-05 03:27:31 +00:00
Eitan Adler
0ce97bdf81 units: Support start of line comments with '#'
Modern GNU units(1) supports comments anywhere with '#' but take the easy route for now and at least support start of line # comments.
2014-07-05 03:25:26 +00:00
Eitan Adler
8d61f393a3 units(1): Add 'terse' support
terse output is used when calling units from another script.
2014-07-05 03:17:57 +00:00
Eitan Adler
a913717b0d units(1): Add 'help' flag
- Add support for --help for compatibility
	- Make usage() static
2014-07-04 22:19:21 +00:00
Eitan Adler
c27cc201fb units(1): Fix man page
Igor walks one way.  I walked the other.

Reported by:	wblock
2014-07-04 21:34:48 +00:00
Eitan Adler
5192ff4547 units(1): add long options
Things brings additional compatibility with units 2.10

Discussed with:	wblock (man page)
2014-07-04 21:21:05 +00:00
Marcel Moolenaar
264f86e1ad Document the -y option as a unit test option.
Add missing -v (and -y) to the usage message.

Requested by: eadler@
2014-07-04 18:47:25 +00:00
Eitan Adler
b5bb953863 look: implement long options
gentoo has "util-linux 2.24.1" with long options.  Other distributions
	have similar.

	usage() is intentionally unchanged to keep it short and sweet

Reviewed by:	jmg
Discussed with:	adrian, jilles
2014-07-04 04:47:29 +00:00
Marcel Moolenaar
f3582a728d Add VHD support to mkimg(1). VHD is used by Xen and Microsoft's Hyper-V
among others.

Add an undocumented option for unit testing (-y). When given, the image
will have UUIDs and timestamps synthesized in a way that gives identical
results across runs. As such, UUIDs stop being unique, globally or
otherwise.

VHD support requested by: gjb@
2014-07-03 20:31:43 +00:00