Re: better error descriptions for locking non-files

2019-06-25 Thread Todd C . Miller
On Tue, 25 Jun 2019 23:57:24 +0200, Sebastian Benoit wrote: > Well, if you do that, i think some callers need a look, for example That change was specific to F_SETLK so the callers you reference are not affected. However, I did miss F_GETLK, which needs the same treatment. - todd Index: sys/

Re: better error descriptions for locking non-files

2019-06-25 Thread Sebastian Benoit
Todd C. Miller(mill...@openbsd.org) on 2019.06.25 09:27:19 -0600: > On Tue, 25 Jun 2019 09:18:28 -0600, "Todd C. Miller" wrote: > > > The ERRORS section could be clearer as to what error you get when > > you try to lock a socket/fifo. > > Actually, for fcntl(2), we should be returning EINVAL, not

Re: iwm: use timeout_add_msec(9)

2019-06-25 Thread Stefan Sperling
On Tue, Jun 25, 2019 at 09:24:21PM +0200, Klemens Nanni wrote: > Here's the first stab at lifting those timeout_add(..., 1) calls that > ought to fire something as soon as possible. > > iwm(4) does so to kick of LED blinking as soon as scanning starts: > > int > iwm_scan(struct iwm_so

iwm: use timeout_add_msec(9)

2019-06-25 Thread Klemens Nanni
Here's the first stab at lifting those timeout_add(..., 1) calls that ought to fire something as soon as possible. iwm(4) does so to kick of LED blinking as soon as scanning starts: int iwm_scan(struct iwm_softc *sc) { ... ic->ic_state = IEE

mg(1) copy file in dired mode

2019-06-25 Thread Mark Lumsden
In dired mode, if you try to copy a file without giving the new path a file name, similar to: cp /xdir/ydir/filname /xdir/ mg fails silently and doesn't copy the file into 'xdir' by using the existing filename as the copied filename. This diff uses the existing filename as the new filename if n

Re: better error descriptions for locking non-files

2019-06-25 Thread Todd C . Miller
On Tue, 25 Jun 2019 09:18:28 -0600, Todd C. Miller wrote: > The ERRORS section could be clearer as to what error you get when > you try to lock a socket/fifo. There is no need to change fcntl.2 or lockf.2, they already document the behavior under EINVAL. The only outlier now is flock.2 so use th

Re: better error descriptions for locking non-files

2019-06-25 Thread Todd C . Miller
On Tue, 25 Jun 2019 09:18:28 -0600, "Todd C. Miller" wrote: > The ERRORS section could be clearer as to what error you get when > you try to lock a socket/fifo. Actually, for fcntl(2), we should be returning EINVAL, not EBADF when trying to lock a non-file. Let's fix that first. - todd Index:

better error descriptions for locking non-files

2019-06-25 Thread Todd C . Miller
The ERRORS section could be clearer as to what error you get when you try to lock a socket/fifo. - todd Index: lib/libc/gen/lockf.3 === RCS file: /cvs/src/lib/libc/gen/lockf.3,v retrieving revision 1.13 diff -u -p -u -r1.13 lockf.3

ahci: don't wait for CR to come on

2019-06-25 Thread Patrick Wildt
Hi, on some hardware I see a "failed to start command DMA on port N, disabling" during attach. Apparently AHCI spec. rev 1.3 only requires that a HBA clears AHCI_PREG_CMD_CR when AHCI_PREG_CMD_ST gets cleared by software/driver, but not the inverse. Actually neither the FreeBSD, Linux nor NetBSD

Re: X hangs again while on integrated

2019-06-25 Thread Gregory Edigarov
Please, could some generous person look into the issue? just tell me if you need any other information as well, or if you need to test some patches. I can even provide ssh access. On 23.04.19 11:43, Gregory Edigarov wrote: Hello misc@ it happens with no traces in logs. most of the time whi

bgpd, unify ref counting code

2019-06-25 Thread Claudio Jeker
In bgpd there are a few objects that use reference counts to keep track on how many things point to them. Those are struct pt_entry, rde_aspath, rde_communities, and nexthop. The way this reference counting is done and especially the cleanup is a bit different everywhere. This diff is making them m