From: Benno Schulenberg <bensberg@telfort.nl>
To: "util-linux@vger.kernel.org" <util-linux@vger.kernel.org>
Cc: Nathan Sharp <nwsharp@live.com>
Subject: Re: [PATCH 6/7] pipesz: report default size in --help, instead of referring the user
Date: Thu, 24 Apr 2025 15:15:57 +0200 [thread overview]
Message-ID: <9681cda7-c636-4399-8229-caada39ccd1f@telfort.nl> (raw)
In-Reply-To: <MN0P221MB1530A6F07A44AF169879CBA7C2852@MN0P221MB1530.NAMP221.PROD.OUTLOOK.COM>
[-- Attachment #1.1: Type: text/plain, Size: 1213 bytes --]
Op 24-04-2025 om 13:24 schreef Nathan Sharp:
> If it is to be done at all, it MUST be done inside the usage() function;
> so that it is unlikely that future changes will introduce a read of an
> uninitialized global variable.
Which variable would be uninitialized? Global variable 'opt_size' gets
initialized to -1 in the beginning. But okay, moving the two lines
before the call of usage() to the start of usage() itself is fine.
> However, I do not think this is a good idea in isolation, as it deprives
> the user of the knowledge of where the default size comes from,
Not at all: where the value comes from is mentioned in the man page.
The usage text is not meant to include _all_ details about the program
-- that is what the man page is for. And, unlike the man page, the
usage text _can_ include the actual value of the thing. And if it can,
it should, in my opinion, as the value itself is much more useful than
saying "go look there".
> and additionally could cause the help message to print a warning!
That is actually better than referring to a file that happens to be
unreadable/unparsable, because then the help text would be lying.
Benno
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 840 bytes --]
next prev parent reply other threads:[~2025-04-24 13:16 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-24 9:32 [PATCH 1/7] unshare: make the wording of a message identical to that of three others Benno Schulenberg
2025-04-24 9:32 ` [PATCH 2/7] irqtop: make the wording of an error message identical to that of another Benno Schulenberg
2025-04-24 9:32 ` [PATCH 3/7] lsfd: improve grammar, and use angular brackets around placeholder word Benno Schulenberg
2025-04-24 9:55 ` Masatake YAMATO
2025-04-24 10:05 ` Karel Zak
2025-04-25 10:36 ` Benno Schulenberg
2025-04-29 19:54 ` Masatake YAMATO
2025-04-30 8:20 ` Benno Schulenberg
2025-04-24 9:32 ` [PATCH 4/7] docs,usage: harmonize description of --hyperlink, and add 2 missing ones Benno Schulenberg
2025-04-24 10:08 ` Karel Zak
2025-04-25 10:43 ` Benno Schulenberg
2025-04-25 20:07 ` Karel Zak
2025-04-24 9:32 ` [PATCH 5/7] pipesz: (man) improve the markup and some wordings Benno Schulenberg
2025-04-24 9:32 ` [PATCH 6/7] pipesz: report default size in --help, instead of referring the user Benno Schulenberg
2025-04-24 11:28 ` Nathan Sharp
[not found] ` <MN0P221MB1530A6F07A44AF169879CBA7C2852@MN0P221MB1530.NAMP221.PROD.OUTLOOK.COM>
2025-04-24 13:15 ` Benno Schulenberg [this message]
2025-04-24 9:32 ` [PATCH 7/7] uuidd: put an option and its description in a single message Benno Schulenberg
2025-04-29 11:11 ` [PATCH 1/7] unshare: make the wording of a message identical to that of three others Karel Zak
2025-04-29 13:55 ` Benno Schulenberg
2025-04-30 11:18 ` Karel Zak
2025-04-30 11:19 ` Karel Zak
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=9681cda7-c636-4399-8229-caada39ccd1f@telfort.nl \
--to=bensberg@telfort.nl \
--cc=nwsharp@live.com \
--cc=util-linux@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox