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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxxxxx> 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
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux