Re: [PATCH] usb: usbip: fix usbip.h path in userspace tool
On Fri, Sep 05, 2014 at 12:55:39AM +0200, Piotr Król wrote: Sorry for that I send second time the same patch. Please ignore it. Thanks, Piotr > Fixes: 588b48caf65c ("usbip: move usbip userspace code out of staging") > which introduced build failure by not changing uapi/usbip.h include path > according to new location. > > Signed-off-by: Piotr Król > --- > tools/usb/usbip/libsrc/usbip_common.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/tools/usb/usbip/libsrc/usbip_common.h > b/tools/usb/usbip/libsrc/usbip_common.h > index 5a0e95edf4df..a80e73d4f11e 100644 > --- a/tools/usb/usbip/libsrc/usbip_common.h > +++ b/tools/usb/usbip/libsrc/usbip_common.h > @@ -15,7 +15,7 @@ > #include > #include > #include > -#include "../../uapi/usbip.h" > +#include <../../../include/uapi/linux/usbip.h> > > #ifndef USBIDS_FILE > #define USBIDS_FILE "/usr/share/hwdata/usb.ids" > -- > 2.1.0 > -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] usb: usbip: fix usbip.h path in userspace tool
On Thu, Sep 04, 2014 at 09:58:11PM +0300, Valentina Manea wrote: > On Thu, Sep 4, 2014 at 5:14 AM, Greg KH 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 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 majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] usb: usbip: fix usbip.h path in userspace tool
On Thu, Sep 4, 2014 at 5:14 AM, Greg KH 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 b. include as 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. For the time being, I suppose the first option will do. Thanks, Valentina -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] usb: usbip: fix usbip.h path in userspace tool
Hello. On 9/4/2014 3:31 AM, Piotr Król wrote: Fixes: 588b48caf65c ("usbip: move usbip userspace code out of staging") which introduced build failure by not changing uapi/usbip.h include path according to new location. Signed-off-by: Piotr Król --- tools/usb/usbip/libsrc/usbip_common.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/usb/usbip/libsrc/usbip_common.h b/tools/usb/usbip/libsrc/usbip_common.h index 5a0e95edf4df..a80e73d4f11e 100644 --- a/tools/usb/usbip/libsrc/usbip_common.h +++ b/tools/usb/usbip/libsrc/usbip_common.h @@ -15,7 +15,7 @@ #include #include #include -#include "../../uapi/usbip.h" +#include <../../../include/uapi/linux/usbip.h> I wonder why you use <> for the current-dir-relative path, not ""? WBR, Sergei -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] usb: usbip: fix usbip.h path in userspace tool
On Thu, Sep 04, 2014 at 11:59:40AM +0300, Valentina Manea wrote: > On Thu, Sep 4, 2014 at 2:41 AM, Greg KH wrote: > > > > Shouldn't you be able to use the same "path" as ch9.h uses? It's a uapi > > .h file, no relative paths should be needed. > > > > For the userspace tool, the build system only looks for headers in the > system default locations, such as /usr/include. Hence, this won't work > for systems that don't have kernel 3.17 headers. That's fine to depend on. > 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. thanks, greg k-h -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] usb: usbip: fix usbip.h path in userspace tool
On Thu, Sep 4, 2014 at 2:41 AM, Greg KH wrote: > > Shouldn't you be able to use the same "path" as ch9.h uses? It's a uapi > .h file, no relative paths should be needed. > For the userspace tool, the build system only looks for headers in the system default locations, such as /usr/include. Hence, this won't work for systems that don't have kernel 3.17 headers. 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. Greg, Shuah, what do you think? Thanks, Valentina -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] usb: usbip: fix usbip.h path in userspace tool
On Thu, Sep 04, 2014 at 01:31:17AM +0200, Piotr Król wrote: > Fixes: 588b48caf65c ("usbip: move usbip userspace code out of staging") > which introduced build failure by not changing uapi/usbip.h include path > according to new location. > > Signed-off-by: Piotr Król > --- > tools/usb/usbip/libsrc/usbip_common.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/tools/usb/usbip/libsrc/usbip_common.h > b/tools/usb/usbip/libsrc/usbip_common.h > index 5a0e95edf4df..a80e73d4f11e 100644 > --- a/tools/usb/usbip/libsrc/usbip_common.h > +++ b/tools/usb/usbip/libsrc/usbip_common.h > @@ -15,7 +15,7 @@ > #include > #include > #include > -#include "../../uapi/usbip.h" > +#include <../../../include/uapi/linux/usbip.h> Shouldn't you be able to use the same "path" as ch9.h uses? It's a uapi .h file, no relative paths should be needed. thanks, greg k-h -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html