[vbox-dev] [PATCH 0/3] VBoxGuest.h: ioctl definitions cleanups
Hans de Goede
hdegoede at redhat.com
Wed Aug 16 09:54:53 UTC 2017
Hi Knut, Michael,
While taking another look at the ioctl number definitions I noticed
that most ioctls were defined using VBOXGUEST_IOCTL_CODE_ (note the _
at the end). So I started out writing a patch to make all ioctls
which do not have a specific 32 bit version use VBOXGUEST_IOCTL_CODE_
instead of VBOXGUEST_IOCTL_CODE (no _ at the end) to be consistent.
Then I realized that VBOXGUEST_IOCTL_CODE_ being used already for
most ioctls means that tVBOXGUEST_IOCTL_FLAG has no meaning outside of
defining the ioctl numbers. Which means that we can switch
VBOXGUEST_IOCTL_HGCM_[DIS]CONNECT to using VBOXGUEST_IOCTL_CODE_
and get rid of VBOXGUEST_IOCTL_HGCM_[DIS]CONNECT_32 since the
actual implementation of them is identical, leading to a nice
After this I realized that this also allowed to get rid of
VBOXGUEST_IOCTL_FLAG altogether in a different manner then
my previous attempt, which is the 3th patch.
I know you already nacked me getting rid of the VBOXGUEST_IOCTL_FLAG,
but this does so in a different manner which actually reduces the number
of #ifdef-s, so I hope you are willing to merge these patches.
If you want to keep the VBOXGUEST_IOCTL_FLAG, it would be nice if you
could at least merge the 2nd patch, as that leads to a nice cleanup.
More information about the vbox-dev