Commit Graph

237004 Commits

Author SHA1 Message Date
mizhka
1ea50c0b50 [gpiospi] add clock delay to avoid smashing of bits
Submitted by:	Hiroki Mori <yamori83@yahoo.co.jp>
Reviewed by:	loos, ray, mizhka
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D8749
2016-12-13 10:03:29 +00:00
mizhka
9e3439d182 [spi] reformat message and ar5315_spi minor fix
This commit corrects print of nomatch (newline was too early) and fix
unit number for new child in ar5315_spi (was 0, now is -1 to calculate it
according to actual system state)

Submitted by:	Hiroki Mori <yamori813@yahoo.co.jp>
Reviewed by:	ray, loos, mizhka
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D8749
2016-12-13 09:53:43 +00:00
ed
cefb702476 Remove the only user of sysctl_add_oid().
My plan is to change this function's prototype at some point in the
future to add a new label argument, which can be used to export all of
sysctl as metrics that can be scraped by Prometheus. Switch over this
caller to use the macro wrapper counterpart.
2016-12-13 07:58:30 +00:00
cperciva
3c4c1ff8b9 Check that blkfront devices have a non-zero number of sectors and a
non-zero sector size.  Such a device would be a virtual disk of zero
bytes; clearly not useful, and not something we should try to attach.

As a fortuitous side effect, checking that these values are non-zero
here results in them not *becoming* zero later on the function.  This
odd behaviour began with r309124 (clang 3.9.0) but is challenging to
debug; making any changes to this function whatsoever seems to affect
the llvm optimizer behaviour enough to make the unexpected zeroing of
the sector_size variable cease.

PR:		215209
Security:	The potential for variables to unexpectedly become zero
		has worrying consequences for security in general, but
		not so much in this particular context.
2016-12-13 06:54:13 +00:00
gonzo
62d539dc18 [iMX6] Add compatibility string for GPT timer on i.MX6 Dual
Up until r295436 GPT timer in i.MX6 Dual dts used the same compatiblity
string as i.MX6 Quad. After the sync up with Linux in r295436, GPT timer
stopped getting attached on the i.MX6 Dual

MFC after:	3 days
2016-12-13 05:09:49 +00:00
loos
9d168758d5 Remove a too strict test and instead, just filter the passed flags with the
supported capabilities.

