Commit Graph

16745 Commits

Author SHA1 Message Date
Devin Teske
877ea04721 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
Devin Teske
8bcf564644 Remove unnecessary semi-colons 2016-12-12 21:18:24 +00:00
Devin Teske
0b8f01fe99 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
Devin Teske
d9f83eb9f4 1 is the default descriptor for redirects without an fd prefix 2016-12-12 21:11:55 +00:00
Devin Teske
bef42d18c5 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
Devin Teske
35c8d5eb1b Allow the script path to contain whitespace and special characters 2016-12-12 21:01:20 +00:00
Devin Teske
58ce2edc98 Use provided API to centralize dialog title strings 2016-12-12 21:00:09 +00:00
Devin Teske
7797a5973f Reorder dialog parameters based on commonality for readability 2016-12-12 20:54:20 +00:00
Devin Teske
6ea6e3fa7d Fix incorrect use of provided API
The result of which was incorrectly sized menu dialogs
2016-12-12 20:49:49 +00:00
Devin Teske
ea2e60b01c Use provided API (change "dialog" to "$DIALOG") 2016-12-12 20:43:09 +00:00
Devin Teske
2abc4c242e Whitespace (dialog options separated to minimize diffs) 2016-12-12 20:41:27 +00:00
Devin Teske
b5938e7da3 Consolidate redirects into here documents, with proper code indentation 2016-12-12 19:46:49 +00:00
Hiroki Sato
dc96a41b44 - 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
Devin Teske
15fadc4858 Remove an unnecessary "return $?" at end of function 2016-12-12 19:26:55 +00:00
Hiroki Sato
8555a6e0a4 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
Devin Teske
7bcf4508be Use ternary operator 2016-12-12 19:24:32 +00:00
Devin Teske
0e638f57e6 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
Devin Teske
71ef4d586a 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
Hiroki Sato
783e461c73 - 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
Devin Teske
86e1d2977f Always pass --default-item parameter to dialog 2016-12-12 19:09:17 +00:00
Devin Teske
48e9fce2f5 There is zero harm in always passing --default-item to dialog 2016-12-12 19:07:42 +00:00
Devin Teske
58dc38bd1c Centralize backtitle string 2016-12-12 19:01:04 +00:00
Devin Teske
5357f8f7c8 Use provided API instead of hard-coded status integers 2016-12-12 18:55:41 +00:00
Devin Teske
76b07bd950 Whitespace 2016-12-12 18:52:22 +00:00
Devin Teske
9ca8b7be34 Remove unnecessary `-n' parameter to head/tail 2016-12-12 18:48:00 +00:00
Devin Teske
3204364296 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
Devin Teske
4fa8c81cc3 Be internally consistent (": > ..." is used elsewhere in this file) 2016-12-12 18:43:42 +00:00
Devin Teske
edcf330372 "echo | sed | sed | awk" is silly (changed to "echo | awk") 2016-12-12 18:42:55 +00:00
Devin Teske
1cac9fc2a3 Add missing `-e' parameter to sed invocations 2016-12-12 18:39:26 +00:00
Devin Teske
8d5182d698 Allow $BSDINSTALL_TMPETC to contain whitespace or special chars 2016-12-12 18:38:18 +00:00
Devin Teske
c62801e26d Group fallbacks together 2016-12-12 18:34:21 +00:00
Devin Teske
0b04945dc0 Remove unnecessary quotes around number in test 2016-12-12 18:33:40 +00:00
Devin Teske
e9c843adc7 Change "[ ! ... ] && ..." to "[ ... ] || ..." 2016-12-12 18:29:24 +00:00
Devin Teske
e20253348d Collapse tiny if statements 2016-12-12 18:28:20 +00:00
Devin Teske
114a587e3b Replace funny block with something easy to digest 2016-12-12 18:24:41 +00:00
Devin Teske
bede070805 Consolidate locals 2016-12-12 18:21:56 +00:00
Devin Teske
5b57fabb45 Remove unnecessary local initializers 2016-12-12 18:20:56 +00:00
Devin Teske
38a9942347 Change "[ ! -z ... ]" => "[ ... ]" and "[ -z ... ]" => "[ ! ... ]" 2016-12-12 18:17:30 +00:00
Devin Teske
138ab67af4 Use $( ... ) instead of ... 2016-12-12 18:10:33 +00:00
Devin Teske
97a4c9f0dc Comments 2016-12-12 18:05:54 +00:00
Baptiste Daroussin
abd4699ce2 Fix pkg groupshow <gid>
PR:		204676
Submitted by:	longwitz@incore.de
MFC after:	2 days
2016-12-10 12:48:48 +00:00
Rick Macklem
df3e1050ff Patch the nfsd so that it doesn't register with rpcbind for an NFSv4 only
server.

This patch uses the sysctl vfs.nfsd.server_min_nfsvers to determine
if/what versions of NFS service should be registered with rpcbind.
For NFSv4 only, it does not register at all, since NFSv4 always uses 2049
and does not require rpcbind.
For NFSv3 minimum, it registers NFSv3 but not NFSv2.

Tested by:	jmader2@gmu.edu
Submitted by:	jmader2@gmu.edu (earlier version)
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D8696
2016-12-08 23:29:56 +00:00
Devin Teske
f18789d787 Functions in their own section 2016-12-08 19:28:12 +00:00
Devin Teske
3d2b0857bf Remove unnecessary trailing backslashes 2016-12-08 19:26:22 +00:00
Devin Teske
3220bdd85c Add support for "hidden" Wi-Fi networks
PR:		bin/214933
Submitted by:	Maxim Filimonov <che@bein.link>
Reviewed by:	dteske, allanjude, adrian
MFC after:	6 days
X-MFC-with:	Follow-up commit for style
2016-12-08 16:41:18 +00:00
Nick Hibma
a96032e552 More typos in strings.
Submitted by:	bde
MFC after:	3 days
2016-12-02 11:30:21 +00:00
Marcelo Araujo
bbdfc8f1ea Use memset(3) instead of bzero(3).
Obtained from:	OpenBSD (r1.12, r1.20, r1.18 and r1.37)
2016-12-02 06:07:27 +00:00
Marcelo Araujo
5902259135 String terminators are called NUL, not NULL, also the variable
mentioned in the comment is p and not u.

Obtained from:	OpenBSD (r1.34)
2016-12-02 05:49:22 +00:00
Nick Hibma
16e7325493 Speling fixes and fix line endings for err_msg output.
In some cases there was not \n, in other cases there was.
2016-12-01 09:14:58 +00:00
Andriy Gapon
9aaefb2c53 bhyve: stability and performance improvement for dbgport
The TCP server implementation in dbgport does not track clients, so it
may try to write to a disconected socket resulting in SIGPIPE.
Avoid that by setting SO_NOSIGPIPE socket option.

Because dbgport emulates an I/O port to guest, the communication is done
byte by byte.  Reduce latency of the TCP/IP transfers by using
TCP_NODELAY option.  In my tests that change improves performance of
kgdb commands with lots of output (e.g. info threads) by two orders of
magnitude.

A general note.  Since we have a uart emulation in bhyve, that can be
used for the console and gdb access to guests.  So, bvmconsole and bvmdebug
could be de-orbited now.  But there are many existing deployments that
still dependend on those.

Discussed with:	julian, jhb
MFC after:	2 weeks
Sponsored by:	Panzura
2016-11-29 13:11:00 +00:00