]> xenbits.xensource.com Git - people/royger/freebsd.git/log
people/royger/freebsd.git
8 years agohyperv: Allow userland to ro-mmap reference TSC page github/projects/bsnmp-improved-ipv6-support
sephe [Thu, 15 Dec 2016 03:32:24 +0000 (03:32 +0000)]
hyperv: Allow userland to ro-mmap reference TSC page

This paves way to implement VDSO for the enlightened time counter.

Reviewed by: kib
MFC after: 1 week
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D8768

8 years agocxgbe(4): Deal with compressed error vectors.
np [Thu, 15 Dec 2016 02:05:29 +0000 (02:05 +0000)]
cxgbe(4): Deal with compressed error vectors.

MFC after: 3 days
Sponsored by: Chelsio Communications

8 years agoProvide introductory description of the default pager.
kib [Wed, 14 Dec 2016 23:36:32 +0000 (23:36 +0000)]
Provide introductory description of the default pager.

Reviewed by: alc
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

8 years agoRemove locking around accounting initialization of the default object.
kib [Wed, 14 Dec 2016 23:34:25 +0000 (23:34 +0000)]
Remove locking around accounting initialization of the default object.

The object is not yet fully constructed and must not be available to
other threads.  This makes default_pager_alloc() almost identical to
swap_pager_alloc_init().

Reviewed by: alc
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

8 years agoreaper: Make REAPER_KILL_SUBTREE actually work.
jilles [Wed, 14 Dec 2016 22:49:20 +0000 (22:49 +0000)]
reaper: Make REAPER_KILL_SUBTREE actually work.

MFC after: 2 weeks

8 years agoUse nmount(2) rather than the obsolete mount(2).
brooks [Wed, 14 Dec 2016 21:30:44 +0000 (21:30 +0000)]
Use nmount(2) rather than the obsolete mount(2).

Reviewed by: cem
MFC after: 1 week
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D8513

8 years agoAdd a free_iovec() function to reset iovec's.
brooks [Wed, 14 Dec 2016 21:26:43 +0000 (21:26 +0000)]
Add a free_iovec() function to reset iovec's.

The primary purpose is to call nmount() in a loop with new iovec's so
free_iovec takes arguments by reference and resets their values.

Reviewed by: cem
MFC after: 1 week
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D8513

8 years agoed(1): drop redundant parenthesis.
pfg [Wed, 14 Dec 2016 21:14:43 +0000 (21:14 +0000)]
ed(1): drop redundant parenthesis.

These were Left-over from the cleanup in r309936.

8 years agoMount filesystems without executable permissions since they should never
brooks [Wed, 14 Dec 2016 21:13:10 +0000 (21:13 +0000)]
Mount filesystems without executable permissions since they should never
be used.

Reviewed by: cem
MFC after: 1 week
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D8513

8 years agoifconfig: do not truncate SSID in verbose mode.
avos [Wed, 14 Dec 2016 21:12:43 +0000 (21:12 +0000)]
ifconfig: do not truncate SSID in verbose mode.

Fix 32-character SSID abbreviation for 'ifconfig -v wlan0 scan' command.

PR: 215301
Submitted by: <ms-freebsd-bugzilla@stoffnet.at>
MFC after: 4 days

8 years agoPut the undocumented df feature of mounting filesystems from device nodes
brooks [Wed, 14 Dec 2016 21:11:42 +0000 (21:11 +0000)]
Put the undocumented df feature of mounting filesystems from device nodes
under an ifdef.  Leave enabled.

Reviewed by: cem
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D8513

8 years agoAdd adamw, feld and rene to the portmgr organization
rene [Wed, 14 Dec 2016 20:53:46 +0000 (20:53 +0000)]
Add adamw, feld and rene to the portmgr organization

8 years agoIn xbd_connect(), use correct scanf conversion specifiers for the
dim [Wed, 14 Dec 2016 19:28:19 +0000 (19:28 +0000)]
In xbd_connect(), use correct scanf conversion specifiers for the
feature_barrier and feature_flush variables.  Otherwise, adjacent
variables on the stack, such as sector_size, may be overwritten, with
disastrous results.

Note that I did not see a good reason to revert the addition of zero
checks introduced in r310013.  Better safe than sorry.

PR: 215209
Tested by: royger
MFC after: 3 days

