aboutsummaryrefslogtreecommitdiff
path: root/tools/usb/usbip/src/usbip_attach.c
diff options
context:
space:
mode:
authorGravatar Igor Kotrasinski <i.kotrasinsk@samsung.com> 2016-03-08 21:49:06 +0100
committerGravatar Greg Kroah-Hartman <gregkh@linuxfoundation.org> 2016-04-26 15:19:50 -0700
commite0546fd8b748b19d8edd1550530da8ebad6e4b31 (patch)
tree79f1d0273652e45a13b96ed1cb1d3fa6122599e3 /tools/usb/usbip/src/usbip_attach.c
parentusbip: tools: Add vudc backend to usbip tools (diff)
downloadlinux-e0546fd8b748b19d8edd1550530da8ebad6e4b31.tar.gz
linux-e0546fd8b748b19d8edd1550530da8ebad6e4b31.tar.bz2
linux-e0546fd8b748b19d8edd1550530da8ebad6e4b31.zip
usbip: tools: Start using VUDC backend in usbip tools
Modify userspace tools to allow exporting and connecting to vudc. This commit is a result of cooperation between Samsung R&D Institute Poland and Open Operating Systems Student Society at University of Warsaw (O2S3@UW) consisting of: Igor Kotrasinski <ikotrasinsk@gmail.com> Karol Kosik <karo9@interia.eu> Ewelina Kosmider <3w3lfin@gmail.com> Dawid Lazarczyk <lazarczyk.dawid@gmail.com> Piotr Szulc <ps347277@students.mimuw.edu.pl> Tutor and project owner: Krzysztof Opasiak <k.opasiak@samsung.com> Signed-off-by: Igor Kotrasinski <i.kotrasinsk@samsung.com> Signed-off-by: Ewelina Kosmider <3w3lfin@gmail.com> [Various bug fixes and improvements] Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools/usb/usbip/src/usbip_attach.c')
-rw-r--r--tools/usb/usbip/src/usbip_attach.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/tools/usb/usbip/src/usbip_attach.c b/tools/usb/usbip/src/usbip_attach.c
index d58a14dfc094..70a6b507fb62 100644
--- a/tools/usb/usbip/src/usbip_attach.c
+++ b/tools/usb/usbip/src/usbip_attach.c
@@ -1,6 +1,9 @@
/*
* Copyright (C) 2011 matt mooney <mfm@muteddisk.com>
* 2005-2007 Takahiro Hirofuchi
+ * Copyright (C) 2015-2016 Samsung Electronics
+ * Igor Kotrasinski <i.kotrasinsk@samsung.com>
+ * Krzysztof Opasiak <k.opasiak@samsung.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -36,7 +39,8 @@
static const char usbip_attach_usage_string[] =
"usbip attach <args>\n"
" -r, --remote=<host> The machine with exported USB devices\n"
- " -b, --busid=<busid> Busid of the device on <host>\n";
+ " -b, --busid=<busid> Busid of the device on <host>\n"
+ " -d, --device=<devid> Id of the virtual UDC on <host>\n";
void usbip_attach_usage(void)
{
@@ -203,6 +207,7 @@ int usbip_attach(int argc, char *argv[])
static const struct option opts[] = {
{ "remote", required_argument, NULL, 'r' },
{ "busid", required_argument, NULL, 'b' },
+ { "device", required_argument, NULL, 'd' },
{ NULL, 0, NULL, 0 }
};
char *host = NULL;
@@ -211,7 +216,7 @@ int usbip_attach(int argc, char *argv[])
int ret = -1;
for (;;) {
- opt = getopt_long(argc, argv, "r:b:", opts, NULL);
+ opt = getopt_long(argc, argv, "d:r:b:", opts, NULL);
if (opt == -1)
break;
@@ -220,6 +225,7 @@ int usbip_attach(int argc, char *argv[])
case 'r':
host = optarg;
break;
+ case 'd':
case 'b':
busid = optarg;
break;