Re: ifconfig: add -rdomain option

2018-02-22 Thread Ayaka Koshibe
On Thu, Feb 22, 2018 at 4:54 AM, David Gwynne wrote: > > >> On 22 Feb 2018, at 5:00 pm, Ayaka Koshibe wrote: >> >> On Wed, Feb 21, 2018 at 03:42:58PM +0100, Sebastian Benoit wrote: >>> Ayaka Koshibe(akosh...@openbsd.org) on 2018.02.20 21:20:20 -0800: On Tue, Feb 20, 2018 at 4:48 AM, Reyk Flo

Re: ifconfig: add -rdomain option

2018-02-22 Thread David Gwynne
> On 22 Feb 2018, at 5:00 pm, Ayaka Koshibe wrote: > > On Wed, Feb 21, 2018 at 03:42:58PM +0100, Sebastian Benoit wrote: >> Ayaka Koshibe(akosh...@openbsd.org) on 2018.02.20 21:20:20 -0800: >>> On Tue, Feb 20, 2018 at 4:48 AM, Reyk Floeter wrote: > Am 20.02.2018 um 11:15 schrieb Klem

Re: ifconfig: add -rdomain option

2018-02-22 Thread Sebastian Benoit
Ayaka Koshibe(akosh...@openbsd.org) on 2018.02.21 23:00:22 -0800: > On Wed, Feb 21, 2018 at 03:42:58PM +0100, Sebastian Benoit wrote: > > Ayaka Koshibe(akosh...@openbsd.org) on 2018.02.20 21:20:20 -0800: > > > On Tue, Feb 20, 2018 at 4:48 AM, Reyk Floeter wrote: > > > > > > > >> Am 20.02.2018 um 1

Re: ifconfig: add -rdomain option

2018-02-22 Thread Stefan Sperling
On Wed, Feb 21, 2018 at 11:00:22PM -0800, Ayaka Koshibe wrote: > Ah, right. I hope I can just update the man page to explicitly mention > this. I've also made it a bit more concise as jmc had suggested. Looks good and works as advertised in a quick test. ok stsp@ > Index: sbin/ifconfig/ifconfig.8

Re: ifconfig: add -rdomain option

2018-02-21 Thread Ayaka Koshibe
On Wed, Feb 21, 2018 at 03:42:58PM +0100, Sebastian Benoit wrote: > Ayaka Koshibe(akosh...@openbsd.org) on 2018.02.20 21:20:20 -0800: > > On Tue, Feb 20, 2018 at 4:48 AM, Reyk Floeter wrote: > > > > > >> Am 20.02.2018 um 11:15 schrieb Klemens Nanni : > > >> > > >>> On Mon, Feb 19, 2018 at 05:09:58

Re: ifconfig: add -rdomain option

2018-02-21 Thread Tom Smyth
Hi Ayaka, All, the diff from a user experience point of view :) ... ill stop right there... I was going to ask another slightly related question regarding ifconfig output consistency would there be a way to display the rdomain of interfaces that are in the default rdomain , as rdomain just

Re: ifconfig: add -rdomain option

2018-02-21 Thread Theo de Raadt
>From be...@openbsd.org Wed Feb 21 07:48:51 2018 >Delivered-To: dera...@cvs.openbsd.org >Date: Wed, 21 Feb 2018 15:48:49 +0100 >From: Sebastian Benoit >To: Theo de Raadt >Cc: akosh...@openbsd.org, r...@openbsd.org, k...@openbsd.org, tech@openbsd.org >Subject: Re: ifconfig

Re: ifconfig: add -rdomain option

2018-02-21 Thread Sebastian Benoit
Theo de Raadt(dera...@openbsd.org) on 2018.02.20 22:27:27 -0700: > > If you read through all the options in the manual page carefully, > ifconfig is not consistant. As a result it cannot use getopt. > It isn't a POSIX argument grammar. It grew up with that funky > table, and there we are. > > B

Re: ifconfig: add -rdomain option

2018-02-21 Thread Sebastian Benoit
Ayaka Koshibe(akosh...@openbsd.org) on 2018.02.20 21:20:20 -0800: > On Tue, Feb 20, 2018 at 4:48 AM, Reyk Floeter wrote: > > > >> Am 20.02.2018 um 11:15 schrieb Klemens Nanni : > >> > >>> On Mon, Feb 19, 2018 at 05:09:58PM -0800, Ayaka Koshibe wrote: > >>> This diff would allow saying 'ifconfig fo

Re: ifconfig: add -rdomain option

2018-02-21 Thread Stefan Sperling
On Tue, Feb 20, 2018 at 09:49:30PM -0800, Ayaka Koshibe wrote: > On Tue, Feb 20, 2018 at 5:08 AM, Stefan Sperling wrote: > > I haven't tested this idea, though. > > Does your change work without the new function unsetrdomain? > > I.e. a diff which only adds this to ifconfig.c: > > > > + { "-

Re: ifconfig: add -rdomain option

2018-02-20 Thread Ayaka Koshibe
On Tue, Feb 20, 2018 at 5:08 AM, Stefan Sperling wrote: > On Mon, Feb 19, 2018 at 05:09:58PM -0800, Ayaka Koshibe wrote: >> Index: sbin/ifconfig/ifconfig.c >> === >> RCS file: /cvs/src/sbin/ifconfig/ifconfig.c,v >> retrieving revision

Re: ifconfig: add -rdomain option

2018-02-20 Thread Theo de Raadt
If you read through all the options in the manual page carefully, ifconfig is not consistant. As a result it cannot use getopt. It isn't a POSIX argument grammar. It grew up with that funky table, and there we are. Both cases occur. "-option argument" and "-option". There is even at least one

Re: ifconfig: add -rdomain option

2018-02-20 Thread Ayaka Koshibe
On Tue, Feb 20, 2018 at 4:48 AM, Reyk Floeter wrote: > >> Am 20.02.2018 um 11:15 schrieb Klemens Nanni : >> >>> On Mon, Feb 19, 2018 at 05:09:58PM -0800, Ayaka Koshibe wrote: >>> This diff would allow saying 'ifconfig foo -rdomain' instead of 'ifconfig >>> foo rdomain 0'. >> I can see where you'r

Re: ifconfig: add -rdomain option

2018-02-20 Thread Stefan Sperling
On Mon, Feb 19, 2018 at 05:09:58PM -0800, Ayaka Koshibe wrote: > Index: sbin/ifconfig/ifconfig.c > === > RCS file: /cvs/src/sbin/ifconfig/ifconfig.c,v > retrieving revision 1.353 > diff -u -p -u -p -r1.353 ifconfig.c > --- sbin/ifconfi

Re: ifconfig: add -rdomain option

2018-02-20 Thread Reyk Floeter
> Am 20.02.2018 um 11:15 schrieb Klemens Nanni : > >> On Mon, Feb 19, 2018 at 05:09:58PM -0800, Ayaka Koshibe wrote: >> This diff would allow saying 'ifconfig foo -rdomain' instead of 'ifconfig >> foo rdomain 0'. > I can see where you're coming from but this breaks semantics: `-option' > clears

Re: ifconfig: add -rdomain option

2018-02-20 Thread Klemens Nanni
On Mon, Feb 19, 2018 at 05:09:58PM -0800, Ayaka Koshibe wrote: > This diff would allow saying 'ifconfig foo -rdomain' instead of 'ifconfig foo > rdomain 0'. I can see where you're coming from but this breaks semantics: `-option' clears an optional parameter or deconfigures functionality whereas `r