Commit Graph
7 Commits
Author SHA1 Message Date
Yuyang Du 37e47d5cfe usb: usbip tool: Fix get_nports()
The commit 0775a9cbc6 ("usbip: vhci extension: modifications
to vhci driver") introduced multiple controllers, and nports as a sys
file, and claimed to read the nports from it, but it didn't.

In addition, the get_nports() has been so wrong that even with 8 port
lines for instance, it gets 7 (I am guessing it is due to a '\n' mess).
Nevertheless, we fix it by reading the nports attribute.

Reviewed-by: Krzysztof Opasiak <[email protected]>
Signed-off-by: Yuyang Du <[email protected]>
Acked-by: Shuah Khan <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2017-04-08 12:17:42 +02:00
Jonathan Dieter e5dfa3f902 usbip: Fix potential format overflow in userspace tools
The usbip userspace tools call sprintf()/snprintf() and don't check for
the return value which can lead the paths to overflow, truncating the
final file in the path.

More urgently, GCC 7 now warns that these aren't checked with
-Wformat-overflow, and with -Werror enabled in configure.ac, that makes
these tools unbuildable.

This patch fixes these problems by replacing sprintf() with snprintf() in
one place and adding checks for the return value of snprintf().

Reviewed-by: Peter Senna Tschudin <[email protected]>
Signed-off-by: Jonathan Dieter <[email protected]>
Acked-by: Shuah Khan <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2017-03-17 13:16:56 +09:00
Krzysztof Opasiak 7b3f74f7e0 usbip: tools: Add vudc backend to usbip tools
Adds an equivalent of usbip_host_driver for the vudc. Most
of the code is already shared, but this adds some vudc specific
code for getting information about devices.

Based on code created in cooperation with Open Operating Systems
Student Society at University of Warsaw (O2S3@UW) consisting of:

   Igor Kotrasinski <[email protected]>
   Karol Kosik <[email protected]>
   Ewelina Kosmider <[email protected]>
   Dawid Lazarczyk <[email protected]>
   Piotr Szulc <[email protected]>

Tutor and project owner:
   Krzysztof Opasiak <[email protected]>

Signed-off-by: Krzysztof Opasiak <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-04-26 15:19:50 -07:00
Krzysztof Opasiak 3391ba0e27 usbip: tools: Extract generic code to be shared with vudc backend
Extract the code from current stub driver backend and a common
interface for both stub driver and vudc. This allows to share most
of the usbipd code for both of them.

Based on code created in cooperation with Open Operating Systems
Student Society at University of Warsaw (O2S3@UW) consisting of:

    Igor Kotrasinski <[email protected]>
    Karol Kosik <[email protected]>
    Ewelina Kosmider <[email protected]>
    Dawid Lazarczyk <[email protected]>
    Piotr Szulc <[email protected]>

Tutor and project owner:
    Krzysztof Opasiak <[email protected]>

Signed-off-by: Krzysztof Opasiak <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-04-26 15:19:50 -07:00
Andrey Utkin 3943f42c11 Replace mentions of "list_struct" to "list_head"
There's no such thing as "list_struct".

Signed-off-by: Andrey Utkin <[email protected]>
Acked-by: Steven Rostedt <[email protected]>
Acked-by: Mauro Carvalho Chehab <[email protected]>
Acked-by: Paul E. McKenney <[email protected]>
Acked-by: Alex Deucher <[email protected]>
Signed-off-by: Jiri Kosina <[email protected]>
2014-11-20 14:45:15 +01:00
Piotr Król 6fa9e1be7f usb: usbip: fix usbip.h path in userspace tool
Fixes: 588b48caf6 ("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 <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-09-04 16:25:30 -07:00
Valentina Manea 588b48caf6 usbip: move usbip userspace code out of staging
At this point, USB/IP userspace code is fully functional
and can be moved out of staging.

Signed-off-by: Valentina Manea <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-08-25 10:38:56 -07:00