All of lore.kernel.org
 help / color / mirror / Atom feed
From: J William Piggott <elseifthen@gmx.com>
To: Karel Zak <kzak@redhat.com>
Cc: util-linux@vger.kernel.org
Subject: Re: [PATCH 2/3] hwclock: remove audit from control struct
Date: Wed, 30 Aug 2017 13:56:21 -0400	[thread overview]
Message-ID: <50bfaf8d-7036-deb7-5cde-854da4e23f64@gmx.com> (raw)
In-Reply-To: <20170830074001.brchka4sfp36wukz@ws.net.home>



On 08/30/2017 03:40 AM, Karel Zak wrote:
> On Tue, Aug 29, 2017 at 12:34:07PM -0400, J William Piggott wrote:
>>
>> hwaudit_on is only used in main() and hwclock_exit() and
>> that is unlikely to ever change.
> 
>  Hmm... the goal is minimize global variables to keep code readable.
>  It's strange to have a control struct and use global variable in the
>  same time.
> 
>> Remove it from the control struct because it:
>>  * cleans up an ugly directive in hwclock_exit
>>  * removes an argument from usage() and hwclock_exit()
>>  * makes usage() comply with util-linux standards
> 
>  I think usage() can call exit(EXIT_SUCCESS) and do not need play any
>  games with audit at all.

True for half of hwclock's functions. Perhaps this special exit
handling should only exist when we HAVE_LIBAUDIT?

Okay, I'll rethink this and update the pull request.

>  
>  On another places we have "ctl" so it's fine fine to keep hwaudit_on
>  within the control struct.
> 
>     Karel
> 

  reply	other threads:[~2017-08-30 17:56 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-29 16:30 [PATCH 0/3] Pull Request J William Piggott
2017-08-29 16:33 ` [PATCH 1/3] hwclock: remove sysexits.h J William Piggott
2017-08-29 16:34 ` [PATCH 2/3] hwclock: remove audit from control struct J William Piggott
2017-08-30  7:40   ` Karel Zak
2017-08-30 17:56     ` J William Piggott [this message]
2017-09-03 19:59       ` J William Piggott
2017-09-03 21:54         ` Sami Kerola
2017-09-04  1:22           ` J William Piggott
2017-09-03 20:01   ` [v2 PATCH 2/3] hwclock: don't always use hwclock_exit J William Piggott
2017-08-29 16:35 ` [PATCH 3/3] hwclock: close hwaudit_fd unconditionally J William Piggott
2017-09-05 10:27 ` [PATCH 0/3] Pull Request Karel Zak

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=50bfaf8d-7036-deb7-5cde-854da4e23f64@gmx.com \
    --to=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 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.