All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/5] Various small fixes
@ 2017-04-10 22:47 J William Piggott
  2017-04-10 22:50 ` [PATCH 1/5] hwclock: use errtryhelp() J William Piggott
                   ` (5 more replies)
  0 siblings, 6 replies; 8+ messages in thread
From: J William Piggott @ 2017-04-10 22:47 UTC (permalink / raw)
  To: Karel Zak; +Cc: util-linux


The first commit reintroduces Karel's change to hwclock on
Dec 19 last year, and extends errtryhelp() use to invalid
arguments.  The rest are style and man-page fixes.


The following changes since commit dddbfa4e9ba63fb731dd04f3b9c1ba18c57f5f69:

  agetty: various man-page fixes (2017-04-10 15:46:26 +0200)

are available in the git repository at:

  git@github.com:jwpi/util-linux.git 170409

for you to fetch changes up to 697bfcf57695087713750900f369af28ae0cbd74:

  hwclock: remove residual 'compare' from man-page (2017-04-10 14:57:01 -0400)

----------------------------------------------------------------
J William Piggott (5):
      hwclock: use errtryhelp()
      parse-date: remove extraneous form feed
      docs: parse-date.txt fix whitespace
      hwclock: fix whitespace in hwclock-rtc.c
      hwclock: remove residual 'compare' from man-page

 Documentation/parse-date.txt | 4 ++--
 lib/parse-date.y             | 2 --
 sys-utils/hwclock-rtc.c      | 3 +--
 sys-utils/hwclock.8.in       | 2 +-
 sys-utils/hwclock.c          | 9 ++++-----
 5 files changed, 8 insertions(+), 12 deletions(-)

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH 1/5] hwclock: use errtryhelp()
  2017-04-10 22:47 [PATCH 0/5] Various small fixes J William Piggott
@ 2017-04-10 22:50 ` J William Piggott
  2017-04-11  9:12   ` Benno Schulenberg
  2017-04-10 22:54 ` [PATCH 2/5] parse-date: remove extraneous form feed J William Piggott
                   ` (4 subsequent siblings)
  5 siblings, 1 reply; 8+ messages in thread
From: J William Piggott @ 2017-04-10 22:50 UTC (permalink / raw)
  To: Karel Zak; +Cc: util-linux


* sys-utils/hwclock.c: use errtryhelp() instead of usage().

Signed-off-by: J William Piggott <elseifthen@gmx.com>
---
 sys-utils/hwclock.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/sys-utils/hwclock.c b/sys-utils/hwclock.c
index 3875bcc..a99eb6d 100644
--- a/sys-utils/hwclock.c
+++ b/sys-utils/hwclock.c
@@ -1479,9 +1479,9 @@ int main(int argc, char **argv)
 			out_version();
 			return 0;
 		case 'h':			/* --help */
-		case '?':
-		default:
 			usage(&ctl, NULL);
+		default:
+			errtryhelp(EXIT_FAILURE);
 		}
 	}
 
@@ -1497,9 +1497,8 @@ int main(int argc, char **argv)
 	}
 #endif
 	if (argc > 0) {
-		usage(&ctl, _("%s takes no non-option arguments.  "
-			"You supplied %d.\n"), program_invocation_short_name,
-		      argc);
+		warnx(_("%d too many arguments given"), argc);
+		errtryhelp(EXIT_FAILURE);
 	}
 
 	if (!ctl.adj_file_name)

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 2/5] parse-date: remove extraneous form feed
  2017-04-10 22:47 [PATCH 0/5] Various small fixes J William Piggott
  2017-04-10 22:50 ` [PATCH 1/5] hwclock: use errtryhelp() J William Piggott
@ 2017-04-10 22:54 ` J William Piggott
  2017-04-10 22:56 ` [PATCH 3/5] docs: parse-date.txt fix whitespace J William Piggott
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 8+ messages in thread
From: J William Piggott @ 2017-04-10 22:54 UTC (permalink / raw)
  To: Karel Zak; +Cc: util-linux


* lib/parse-date.y: Remove extraneous form feed (FF, 0x0C, ^L).

Signed-off-by: J William Piggott <elseifthen@gmx.com>
---
 lib/parse-date.y | 2 --
 1 file changed, 2 deletions(-)

diff --git a/lib/parse-date.y b/lib/parse-date.y
index 7bfdb36..66ec722 100644
--- a/lib/parse-date.y
+++ b/lib/parse-date.y
@@ -874,8 +874,6 @@ static table const military_table[] = {
 	{ NULL, 0, 0 }
 };
 
-\f
-
 /**
  * Convert a time zone expressed as HH:MM into an integer count of
  * minutes.  If MM is negative, then S is of the form HHMM and needs

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 3/5] docs: parse-date.txt fix whitespace
  2017-04-10 22:47 [PATCH 0/5] Various small fixes J William Piggott
  2017-04-10 22:50 ` [PATCH 1/5] hwclock: use errtryhelp() J William Piggott
  2017-04-10 22:54 ` [PATCH 2/5] parse-date: remove extraneous form feed J William Piggott
@ 2017-04-10 22:56 ` J William Piggott
  2017-04-10 22:58 ` [PATCH 4/5] hwclock: fix whitespace in hwclock-rtc.c J William Piggott
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 8+ messages in thread
From: J William Piggott @ 2017-04-10 22:56 UTC (permalink / raw)
  To: Karel Zak; +Cc: util-linux


Signed-off-by: J William Piggott <elseifthen@gmx.com>
---
 Documentation/parse-date.txt | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Documentation/parse-date.txt b/Documentation/parse-date.txt
index cb06a47..56bed1e 100644
--- a/Documentation/parse-date.txt
+++ b/Documentation/parse-date.txt
@@ -4,7 +4,7 @@ NAME
 
 SYNOPSIS
 	#include "timeutils.h"
-	
+
 	int parse_date(struct timespec *result, char const *p,
 			struct timespec const *now)
 
@@ -15,7 +15,7 @@ DESCRIPTION
 	The string itself is pointed to by *p.  Return 1 if successful.
 	*p can be an incomplete or relative time specification; if so, use
 	*now as the basis for the returned time.
-	
+
 
 This function is based upon gnulib's parse-datetime.y-dd7a871.
 

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 4/5] hwclock: fix whitespace in hwclock-rtc.c
  2017-04-10 22:47 [PATCH 0/5] Various small fixes J William Piggott
                   ` (2 preceding siblings ...)
  2017-04-10 22:56 ` [PATCH 3/5] docs: parse-date.txt fix whitespace J William Piggott
@ 2017-04-10 22:58 ` J William Piggott
  2017-04-10 23:00 ` [PATCH 5/5] hwclock: remove residual 'compare' from man-page J William Piggott
  2017-04-18  9:07 ` [PATCH 0/5] Various small fixes Karel Zak
  5 siblings, 0 replies; 8+ messages in thread
From: J William Piggott @ 2017-04-10 22:58 UTC (permalink / raw)
  To: Karel Zak; +Cc: util-linux


Signed-off-by: J William Piggott <elseifthen@gmx.com>
---
 sys-utils/hwclock-rtc.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/sys-utils/hwclock-rtc.c b/sys-utils/hwclock-rtc.c
index f272828..b39a970 100644
--- a/sys-utils/hwclock-rtc.c
+++ b/sys-utils/hwclock-rtc.c
@@ -413,8 +413,7 @@ int get_epoch_rtc(const struct hwclock_control *ctl, unsigned long *epoch_p)
 	}
 
 	if (ioctl(rtc_fd, RTC_EPOCH_READ, epoch_p) == -1) {
-			warn(_("ioctl(RTC_EPOCH_READ) to %s failed"),
-				  rtc_dev_name);
+		warn(_("ioctl(RTC_EPOCH_READ) to %s failed"), rtc_dev_name);
 		return 1;
 	}
 

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 5/5] hwclock: remove residual 'compare' from man-page
  2017-04-10 22:47 [PATCH 0/5] Various small fixes J William Piggott
                   ` (3 preceding siblings ...)
  2017-04-10 22:58 ` [PATCH 4/5] hwclock: fix whitespace in hwclock-rtc.c J William Piggott
