Re: vmd: simplify fatal/fatalx errno handling

2016-10-16 Thread Theo de Raadt
> On Sun, Oct 16, 2016 at 02:55:39PM -0700, Philip Guenther wrote: > > > > Instead of using errno as a hidden argument to vfatal(), make it an > > _actual_ argument named 'code', ala the errc/warnc family, and rename it > > to vfatalc() to match the pattern set. > > > > ok? > > > > Philip

Re: vmd: simplify fatal/fatalx errno handling

2016-10-16 Thread Mike Larkin
On Sun, Oct 16, 2016 at 02:55:39PM -0700, Philip Guenther wrote: > > Instead of using errno as a hidden argument to vfatal(), make it an > _actual_ argument named 'code', ala the errc/warnc family, and rename it > to vfatalc() to match the pattern set. > > ok? > > Philip Guenther > Isn't

Re: use x2apic if it is enabled by BIOS

2016-10-16 Thread YASUOKA Masahiko
Hi, Thanks your comments, On Fri, 14 Oct 2016 16:23:40 +0200 (CEST) s...@openbsd.org wrote: > On Fri, 14 Oct 2016, YASUOKA Masahiko wrote: >> I'm working on NEC Express5800/R110h-1 (dmesg is attached). On this >> machine, our kernel panics with following message. >> >> cpu0 at mainbus0panic:

minor diff for ldapd.conf.5

2016-10-16 Thread Rob Pierce
Fix a couple of grammar mistakes, remove a redundant word, and add a FILES reference for the /etc/ldap/certs directory. Rob Index: ldapd.conf.5 === RCS file: /cvs/src/usr.sbin/ldapd/ldapd.conf.5,v retrieving revision 1.19 diff -u -p

syslogd max unix sockets

2016-10-16 Thread Alexander Bluhm
Hi, I would like to remove the artificial maximum number of unix domain sockets in syslogd(8). Just malloc(3) them dynamically which also gives a more random address space layout. ok? bluhm Index: usr.sbin/syslogd/syslogd.8 ===

xenocara: make the ws driver reboust to EIO

2016-10-16 Thread Philip Guenther
On my Lenovo Yoga12, the touchscreen** will go into low power mode or some such if I leave the system alone to make dinner or something productive like that. At that point the wsmouse device for it vanishes and the X server sees an infinite stream of EIO errors which it handlesby looping

vmd: simplify fatal/fatalx errno handling

2016-10-16 Thread Philip Guenther
Instead of using errno as a hidden argument to vfatal(), make it an _actual_ argument named 'code', ala the errc/warnc family, and rename it to vfatalc() to match the pattern set. ok? Philip Guenther Index: log.c === RCS file:

CVS: cvs.openbsd.org: src (fwd)

2016-10-16 Thread Philip Guenther
Should have sent this to tech... -- Forwarded message -- Date: Sun, 16 Oct 2016 13:57:42 -0700 From: Philip Guenther To: Jeremie Courreges-Anglas Cc: source-chan...@openbsd.org Subject: Re: CVS: cvs.openbsd.org: src On Sun, 16 Oct 2016,

vm.conf(5) manual tweak for switches

2016-10-16 Thread Edd Barrett
Hi, In vm.conf(5): ---8<--- Virtual switches can be configured at any point in the configuration file; they allow switchd to add network interfaces of VMs to the underlying switch interfaces automatically. --->8--- This confused me, since i've been using virtual switches without switchd. I have

Re: usb disk dirty after every reboot

2016-10-16 Thread Theo de Raadt
> * When sync(2) is called. Though I am not 100% sure if we really want to do a > cache flush for every sync. Thoughts? We definately cannot it there. The system call is asyncronous, and makes no gaurantees. Furthermore note that any user can call sync(2), so unknown performance would come

Re: diff3: use boolean OR, not bitwise

2016-10-16 Thread Otto Moerbeek
On Sun, Oct 16, 2016 at 08:44:34AM -0600, Todd C. Miller wrote: > On Sun, 16 Oct 2016 16:06:39 +0200, Otto Moerbeek wrote: > > > On Sun, Oct 16, 2016 at 07:07:36AM -0600, Todd C. Miller wrote: > > > > > It is effectively the same in this case but using the boolean OR > > > is less surprising

Re: config(8): use {err,warn}{,x} instead of fprintf(stderr, ...)

2016-10-16 Thread Todd C. Miller
On Sun, 16 Oct 2016 11:47:32 +0200, Theo Buehler wrote: > Many files already include and there's a mix of hand-rolled > warning messages and there's incorrect usage warn("config: ..."). This > is a first sweep at unifying them. > > In mkheaders.c, there is an err() function, rename it to

