Index | Thread | Search

From:
Ingo Schwarze <schwarze@usta.de>
Subject:
Re: btrace(1): fix -e and filename args
To:
Klemens Nanni <kn@openbsd.org>
Cc:
Rafael Sadowski <rafael@sizeofvoid.org>, Claudio Jeker <cjeker@diehard.n-r-g.com>, tech@openbsd.org, jmc@openbsd.org
Date:
Sun, 18 May 2025 22:32:11 +0200

Download raw body.

Thread
Hello,

Klemens Nanni wrote on Sun, May 18, 2025 at 08:23:26AM +0000:
> 18.05.2025 11:05, Rafael Sadowski:

>> I think Ingo, this is a huge improvement for new btrace users like me.
>> OK rsadowski

> +1

Thanks to Rafael for reporting the issues, Claudio for explaining,
and everybody for checking.  I committed my patch.

>>> +	fprintf(stderr, "usage: %s [-lnv] [-p elffile] "
>>> +	    "programfile | -e program [argument ...]\n", getprogname());

> awk(1) says "prog" and "progfile", the tools are very similar
> in this regard, so you keep them in sync here as well.

Even though Unix has a tradition of cp ed ld ln ls mt mv nm rm,
in documentation, i actually prefer placeholders that are real English
words over abbreviations, unless they are awfully long, which "program"
isn't.  I think real words read better.

I do not want to gratuitiously mess with the awk(1) manual because
that might cause additional work for millert@ when updating.
When something is really broken, sure, but that isn't the case here.

  btrace  programfile | -e program
  awk     prog        | -f progfile  # note the other one gets the option
  ksh     -c string   | -s | file
  sh      -c string          file

So, argument naming isn't consistent at all.  If getting it consistent
is trivial, that's sometimes worthwhile, but it doesn't seem trivial
here.  Not a big deal IMHO.

Yours,
  Ingo