237004 Commits

Author SHA1 Message Date
dteske
70f01cabaf Remove an unnecessary call to f_dialog_title_restore() 2016-12-12 21:27:29 +00:00
dteske
d2d70042b1 Whitespace 2016-12-12 21:26:36 +00:00
dteske
7b0075c12b Utilize provided i18n strings 2016-12-12 21:23:47 +00:00
dteske
b3ba09ad44 Remove incomplete and unnecessary creation of fd3
The provided API already provides a passthru descriptor and even
gives you a varaible for referring to it.
2016-12-12 21:20:56 +00:00
dteske
1f72b9ecd2 Remove unnecessary semi-colons 2016-12-12 21:18:24 +00:00
dteske
81a43c15a2 Use awk the following (more succinct) awk syntax:
condition1 { action1 }
	condition2 { action2 }

instead of the following syntax:

	{
		if (condition1) { action1 }
		else if (condition2) { action2 }
	}
2016-12-12 21:16:37 +00:00
dteske
a2137139d3 1 is the default descriptor for redirects without an fd prefix 2016-12-12 21:11:55 +00:00
dteske
9474c4bc00 Fix invalid parameter expansion (change $@ to "$@")
Without quotes, $@ loses its special meanining (see below)

% sh -c 'echo $@' /bin/sh "   1   " "   2   "
1 2
% sh -c 'echo "$@"' /bin/sh "   1   " "   2   "
   1       2

The quotes are required to get ARGV to be unperterped
2016-12-12 21:04:11 +00:00
dteske
d5fa50b840 Allow the script path to contain whitespace and special characters 2016-12-12 21:01:20 +00:00
dteske
132073e3d3 Use provided API to centralize dialog title strings 2016-12-12 21:00:09 +00:00
dteske
aec8b5b0d1 Reorder dialog parameters based on commonality for readability 2016-12-12 20:54:20 +00:00
dteske
4cbb470510 Fix incorrect use of provided API
The result of which was incorrectly sized menu dialogs
2016-12-12 20:49:49 +00:00
dteske
73a6483723 Use provided API (change "dialog" to "$DIALOG") 2016-12-12 20:43:09 +00:00
dteske
f36072e86a Whitespace (dialog options separated to minimize diffs) 2016-12-12 20:41:27 +00:00
pfg
b7278ffafc ed(1): Simplify some checks.
The return type for both fread(3) and fwrite(3) cannot be negative, this
renders some checks invalid and variable 'ct' unnecessary.
Also bump 'len' to size_t to avoid signed/unsigned comparison warnings.
2016-12-12 20:25:59 +00:00
manu
03c8e93972 Use the spibus accessor when applicable.
MFC after:	3 days
2016-12-12 20:04:31 +00:00
dteske
7a906cbddf Consolidate redirects into here documents, with proper code indentation 2016-12-12 19:46:49 +00:00
hrs
fc29dcf63c - Refactor listening socket list. All of the listening sockets are
now maintained in a single linked-list in a transport-independent manner.
- Use queue.h for linked-list structure.
- Use linked-list for AllowedPeers.
- Use getaddrinfo(8) even for Unix Domain sockets.
- Use macros to type-casting from/to struct sockaddr{,_in,_in6}.
- Define fu_* macro for union f_un to shorten the member names.
- Remove an extra #include <sys/type.h>.
- Add "static" to non-exported symbols.
- !INET support is still incomplete but will be fixed later.

There is no functional change except for some minor debug messages.
2016-12-12 19:33:40 +00:00
dteske
8deaf769ad Remove an unnecessary "return $?" at end of function 2016-12-12 19:26:55 +00:00
hrs
a92b987411 Temporarily backout the previous commit because it was totally broken due to
unresolved merge conflicts.

Pointy hat to:	hrs
2016-12-12 19:24:52 +00:00
dteske
66586c3cda Use ternary operator 2016-12-12 19:24:32 +00:00
mjg
aa6fdf05e8 vfs: use vrefact in getcwd and fchdir 2016-12-12 19:16:35 +00:00
dteske
0d3fb22f07 If you're not going to make use of the products of a match() in awk
(e.g., RSTART and RLENGTH variables) then use ~ instead of match()
2016-12-12 19:12:31 +00:00
trasz
4cbaaf9b71 Undo r309891. Konstantin is right in that this condition normally
cannot happen - the um_dev field is assigned at mount and never written
to afterwards.
2016-12-12 19:11:04 +00:00
dteske
5b403b7aab Now that these variables do not contain the --default-item flag itself,
change the name of the variable from $def_item_... to $default_...
2016-12-12 19:10:39 +00:00
hrs
72a9e76712 - Refactor listening socket list. All of the listening sockets are
now maintained in a single linked-list in a transport-independent manner.
- Use queue.h for linked-list structure.
- Use linked-list for AllowedPeers.
- Use getaddrinfo(8) even for Unix Domain sockets.
- Use macros to type-casting from/to struct sockaddr{,_in,_in6}.
- Define fu_* macro for union f_un to shorten the member names.
- Remove an extra #include <sys/type.h>.
- Add "static" to non-exported symbols.
- !INET support is still incomplete but will be fixed later.

There is no functional change except for some minor debug messages.
2016-12-12 19:10:14 +00:00
dteske
7186d17fc0 Always pass --default-item parameter to dialog 2016-12-12 19:09:17 +00:00
dteske
6ac73bdcd8 There is zero harm in always passing --default-item to dialog 2016-12-12 19:07:42 +00:00
dteske
6895a533a9 Centralize backtitle string 2016-12-12 19:01:04 +00:00
robak
0c7183eeba Fix regression when stdin/out/err fds are are overridden by shell.
Submitted by:	Pawel Biernacki <pawel.biernacki@gmail.com>
Reported by:	ngie
Approved by:	ngie
Sponsored by:	Mysterious Code Ltd.
Differential Revision:	https://reviews.freebsd.org/D8543
2016-12-12 18:56:40 +00:00
dteske
85088f1091 Use provided API instead of hard-coded status integers 2016-12-12 18:55:41 +00:00
dteske
65dd648795 Whitespace 2016-12-12 18:52:22 +00:00
dteske
eb2a4fb667 Remove unnecessary `-n' parameter to head/tail 2016-12-12 18:48:00 +00:00
dteske
c523ed6ee1 awk(1) match() takes a regex, use /.../ to remind ourselves of this
NB: The difference between "..." and /.../ for a regex in awk is that
quoted strings go through escape expansion first (e.g., \\ becomes \)
2016-12-12 18:45:52 +00:00
dteske
827f6676dc Be internally consistent (": > ..." is used elsewhere in this file) 2016-12-12 18:43:42 +00:00
dteske
a86c55d3d1 "echo | sed | sed | awk" is silly (changed to "echo | awk") 2016-12-12 18:42:55 +00:00
dteske
74e48b359f Add missing `-e' parameter to sed invocations 2016-12-12 18:39:26 +00:00
dteske
2abc445326 Allow $BSDINSTALL_TMPETC to contain whitespace or special chars 2016-12-12 18:38:18 +00:00
manu
037f67880c CS ivar is uint32_t, not int.
MFC after:	3 days
2016-12-12 18:36:46 +00:00
dteske
544da66b52 Group fallbacks together 2016-12-12 18:34:21 +00:00
dteske
fa756bc185 Remove unnecessary quotes around number in test 2016-12-12 18:33:40 +00:00
dteske
53f48a2373 Change "[ ! ... ] && ..." to "[ ... ] || ..." 2016-12-12 18:29:24 +00:00
dteske
5d63bb6317 Collapse tiny if statements 2016-12-12 18:28:20 +00:00
dteske
a848623c29 Replace funny block with something easy to digest 2016-12-12 18:24:41 +00:00
dteske
1390aaa722 Consolidate locals 2016-12-12 18:21:56 +00:00
dteske
0d737976f5 Remove unnecessary local initializers 2016-12-12 18:20:56 +00:00
dteske
ced2b90567 Change "[ ! -z ... ]" => "[ ... ]" and "[ -z ... ]" => "[ ! ... ]" 2016-12-12 18:17:30 +00:00
andrew
3b55e84275 Enable ACPI on arm64. It's not yet functional, but it will help keeping the
code building until it is ready.

Obtained from:	ABT Systems Ltd
Sponsored by:	The FreeBSD Foundation
2016-12-12 18:13:03 +00:00
dteske
eaa4d342d8 Use $( ... ) instead of ... 2016-12-12 18:10:33 +00:00
dteske
889cd4165d Comments 2016-12-12 18:05:54 +00:00