8 years agoSkip a ustack test that triggers an assertion on INVARIANTS kernels.
markj [Wed, 14 Dec 2016 19:01:43 +0000 (19:01 +0000)]
Skip a ustack test that triggers an assertion on INVARIANTS kernels.

Reported by: ngie
Sponsored by: Dell EMC Isilon
X-MFC-With: r309698

8 years agoDon't run the MCA record refill task during boot.
markj [Wed, 14 Dec 2016 19:00:08 +0000 (19:00 +0000)]
Don't run the MCA record refill task during boot.

The MCA taskqueue is not initialized until some time after CMCIs are
enabled on the BSP.

Reviewed by: cem, jhb
MFC after: 1 week
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D8783

8 years agoTidy up. Mostly, remove or replace stale comments. Most of the comments
alc [Wed, 14 Dec 2016 17:28:55 +0000 (17:28 +0000)]
Tidy up.  Mostly, remove or replace stale comments.  Most of the comments
in this file actually described the operation of the swap pager, not the
default pager.  Given that this is the wrong place to discuss the
implementation of the swap pager, it shouldn't come as a surprise that as
the swap pager evolved these comments became increasingly stale.  In
addition, apply some style fixes, like modernizing a few remaining old-
style function definitions.

Reviewed by: kib, markj
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D8781

8 years agoAdd new compatible string "allwinner,sun7i-a20-mmc".
manu [Wed, 14 Dec 2016 15:00:24 +0000 (15:00 +0000)]
Add new compatible string "allwinner,sun7i-a20-mmc".

New upstream DTS is using this now for A20 SoC.

MFC after: 3 days

8 years agoFix initialisation of mlx4_pci_table's .driver_data fields.
hselasky [Wed, 14 Dec 2016 14:13:44 +0000 (14:13 +0000)]
Fix initialisation of mlx4_pci_table's .driver_data fields.

MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D8791
Sponsored by: Mellanox Technologies
Submitted by: Dexuan Cui <decui@microsoft.com>

8 years agoRevert accidental change made in r310056.
ed [Wed, 14 Dec 2016 13:35:33 +0000 (13:35 +0000)]
Revert accidental change made in r310056.

Because I had to cherry-pick some of my changes in r310051, I
accidentally made a typo when manually applying the rest in r310056.

8 years agoLet all FEATURE()s use the same Prometheus metric.
ed [Wed, 14 Dec 2016 13:05:04 +0000 (13:05 +0000)]
Let all FEATURE()s use the same Prometheus metric.

Without this change, every individual FEATURE() declaration would have
an individual metric in Prometheus. Though this wouldn't be harmful, it
would look very cluttered.

By letting it use a single metric with the name of the feature attached
as a label, it also becomes easier to search, as you can apply regex
matching, etc.

Reviewed by: cem
Differential Revision: https://reviews.freebsd.org/D8775

8 years agoAdd a "device_index" label to all sysctls under dev.$driver.$index.
ed [Wed, 14 Dec 2016 13:03:01 +0000 (13:03 +0000)]
Add a "device_index" label to all sysctls under dev.$driver.$index.

This way it becomes possible to graph a property for all instances of a
single driver. For example, graphing the number of packets across all
USB controllers, the amount of dropped packets on all NICs, etc.

Reviewed by: cem
Differential Revision: https://reviews.freebsd.org/D8775

8 years agoAttach a "thermal_zone" label to the ACPI thermal zone sysctls.
ed [Wed, 14 Dec 2016 13:00:27 +0000 (13:00 +0000)]
Attach a "thermal_zone" label to the ACPI thermal zone sysctls.

In order to make Prometheus do graphing/alerting on thermal sensors in a
generic fashion, we should attach the name of the thermal zone device as
a label. That way there is only a single metric for the temperature of a
thermal zone, with its name attached as a label.

Reviewed by: cem
Differential Revision: https://reviews.freebsd.org/D8775

8 years agoAdd labels to sysctls related to clocks.
ed [Wed, 14 Dec 2016 12:56:58 +0000 (12:56 +0000)]
Add labels to sysctls related to clocks.

Sysctls like kern.eventtimer.et.*.quality currently embed the name of
the clock device. This is problematic for the Prometheus metrics
exporter for two reasons:

- Some of those clocks have dashes in their names, which Prometheus
  doesn't allow to be used in metric names.
- It doesn't allow for extracting the same property of all clocks on the
  system from within a single query.

Attach these nodes to have a label, so that the Prometheus metrics
exporter gives these metric a uniform name with the name of the clock
attached as a label.

Reviewed by: cem
Differential Revision: https://reviews.freebsd.org/D8775

8 years agoAdd label annotations to CAM sysctls.
ed [Wed, 14 Dec 2016 12:53:33 +0000 (12:53 +0000)]
Add label annotations to CAM sysctls.

Under kern.cam we have certain sysctls that are per-device, such as the
ones under kern.cam.ada.[0-9]+.*. Add a "device_index" label annotation
to such sysctls, so that the Prometheus metrics exporter will give all
of those metrics the same name. The device number will be added to the
metric name as the "device_index" label.

Reviewed by: cem
Differential Revision: https://reviews.freebsd.org/D8775

8 years agoAdd support for attaching aggregation labels to sysctl objects.
ed [Wed, 14 Dec 2016 12:47:34 +0000 (12:47 +0000)]
Add support for attaching aggregation labels to sysctl objects.

I'm currently working on writing a metrics exporter for the Prometheus
monitoring system to provide access to sysctl metrics. Prometheus and
sysctl have some structural differences:

- sysctl is a tree of string component names.
- Prometheus uses a flat namespace for its metrics, but allows you to
  attach labels with values to them, so that you can do aggregation.

An initial version of my exporter simply translated

    hw.acpi.thermal.tz1.temperature

to

    sysctl_hw_acpi_thermal_tz1_temperature_celcius

while we should ideally have

    sysctl_hw_acpi_thermal_temperature_celcius{thermal_zone="tz1"}

allowing you to graph all thermal zones on a system in one go.

The change presented in this commit adds support for accomplishing this,
by providing the ability to attach labels to nodes. In the example I
gave above, the label "thermal_zone" would be attached to "tz1". As this
is a feature that will only be used very rarely, I decided to not change
the KPI too aggressively.

Discussed on: hackers@
Reviewed by: cem
Differential Revision: https://reviews.freebsd.org/D8775

8 years agoProvide non-final but valid PCB pointer for thread0 for duration of
kib [Wed, 14 Dec 2016 11:40:31 +0000 (11:40 +0000)]
Provide non-final but valid PCB pointer for thread0 for duration of
hammer_time().  This makes assembler exception handlers not fault
itself when setting PCB flags, and allow normal kernel trap handler to
get control.  The pointer is reset after FPU parameters are obtained.

Set thread0.td_critnest to 1 for duration of hammer_time() as well.
In particular, page faults at that early stage panic immediately
instead of trying to call not yet operational VM to resolve it.

As result, faults during second half of the hammer_time() execution
have a chance to be reported instead of silent machine reboot or hang.

Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks

8 years agocxgbe(4): Fix the tid range shown for T6 cards in misc.tids.
np [Wed, 14 Dec 2016 07:36:36 +0000 (07:36 +0000)]
cxgbe(4): Fix the tid range shown for T6 cards in misc.tids.

MFC after: 3 days

8 years agohyperv: Implement "enlightened" time counter, which is rdtsc based.
sephe [Wed, 14 Dec 2016 03:20:57 +0000 (03:20 +0000)]
hyperv: Implement "enlightened" time counter, which is rdtsc based.

Reviewed by: kib
MFC after: 1 week
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D8763

8 years ago- Resize FreeBSD to the size of the OpenStack flavor (growfs).
gjb [Wed, 14 Dec 2016 03:01:15 +0000 (03:01 +0000)]
- Resize FreeBSD to the size of the OpenStack flavor (growfs).
- Speeds up the boot process by disabling sendmail.
- Allows an user to ssh as root with a public key.
- Make ssh(1) respond faster by disabling DNS lookups.
- Enable DHCP on the vtnet(4) interface.

Note: The CLOUDWARE list has not yet been changed to include the
OpenStack target by default yet.

Submitted by: Diego Casati
PR: 215258
MFC after: 1 week
Sponsored by: The FreeBSD Foundation

8 years agoAdd 'const' to fn_name's return type to remove a cast.
jhb [Wed, 14 Dec 2016 00:21:06 +0000 (00:21 +0000)]
Add 'const' to fn_name's return type to remove a cast.

8 years agoUse casts to force an unsigned comparison in db_search_symbol().
jhb [Wed, 14 Dec 2016 00:18:12 +0000 (00:18 +0000)]
Use casts to force an unsigned comparison in db_search_symbol().