@ 2017-04-10 23:00 ` J William Piggott
  2017-04-18  9:07 ` [PATCH 0/5] Various small fixes Karel Zak
  5 siblings, 0 replies; 8+ messages in thread
From: J William Piggott @ 2017-04-10 23:00 UTC (permalink / raw)
  To: Karel Zak; +Cc: util-linux


Signed-off-by: J William Piggott <elseifthen@gmx.com>
---
 sys-utils/hwclock.8.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys-utils/hwclock.8.in b/sys-utils/hwclock.8.in
index 80a579f..f11df80 100644
--- a/sys-utils/hwclock.8.in
+++ b/sys-utils/hwclock.8.in
@@ -19,7 +19,7 @@ Hardware Clock time; set the Hardware Clock to a specified time; set the
 Hardware Clock from the System Clock; set the System Clock from the
 Hardware Clock; compensate for Hardware Clock drift; correct the System
 Clock timescale; set the kernel's timezone, NTP timescale, and epoch
-(Alpha only); compare the System and Hardware Clocks; and predict future
+(Alpha only); and predict future
 Hardware Clock values based on its drift rate.
 .PP
 Since v2.26 important changes were made to the

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/5] hwclock: use errtryhelp()
  2017-04-10 22:50 ` [PATCH 1/5] hwclock: use errtryhelp() J William Piggott
@ 2017-04-11  9:12   ` Benno Schulenberg
  0 siblings, 0 replies; 8+ messages in thread
From: Benno Schulenberg @ 2017-04-11  9:12 UTC (permalink / raw)
  To: J William Piggott; +Cc: Karel Zak, Util-Linux


On Tue, Apr 11, 2017, at 00:50, J William Piggott wrote:
> 
> * sys-utils/hwclock.c: use errtryhelp() instead of usage().

The commit message (subject line) could be more informative, say:

hwclock: suggest to try --help when an unknown option is given

Benno

-- 
http://www.fastmail.com - Send your email first class

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 0/5] Various small fixes
  2017-04-10 22:47 [PATCH 0/5] Various small fixes J William Piggott
                   ` (4 preceding siblings ...)
  2017-04-10 23:00 ` [PATCH 5/5] hwclock: remove residual 'compare' from man-page J William Piggott
@ 2017-04-18  9:07 ` Karel Zak
  5 siblings, 0 replies; 8+ messages in thread
From: Karel Zak @ 2017-04-18  9:07 UTC (permalink / raw)
  To: J William Piggott; +Cc: util-linux

On Mon, Apr 10, 2017 at 06:47:53PM -0400, J William Piggott wrote:
>       hwclock: use errtryhelp()
>       parse-date: remove extraneous form feed
>       docs: parse-date.txt fix whitespace
>       hwclock: fix whitespace in hwclock-rtc.c
>       hwclock: remove residual 'compare' from man-page

Applied, thanks.

-- 
 Karel Zak  <kzak@redhat.com>
 http://karelzak.blogspot.com

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2017-04-18  9:08 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-10 22:47 [PATCH 0/5] Various small fixes J William Piggott
2017-04-10 22:50 ` [PATCH 1/5] hwclock: use errtryhelp() J William Piggott
2017-04-11  9:12   ` Benno Schulenberg
2017-04-10 22:54 ` [PATCH 2/5] parse-date: remove extraneous form feed J William Piggott
2017-04-10 22:56 ` [PATCH 3/5] docs: parse-date.txt fix whitespace J William Piggott
2017-04-10 22:58 ` [PATCH 4/5] hwclock: fix whitespace in hwclock-rtc.c J William Piggott
2017-04-10 23:00 ` [PATCH 5/5] hwclock: remove residual 'compare' from man-page J William Piggott
2017-04-18  9:07 ` [PATCH 0/5] Various small fixes Karel Zak

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.