Re: Use enum to declare errno values

From: Nikita Danilov
Date: Wed Nov 23 2005 - 11:55:48 EST

moreau francis writes:


> int foo(void)
> {
> int tmp;
> tmp = bar();
> [...]
> return tmp;
> }
> How do you know if tmp store an errno value ? You have to look into bar and so

Of course you should. How to debug anything without knowing what called
function is doing? This is kernel programming after all. Which, by the
way, means that debugging convenience is not at all important.

> on...By using "enum errnoval", gdb can directly tell you that a variable stores
> an errno value.
> Thanks

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