summaryrefslogtreecommitdiff
path: root/tools/usb
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-01-02 17:13:41 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-01-02 17:13:41 +0300
commit01f1918833e4817fdb0810306c021c5cbee775d3 (patch)
tree34a649c453d30fee1f1b564badb6e3dc210655c3 /tools/usb
parent3df613ec12f71f00dad545a9df75573951e5c59f (diff)
parent30a7acd573899fd8b8ac39236eff6468b195ac7d (diff)
downloadlinux-01f1918833e4817fdb0810306c021c5cbee775d3.tar.xz
Merge 4.15.0-rc6 into usb-next
We want the USB fixes in here, and this resolves a merge issue with the vhci_rx.c file. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools/usb')
-rw-r--r--tools/usb/usbip/src/utils.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/tools/usb/usbip/src/utils.c b/tools/usb/usbip/src/utils.c
index 2b3d6d235015..3d7b42e77299 100644
--- a/tools/usb/usbip/src/utils.c
+++ b/tools/usb/usbip/src/utils.c
@@ -30,6 +30,7 @@ int modify_match_busid(char *busid, int add)
char command[SYSFS_BUS_ID_SIZE + 4];
char match_busid_attr_path[SYSFS_PATH_MAX];
int rc;
+ int cmd_size;
snprintf(match_busid_attr_path, sizeof(match_busid_attr_path),
"%s/%s/%s/%s/%s/%s", SYSFS_MNT_PATH, SYSFS_BUS_NAME,
@@ -37,12 +38,14 @@ int modify_match_busid(char *busid, int add)
attr_name);
if (add)
- snprintf(command, SYSFS_BUS_ID_SIZE + 4, "add %s", busid);
+ cmd_size = snprintf(command, SYSFS_BUS_ID_SIZE + 4, "add %s",
+ busid);
else
- snprintf(command, SYSFS_BUS_ID_SIZE + 4, "del %s", busid);
+ cmd_size = snprintf(command, SYSFS_BUS_ID_SIZE + 4, "del %s",
+ busid);
rc = write_sysfs_attribute(match_busid_attr_path, command,
- sizeof(command));
+ cmd_size);
if (rc < 0) {
dbg("failed to write match_busid: %s", strerror(errno));
return -1;