On all of our platforms, db_expr_t is a signed integer while
db_addr_t is an unsigned integer value.  db_search_symbol used variables
of type db_expr_t to hold the current offset of the requested address from
the "best" symbol found so far.  This value was initialized to '~0'.
When a new symbol is found from a symbol table, the associated diff for the
new symbol is compared against the existing value as 'if (newdiff < diff)'
to determine if the new symbol had a smaller diff and was thus a closer
match.

On 64-bit MIPS, the '~0' was treated as a negative value (-1).  A lookup
that found a perfect match of an address against a symbol returned a diff
of 0.  However, in signed comparisons, 0 is not less than -1.  As a result,
DDB on 64-bit MIPS never resolved any addresses to symbols.  Workaround
this by using casts to force an unsigned comparison.

Probably the diff returned from db_search_symbol() and X_db_search_symbol()
should be changed to a db_addr_t instead of a db_expr_t as it is an
unsigned value (and is an offset of an address, so should fit in the same
size as an address).

Sponsored by: DARPA / AFRL

8 years agoRevert r309918 -- modern POSIX has deprecated -<#>/+<#> syntax
dteske [Tue, 13 Dec 2016 22:31:49 +0000 (22:31 +0000)]
Revert r309918 -- modern POSIX has deprecated -<#>/+<#> syntax

Special thanks to: jilles

8 years agoFix stack traces in DDB for the debugger thread.
jhb [Tue, 13 Dec 2016 22:30:48 +0000 (22:30 +0000)]
Fix stack traces in DDB for the debugger thread.

When the kernel debugger is entered, makectx() is called to store
appropriate state from the trapframe for the debugger into a global
kdb_pcb used as the thread context of the thread entering the
debugger.  Stack unwinders for DDB called via db_trace_thread() are
supposed to then use this saved context so that the stack trace for
the current thread starts at the location of the event that triggered
debugger entry.

MIPS was instead starting the stack trace of the current thread from
the context of db_trace_thread itself and unwinding back out through
the debugger to the original frame.  Fix a couple of things to bring
MIPS inline with other platforms:
- Fix makectx() to store the PC, SP, and RA in the right portion of
  the PCB used by db_trace_thread().
- Fix db_trace_thread() to always use kdb_thr_ctx() (and thus kdb_pcb
  for the debugger thread).
- Move the logic for tracing curthread from within the current
  function into db_trace_self() to match other architectures.

Sponsored by: DARPA / AFRL

8 years agoMFV: r309561
jkim [Tue, 13 Dec 2016 22:16:02 +0000 (22:16 +0000)]
MFV: r309561

Merge byacc 20161202.

8 years agoRemove an extra "break" which could incorrectly terminate an
hrs [Tue, 13 Dec 2016 20:55:46 +0000 (20:55 +0000)]
Remove an extra "break" which could incorrectly terminate an
STAILQ_FOREACH() loop when an AF_INET6 rule matched.

Spotted by: cem

8 years agocxgbe(4): Retire t4_bus_space_read_8 and t4_bus_space_write_8.
np [Tue, 13 Dec 2016 20:35:57 +0000 (20:35 +0000)]
cxgbe(4): Retire t4_bus_space_read_8 and t4_bus_space_write_8.

MFC after: 3 days
Sponsored by: Chelsio Communications

8 years agoZero return value when counter_rate() switches over to next second and
glebius [Tue, 13 Dec 2016 20:11:45 +0000 (20:11 +0000)]
Zero return value when counter_rate() switches over to next second and
value is positive, but below the limit.

8 years agolinuxkpi: Fix not-found case of linux_pci_find_irq_dev
cem [Tue, 13 Dec 2016 19:58:21 +0000 (19:58 +0000)]
linuxkpi: Fix not-found case of linux_pci_find_irq_dev

Linux list_for_each_entry() does not neccessarily end with the iterator
NULL (it may be an offset from NULL if the list member is not the first
element of the member struct).

Reported by: Coverity
CID: 1366940
Reviewed by: hselasky@
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D8780

8 years agoUse register_t instead of uintptr_t for register values in backtraces.
jhb [Tue, 13 Dec 2016 19:36:05 +0000 (19:36 +0000)]
Use register_t instead of uintptr_t for register values in backtraces.

This fixes backtraces from DDB in n32 kernels as uintptr_t is only a
uint32_t.  In particular, the upper 32-bits of each register value were
treated as the register's value breaking both the output of register
values, but also the values of 'ra' and 'sp' required to walk up to the
previous frame.

Sponsored by: DARPA / AFRL

8 years agoFix remove_userlocal_code() for n32.
jhb [Tue, 13 Dec 2016 19:27:31 +0000 (19:27 +0000)]
Fix remove_userlocal_code() for n32.

n32 kernels use a 64-bit store to the TLS register rather than a 32-bit
store.

Sponsored by: DARPA / AFRL

8 years agoUse db_lookup_proc() in the DDB 'show procvm' command.
jhb [Tue, 13 Dec 2016 19:22:43 +0000 (19:22 +0000)]
Use db_lookup_proc() in the DDB 'show procvm' command.

This allows processes to be identified by PID as well as a pointer address.

MFC after: 2 weeks
Sponsored by: DARPA / AFRL

8 years agoFix bug in r309712, do not leak gem object pin count in case of error
kib [Tue, 13 Dec 2016 19:04:05 +0000 (19:04 +0000)]
Fix bug in r309712, do not leak gem object pin count in case of error
or retry.

Reported and tested by: Michael Butler <imb@protected-networks.net>
Sponsored by: The FreeBSD Foundation
MFC after: 16 days

8 years agoLanguage and mdoc cleanup.
brueffer [Tue, 13 Dec 2016 18:15:11 +0000 (18:15 +0000)]
Language and mdoc cleanup.

8 years agoTake write lock for rtld_bind before modifying obj_list in dl_iterate_phdr().
bdrewery [Tue, 13 Dec 2016 18:05:14 +0000 (18:05 +0000)]
Take write lock for rtld_bind before modifying obj_list in dl_iterate_phdr().

This avoids a race with readers such as dladdr(3)/dlinfo(3)/dlsym(3) and
the atexit(3) handler.  This race was introduced in r294373.

Reviewed by: markj, kib, kan
MFC after: 2 weeks
Sponsored by: Dell EMC Isilon

8 years agoadd myself as a ports committer and update mentor/mentee relationship
lifanov [Tue, 13 Dec 2016 16:53:58 +0000 (16:53 +0000)]
add myself as a ports committer and update mentor/mentee relationship

Reviewed by: matthew
Approved by: matthew (mentor)
Differential Revision: https://reviews.freebsd.org/D8774

8 years agoReduce diff from Illumos by better variables mapping.
mav [Tue, 13 Dec 2016 16:20:10 +0000 (16:20 +0000)]
Reduce diff from Illumos by better variables mapping.

8 years agoUse the platform_*_t typedefs to help check the platform function types are
andrew [Tue, 13 Dec 2016 13:46:09 +0000 (13:46 +0000)]
Use the platform_*_t typedefs to help check the platform function types are
correct.

Sponsored by: ABT Systems Ltd

8 years agoAdd the missing void to function signatures in much of the arm code.
andrew [Tue, 13 Dec 2016 13:43:22 +0000 (13:43 +0000)]
Add the missing void to function signatures in much of the arm code.

Sponsored by: ABT Systems Ltd

8 years agoUse platform_*_t to check the platform function signatures are correct in
andrew [Tue, 13 Dec 2016 13:07:17 +0000 (13:07 +0000)]
Use platform_*_t to check the platform function signatures are correct in
the Rockchip platform code and correct the one place they differ.

Sponsored by: ABT Systems Ltd

8 years agoSwitch Rockchip RK3188 SoC to use the platform code.
ganbold [Tue, 13 Dec 2016 11:43:46 +0000 (11:43 +0000)]
Switch Rockchip RK3188 SoC to use the platform code.

Reviewed by: andrew, manu
Differential Revision: https://reviews.freebsd.org/D8769

8 years ago[gpiospi] add clock delay to avoid smashing of bits
mizhka [Tue, 13 Dec 2016 10:03:29 +0000 (10:03 +0000)]
[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

8 years ago[spi] reformat message and ar5315_spi minor fix
mizhka [Tue, 13 Dec 2016 09:53:43 +0000 (09:53 +0000)]
[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

8 years agoRemove the only user of sysctl_add_oid().
ed [Tue, 13 Dec 2016 07:58:30 +0000 (07:58 +0000)]
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.

8 years agoCheck that blkfront devices have a non-zero number of sectors and a
cperciva [Tue, 13 Dec 2016 06:54:13 +0000 (06:54 +0000)]
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.

8 years ago[iMX6] Add compatibility string for GPT timer on i.MX6 Dual
gonzo [Tue, 13 Dec 2016 05:09:49 +0000 (05:09 +0000)]
[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

8 years agoRemove a too strict test and instead, just filter the passed flags with the
loos [Tue, 13 Dec 2016 03:36:41 +0000 (03:36 +0000)]
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

8 years ago[iMX6] Fix platform compatibility string for i.MX6 Dual
gonzo [Tue, 13 Dec 2016 03:26:12 +0000 (03:26 +0000)]
[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

8 years agoIt's completely pointless to replace newlines with space
dteske [Tue, 13 Dec 2016 02:56:52 +0000 (02:56 +0000)]
It's completely pointless to replace newlines with space
(this is done automatically for you upon shell expansion)

8 years agoThe flags of a WLAN need to be quoted (they contain things like brackets)
dteske [Tue, 13 Dec 2016 02:54:44 +0000 (02:54 +0000)]
The flags of a WLAN need to be quoted (they contain things like brackets)

8 years agoSimplify single-line if statements
dteske [Tue, 13 Dec 2016 02:48:14 +0000 (02:48 +0000)]
Simplify single-line if statements

8 years agoSimplify loop by moving predicate to clause
dteske [Tue, 13 Dec 2016 02:47:39 +0000 (02:47 +0000)]
Simplify loop by moving predicate to clause

8 years agoWordsmithing
dteske [Tue, 13 Dec 2016 02:46:36 +0000 (02:46 +0000)]
Wordsmithing

8 years agoWhy test $? when you can test the command
dteske [Tue, 13 Dec 2016 02:45:52 +0000 (02:45 +0000)]
Why test $? when you can test the command

8 years agoRestore previous comment
dteske [Tue, 13 Dec 2016 02:45:07 +0000 (02:45 +0000)]
Restore previous comment

8 years agoBoth simplify bringup of interface after changes and catch errors in debug
dteske [Tue, 13 Dec 2016 02:44:33 +0000 (02:44 +0000)]
Both simplify bringup of interface after changes and catch errors in debug

8 years agoCalculate proper size of menu list dialog
dteske [Tue, 13 Dec 2016 02:42:10 +0000 (02:42 +0000)]
Calculate proper size of menu list dialog

8 years agoThere's an API function for catching errors and displaying them or
dteske [Tue, 13 Dec 2016 02:40:54 +0000 (02:40 +0000)]
There's an API function for catching errors and displaying them or
logging them to debug output

8 years agoThere's an API function for displaying pauses
dteske [Tue, 13 Dec 2016 02:30:24 +0000 (02:30 +0000)]
There's an API function for displaying pauses

8 years agoThere's an API function for displaying yes/no dialogs
dteske [Tue, 13 Dec 2016 02:29:20 +0000 (02:29 +0000)]
There's an API function for displaying yes/no dialogs

8 years agoThere's an API function for displaying errors
dteske [Tue, 13 Dec 2016 02:27:38 +0000 (02:27 +0000)]
There's an API function for displaying errors

8 years agoComment
dteske [Tue, 13 Dec 2016 02:25:23 +0000 (02:25 +0000)]
Comment

8 years agoWhitespace alignment
dteske [Tue, 13 Dec 2016 02:23:48 +0000 (02:23 +0000)]
Whitespace alignment

8 years agoRelying on dialog auto-sizing (width/height/rows = 0) is a mistake
dteske [Tue, 13 Dec 2016 02:22:21 +0000 (02:22 +0000)]
Relying on dialog auto-sizing (width/height/rows = 0) is a mistake
Use the provided API for calculating the appropriate size of menus

8 years agoRemove unnecessary quotes
dteske [Tue, 13 Dec 2016 02:16:00 +0000 (02:16 +0000)]
Remove unnecessary quotes

8 years agoAdd missing quotes
dteske [Tue, 13 Dec 2016 02:15:36 +0000 (02:15 +0000)]
Add missing quotes

8 years agoIn awk, if you're going to append a newline to your printf
dteske [Tue, 13 Dec 2016 02:14:40 +0000 (02:14 +0000)]
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

8 years agoThis statement has too many backslashes
dteske [Tue, 13 Dec 2016 02:13:20 +0000 (02:13 +0000)]
This statement has too many backslashes

8 years agoNeither printf (and as is commonly known) nor print need parens in awk
dteske [Tue, 13 Dec 2016 02:12:00 +0000 (02:12 +0000)]
Neither printf (and as is commonly known) nor print need parens in awk

8 years agoWhitespace and alignment
dteske [Tue, 13 Dec 2016 02:11:09 +0000 (02:11 +0000)]
Whitespace and alignment

8 years agoYou don't need parentheses for awk's printf
dteske [Tue, 13 Dec 2016 02:07:12 +0000 (02:07 +0000)]
You don't need parentheses for awk's printf

8 years agoContinued resolution of conveluted statement
dteske [Tue, 13 Dec 2016 02:04:50 +0000 (02:04 +0000)]
Continued resolution of conveluted statement
We shouldn't be coding things like "x || (x && x) || x || x || x ..."

8 years agoThese two error messages have always been backwards since inception
dteske [Tue, 13 Dec 2016 02:02:14 +0000 (02:02 +0000)]
These two error messages have always been backwards since inception

8 years agoWhy use $? when you can use the command itself
dteske [Tue, 13 Dec 2016 01:59:35 +0000 (01:59 +0000)]
Why use $? when you can use the command itself

8 years agoIf the first ping succeeded, why on Earth should we ping it again?
dteske [Tue, 13 Dec 2016 01:56:28 +0000 (01:56 +0000)]
If the first ping succeeded, why on Earth should we ping it again?

8 years agoStart deconstructing a conveluted hunk of code
dteske [Tue, 13 Dec 2016 01:54:44 +0000 (01:54 +0000)]
Start deconstructing a conveluted hunk of code

8 years agoRemove completely unnecesary parentheses
dteske [Tue, 13 Dec 2016 01:52:10 +0000 (01:52 +0000)]
Remove completely unnecesary parentheses

8 years agoWhy repeat yourself when you can send stderr to the same place as stdout?
dteske [Tue, 13 Dec 2016 01:50:22 +0000 (01:50 +0000)]
Why repeat yourself when you can send stderr to the same place as stdout?

8 years agoProperly quote variable
dteske [Tue, 13 Dec 2016 01:44:18 +0000 (01:44 +0000)]
Properly quote variable

8 years agoUse more generic f_yesno() from provided API
dteske [Tue, 13 Dec 2016 01:42:13 +0000 (01:42 +0000)]
Use more generic f_yesno() from provided API

8 years agoThe output of dialog needs to be sanitized
dteske [Tue, 13 Dec 2016 01:41:06 +0000 (01:41 +0000)]
The output of dialog needs to be sanitized
for portability/compatibility requirements

8 years agoWhitespace alignment
dteske [Tue, 13 Dec 2016 01:39:09 +0000 (01:39 +0000)]
Whitespace alignment

8 years agoSort the domains
dteske [Tue, 13 Dec 2016 01:36:46 +0000 (01:36 +0000)]
Sort the domains

8 years agoThe --no-items and --stdout options are non-standard and should be avoided
dteske [Tue, 13 Dec 2016 01:35:26 +0000 (01:35 +0000)]
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

8 years agoMore efficiently make use of the exit status
dteske [Tue, 13 Dec 2016 00:27:56 +0000 (00:27 +0000)]
More efficiently make use of the exit status

8 years agoStop repeating strings (centralize prompt string)
dteske [Tue, 13 Dec 2016 00:22:01 +0000 (00:22 +0000)]
Stop repeating strings (centralize prompt string)
NB: Changes to strings now only affect a single line

8 years agoAdd missing backslash (no real effect; it's pedantic and correct for
dteske [Tue, 13 Dec 2016 00:18:51 +0000 (00:18 +0000)]
Add missing backslash (no real effect; it's pedantic and correct for
the interpolation level)

8 years agoUse the oft-neglected awk syntax "startcondition, stopcondition { ... }" to
dteske [Tue, 13 Dec 2016 00:02:59 +0000 (00:02 +0000)]
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.

8 years agoQuote WLAN_IFACE (pedantic)
dteske [Mon, 12 Dec 2016 22:57:07 +0000 (22:57 +0000)]
Quote WLAN_IFACE (pedantic)

8 years agoAdd tests for reaper receiving SIGCHLD (r309886).
jilles [Mon, 12 Dec 2016 22:51:29 +0000 (22:51 +0000)]
Add tests for reaper receiving SIGCHLD (r309886).

PR: 213928
MFC after: 2 weeks

8 years agoIn awk, casting a variable as a boolean condition is the same as testing if
dteske [Mon, 12 Dec 2016 21:29:48 +0000 (21:29 +0000)]
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