uniq(1): support arbitrarily long lines

2021-10-31 Thread Scott Cheloha
In uniq(1), if we use getline(3) instead of fgets(3) we can support arbitrarily long lines. The only potentially confusing thing here is the pointer exchange within the loop. The current code uses fixed buffers so we just do a pointer swap. Easy. The new code uses dynamic buffers so we need to

Fix netstart when wg requires DNS

2021-10-31 Thread Daniel Moch
I have a server that configures a wg(4) interface to include a peer where wgendpoint is specified via a DNS address. This had been working prior to upgrading to 7.0. The below patch gets it working again by starting dhcpleased before calling netstart in rc, and moving the wait for a default route i

tr(1): plug leak in genclass()

2021-10-31 Thread Scott Cheloha
In tr(1), if we have already generated a given character class we don't need to do it again. Further, we don't need to keep all the memory we allocate for the set of characters in the class. NCHARS + 1 is just an upper bound on the length. We should return whatever we don't need. This plugs a sm

Re: Fix vi(1) recovery - new method

2021-10-31 Thread Andrew Hewus Fresh
In my quick test, this works a lot better than what we have now. At least I get back more of the file I was working on. I also haven't been able to reproduce the annoying segfault and half the original file disappearing, although that was infrequent before so could just be luck. User experience

Re: tr(1): fix/cleanup backslash()

2021-10-31 Thread Todd C . Miller
On Sun, 31 Oct 2021 12:22:22 -0500, Scott Cheloha wrote: > Thoughts? OK? Looks good to me. OK millert@ - todd

net80211: use BSS load information when choosing access point

2021-10-31 Thread Stefan Sperling
Some access points advertise BSS load information in beacons in order to help clients make informed roaming decisions. BSS load information includes the number of associated stations, the channel utilization (this takes other networks on the same channel into account), and current admission capaci

tr(1): fix/cleanup backslash()

2021-10-31 Thread Scott Cheloha
Here is an attempt to clean up backslash() in tr(1). There are two real problems: - We should not treat '8' or '9' as being a part of an octal escape. They not octal digits. This yields some strange results: $ printf AB | tr AB '\78' | hexdump -c 000 @ @

[PATCH] usr.bin/rsync: Fix some spelling errors

2021-10-31 Thread Elyes HAOUAS
Signed-off-by: Elyes HAOUAS --- usr.bin/rsync/copy.c | 2 +- usr.bin/rsync/fargs.c| 2 +- usr.bin/rsync/flist.c| 2 +- usr.bin/rsync/io.c | 6 +++--- usr.bin/rsync/rmatch.c | 4 ++-- usr.bin/rsync/rsync.5| 2 +- usr.bin/rsync/socket.c | 2 +- usr.bin/rsync/uploader.c | 2

[PATCH] sys/arch/arm64: Get rid of trailing whitespaces

2021-10-31 Thread Elyes HAOUAS
Signed-off-by: Elyes HAOUAS --- diff --git sys/arch/arm64/arm64/cpu.c sys/arch/arm64/arm64/cpu.c index 8d1618419a7..83bb862a5a6 100644 --- sys/arch/arm64/arm64/cpu.c +++ sys/arch/arm64/arm64/cpu.c @@ -1186,7 +1186,7 @@ cpu_opp_get_cooling_level(void *cookie, uint32_t *cells) { struct cpu

[PATCH] bin: Get rid of trailing whitespaces

2021-10-31 Thread Elyes HAOUAS
Signed-off-by: Elyes HAOUAS --- diff --git bin/chmod/chmod.c bin/chmod/chmod.c index 449ac707ea1..d6f5bdc73a1 100644 --- bin/chmod/chmod.c +++ bin/chmod/chmod.c @@ -256,7 +256,7 @@ done: * on the level: follow it iff it's a command line arg. */ if