* [PATCH 0/2] Pull Request
@ 2017-07-18 19:59 J William Piggott
2017-07-18 20:00 ` [PATCH 1/2] hwclock: remove unused epoch_option J William Piggott
2017-07-18 20:01 ` [PATCH 2/2] hwclock: fix regression from c3ae785 J William Piggott
0 siblings, 2 replies; 15+ messages in thread
From: J William Piggott @ 2017-07-18 19:59 UTC (permalink / raw)
To: Karel Zak; +Cc: util-linux
The following changes since commit 78f9ecb990b994e272d9a69670b5c006e7f9fcdc:
blkid: Add dm-integrity superblock signature (2017-07-18 14:43:21 +0200)
are available in the git repository at:
git@github.com:jwpi/util-linux.git 170717
for you to fetch changes up to 8c3a4703b173408d4f2e8dd8fcabf844b0cf0146:
hwclock: fix regression from c3ae785 (2017-07-18 15:42:55 -0400)
----------------------------------------------------------------
J William Piggott (2):
hwclock: remove unused epoch_option
hwclock: fix regression from c3ae785
sys-utils/hwclock.c | 7 ++++---
sys-utils/hwclock.h | 1 -
2 files changed, 4 insertions(+), 4 deletions(-)
^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH 1/2] hwclock: remove unused epoch_option
2017-07-18 19:59 [PATCH 0/2] Pull Request J William Piggott
@ 2017-07-18 20:00 ` J William Piggott
2017-07-18 20:01 ` [PATCH 2/2] hwclock: fix regression from c3ae785 J William Piggott
1 sibling, 0 replies; 15+ messages in thread
From: J William Piggott @ 2017-07-18 20:00 UTC (permalink / raw)
To: Karel Zak; +Cc: util-linux
Also one whitespace fix.
Signed-off-by: J William Piggott <elseifthen@gmx.com>
---
sys-utils/hwclock.c | 2 +-
sys-utils/hwclock.h | 1 -
2 files changed, 1 insertion(+), 2 deletions(-)
diff --git a/sys-utils/hwclock.c b/sys-utils/hwclock.c
index 423ebcd..9745158 100644
--- a/sys-utils/hwclock.c
+++ b/sys-utils/hwclock.c
@@ -1468,7 +1468,7 @@ int main(int argc, char **argv)
}
if (ctl.set || ctl.predict) {
- if (!ctl.date_opt){
+ if (!ctl.date_opt) {
warnx(_("--date is required for --set or --predict"));
hwclock_exit(&ctl, EX_USAGE);
}
diff --git a/sys-utils/hwclock.h b/sys-utils/hwclock.h
index 61be57a..a1ef80c 100644
--- a/sys-utils/hwclock.h
+++ b/sys-utils/hwclock.h
@@ -64,7 +64,6 @@ typedef int bool;
/* hwclock.c */
extern int debug;
-extern unsigned long epoch_option;
extern double time_diff(struct timeval subtrahend, struct timeval subtractor);
/* rtc.c */
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 2/2] hwclock: fix regression from c3ae785
2017-07-18 19:59 [PATCH 0/2] Pull Request J William Piggott
2017-07-18 20:00 ` [PATCH 1/2] hwclock: remove unused epoch_option J William Piggott
@ 2017-07-18 20:01 ` J William Piggott
2017-07-18 20:33 ` Ruediger Meier
2017-07-20 1:14 ` [v3 PATCH " J William Piggott
1 sibling, 2 replies; 15+ messages in thread
From: J William Piggott @ 2017-07-18 20:01 UTC (permalink / raw)
To: Karel Zak; +Cc: util-linux
hwclock --get foobar
hwclock: 3 too many arguments given
Fixed:
hwclock --get foobar
hwclock: 1 too many arguments given
Signed-off-by: J William Piggott <elseifthen@gmx.com>
---
sys-utils/hwclock.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/sys-utils/hwclock.c b/sys-utils/hwclock.c
index 9745158..9b313cf 100644
--- a/sys-utils/hwclock.c
+++ b/sys-utils/hwclock.c
@@ -1448,9 +1448,10 @@ int main(int argc, char **argv)
}
}
- if (argc > optind) {
+ argc -= optind;
+ if (argc > 0) {
warnx(_("%d too many arguments given"), argc);
- errtryhelp(EXIT_FAILURE);
+ errtryhelp(EX_USAGE);
}
if (!ctl.adj_file_name)
^ permalink raw reply related [flat|nested] 15+ messages in thread
* Re: [PATCH 2/2] hwclock: fix regression from c3ae785
2017-07-18 20:01 ` [PATCH 2/2] hwclock: fix regression from c3ae785 J William Piggott
@ 2017-07-18 20:33 ` Ruediger Meier
2017-07-18 20:46 ` Ruediger Meier
2017-07-19 1:20 ` J William Piggott
2017-07-20 1:14 ` [v3 PATCH " J William Piggott
1 sibling, 2 replies; 15+ messages in thread
From: Ruediger Meier @ 2017-07-18 20:33 UTC (permalink / raw)
To: J William Piggott; +Cc: Karel Zak, util-linux
On Tuesday 18 July 2017, J William Piggott wrote:
> hwclock --get foobar
> hwclock: 3 too many arguments given
>
> Fixed:
>
> hwclock --get foobar
> hwclock: 1 too many arguments given
>
> Signed-off-by: J William Piggott <elseifthen@gmx.com>
> ---
> sys-utils/hwclock.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/sys-utils/hwclock.c b/sys-utils/hwclock.c
> index 9745158..9b313cf 100644
> --- a/sys-utils/hwclock.c
> +++ b/sys-utils/hwclock.c
> @@ -1448,9 +1448,10 @@ int main(int argc, char **argv)
> }
> }
>
> - if (argc > optind) {
> + argc -= optind;
> + if (argc > 0) {
> warnx(_("%d too many arguments given"), argc);
Oops, sorry for this regression ;)
Anyways, at least for me "1 too many arguments given" does not sound
really understandable. Maybe we don't need that number at all!?
> - errtryhelp(EXIT_FAILURE);
> + errtryhelp(EX_USAGE);
What about changing also the last other errtryhelp(EXIT_FAILURE) to
EX_USAGE, 5 lines above?
> }
>
> if (!ctl.adj_file_name)
> --
> To unsubscribe from this list: send the line "unsubscribe util-linux"
> in the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 2/2] hwclock: fix regression from c3ae785
2017-07-18 20:33 ` Ruediger Meier
@ 2017-07-18 20:46 ` Ruediger Meier
2017-07-19 1:25 ` J William Piggott
2017-07-19 1:20 ` J William Piggott
1 sibling, 1 reply; 15+ messages in thread
From: Ruediger Meier @ 2017-07-18 20:46 UTC (permalink / raw)
To: J William Piggott; +Cc: Karel Zak, util-linux
On Tuesday 18 July 2017, Ruediger Meier wrote:
> On Tuesday 18 July 2017, J William Piggott wrote:
> > hwclock --get foobar
> > hwclock: 3 too many arguments given
> >
> > Fixed:
> >
> > hwclock --get foobar
> > hwclock: 1 too many arguments given
> >
> > Signed-off-by: J William Piggott <elseifthen@gmx.com>
> > ---
> > sys-utils/hwclock.c | 5 +++--
> > 1 file changed, 3 insertions(+), 2 deletions(-)
> >
> > diff --git a/sys-utils/hwclock.c b/sys-utils/hwclock.c
> > index 9745158..9b313cf 100644
> > --- a/sys-utils/hwclock.c
> > +++ b/sys-utils/hwclock.c
> > @@ -1448,9 +1448,10 @@ int main(int argc, char **argv)
> > }
> > }
> >
> > - if (argc > optind) {
> > + argc -= optind;
> > + if (argc > 0) {
> > warnx(_("%d too many arguments given"), argc);
>
> Oops, sorry for this regression ;)
BTW I removed
- argc -= optind;
- argv += optind;
only where I thought *both* are not used later. In this case I've made a
mistake. If you really want to keep "argc -= optind" then you could
also re-add the unused "argv += optind" to avoid confusing other
code-readers in future. Making the clang-analyzer happy is not the most
important thing.
> Anyways, at least for me "1 too many arguments given" does not sound
> really understandable. Maybe we don't need that number at all!?
>
> > - errtryhelp(EXIT_FAILURE);
> > + errtryhelp(EX_USAGE);
>
> What about changing also the last other errtryhelp(EXIT_FAILURE) to
> EX_USAGE, 5 lines above?
>
> > }
> >
> > if (!ctl.adj_file_name)
> > --
> > To unsubscribe from this list: send the line "unsubscribe
> > util-linux" in the body of a message to majordomo@vger.kernel.org
> > More majordomo info at http://vger.kernel.org/majordomo-info.html
>
> --
> To unsubscribe from this list: send the line "unsubscribe util-linux"
> in the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 2/2] hwclock: fix regression from c3ae785
2017-07-18 20:33 ` Ruediger Meier
2017-07-18 20:46 ` Ruediger Meier
@ 2017-07-19 1:20 ` J William Piggott
1 sibling, 0 replies; 15+ messages in thread
From: J William Piggott @ 2017-07-19 1:20 UTC (permalink / raw)
To: Ruediger Meier; +Cc: Karel Zak, util-linux
On 07/18/2017 04:33 PM, Ruediger Meier wrote:
> On Tuesday 18 July 2017, J William Piggott wrote:
>> hwclock --get foobar
>> hwclock: 3 too many arguments given
>>
>> Fixed:
>>
>> hwclock --get foobar
>> hwclock: 1 too many arguments given
>>
>> Signed-off-by: J William Piggott <elseifthen@gmx.com>
>> ---
>> sys-utils/hwclock.c | 5 +++--
>> 1 file changed, 3 insertions(+), 2 deletions(-)
>>
>> diff --git a/sys-utils/hwclock.c b/sys-utils/hwclock.c
>> index 9745158..9b313cf 100644
>> --- a/sys-utils/hwclock.c
>> +++ b/sys-utils/hwclock.c
>> @@ -1448,9 +1448,10 @@ int main(int argc, char **argv)
>> }
>> }
>>
>> - if (argc > optind) {
>> + argc -= optind;
>> + if (argc > 0) {
>> warnx(_("%d too many arguments given"), argc);
>
> Oops, sorry for this regression ;)
>
> Anyways, at least for me "1 too many arguments given" does not sound
> really understandable. Maybe we don't need that number at all!?
>
I don't how it would be misunderstood, it's pretty straight forward
language.
I think the number could be helpful for complex commands like:
hwclock --predict --date jan 10 2017 --utc foo --noadjfile
hwclock: 3 too many arguments given
>
>> - errtryhelp(EXIT_FAILURE);
>> + errtryhelp(EX_USAGE);
>
> What about changing also the last other errtryhelp(EXIT_FAILURE) to
> EX_USAGE, 5 lines above?
Good point. Pushed the change.
>
>
>> }
>>
>> if (!ctl.adj_file_name)
>> --
>> To unsubscribe from this list: send the line "unsubscribe util-linux"
>> in the body of a message to majordomo@vger.kernel.org
>> More majordomo info at http://vger.kernel.org/majordomo-info.html
> --
> To unsubscribe from this list: send the line "unsubscribe util-linux" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 2/2] hwclock: fix regression from c3ae785
2017-07-18 20:46 ` Ruediger Meier
@ 2017-07-19 1:25 ` J William Piggott
0 siblings, 0 replies; 15+ messages in thread
From: J William Piggott @ 2017-07-19 1:25 UTC (permalink / raw)
To: Ruediger Meier; +Cc: Karel Zak, util-linux
On 07/18/2017 04:46 PM, Ruediger Meier wrote:
> On Tuesday 18 July 2017, Ruediger Meier wrote:
>> On Tuesday 18 July 2017, J William Piggott wrote:
>>> hwclock --get foobar
>>> hwclock: 3 too many arguments given
>>>
>>> Fixed:
>>>
>>> hwclock --get foobar
>>> hwclock: 1 too many arguments given
>>>
>>> Signed-off-by: J William Piggott <elseifthen@gmx.com>
>>> ---
>>> sys-utils/hwclock.c | 5 +++--
>>> 1 file changed, 3 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/sys-utils/hwclock.c b/sys-utils/hwclock.c
>>> index 9745158..9b313cf 100644
>>> --- a/sys-utils/hwclock.c
>>> +++ b/sys-utils/hwclock.c
>>> @@ -1448,9 +1448,10 @@ int main(int argc, char **argv)
>>> }
>>> }
>>>
>>> - if (argc > optind) {
>>> + argc -= optind;
>>> + if (argc > 0) {
>>> warnx(_("%d too many arguments given"), argc);
>>
>> Oops, sorry for this regression ;)
>
> BTW I removed
>
> - argc -= optind;
> - argv += optind;
>
> only where I thought *both* are not used later. In this case I've made a
> mistake. If you really want to keep "argc -= optind" then you could
> also re-add the unused "argv += optind" to avoid confusing other
> code-readers in future. Making the clang-analyzer happy is not the most
> important thing.
>
Including it is confusing; it doesn't do anything.
>> Anyways, at least for me "1 too many arguments given" does not sound
>> really understandable. Maybe we don't need that number at all!?
>>
>>> - errtryhelp(EXIT_FAILURE);
>>> + errtryhelp(EX_USAGE);
>>
>> What about changing also the last other errtryhelp(EXIT_FAILURE) to
>> EX_USAGE, 5 lines above?
>>
>>> }
>>>
>>> if (!ctl.adj_file_name)
>>> --
>>> To unsubscribe from this list: send the line "unsubscribe
>>> util-linux" in the body of a message to majordomo@vger.kernel.org
>>> More majordomo info at http://vger.kernel.org/majordomo-info.html
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe util-linux"
>> in the body of a message to majordomo@vger.kernel.org
>> More majordomo info at http://vger.kernel.org/majordomo-info.html
> --
> To unsubscribe from this list: send the line "unsubscribe util-linux" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply [flat|nested] 15+ messages in thread
* [v3 PATCH 2/2] hwclock: fix regression from c3ae785
2017-07-18 20:01 ` [PATCH 2/2] hwclock: fix regression from c3ae785 J William Piggott
2017-07-18 20:33 ` Ruediger Meier
@ 2017-07-20 1:14 ` J William Piggott
1 sibling, 0 replies; 15+ messages in thread
From: J William Piggott @ 2017-07-20 1:14 UTC (permalink / raw)
To: Karel Zak; +Cc: util-linux
hwclock --get foo
hwclock: 3 too many arguments given
Fixed:
hwclock --get foo
hwclock: 1 too many arguments given
Signed-off-by: J William Piggott <elseifthen@gmx.com>
---
sys-utils/hwclock.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/sys-utils/hwclock.c b/sys-utils/hwclock.c
index 9745158..aadf196 100644
--- a/sys-utils/hwclock.c
+++ b/sys-utils/hwclock.c
@@ -1444,13 +1444,13 @@ int main(int argc, char **argv)
case 'h': /* --help */
usage(&ctl);
default:
- errtryhelp(EXIT_FAILURE);
+ errtryhelp(EX_USAGE);
}
}
- if (argc > optind) {
+ if (argc -= optind) {
warnx(_("%d too many arguments given"), argc);
- errtryhelp(EXIT_FAILURE);
+ errtryhelp(EX_USAGE);
}
if (!ctl.adj_file_name)
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 0/2] Pull Request
@ 2017-12-24 20:36 J William Piggott
0 siblings, 0 replies; 15+ messages in thread
From: J William Piggott @ 2017-12-24 20:36 UTC (permalink / raw)
To: Karel Zak; +Cc: util-linux
The following changes since commit 43afa84581de8984aa00ef2e9208198929f72ddf:
lib/mbsalign: encode \x to \xecx (2017-12-20 13:01:43 +0100)
are available in the git repository at:
git@github.com:jwpi/util-linux.git 171213
for you to fetch changes up to e3fac9e420c55ae804199da6be2eb08ba9788795:
hwclock: add --ul-debug implementing debug.h (2017-12-24 14:19:26 -0500)
----------------------------------------------------------------
J William Piggott (2):
hwclock: rename --debug option to --verbose
hwclock: add --ul-debug implementing debug.h
Documentation/deprecated.txt | 12 +++++
sys-utils/hwclock-rtc.c | 10 ++---
sys-utils/hwclock.8.in | 15 ++++---
sys-utils/hwclock.c | 105 ++++++++++++++++++++++++-------------------
sys-utils/hwclock.h | 14 ++++--
5 files changed, 96 insertions(+), 60 deletions(-)
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 0/2] Pull Request
2017-11-18 21:19 J William Piggott
@ 2017-11-20 11:08 ` Karel Zak
0 siblings, 0 replies; 15+ messages in thread
From: Karel Zak @ 2017-11-20 11:08 UTC (permalink / raw)
To: J William Piggott; +Cc: util-linux
On Sat, Nov 18, 2017 at 04:19:15PM -0500, J William Piggott wrote:
> J William Piggott (2):
> hwclock: use reentrant time conversion functions
> hwclock: fix debug regression
Applied, thanks.
--
Karel Zak <kzak@redhat.com>
http://karelzak.blogspot.com
^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH 0/2] Pull Request
@ 2017-11-18 21:19 J William Piggott
2017-11-20 11:08 ` Karel Zak
0 siblings, 1 reply; 15+ messages in thread
From: J William Piggott @ 2017-11-18 21:19 UTC (permalink / raw)
To: Karel Zak; +Cc: util-linux
The following changes since commit 75f03badd7ed9f1dd951863d75e756883d3acc55:
bash-completion: (umount) use findmnt, escape a space in paths (2017-11-16 16:27:32 +0100)
are available in the git repository at:
git@github.com:jwpi/util-linux.git 171017
for you to fetch changes up to af54dbd929266f6706a34050ed51e5114f520f59:
hwclock: fix debug regression (2017-11-17 20:25:40 -0500)
----------------------------------------------------------------
J William Piggott (2):
hwclock: use reentrant time conversion functions
hwclock: fix debug regression
sys-utils/hwclock.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 0/2] pull request
2017-09-21 20:08 [PATCH 0/2] pull request J William Piggott
@ 2017-09-22 10:04 ` Karel Zak
0 siblings, 0 replies; 15+ messages in thread
From: Karel Zak @ 2017-09-22 10:04 UTC (permalink / raw)
To: J William Piggott; +Cc: util-linux
On Thu, Sep 21, 2017 at 04:08:46PM -0400, J William Piggott wrote:
> J William Piggott (2):
> hwclock: exit bug fix and single test mode message
> hwclock: make debug implicit for test mode.
Applied, thanks.
--
Karel Zak <kzak@redhat.com>
http://karelzak.blogspot.com
^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH 0/2] pull request
@ 2017-09-21 20:08 J William Piggott
2017-09-22 10:04 ` Karel Zak
0 siblings, 1 reply; 15+ messages in thread
From: J William Piggott @ 2017-09-21 20:08 UTC (permalink / raw)
To: Karel Zak; +Cc: util-linux
Karel, these include a minor bug fix and another change that yet again
affects hwclock's usage strings, so I thought you might want them for
the upcoming release.
If you'd rather wait until the next cycle, that is fine with me as well.
The following changes since commit 323e0668cd380b3353da03d5bd74887ab26f1ea3:
po: fix ipcrm translation error fr.po (2017-09-20 12:14:42 +0200)
are available in the git repository at:
git@github.com:jwpi/util-linux.git 170915
for you to fetch changes up to f0a0ce744573bc3b3164062bc25e8fc6ddc7d9b9:
hwclock: make debug implicit for test mode. (2017-09-21 14:53:43 -0400)
----------------------------------------------------------------
J William Piggott (2):
hwclock: exit bug fix and single test mode message
hwclock: make debug implicit for test mode.
sys-utils/hwclock.8.in | 8 +++----
sys-utils/hwclock.c | 64 ++++++++++++++++++++------------------------------
2 files changed, 29 insertions(+), 43 deletions(-)
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 0/2] pull request
2017-06-22 0:49 J William Piggott
@ 2017-06-22 8:47 ` Karel Zak
0 siblings, 0 replies; 15+ messages in thread
From: Karel Zak @ 2017-06-22 8:47 UTC (permalink / raw)
To: J William Piggott; +Cc: util-linux
On Wed, Jun 21, 2017 at 08:49:56PM -0400, J William Piggott wrote:
> are available in the git repository at:
>
> git@github.com:jwpi/util-linux.git 170618
Merged, thanks.
Karel
--
Karel Zak <kzak@redhat.com>
http://karelzak.blogspot.com
^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH 0/2] pull request
@ 2017-06-22 0:49 J William Piggott
2017-06-22 8:47 ` Karel Zak
0 siblings, 1 reply; 15+ messages in thread
From: J William Piggott @ 2017-06-22 0:49 UTC (permalink / raw)
To: Karel Zak; +Cc: util-linux
The following changes since commit fad561b0e4b862e320b3c7b72527b09bc1b04860:
build-sys: update DISTCHECK_CONFIGURE_FLAGS (2017-06-21 15:41:21 +0200)
are available in the git repository at:
git@github.com:jwpi/util-linux.git 170618
for you to fetch changes up to 2cb89055c57143f120a404e1c00757eb1b7d41b0:
hwclock: add audit for --systz (2017-06-21 20:37:41 -0400)
----------------------------------------------------------------
J William Piggott (2):
hwclock: remove unused optstring characters
hwclock: add audit for --systz
sys-utils/hwclock.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2017-12-24 20:36 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-18 19:59 [PATCH 0/2] Pull Request J William Piggott
2017-07-18 20:00 ` [PATCH 1/2] hwclock: remove unused epoch_option J William Piggott
2017-07-18 20:01 ` [PATCH 2/2] hwclock: fix regression from c3ae785 J William Piggott
2017-07-18 20:33 ` Ruediger Meier
2017-07-18 20:46 ` Ruediger Meier
2017-07-19 1:25 ` J William Piggott
2017-07-19 1:20 ` J William Piggott
2017-07-20 1:14 ` [v3 PATCH " J William Piggott
-- strict thread matches above, loose matches on Subject: below --
2017-12-24 20:36 [PATCH 0/2] Pull Request J William Piggott
2017-11-18 21:19 J William Piggott
2017-11-20 11:08 ` Karel Zak
2017-09-21 20:08 [PATCH 0/2] pull request J William Piggott
2017-09-22 10:04 ` Karel Zak
2017-06-22 0:49 J William Piggott
2017-06-22 8:47 ` 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.