Properly sync filesystems during {suspend,hibernate}/resume

2017-12-16 Thread Theo de Raadt
After recent reboot related improvements, I have some familiarity with tricking the vnode layer into a stable state. This should settle filesystems "clean" onto disk. If one does a suspend and then runs out of battery.. or experiences a crash or out of battery during a hibernate, the filesystems

Re: ypldap patch 5: fix aldap_close

2017-12-16 Thread Jonathan Matthew
On Sat, Dec 16, 2017 at 08:38:59PM +0300, Vadim Zhukov wrote: > 2017-12-06 19:12 GMT+03:00 Vadim Zhukov : > >> The aldap_close() return value is never checked, and I do not see > >> any good reason to do that. Also, in case close(2) fails, it'll miss > >> freeing other data. > > > > I'm blind. :-\

Re: mg: have Insert key toggle overwrite mode by default

2017-12-16 Thread Brian Callahan
On 12/16/17 17:06, Lari Rasku wrote: There's a fairly strong convention among text editors that the Insert key should toggle overwrite mode. This is admittedly far more common among GUI editors, but could mg adopt it as a default anyway? I'm inclined to agree with at least the general directi

mg: have Insert key toggle overwrite mode by default

2017-12-16 Thread Lari Rasku
There's a fairly strong convention among text editors that the Insert key should toggle overwrite mode. This is admittedly far more common among GUI editors, but could mg adopt it as a default anyway? diff --git usr.bin/mg/ttykbd.c usr.bin/mg/ttykbd.c index 67bc8e4bd..485291a77 100644 --- usr.bin

Re: less(1): `!' command

2017-12-16 Thread Theo de Raadt
> On Sat, 16 Dec 2017 19:39:27 +, Theo de Raadt wrote: > > > On Sat, 16 Dec 2017 18:13:16 +, Jiri B wrote: > > > > On Sat, Dec 16, 2017 at 04:55:44PM +, kshe wrote: > > > > > Hi, > > > > > > > > > > Would a patch to bring back the `!' command to less(1) be accepted? > > > > > The > >

Re: less(1): `!' command

2017-12-16 Thread kshe
On Sat, 16 Dec 2017 19:39:27 +, Theo de Raadt wrote: > > On Sat, 16 Dec 2017 18:13:16 +, Jiri B wrote: > > > On Sat, Dec 16, 2017 at 04:55:44PM +, kshe wrote: > > > > Hi, > > > > > > > > Would a patch to bring back the `!' command to less(1) be accepted? The > > > > commit message for

Re: less(1): `!' command

2017-12-16 Thread Theo de Raadt
> > Would a patch to bring back the `!' command to less(1) be accepted? The > > commit message for its removal explains that ^Z should be used instead, > > but that obviously does not work if less(1) is run from something else > > than an interactive shell, for example when reading manual pages fr

Re: less(1): `!' command

2017-12-16 Thread Theo de Raadt
> On Sat, 16 Dec 2017 18:13:16 +, Jiri B wrote: > > On Sat, Dec 16, 2017 at 04:55:44PM +, kshe wrote: > > > Hi, > > > > > > Would a patch to bring back the `!' command to less(1) be accepted? The > > > commit message for its removal explains that ^Z should be used instead, > > > but that o

Re: less(1): `!' command

2017-12-16 Thread kshe
On Sat, 16 Dec 2017 18:13:16 +, Jiri B wrote: > On Sat, Dec 16, 2017 at 04:55:44PM +, kshe wrote: > > Hi, > > > > Would a patch to bring back the `!' command to less(1) be accepted? The > > commit message for its removal explains that ^Z should be used instead, > > but that obviously does

Re: Add "-c command" option to script(1)

2017-12-16 Thread Job Snijders
On Sat, Dec 16, 2017 at 09:45:02AM +0100, Paul de Weerd wrote: > On Fri, Dec 15, 2017 at 12:24:45PM +0100, Paul de Weerd wrote: > | I've updated the diff to add this example as per jmc's suggestion. It > | now has: > | > | - add the `-c command` feature > | - updates usage > | - remov

ps.1: command keyword width

2017-12-16 Thread Tobias Ulmer
Hi Ingo, the "command" keyword is restricted in width even if termwidth is unlimited. See print.c, command(): ... if (ve->next != NULL || termwidth != UNLIMITED) { It would be nice if this could be documented. Maybe something like this: Index: ps.1 ===

Re: less(1): `!' command

2017-12-16 Thread Jiri B
On Sat, Dec 16, 2017 at 04:55:44PM +, kshe wrote: > Hi, > > Would a patch to bring back the `!' command to less(1) be accepted? The > commit message for its removal explains that ^Z should be used instead, > but that obviously does not work if less(1) is run from something else > than an inte

Re: ypldap patch 5: fix aldap_close

2017-12-16 Thread Vadim Zhukov
2017-12-06 19:12 GMT+03:00 Vadim Zhukov : >> The aldap_close() return value is never checked, and I do not see >> any good reason to do that. Also, in case close(2) fails, it'll miss >> freeing other data. > > I'm blind. :-\ > > The problem I was looking for was right here: the aldap_close() closes

dc(1): properly report errors

2017-12-16 Thread kshe
Hi, On error, the BN functions do not set errno, so errx(3) should be used instead of err(3). Moreover, one may call ERR_reason_error_string(3) to obtain a real error message from an error code. $ dc -e '2 2 64^^' dc: big number failure 3fff072: Undefined error: 0 $ ./dc

less(1): `!' command

2017-12-16 Thread kshe
Hi, Would a patch to bring back the `!' command to less(1) be accepted? The commit message for its removal explains that ^Z should be used instead, but that obviously does not work if less(1) is run from something else than an interactive shell, for example when reading manual pages from a vi(1)

Re: net/rtsock.c: size to free(9)

2017-12-16 Thread kshe
On Wed, 13 Dec 2017 08:56:53 +, Martin Pieuchot wrote: > Thanks. I'd suggest you for the next time to not to mix withespace or > style changes with a functional change. > > That said it'd be great if you could look at other free(9) calls missing > the size argument. The diff below deals with

vi(1): cscope leftover

2017-12-16 Thread kshe
Hi, Support for cscope connections was removed from vi(1) a few years ago. Index: ex/ex_cmd.c === RCS file: /cvs/src/usr.bin/vi/ex/ex_cmd.c,v retrieving revision 1.10 diff -u -p -r1.10 ex_cmd.c --- ex/ex_cmd.c 19 Nov 2015 07:53:31 -0

Enforce limits in regulator framework

2017-12-16 Thread Mark Kettenis
The regulators defined in the FDT typically have limits associated with them. The diff below enforces those limits. Enforcing the limits also happens when the regulator is registered. As a consequence regulators will be properly initialized even when the firmware (i.e. U-Boot) doesn't do that. o

ksh: make home & end keys work out-of-the-box in the console

2017-12-16 Thread Lari Rasku
Tested with vt220 and wsvt25. Hopefully we're close to exhausting all the different ways to encode these keys by now. diff --git bin/ksh/emacs.c bin/ksh/emacs.c index 07bfbd914..4291ce656 100644 --- bin/ksh/emacs.c +++ bin/ksh/emacs.c @@ -1536,6 +1536,8 @@ x_init_emacs(void) kb_add(x_mv_e

iwn(4) 4965 background scan workarounds

2017-12-16 Thread Stefan Sperling
FreeBSD committed two workarounds for firmware problems during background scans on iwn(4) 4965 devices in this revision: r222679 | bschmidt | 2011-06-04 13:43:09 +0200 (Sat, 04 Jun 2011) | 15 lines The firmware of 4965 serie

Re: sunxi RSB implementation

2017-12-16 Thread Artturi Alm
On Fri, Dec 15, 2017 at 10:58:22PM +0100, Mark Kettenis wrote: > Some of the Allwinner SoCs have a so-called Reduces Serial Bus that is > used to communicate with peripheral chips (mostly power management > ICs). The diff below adds a driver for the RSB conntroller, named > sxirsb(4), and a driver

Re: csh: NULL checks before free()

2017-12-16 Thread Anton Lindqvist
On Fri, Dec 15, 2017 at 05:03:40PM +0800, Michael W. Bombardieri wrote: > Hello, > > Previously in csh(1) the xfree() function was removed in favour > of regular free(). This patch removes a couple of NULL checks > before free(). Committed, thanks!

DragonFly BSD fingerprint

2017-12-16 Thread Sevan Janiyan
Hello, Attached patch adds the fingerprints for DragonFly to pf.os. From http://gitweb.dragonflybsd.org/dragonfly.git/blob_plain/947927fb129de774317974bc923ca1ade3d4cc60:/etc/pf.os Sevan Index: etc/pf.os === RCS file: /cvs/src/etc/pf.

Re: Add "-c command" option to script(1)

2017-12-16 Thread Paul de Weerd
On Fri, Dec 15, 2017 at 12:24:45PM +0100, Paul de Weerd wrote: | I've updated the diff to add this example as per jmc's suggestion. It | now has: | | - add the `-c command` feature | - updates usage | - removes /* ARGSUSED */ lint comments | - documents the -c feature |