Spotted by:	yamori813@yahoo.co.jp (Hiroki Mori)
MFC after:	2 weeks
2016-12-13 03:36:41 +00:00
gonzo
9dbed0d558 [iMX6] Fix platform compatibility string for i.MX6 Dual
i.MX6 Dual boot was broken since r308533 because ofw_bus_node_is_compatible
is more strict than fdt_is_compatible and does not accept partial matches
2016-12-13 03:26:12 +00:00
dteske
ee335e51e1 It's completely pointless to replace newlines with space
(this is done automatically for you upon shell expansion)
2016-12-13 02:56:52 +00:00
dteske
7665f7ac67 The flags of a WLAN need to be quoted (they contain things like brackets) 2016-12-13 02:54:44 +00:00
dteske
d208501dc8 Simplify single-line if statements 2016-12-13 02:48:14 +00:00
dteske
21f47b71cd Simplify loop by moving predicate to clause 2016-12-13 02:47:39 +00:00
dteske
66dc7693d3 Wordsmithing 2016-12-13 02:46:36 +00:00
dteske
aea80b05f3 Why test $? when you can test the command 2016-12-13 02:45:52 +00:00
dteske
4e07ba017a Restore previous comment 2016-12-13 02:45:07 +00:00
dteske
4c7fbd1f3b Both simplify bringup of interface after changes and catch errors in debug 2016-12-13 02:44:33 +00:00
dteske
a35c1dd28a Calculate proper size of menu list dialog 2016-12-13 02:42:10 +00:00
dteske
8e2e3ae3dd There's an API function for catching errors and displaying them or
logging them to debug output
2016-12-13 02:40:54 +00:00
dteske
397585b6bb There's an API function for displaying pauses 2016-12-13 02:30:24 +00:00
dteske
52245df7f6 There's an API function for displaying yes/no dialogs 2016-12-13 02:29:20 +00:00
dteske
b2bffd29c0 There's an API function for displaying errors 2016-12-13 02:27:38 +00:00
dteske
ace145d56c Comment 2016-12-13 02:25:23 +00:00
dteske
b37902302b Whitespace alignment 2016-12-13 02:23:48 +00:00
dteske
04ee6d2bc0 Relying on dialog auto-sizing (width/height/rows = 0) is a mistake
Use the provided API for calculating the appropriate size of menus
2016-12-13 02:22:21 +00:00
dteske
ae195a31a8 Remove unnecessary quotes 2016-12-13 02:16:00 +00:00
dteske
cbd36b071a Add missing quotes 2016-12-13 02:15:36 +00:00
dteske
d811f94e7f In awk, if you're going to append a newline to your printf
AND you're going to print only the argument, just use print
2016-12-13 02:14:40 +00:00
dteske
8179d41c00 This statement has too many backslashes 2016-12-13 02:13:20 +00:00
dteske
970dd61e8b Neither printf (and as is commonly known) nor print need parens in awk 2016-12-13 02:12:00 +00:00
dteske
caa88d1b07 Whitespace and alignment 2016-12-13 02:11:09 +00:00
dteske
071e4a0235 You don't need parentheses for awk's printf 2016-12-13 02:07:12 +00:00
dteske
4442ea7869 Continued resolution of conveluted statement
We shouldn't be coding things like "x || (x && x) || x || x || x ..."
2016-12-13 02:04:50 +00:00
dteske
3af2400435 These two error messages have always been backwards since inception 2016-12-13 02:02:14 +00:00
dteske
e9c0e67f16 Why use $? when you can use the command itself 2016-12-13 01:59:35 +00:00
dteske
466c31033e If the first ping succeeded, why on Earth should we ping it again? 2016-12-13 01:56:28 +00:00
dteske
89fc8acc2d Start deconstructing a conveluted hunk of code 2016-12-13 01:54:44 +00:00
dteske
8216db0e54 Remove completely unnecesary parentheses 2016-12-13 01:52:10 +00:00
dteske
69fc9cb69a Why repeat yourself when you can send stderr to the same place as stdout? 2016-12-13 01:50:22 +00:00
dteske
7940685748 Properly quote variable 2016-12-13 01:44:18 +00:00
dteske
d302140ee4 Use more generic f_yesno() from provided API 2016-12-13 01:42:13 +00:00
dteske
c52826dc16 The output of dialog needs to be sanitized
for portability/compatibility requirements
2016-12-13 01:41:06 +00:00
dteske
c610b42d0f Whitespace alignment 2016-12-13 01:39:09 +00:00
dteske
63213c08fe Sort the domains 2016-12-13 01:36:46 +00:00
dteske
49fdf75f47 The --no-items and --stdout options are non-standard and should be avoided
From the dialog(1) manual:
using [--stdout] in portable scripts is not recommended
2016-12-13 01:35:26 +00:00
dteske
b80642d373 More efficiently make use of the exit status 2016-12-13 00:27:56 +00:00
dteske
8a66e75e41 Stop repeating strings (centralize prompt string)
NB: Changes to strings now only affect a single line
2016-12-13 00:22:01 +00:00
dteske
eb83f20492 Add missing backslash (no real effect; it's pedantic and correct for
the interpolation level)
2016-12-13 00:18:51 +00:00
dteske
7d793e70e3 Use the oft-neglected awk syntax "startcondition, stopcondition { ... }" to
process the range of country labels which appear as columnar list from the
"ifconfig DEV list countries" command. Not only improving maintainability,
but also properly encapsulating arguments in single-quotes instead of
trying to escape whitespace. It is also completely unnecessary to collapse
newlines into whitespace (shell will do this for you automatically upon
expansion of the contents where necessary).

NB: This also changes the sorting algorithm to sort on the country code,
not the country name. The type-ahead feature of dialog is destroyed if the
tags are not sorted properly.
2016-12-13 00:02:59 +00:00
dteske
8544084830 Quote WLAN_IFACE (pedantic) 2016-12-12 22:57:07 +00:00
jilles
598ba7215c Add tests for reaper receiving SIGCHLD (r309886).
PR:		213928
MFC after:	2 weeks
2016-12-12 22:51:29 +00:00
dteske
6e5a839b01 In awk, casting a variable as a boolean condition is the same as testing if
the length of the variable contents is greater than zero

This allows us to also move the secondary condition into the action clause
2016-12-12 21:29:48 +00:00