Re: [PATCH 12/12] setterm: convert remaining magic values to symbolic references

Karel Zak
2014-05-12T12:16:26Z

On Sun, May 11, 2014 at 08:26:49PM +0100, Sami Kerola wrote:
> Signed-off-by: Sami Kerola <kerolasa@iki.fi>
> ---
> term-utils/setterm.c | 65 ++++++++++++++++++++++++++++++++++++----------------
> 1 file changed, 45 insertions(+), 20 deletions(-)
>
> diff --git a/term-utils/setterm.c b/term-utils/setterm.c
> index 2de555e..5950d2a 100644
> --- a/term-utils/setterm.c
> +++ b/term-utils/setterm.c
> @@ -171,6 +171,31 @@ enum {
> };
> #endif
>
> +/* Powersave modes */
> +enum {
> + VESA_BLANK_MODE_OFF = 0,
> + VESA_BLANK_MODE_SUSPENDV,
> + VESA_BLANK_MODE_SUSPENDH,
> + VESA_BLANK_MODE_POWERDOWN
> +};
> +
> +/* klogctl() actions */
> +enum {
> + SYSLOG_ACTION_CONSOLE_OFF = 6,
> + SYSLOG_ACTION_CONSOLE_ON = 7,
> + SYSLOG_ACTION_CONSOLE_LEVEL = 8
> +};

OK.

> +/* Various numbers */
> +enum {
> + CONSOLE_LEVEL_MIN = 1,
> + CONSOLE_LEVEL_MAX = 8,
> + DEFAULT_TAB_LEN = 8,
> + BLANK_MAX = 60,
> + TABS_MAX = 160,
> + BLENGTH_MAX = 2000,
> +};

Please, use enum {} to group together things which have any relation,
otherwise use #define.

Fixed and merged.

Applied all patches in the patchset, thanks.

Karel

--
Karel Zak <kzak@redhat.com>