Util-Linux package development
 help / color / mirror / Atom feed
From: Ruediger Meier <sweet_f_a@gmx.de>
To: J William Piggott <elseifthen@gmx.com>
Cc: Karel Zak <kzak@redhat.com>, util-linux@vger.kernel.org
Subject: Re: [PATCH 2/5] hwclock: usage() use program_invocation_short_name
Date: Mon, 3 Jul 2017 10:46:45 +0200	[thread overview]
Message-ID: <201707031046.45954.sweet_f_a@gmx.de> (raw)
In-Reply-To: <d0d5b0b9-184d-7733-3116-406c9033d927@gmx.com>

On Sunday 02 July 2017, J William Piggott wrote:
> 
> Signed-off-by: J William Piggott <elseifthen@gmx.com>
> ---
>  sys-utils/hwclock.c | 8 +++++---
>  1 file changed, 5 insertions(+), 3 deletions(-)
> 
> diff --git a/sys-utils/hwclock.c b/sys-utils/hwclock.c
> index 8b1e2f3..eeb68e7 100644
> --- a/sys-utils/hwclock.c
> +++ b/sys-utils/hwclock.c
> @@ -1203,7 +1203,7 @@ static void __attribute__((__noreturn__))
>  usage(const struct hwclock_control *ctl)
>  {
>  	fputs(USAGE_HEADER, stdout);
> -	puts(_(" hwclock [function] [option...]"));
> +	printf(_(" %s [function] [option...]\n"), program_invocation_short_name);
>  
>  	fputs(USAGE_SEPARATOR, stdout);
>  	puts(_("Query or set the RTC (Real Time Clock / Hardware Clock)"));
> @@ -1222,8 +1222,10 @@ usage(const struct hwclock_control *ctl)
>  #endif
>  	puts(_("     --predict        predict the drifted RTC time according to --date"));
>  	fputs(USAGE_OPTIONS, stdout);
> -	puts(_(" -u, --utc            inform hwclock the RTC timescale is UTC"));
> -	puts(_(" -l, --localtime      inform hwclock the RTC timescale is Local"));
> +	printf(_(
> +	       " -u, --utc            inform %s the RTC timescale is UTC\n"), program_invocation_short_name);
> +	printf(_(
> +	       " -l, --localtime      inform %s the RTC timescale is Local\n"), program_invocation_short_name);
>  #ifdef __linux__
>  	printf(_(
>  	       " -f, --rtc <file>     use an alternate file to %1$s\n"), _PATH_RTC_DEV);

I'm not sure if this makes really sense. I wouldn't overuse the program
name in general. And in this case I would rather remove the reduntant
term "inform hwclock" as *all* options "inform hwclock" about something. 

cu,
Rudi

  reply	other threads:[~2017-07-03  8:46 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-02 19:45 [PATCH 0/5] pull request J William Piggott
2017-07-02 19:50 ` [PATCH 1/5] hwclock: remove from usage() FILE *out = stdout J William Piggott
2017-07-02 19:51 ` [PATCH 2/5] hwclock: usage() use program_invocation_short_name J William Piggott
2017-07-03  8:46   ` Ruediger Meier [this message]
2017-07-03 15:14     ` J William Piggott
2017-07-03 19:31       ` J William Piggott
2017-07-02 19:53 ` [PATCH 3/5] hwclock: final usage() strings slice J William Piggott
2017-07-03  8:51   ` Ruediger Meier
2017-07-03 15:35     ` J William Piggott
2017-07-04  7:58       ` Karel Zak
2017-07-04  8:34         ` Bernhard Voelker
2017-07-04  8:55           ` Ruediger Meier
2017-07-04  9:00             ` Bernhard Voelker
2017-07-04 16:53             ` Karel Zak
2017-07-04 17:06               ` Karel Zak
2017-07-05 17:45         ` J William Piggott
2017-07-02 19:54 ` [PATCH 4/5] docs: update boilerplate.c usage() J William Piggott
2017-07-02 19:55 ` [PATCH 5/5] hwclock: sync one-liner descriptions J William Piggott
2017-07-10 23:34 ` [PING - REBASED][PATCH 0/5] pull request J William Piggott
2017-07-11  8:06   ` Karel Zak
2017-07-11 17:54     ` J William Piggott

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=201707031046.45954.sweet_f_a@gmx.de \
    --to=sweet_f_a@gmx.de \
    --cc=elseifthen@gmx.com \
    --cc=kzak@redhat.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