Re: Use enum to declare errno values

From: Alan Cox
Date: Wed Nov 23 2005 - 09:42:42 EST

On Mer, 2005-11-23 at 16:31 +0200, Denis Vlasenko wrote:
> Enums are really nice substitute for integer constants instead of #defines.
> Enums obey scope rules, #defines do not.
> However enums are not widely used because of
> 1. tradition and style
> 2. awkward syntax required: enum { ABC = 123 };

The SATA layer uses enum for constants and while it was a bit of change
in style when I met it, it does seem to work just as well

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at