Re: [PATCH 2/5] hwclock: usage() use program_invocation_short_name

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sunday 02 July 2017, J William Piggott wrote:
> 
> Signed-off-by: J William Piggott <elseifthen@xxxxxxx>
> ---
>  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
--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux