Thread (89 messages) flat view 89 messages, 18 authors, 2014-11-17

Re: kdbus: add header file

From: Tom Gundersen <hidden>
Date: 2014-10-30 11:03:02
Also in: lkml

On Thu, Oct 30, 2014 at 9:20 AM, Arnd Bergmann [off-list ref] wrote:
I think in general, using enum is great, but for ioctl command numbers,
we probably want to have defines so the user space implementation can
use #ifdef to see if the kernel version that it is being built for
knows a particular command.
Does that make sense for the first version? I agree that we should use
 #define to allow #ifdef for when we add more ioctls in the future,
but these ioctls will always exist...

The nice thing about enums is of course that it helps with debugging
as gdb can show the string representation rather than the number,
because in contrast to #defines, an enum is something the compliler
knows about.

Cheers,

Tom
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help