Re: [PATCH 3/6] usermodehelper: kill umh_wait, renumber UMH_*constants

From: Oleg Nesterov
Date: Wed Feb 15 2012 - 13:19:36 EST


On 02/15, Rusty Russell wrote:
>
> On Tue, 14 Feb 2012 17:48:21 +0100, Oleg Nesterov <oleg@xxxxxxxxxx> wrote:
> > No functional changes. It is not sane to use UMH_KILLABLE with
> > enum umh_wait, but obviously we do not want another argument in
> > call_usermodehelper_* helpers. Kill this enum, use the plain int.
>
> Seems like a step backwards. Perhaps reorder the enum, but implying an
> explicit range of values explicit by using an enum seems good.

The problem is, the things like "UMH_WAIT_EXEC | UMH_KILLABLE" do not
look like enum to me, even if they both are enums and the resulting
code is correct.

OTOH, something like

enum umh_wait {
UMH_NO_WAIT,
UMH_WAIT_EXEC,
UMH_WAIT_PROC,
UMH_WAIT_EXEC_KILLABLE,
UMH_WAIT_PROC_KILLABLE,
};

doesn't look very nice/convenient too.

But. This is the cleanup, and thus it should not disturb the maintainer.
I do not mind to redo it either way, just tell me what you prefer.

This change doesn't create any dependency, it can be reverted/reworked
at any moment. It could be the last patch in series, probably I should
have sent it as 6/6.

Or,

> But it's a minor gripe, feel free to ignore.

works for me too ;)

> Entire series:
> Acked-by: Rusty Russell <rusty@xxxxxxxxxxxxxxx>

Thanks!

Oleg.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/