Re: [PATCH 2/3 v4] Refactor and expose core-dumping functionality

Gary Benson
2014-06-06T09:09:08Z

Doug Evans wrote:
> On Thu, Jun 5, 2014 at 6:03 AM, Gary Benson <gbenson@redhat.com> wrote:
> > This patch exposes the functions that dump core outside utils.c.
> > The function can_dump_core has been split into two new functions,
> > check_can_dump_core and warn_cant_dump_core so that the check and
> > the printed warning can be separated. A new function
> > check_can_dump_core_warn replaces the original can_dump_core.
>
> check_can_dump_core feels a bit clumsy over the original
> can_dump_core. can_dump_core (or can_dump_core_p) reads better to
> me. [And now it does what it says it does, without the side-effect
> of the printf.]
>
> Not sure if I'd rename check_can_dump_core_warn (or delete it).

Ok, I renamed check_can_dump_core back to the original can_dump_core,
and I renamed check_can_dump_core_warn as can_dump_core_warn (it's
called twice, so there would be duplication if I removed it).

I won't post another patch series for such a small change but the
updated patches are in my github (http://tinyurl.com/dmcc-v4-2 and
http://tinyurl.com/dmcc-v4-3) if you would like to take a look.
Patch 2 is the important one, patch 3 only has a couple of lines
changed.

Thanks,
Gary

--