caesar(6) documents incorrect frequencies

2017-07-26 Thread Matthew Martin
The man page documents frequencies that are different than the code uses e.g. C (3.61 vs 2.7) and D (4.78 vs 3.8). This seems a bit much for a man page. If anyone prefers the letter ordering be kept, the correct order is ETSAORINDHLCPMUYFWGBVKXQZJ . - Matthew Martin diff --git caesar.6 caesar.6

Re: printf(3) return value on ENOMEM

2017-07-26 Thread Theo de Raadt
Here's my take. Internally if a intentional errno is produced, the functions should cease motion and return -1 to indicate error. However, these functions should probably guard against unintentional errno changes. Using save_errno method. I thought snprintf should maybe be a little different.

Re: printf(3) return value on ENOMEM

2017-07-26 Thread Theo de Raadt
> yeah. the number of bytes returned seems like a mistake in the api design. sorry, but that comes off like a clever soundbite. the return value informs about the expansion size after the format strings processing, and i am sure someone has used that information in a place where it was useful. e

Re: printf(3) return value on ENOMEM

2017-07-26 Thread Ted Unangst
Ingo Schwarze wrote: > So i say in all cases above, return -1, set ENOMEM, and it doesn't > matter much whether anything is printed, except that asprintf(3) > must of course free(3) any allocated memory before returning and > set the pointer to NULL. yeah. the number of bytes returned seems like a

vmd: reset queue_size if queue_select is invalid

2017-07-26 Thread Nick Owens
hello tech@, here is a diff that will follow the virtio spec a little closer, and allows 9front's (http://9front.org) virtio-blk driver to correctly find the number of queues. i know that virtio-blk only has one queue, but the virtio probing code is shared between virtio-blk and virtio-scsi. with

Re: printf(3) return value on ENOMEM

2017-07-26 Thread Ingo Schwarze
Hi Theo, Theo de Raadt wrote on Wed, Jul 26, 2017 at 08:07:53AM -0600: > Ingo Schwarze wrote: >> The current behaviour of our implementation is to return the number >> of characters printed *and* set errno = ENOMEM. > I expect it should not set errno. As a general rule, errno should > only be s

calendar vs KOI8

2017-07-26 Thread Jan Stary
Is 5.9 out yet? Index: io.c === RCS file: /cvs/src/usr.bin/calendar/io.c,v retrieving revision 1.44 diff -u -p -r1.44 io.c --- io.c31 Aug 2016 09:38:47 - 1.44 +++ io.c26 Jul 2017 20:21:09 - @@ -89,13 +89,

sys/net/rtsock.c: typo in comment

2017-07-26 Thread Anton Lindqvist
Hi, Looks like a typo to me. Comments? OK? Index: rtsock.c === RCS file: /cvs/src/sys/net/rtsock.c,v retrieving revision 1.241 diff -u -p -r1.241 rtsock.c --- rtsock.c24 Jul 2017 09:20:32 - 1.241 +++ rtsock.c26 Jul 2

LC_NUMERIC in awk

2017-07-26 Thread Jan Stary
Does awk really need to set and reset LC_NUMERIC? Does it need to set locale at all? Jan Index: main.c === RCS file: /cvs/src/usr.bin/awk/main.c,v retrieving revision 1.19 diff -u -p -r1.19 main.c --- main.c 22 Oct 2015

Re: printf(3) return value on ENOMEM

2017-07-26 Thread Ingo Schwarze
Hi, now we have conflicting and incomplete opinions. What should "prefix %.500f postfix", 1.0 and "%s %.500f %s", "prefix", 1.0, "postfix" do if the %f fails with ENOMEM? Currently, 1. [f]printf(..., "prefix %.500f postfix", 1.0) prints nothing, returns 7, sets ENOMEM

ioctl under route promise for pledging snmpd

2017-07-26 Thread Rob Pierce
snmpe calls kif_update on an interface change which performs an ioctl with SIOCGIFDESCR, currently disallowed by pledge. No other network daemons do this. The only other programs that make this call appear to be ifconfig and systat. ifnet.if_description simply contains an optional user defined int

[patch/route] Allow short commands

2017-07-26 Thread Denis Fondras
Hi, I use route(8) a lot and I thought being able to use shorter commands/keywords could be nice. Like : route a default 192.0.2.1 route del default Regards, Denis Index: route.c === RCS file: /cvs/src/sbin/route/route.c,v retriev

Re: whois(1): follow ICANN change to field names

2017-07-26 Thread Stuart Henderson
On 2017/07/26 09:24, Todd C. Miller wrote: > On Wed, 26 Jul 2017 17:19:42 +0200, Jeremie Courreges-Anglas wrote: > > > On Wed, Jul 26 2017, Stuart Henderson wrote: > > > the > > > https://www.icann.org/resources/pages/rdds-labeling-policy-2017-02-01-e > > n > > > changes have gone live (at least

Re: whois(1): follow ICANN change to field names

2017-07-26 Thread Jeremie Courreges-Anglas
On Wed, Jul 26 2017, "Todd C. Miller" wrote: > On Wed, 26 Jul 2017 17:19:42 +0200, Jeremie Courreges-Anglas wrote: > >> On Wed, Jul 26 2017, Stuart Henderson wrote: >> > the https://www.icann.org/resources/pages/rdds-labeling-policy-2017-02-01-e >> n >> > changes have gone live (at least for com/

Re: whois(1): follow ICANN change to field names

2017-07-26 Thread Todd C. Miller
On Wed, 26 Jul 2017 17:19:42 +0200, Jeremie Courreges-Anglas wrote: > On Wed, Jul 26 2017, Stuart Henderson wrote: > > the https://www.icann.org/resources/pages/rdds-labeling-policy-2017-02-01-e > n > > changes have gone live (at least for com/net), so whois(1) no longer chases > > referrals. OK

Re: whois(1): follow ICANN change to field names

2017-07-26 Thread Jeremie Courreges-Anglas
On Wed, Jul 26 2017, Stuart Henderson wrote: > the https://www.icann.org/resources/pages/rdds-labeling-policy-2017-02-01-en > changes have gone live (at least for com/net), so whois(1) no longer chases > referrals. OK to change the string to the new one? Would it make sense to keep looking for "W

Re: whois(1): follow ICANN change to field names

2017-07-26 Thread Todd C. Miller
On Wed, 26 Jul 2017 15:43:38 +0100, Stuart Henderson wrote: > the https://www.icann.org/resources/pages/rdds-labeling-policy-2017-02-01-en > changes have gone live (at least for com/net), so whois(1) no longer chases > referrals. OK to change the string to the new one? OK millert@ - todd

Re: printf(3) return value on ENOMEM

2017-07-26 Thread Todd C. Miller
On Wed, 26 Jul 2017 12:10:53 +0200, Ingo Schwarze wrote: > As related data points, for EOVERFLOW, we do always return -1, > and for EILSEQ, we changed the code some time ago to return -1 - > even though in both of these cases, it is not completely obvious > whether those should be considered "outp

whois(1): follow ICANN change to field names

2017-07-26 Thread Stuart Henderson
the https://www.icann.org/resources/pages/rdds-labeling-policy-2017-02-01-en changes have gone live (at least for com/net), so whois(1) no longer chases referrals. OK to change the string to the new one? diff --git usr.bin/whois/whois.c usr.bin/whois/whois.c index 907d102b2f8..0e608295edf 100644 -

Re: printf(3) return value on ENOMEM

2017-07-26 Thread Theo de Raadt
> > From: "Theo de Raadt" > > Date: Wed, 26 Jul 2017 08:07:53 -0600 > > > > > The current behaviour of our implementation is to return the number > > > of characters printed *and* set errno = ENOMEM. > > > > I expect it should not set errno. As a general rule, errno should > > only be set if an

Re: printf(3) return value on ENOMEM

2017-07-26 Thread Mark Kettenis
> From: "Theo de Raadt" > Date: Wed, 26 Jul 2017 08:07:53 -0600 > > > The current behaviour of our implementation is to return the number > > of characters printed *and* set errno = ENOMEM. > > I expect it should not set errno. As a general rule, errno should > only be set if an error has been

Re: printf(3) return value on ENOMEM

2017-07-26 Thread Theo de Raadt
> The current behaviour of our implementation is to return the number > of characters printed *and* set errno = ENOMEM. I expect it should not set errno. As a general rule, errno should only be set if an error has been indicated. Other short operations don't set errno.

Re: em link state change

2017-07-26 Thread Sebastian Benoit
wow, and ok benno@ Alexander Bluhm(alexander.bl...@gmx.net) on 2017.07.25 18:07:19 +0200: > Hi, > > The LINK_STATE_IS_UP() macro considers LINK_STATE_UNKNOWN as up. > So the em driver never gets out of that state. The change was in > sys/net/if.h > > revision 1.123 > date: 2011/07/03 17:41:50;

printf(3) return value on ENOMEM

2017-07-26 Thread Ingo Schwarze
Hi, what should printf(3) return on %e/%f/%g/%a malloc(3) failure? Neither POSIX nor our manual page seem fully conclusive. POSIX says: The fprintf() and printf() functions may fail if: [ENOMEM] Insufficient storage space is available. RETURN VALUE Upon successful completion, the fprin

Re: em link state change

2017-07-26 Thread Martin Pieuchot
On 25/07/17(Tue) 18:07, Alexander Bluhm wrote: > Hi, > > The LINK_STATE_IS_UP() macro considers LINK_STATE_UNKNOWN as up. > So the em driver never gets out of that state. The change was in > sys/net/if.h > > revision 1.123 > date: 2011/07/03 17:41:50; author: claudio; state: Exp; lines: +3 -2