mg - set read-only from command line

2015-12-23 Thread Mark Lumsden
If I am opening a lot of files into an editor but with the intention of not changing the contents (or more usually only amending a couple of files), a la: > mg * I like to open them all read-only, then change the ones I want to edit to read-write as required, that way I know when I close them

fgetwc(3) error reporting bug

2015-12-23 Thread Ingo Schwarze
Hi, i just noticed a bug in fgetwc(3) in our libc, the function used to implement getwc(3), getwchar(3), getws(3), getwln(3) and the wscanf(3) family of functions. In case of an encoding error, it does not set the error indicator, such that a program correctly checking ferror(3) after WEOF may

Re: Add --brief and --dereference to file(1)

2015-12-23 Thread Jérémie Courrèges-Anglas
Ralf Horstmann writes: > Hi, Hi, > xdg-open uses "xdg-mime query filetype" to find out the mime type of a given > file. Depending on the desktop environment, xdg-mime uses different backends. > In my case (i3 wm) it falls back to the generic code path, which uses > > file

Re: UTF-8 support for colrm(1)

2015-12-23 Thread Ingo Schwarze
Hi Steffen, Steffen Nurpmeso wrote on Wed, Dec 23, 2015 at 11:45:36AM +0100: > Ingo Schwarze wrote: >> For example, colrm(1). >> >> 4. The backspace character (U+0008) backs up by one display position >>rather than by one character. That causes miscounting when >>

rdate - truncated error messages

2015-12-23 Thread Andre Smagin
Hello. After the recent addition of pledge and privilege separation to rdate, some error messages get truncated, since the pipe message size for the child is limited to 256. For example: $ rdate -n pool.ntp.org rdate: Failed to connect to server: Can't assign requested address rdate: Failed to

Re: vlan(4): better checks for valid vlan ids

2015-12-23 Thread Sebastian Benoit
David Gwynne(da...@gwynne.id.au) on 2015.12.22 11:06:21 +1000: > the spec says vlan 0 and vlan 4095 are reserved, so we probably > shouldnt use them. > > this tweaks the vlan tag check only allow valid ids per the spec. > > ok? code reads ok however, this could be tweaked in ifconfig too:

Re: UTF-8 support for colrm(1)

2015-12-23 Thread Steffen Nurpmeso
Ingo Schwarze wrote: |Steffen Nurpmeso wrote on Wed, Dec 23, 2015 at 11:45:36AM +0100: |> Ingo Schwarze wrote: |>> For example, colrm(1). |>> |>> 4. The backspace character (U+0008) backs up by one display position |>>rather than by one character.

Re: Failed to boot after upgrading to Dec. 23 snapshot

2015-12-23 Thread Glenn Faustino
This has been fixed by Ken. Thanks! http://marc.info/?l=openbsd-cvs=145088426911767=2 Regards, Glenn

Re: UTF-8 support for colrm(1)

2015-12-23 Thread Steffen Nurpmeso
Hello Ingo, Ingo Schwarze wrote: |For example, colrm(1). |4. The backspace character (U+0008) backs up by one display position | rather than by one character. That causes miscounting when | backspace follows a zero-width or double-width character. this however is

pledge tokenadm(8)

2015-12-23 Thread Ricardo Mestre
Hi tech@ tokenadm(8) pretty much needs almost the same pledge annotations as login_token(8), "rpath wpath cpath fattr flock" for operations on the DB files and before that it also needs getpw due to calling getgrnam(3) to get the group (TOKEN_GROUP). In this case where both differ is that

Re: Make em(4) more mpsafe again

2015-12-23 Thread Hrvoje Popovski
On 11.12.2015. 10:47, Martin Pieuchot wrote: > On 05/12/15(Sat) 15:41, Claudio Jeker wrote: >> So Mark and I spent some time to figure out what the issue was with ix(4) >> based on that info I resurected the em(4) mpsafe diff that got backed out >> and I applied the same fix. It is somewhat

Failed to boot after upgrading to Dec. 23 snapshot

2015-12-23 Thread Glenn Faustino
Hi Tech@, After upgrading my system to Dec. 23 snapshot it failed to boot with the following error: Using drive 0, partition 3. Loading. probing: pc0 mem[630K 511M 510M 2471M 4582M a20=on] disk: hd0+ sr0* >> OpenBSD/amd64 BOOT 3.29 Passphrase: open(sr0a:/etc/boot.conf): can't read disk label

merge in_ and in6_pcbbind(), introduce in(6)_pcbaddrisavail()

2015-12-23 Thread Vincent Gross
in_pcbbind and in6_pcbbind have a lot in common, the only meaningful differences are in the checks done to ensure a sockaddr is available. This diff splits theses checks in their own functions, and merge the remaining code in one single function. Aside from being easier to read, it also makes it