From: Benno Schulenberg <bensberg@justemail.net>
To: JWP <elseifthen@gmx.com>
Cc: Karel Zak <kzak@redhat.com>, "Util-Linux" <util-linux@vger.kernel.org>
Subject: Re: [PATCH 2/5] hwclock: clean up message periods/full stops
Date: Fri, 24 Oct 2014 22:58:07 +0200 [thread overview]
Message-ID: <1414184287.962524.183013401.569326CF@webmail.messagingengine.com> (raw)
In-Reply-To: <544A795B.8090301@gmx.com>
On Fri, Oct 24, 2014, at 18:07, JWP wrote:
> So what is the util-linux position on message punctuation in general, and
> line termination specifically? The documentation seem to imply not using any.
The current situation is a mess. And the documentation does not say
anything about what error messages, status reports, and imperatives
to the user should look like. The general style seems to be:
1) Error messages (anything that is preceded by the program name
followed by a colon and a space, in thise case "hwclock: ") start with
a lowercase letter and do not end in a period, nor use any period.
2) Status reports and imperatives to the user use full sentences:
they start with a capital letter and end in a period.
So I think the following output is fairly good.
$ ./hwclock --debug
hwclock from util-linux 2.25.379-04c10
hwclock: cannot open /dev/rtc: Permission denied
Using direct I/O instructions to ISA clock.
hwclock: unable to get I/O port access: the iopl(3) call failed.: Operation not permitted
hwclock: Probably you need root privileges.
The last line should not be preceded by "hwclock" as it's not
an error message. And "the iopl(3) call failed." should obviously
not end in a period, and it starts with a space too many.
(Also, the phrases "Permission denied" and "Operation not permitted"
should not be capitalized, but they come from libc, so util-linux
cannot do anything about that.)
With line termination you mean the placings of \n? When they
are needed, to break up a long message, preferably wrap the
text in the program at the same place.
To come back to your patch for a moment:
> printf(_("Clock drift factor was calculated as "
> - "%f seconds/day.\n"
> - "It is far too much. Resetting to zero.\n"),
> + "%f seconds/day\n"
> + "It is far too much, resetting to zero\n"),
> drift_factor);
This would simply be a wrong change. Literally your second line
says that resetting to zero is far too much. When giving status
reports it won't hurt to be very clear, and punctuation is part
of that. If asked, I would rewrite the above message as:
"The clock drift factor was calculated as %f seconds per day.\n"
"This is far too much. It has been reset to zero.\n"
Benno
--
http://www.fastmail.fm - mmm... Fastmail...
next prev parent reply other threads:[~2014-10-24 20:58 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-24 2:49 [PATCH 2/5] hwclock: clean up message periods/full stops JWP
2014-10-24 11:33 ` Benno Schulenberg
2014-10-24 12:37 ` JWP
2014-10-24 12:59 ` Karel Zak
2014-10-24 16:07 ` JWP
2014-10-24 20:58 ` Benno Schulenberg [this message]
2014-10-27 10:59 ` Karel Zak
2014-10-27 10:55 ` Karel Zak
2014-10-24 21:57 ` Lauri Nurmi
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=1414184287.962524.183013401.569326CF@webmail.messagingengine.com \
--to=bensberg@justemail.net \
--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;
as well as URLs for NNTP newsgroup(s).