Re: [PATCH 4/5] hwclock: Fix --date debug messages

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

 



On Fri, Oct 24, 2014, at 04:53, JWP wrote:
>  	if (debug)
> -		printf(_("response from date command = %s"), date_resp);
> +		printf(_("The response was: %s"), date_resp);
>  	if (strncmp(date_resp, magic, sizeof(magic) - 1) != 0) {
>  		warnx(_("The date command issued by %s returned "
> -				  "unexpected results\n"
> -				  "The command was:\n  %s\n"
> -				  "The response was:\n  %s"),
> -			program_invocation_short_name, date_command, date_resp);
> +			"unexpected results\nThe response was: %s"
> +			"The command was: %s"),
> +		      program_invocation_short_name, date_resp, date_command);

Oh no.  If the user does not use --debug, hwclock will warn that
a command gave an unexpected result and will print the command
but not the actual result.  This is silly.

By the way, the --debug flag is improperly named.  It should actually
be called --verbose, because in all the rest of util-linux debug messages
are never gettextized (using calls to _()).  The use of --debug is not
meant to debug hwclock itself but to debug the user's use of hwclock.
It should therefore be called --verbose.

Benno

-- 
http://www.fastmail.fm - A fast, anti-spam email service.

--
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