Index | Thread | Search

From:
"Theo de Raadt" <deraadt@openbsd.org>
Subject:
Re: ifconfig wg: "humanify" last handshake
To:
Renaud Allard <renaud@allard.it>
Cc:
tech@openbsd.org
Date:
Thu, 07 Aug 2025 07:03:50 -0600

Download raw body.

Thread
Renaud Allard <renaud@allard.it> wrote:

> 
> 
> On 8/7/25 10:38 AM, Omar Polo wrote:
> > Stuart Henderson <stu@spacehopper.org> wrote:
> >> On 2025/08/06 16:34, Omar Polo wrote:
> >>> +	else if (delta > 60 * 60 * 2)
> >>> +		r = snprintf(buf, sizeof(buf), "%lld hours ago",
> >>> +		    delta / (60 * 60));
> >>> +	else if (delta > 60 * 2)
> >>> +		r = snprintf(buf, sizeof(buf), "%lld minutes ago",
> >>> +		    delta / 60);
> >>
> >> "3 minutes ago" loses a lot of information compared to (180..239) seconds.
> > mmhh, yeah, you're right.  Honestly I don't look often at the last
> > handshake, usually just when something is not working, like the other
> > day, i care to look.
> > i also understand theo's point.
> > i'll continue runinng python to do the math to understand how much
> > time
> > passed :-)
> > 
> 
> That's just an idea, but what about adding a "-h" flag like in df(1)?

Shall we add a -h flag to all binaries?

Let's say it grows OpenBSD by 1MB.

Of course we'll add -h to a bunch of the programs that land on the ramdisk,
and the ramdisk will overflow.  So we'll need to add #ifdef's to the code
to remove it from the ramdisk.

Of course, -h in some programs is defined to issue the usage message.
Those programs will diverge from this new "standard" you are proposing.

Oh but what about standards!  -h is not a standard POSIX feature.  It's
an extension.

Oh, but what if people use -h in a script?  And then copy the script to
another system wanting it to work there?  It will fail, because they don't
have -h.

Is any of this worth it?

No, it's ridiculous busy work.  Noone needs a new -h flag anywhere.

There's a fringe sub-group on the side of the open source communtity who
often encourages the extention and bloat of software with features that
noone actually needs, that will get used once or effectively never because
noone needs it.

I hope that also explains why ifconfig doesn't have a web gui.