[firefly] [PATCH] usb: usbip: fix usbip.h path in userspace tool

Greg KH gregkh at linuxfoundation.org
Thu Sep 4 23:43:22 EEST 2014


On Thu, Sep 04, 2014 at 09:58:11PM +0300, Valentina Manea wrote:
> On Thu, Sep 4, 2014 at 5:14 AM, Greg KH <gregkh at linuxfoundation.org> wrote:
> >
> >> This patch is a pretty nasty hack to get it to compile within the
> >> kernel tree.  I wonder whether we can make this self-contained by
> >> duplicating the header's content inside usbip_common.h.
> >
> > Ick, no, don't do that, use the .h file, that is what it is there for.
> >
> 
> This leaves 2 options:
> a. include the file the way this patch did it

No.

> b. include as <linux/usbip.h> and add the relative path in the kernel
> tree to include/uapi as include path. the problem with this is that
> the previous header, ch9.h, eventually includes other kernel headers
> and a path to include/ would also be necessary. plus, there's a
> warning about using kernel headers from user space, which is legit.

If you get a warning, then you are doing something wrong.  Just use the
header file that the kernel installs (it is a uapi/ file, right?)  Then
all should be fine.

> For the time being, I suppose the first option will do.

No, relative paths for user tools to kernel header files isn't ok.

greg k-h


More information about the firefly mailing list