add c11 static_assert definition to assert.h

2016-10-16 Thread Jonathan Gray
I encountered static_assert when trying to build an optional part of a newer version of Mesa with clang. Definition taken from FreeBSD. Index: sys/sys/cdefs.h === RCS file: /cvs/src/sys/sys/cdefs.h,v retrieving revision 1.39 diff -u

Re: diff3: use boolean OR, not bitwise

2016-10-16 Thread Todd C. Miller
On Sun, 16 Oct 2016 16:06:39 +0200, Otto Moerbeek wrote: > On Sun, Oct 16, 2016 at 07:07:36AM -0600, Todd C. Miller wrote: > > > It is effectively the same in this case but using the boolean OR > > is less surprising and may quiet over zealous compilers. > > Are you sure? For example, in

Re: config(8): use {err,warn}{,x} instead of fprintf(stderr, ...)

2016-10-16 Thread Martin Natano
On Sun, Oct 16, 2016 at 01:35:34PM +0200, Theo Buehler wrote: > On Sun, Oct 16, 2016 at 11:47:32AM +0200, Theo Buehler wrote: > > Many files already include and there's a mix of hand-rolled > > warning messages and there's incorrect usage warn("config: ..."). This > > is a first sweep at unifying

diff3: use boolean OR, not bitwise

2016-10-16 Thread Todd C. Miller
It is effectively the same in this case but using the boolean OR is less surprising and may quiet over zealous compilers. OK? - todd Index: cvs/diff3.c === RCS file: /cvs/src/usr.bin/cvs/diff3.c,v retrieving revision 1.61 diff -u

Re: config(8): use {err,warn}{,x} instead of fprintf(stderr, ...)

2016-10-16 Thread Theo Buehler
On Sun, Oct 16, 2016 at 11:47:32AM +0200, Theo Buehler wrote: > Many files already include and there's a mix of hand-rolled > warning messages and there's incorrect usage warn("config: ..."). This > is a first sweep at unifying them. > > In mkheaders.c, there is an err() function, rename it to

malloc canaries for > page sized objects

2016-10-16 Thread Otto Moerbeek
Hi, this diff is somewhat big since I decided to rewrite wrterror() to be able to get better error messages. Please review and test this with malloc option C (and other flags). An example run: a.out(85360) in free(): chunk canary corrupted 0x13c68f696000 0x18a92@0x18a88 This means I overwrote

config(8): use {err,warn}{,x} instead of fprintf(stderr, ...)

2016-10-16 Thread Theo Buehler
Many files already include and there's a mix of hand-rolled warning messages and there's incorrect usage warn("config: ..."). This is a first sweep at unifying them. In mkheaders.c, there is an err() function, rename it to emitwarn() since there are emit* functions already and it is non-fatal.

remove config -g option

2016-10-16 Thread Martin Natano
The -g option is obsolete (and undocumented) at least since the initial import in '95. Your finger memory should be updated by now. Ok to remove? natano Index: main.c === RCS file: /cvs/src/usr.sbin/config/main.c,v retrieving

config(8) getopt cleanup

2016-10-16 Thread Martin Natano
The declarations for optarg and optind are pulled in from . No need to declare them again. Ok? natano Index: main.c === RCS file: /cvs/src/usr.sbin/config/main.c,v retrieving revision 1.53 diff -u -p -r1.53 main.c --- main.c

ffs/msdosfs: Flush cache when updating mount to R/O

2016-10-16 Thread Stefan Fritsch
On Sun, 16 Oct 2016, Stefan Fritsch wrote: > > * When a R/W mount is updated to R/O. I will send patches for this in a > > separate mail. Part 2: Use it msdosfs & ffs: flush cache if updating mount to r/o Other filesystems can be changed later. ok? diff --git sys/msdosfs/msdosfs_vfsops.c

Add ioctl for disk cache flush

2016-10-16 Thread Stefan Fritsch
On Sun, 16 Oct 2016, Stefan Fritsch wrote: > * When a R/W mount is updated to R/O. I will send patches for this in a > separate mail. Part 1: Add an ioctl: add DIOCCACHESYNC Add an ioctl to tell storage devices to flush their internal caches. Ported from netbsd by pedro@ OK? diff --git

Re: usb disk dirty after every reboot

2016-10-16 Thread Stefan Fritsch
[moving to tech@] On Tuesday, 20 September 2016 08:03:32 CEST Stefan Fritsch wrote: > On Tue, 20 Sep 2016, Darren Tucker wrote: > > On Tue, Sep 20, 2016 at 1:43 AM, Jan Stary wrote: > > > This is current/i386 on an ALIX.1E (demsg below). > > > I have an USB disk connected for