From 0c7f35d26b1dc45ab27e3ea8ff7f6a8a88a18174 Mon Sep 17 00:00:00 2001 From: Galen Guyer Date: Mon, 8 May 2023 17:21:20 -0400 Subject: usbip: give a more helpful error message if vhdi_hcd isn't loaded Suggest loading vhdi_hcd if it's not loaded to make error message less opaque Signed-off-by: Galen Guyer Reviewed-By: Hongren Zheng Acked-by: Shuah Khan Link: https://lore.kernel.org/r/20230508212120.435329-1-galen@galenguyer.com Signed-off-by: Greg Kroah-Hartman --- tools/usb/usbip/src/usbip_attach.c | 2 +- tools/usb/usbip/src/usbip_detach.c | 2 +- tools/usb/usbip/src/usbip_port.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'tools') diff --git a/tools/usb/usbip/src/usbip_attach.c b/tools/usb/usbip/src/usbip_attach.c index b4aeb9f1f493..531a415538f9 100644 --- a/tools/usb/usbip/src/usbip_attach.c +++ b/tools/usb/usbip/src/usbip_attach.c @@ -86,7 +86,7 @@ static int import_device(int sockfd, struct usbip_usb_device *udev) rc = usbip_vhci_driver_open(); if (rc < 0) { - err("open vhci_driver"); + err("open vhci_driver (is vhci_hcd loaded?)"); goto err_out; } diff --git a/tools/usb/usbip/src/usbip_detach.c b/tools/usb/usbip/src/usbip_detach.c index aec993159036..b29101986b5a 100644 --- a/tools/usb/usbip/src/usbip_detach.c +++ b/tools/usb/usbip/src/usbip_detach.c @@ -50,7 +50,7 @@ static int detach_port(char *port) ret = usbip_vhci_driver_open(); if (ret < 0) { - err("open vhci_driver"); + err("open vhci_driver (is vhci_hcd loaded?)"); return -1; } diff --git a/tools/usb/usbip/src/usbip_port.c b/tools/usb/usbip/src/usbip_port.c index 4d14387df13d..21a20e378419 100644 --- a/tools/usb/usbip/src/usbip_port.c +++ b/tools/usb/usbip/src/usbip_port.c @@ -18,7 +18,7 @@ static int list_imported_devices(void) ret = usbip_vhci_driver_open(); if (ret < 0) { - err("open vhci_driver"); + err("open vhci_driver (is vhci_hcd loaded?)"); goto err_names_free; } -- cgit v1.2.3 From 06042d7b32a71c6a423948f8c7fd4bd13572bdf3 Mon Sep 17 00:00:00 2001 From: Uwe Kleine-König Date: Wed, 3 May 2023 19:36:22 +0200 Subject: usbip: Use _FORTIFY_SOURCE=2 instead of (implicitly) =1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit _FORTIFY_SOURCE=2 uses more and stricter checks. This is what e.g. Debian recommends to build packages with. While at it fix a typo in the output of ./configure --help. Signed-off-by: Uwe Kleine-König Reviewed-By: Hongren Zheng Link: https://lore.kernel.org/r/20230503173622.1072787-1-ukleinek@debian.org Signed-off-by: Greg Kroah-Hartman --- tools/usb/usbip/configure.ac | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tools') diff --git a/tools/usb/usbip/configure.ac b/tools/usb/usbip/configure.ac index 607d05c5ccfd..8debf934f8b7 100644 --- a/tools/usb/usbip/configure.ac +++ b/tools/usb/usbip/configure.ac @@ -94,11 +94,11 @@ AC_SUBST([USBIDS_DIR]) AC_MSG_CHECKING([whether to use fortify]) AC_ARG_WITH([fortify], [AS_HELP_STRING([--with-fortify], - [use _FORTIFY_SROUCE option when compiling)])], + [use _FORTIFY_SOURCE=2 option when compiling)])], dnl [ACTION-IF-GIVEN] [if test "$withval" = "yes"; then AC_MSG_RESULT([yes]) - CFLAGS="$CFLAGS -D_FORTIFY_SOURCE -O" + CFLAGS="$CFLAGS -D_FORTIFY_SOURCE=2 -O" else AC_MSG_RESULT([no]) CFLAGS="$CFLAGS -U_FORTIFY_SOURCE" -- cgit v1.2.3