Hiroki Sato
066f8db8f3
Add a missing "default:" case.
2016-12-22 05:57:45 +00:00
Hiroki Sato
dd87e05952
Initialize a structure by using a compound literal to avoid forgetting
...
to zero unspecified members.
2016-12-22 05:55:44 +00:00
Hiroki Sato
1ef75d66c8
Fix debug log in the case of AF_INET6.
2016-12-22 05:28:30 +00:00
Hiroki Sato
cb7c842281
- Simplify masklen->netmask conversion for AF_INET6.
...
- Use iov[N] by array index instead of using pointer v = &iov[0] to
make the compiler catch an out-of-range access of the array.
2016-12-22 05:23:38 +00:00
Alexander Motin
f383d6efd5
Add support for locally assigned RFC 4122 UUID LUN identifiers.
...
MFC after: 2 weeks
2016-12-21 09:05:30 +00:00
Ed Schouten
de44cbc21d
Add a Prometheus exporter for sysctl values.
...
Now that we have our sysctl tree annotated with aggregation labels,
let's go ahead and provide a very simple utility for exporting the
sysctl tree in Prometheus' format. It can either be used in conjunction
with the Prometheus node exporter or run through inetd(8).
The reason why I'm opting for having it in the base system is because it
has a pretty strong integration with some of sysctl's innards, such as
access to iterators, name lookups, metadata and type information. As I
am investigating whether we can add histograms as native types to sysctl
as well, this integration will only get stronger as we go along. That's
why it would be safer to oversee the development of this exporter
ourselves, as opposed to having it as an external project.
This exporter is remarkably compact, especially when compared to the
official Linux binary of the Prometheus node exporter (16 KB vs 12 MB).
I guess this could be an interesting aspect for monitoring embedded
FreeBSD-based systems.
Differential Revision: https://reviews.freebsd.org/D8792
2016-12-21 08:29:44 +00:00
Hiroki Sato
bbe85c3834
Simplify type casting of struct sockaddr_in.
2016-12-21 07:05:34 +00:00
Hiroki Sato
e46b059e46
- Initialize deadq_head statically.
...
- Fix indent.
- Add missing -S flag into usage().
- Use nitems() for an iov array instead of a macro.
2016-12-21 06:49:21 +00:00
Hiroki Sato
e5610451b2
- Add fklog into struct socklist. Files and local/remote sockets are
...
now processed in struct socklist in a consistent manner.
- Add helper functions to add a new entry of struct socklist, filed, or peer.
- Use the same routine for -l, -p, and -S.
- Close /dev/klog when read(2) failed.
2016-12-21 06:42:30 +00:00
Hiroki Sato
c532386291
- Use fnmatch(3) for domanname matching of -a options.
...
- Document the patten matching.
- Document -S flag in SYNOPSIS.
2016-12-21 05:45:59 +00:00
Conrad Meyer
d21656dcab
Add a 'force' option for non-interactive crontab removal
...
Add a '-f' option to force crontab '-r' to be non-interactive.
Submitted by: Sam Gwydir <sam at samgwydir.com>
Reviewed by: me, wblock (previous version)
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D8815
2016-12-20 17:12:17 +00:00
Hiroki Sato
97456b7413
Escape punctuation characters.
2016-12-20 08:49:13 +00:00
Hiroki Sato
2e0ef629ee
Add a NULL check.
2016-12-20 04:05:21 +00:00
Hiroki Sato
27efdcd869
Add a default socket bound to *:514 when no -b option is specified.
...
This was accidentally removed at r309933.
Spotted by: Michael Butler
2016-12-20 03:41:40 +00:00
Hiroki Sato
a5636d2a3e
Add a missing STAILQ_INSERT_TAIL() for allowaddr rule.
2016-12-19 17:10:30 +00:00
Enji Cooper
f16a380f79
Clean up parse_ip(..)
...
- Clean up trailing whitespace
- Fix variable alignment
MFC after: 1 week
2016-12-18 05:36:04 +00:00
Enji Cooper
ddedf93534
Fix some minor typos with begemotBridgeTpLearnedEntryDiscards and
...
begemotBridgeTpMaxAddresses
Bump LAST-UPDATED for the MIB, per the change
MFC after: 1 week
2016-12-18 00:44:43 +00:00
Colin Percival
5b3b877f89
Avoid division by zero in the rare case that portsnap needs to fetch
...
zero patches. (This avoids two "dc: divide by zero" warnings.)
MFC after: 3 days
2016-12-16 22:37:16 +00:00
Devin Teske
a7cc56803c
Revert r309918 -- modern POSIX has deprecated -<#>/+<#> syntax
...
Special thanks to: jilles
2016-12-13 22:31:49 +00:00
Hiroki Sato
442f3ba311
Remove an extra "break" which could incorrectly terminate an
...
STAILQ_FOREACH() loop when an AF_INET6 rule matched.
Spotted by: cem
2016-12-13 20:55:46 +00:00
Devin Teske
f3a8471e5f
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
Devin Teske
be094a3204
The flags of a WLAN need to be quoted (they contain things like brackets)
2016-12-13 02:54:44 +00:00
Devin Teske
19dbb0ba18
Simplify single-line if statements
2016-12-13 02:48:14 +00:00
Devin Teske
afcce2f52d
Simplify loop by moving predicate to clause
2016-12-13 02:47:39 +00:00
Devin Teske
b46ca7cefe
Wordsmithing
2016-12-13 02:46:36 +00:00
Devin Teske
a9d334210f
Why test $? when you can test the command
2016-12-13 02:45:52 +00:00
Devin Teske
6ef8ca674f
Restore previous comment
2016-12-13 02:45:07 +00:00
Devin Teske
94f5aec600
Both simplify bringup of interface after changes and catch errors in debug
2016-12-13 02:44:33 +00:00
Devin Teske
b9f60aba8b
Calculate proper size of menu list dialog
2016-12-13 02:42:10 +00:00
Devin Teske
9a46c67aed
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
Devin Teske
7e1166de96
There's an API function for displaying pauses
2016-12-13 02:30:24 +00:00
Devin Teske
d79a135578
There's an API function for displaying yes/no dialogs
2016-12-13 02:29:20 +00:00
Devin Teske
1d92999c48
There's an API function for displaying errors
2016-12-13 02:27:38 +00:00
Devin Teske
35af83c188
Comment
2016-12-13 02:25:23 +00:00
Devin Teske
b45548a80e
Whitespace alignment
2016-12-13 02:23:48 +00:00
Devin Teske
d5fddc4dcb
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
Devin Teske
7599c85424
Remove unnecessary quotes
2016-12-13 02:16:00 +00:00
Devin Teske
1095816ec3
Add missing quotes
2016-12-13 02:15:36 +00:00
Devin Teske
01a2404c35
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
Devin Teske
dba958af5d
This statement has too many backslashes
2016-12-13 02:13:20 +00:00
Devin Teske
be34885e2a
Neither printf (and as is commonly known) nor print need parens in awk
2016-12-13 02:12:00 +00:00
Devin Teske
5943bcd19f
Whitespace and alignment
2016-12-13 02:11:09 +00:00
Devin Teske
191441eed8
You don't need parentheses for awk's printf
2016-12-13 02:07:12 +00:00
Devin Teske
0724c87c95
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
Devin Teske
32c34b0361
These two error messages have always been backwards since inception
2016-12-13 02:02:14 +00:00
Devin Teske
7f513d3675
Why use $? when you can use the command itself
2016-12-13 01:59:35 +00:00
Devin Teske
6b77f63e5d
If the first ping succeeded, why on Earth should we ping it again?
2016-12-13 01:56:28 +00:00
Devin Teske
a1a6fec1c7
Start deconstructing a conveluted hunk of code
2016-12-13 01:54:44 +00:00
Devin Teske
19cae84e23
Remove completely unnecesary parentheses
2016-12-13 01:52:10 +00:00
Devin Teske
751993945a
Why repeat yourself when you can send stderr to the same place as stdout?
2016-12-13 01:50:22 +00:00