mg: fgetln -> getline

2017-09-16 Thread Scott Cheloha
Hi, This will make mg(1) ever so slightly more portable: downstream will appreciate it. And fgetln(3) was recently deprecated. Misc. comments: The comments about NUL and "the last line problem" aren't per se applicable with getline(3) so I removed them. I will say that if ever a command does *

armv7 inlined bus_space, was Re: armv7 bs retry, for comments 1/5.

2017-09-16 Thread Artturi Alm
On Sun, Jul 09, 2017 at 11:37:44AM +0300, Artturi Alm wrote: > Hi, > > ok, the previous version of this was crap, i must admit having gone > through what i sent, since i got no comments for it. > i'll retry w/version i think should be simple enough, with almost > no cleanup done, so rather minimal

[patch] Remove superfluous seek_filesize() from less

2017-09-16 Thread Jesper Wallin
Hi all, I was reading through the code for less/filename.c and noticed that the calling for seek_filesize() in filesize() is superfluous? A wild guess is that it's remains from when BAD_LSEEK was removed? Jesper Wallin Index: usr.bin/less/filename.c ===

efiboot: Reuse GOP info struct

2017-09-16 Thread Klemens Nanni
gopi is only used for filling ei after info's last usage. info is more descriptive imho and reusing it gets rid of the extra variable. Feedback? diff --git a/sys/arch/amd64/stand/efiboot/efiboot.c b/sys/arch/amd64/stand/efiboot/efiboot.c index 42e79fbea6b..1ed2968bffa 100644 --- a/sys/arch/amd6

Re: efiboot: Implement machine gop command

2017-09-16 Thread Klemens Nanni
On Tue, Sep 05, 2017 at 12:47:15AM +, Klemens Nanni wrote: > I also have a working and tested diff for `machine fb [n]' analog to > `machine video [n]' that enables listing/and setting the GOP mode just > like FreeBSD does it with `gop list | get | set '. I'd also like to > get this in together

Re: efiboot: Restore GOP mode on SetMode() failure

2017-09-16 Thread Klemens Nanni
On Tue, Sep 05, 2017 at 12:47:15AM +, Klemens Nanni wrote: > This diff fixes missing video output when booting in UEFI mode on the > ThinkPad X121e (and possibly other boards with crappy implemenatations) > as reported earlier: > > https://marc.info/?l=openbsd-bugs&m=150407033628497&w=2

Re: syslogd close at EAGAIN

2017-09-16 Thread Jeremie Courreges-Anglas
On Sat, Sep 16 2017, Alexander Bluhm wrote: > Hi, > > syslogd tries to ignore EAGAIN for tty. Unfortunately it closes > the file descriptor before checking the errno. So f_file contains > a bad file descriptor that may be reused at the next open. > > I think f_file should not be closed if the er

Re: syslogd preopen console

2017-09-16 Thread Jeremie Courreges-Anglas
On Wed, Sep 13 2017, Alexander Bluhm wrote: > Hi, > > syslogd has special code for reporting errors before it has been > initialized. Then it tries to log to console. For every message > it reopens the console with file descriptor passing from the privsep > parent. Of course that does not work

Re: sysctl_int(), sysctl_struct() & MP work

2017-09-16 Thread Jeremie Courreges-Anglas
On Wed, Sep 13 2017, Martin Pieuchot wrote: > On 12/09/17(Tue) 15:53, Martin Pieuchot wrote: >> Diff below reduces the scope of the NET_LOCK(), this time in sysctl >> path. It is interesting for multiple reasons: >> >> - It reduces the contention on the NET_LOCK(), which should improve >> the

iwm refcount diff needs testing

2017-09-16 Thread Stefan Sperling
This diff aims to fix race conditions in iwm(4) when the interface is brought up/down. The goal is to prevent spurious errors in dmesg such as "iwm0: could not initiate scan", "iwm0: could not add MAC context", etc. Such errors appear because of race conditions where tasks race other tasks and/or i