[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAG-2HqV_mXyARMs=9GOpbCBHPU+2XMkDcm=sGekYnnujNPAYqQ@mail.gmail.com>
Date: Thu, 30 Oct 2014 12:02:39 +0100
From: Tom Gundersen <teg@...m.no>
To: Arnd Bergmann <arnd@...db.de>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Linux API <linux-api@...r.kernel.org>,
LKML <linux-kernel@...r.kernel.org>,
John Stultz <john.stultz@...aro.org>,
Tejun Heo <tj@...nel.org>,
Marcel Holtmann <marcel@...tmann.org>,
Ryan Lortie <desrt@...rt.ca>,
Bastien Nocera <hadess@...ess.net>,
David Herrmann <dh.herrmann@...il.com>,
Djalal Harouni <tixxdz@...ndz.org>,
Simon McVittie <simon.mcvittie@...labora.co.uk>,
Daniel Mack <daniel@...que.org>,
"alban.crequy" <alban.crequy@...labora.co.uk>,
"javier.martinez" <javier.martinez@...labora.co.uk>
Subject: Re: kdbus: add header file
On Thu, Oct 30, 2014 at 9:20 AM, Arnd Bergmann <arnd@...db.de> 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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists