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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, May 11, 2014 at 08:26:49PM +0100, Sami Kerola wrote:
> Signed-off-by: Sami Kerola <kerolasa@xxxxxx>
> ---
>  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@xxxxxxxxxx>
 http://karelzak.blogspot.com
--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux