diff options
author | Shuah Khan <shuahkh@osg.samsung.com> | 2018-01-18 19:25:30 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-01-22 09:34:37 -0500 |
commit | 5468099c747240ed97dbb34340fece8ca87be34f (patch) | |
tree | 4060d5c246ec7a91dc1c6ea1c9c0605049c49551 | |
parent | 46fe895e22ab3845515ec06b01eaf1282b342e29 (diff) |
usbip: vhci_hcd: update 'status' file header and format
Commit 2f2d0088eb93
("usbip: prevent vhci_hcd driver from leaking a socket pointer address")
in the /sys/devices/platform/vhci_hcd/status.
Fix the header and field alignment to reflect the changes and make it
easier to read.
Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/usb/usbip/vhci_sysfs.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/usb/usbip/vhci_sysfs.c b/drivers/usb/usbip/vhci_sysfs.c index 091f76b7196d..a9de15cab2ec 100644 --- a/drivers/usb/usbip/vhci_sysfs.c +++ b/drivers/usb/usbip/vhci_sysfs.c | |||
@@ -17,10 +17,10 @@ | |||
17 | 17 | ||
18 | /* | 18 | /* |
19 | * output example: | 19 | * output example: |
20 | * hub port sta spd dev sockfd local_busid | 20 | * hub port sta spd dev sockfd local_busid |
21 | * hs 0000 004 000 00000000 3 1-2.3 | 21 | * hs 0000 004 000 00000000 000003 1-2.3 |
22 | * ................................................ | 22 | * ................................................ |
23 | * ss 0008 004 000 00000000 4 2-3.4 | 23 | * ss 0008 004 000 00000000 000004 2-3.4 |
24 | * ................................................ | 24 | * ................................................ |
25 | * | 25 | * |
26 | * Output includes socket fd instead of socket pointer address to avoid | 26 | * Output includes socket fd instead of socket pointer address to avoid |
@@ -44,13 +44,13 @@ static void port_show_vhci(char **out, int hub, int port, struct vhci_device *vd | |||
44 | if (vdev->ud.status == VDEV_ST_USED) { | 44 | if (vdev->ud.status == VDEV_ST_USED) { |
45 | *out += sprintf(*out, "%03u %08x ", | 45 | *out += sprintf(*out, "%03u %08x ", |
46 | vdev->speed, vdev->devid); | 46 | vdev->speed, vdev->devid); |
47 | *out += sprintf(*out, "%u %s", | 47 | *out += sprintf(*out, "%06u %s", |
48 | vdev->ud.sockfd, | 48 | vdev->ud.sockfd, |
49 | dev_name(&vdev->udev->dev)); | 49 | dev_name(&vdev->udev->dev)); |
50 | 50 | ||
51 | } else { | 51 | } else { |
52 | *out += sprintf(*out, "000 00000000 "); | 52 | *out += sprintf(*out, "000 00000000 "); |
53 | *out += sprintf(*out, "0000000000000000 0-0"); | 53 | *out += sprintf(*out, "000000 0-0"); |
54 | } | 54 | } |
55 | 55 | ||
56 | *out += sprintf(*out, "\n"); | 56 | *out += sprintf(*out, "\n"); |
@@ -148,7 +148,7 @@ static ssize_t status_show(struct device *dev, | |||
148 | int pdev_nr; | 148 | int pdev_nr; |
149 | 149 | ||
150 | out += sprintf(out, | 150 | out += sprintf(out, |
151 | "hub port sta spd dev socket local_busid\n"); | 151 | "hub port sta spd dev sockfd local_busid\n"); |
152 | 152 | ||
153 | pdev_nr = status_name_to_id(attr->attr.name); | 153 | pdev_nr = status_name_to_id(attr->attr.name); |
154 | if (pdev_nr < 0) | 154 | if (pdev_nr < 0) |