Commit 5468099c authored by Shuah Khan's avatar Shuah Khan Committed by Greg Kroah-Hartman

usbip: vhci_hcd: update 'status' file header and format

Commit 2f2d0088
("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: default avatarShuah Khan <shuahkh@osg.samsung.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 46fe895e
...@@ -18,9 +18,9 @@ ...@@ -18,9 +18,9 @@
/* /*
* output example: * output example:
* hub port sta spd dev sockfd local_busid * hub port sta spd dev sockfd local_busid
* hs 0000 004 000 00000000 3 1-2.3 * hs 0000 004 000 00000000 000003 1-2.3
* ................................................ * ................................................
* ss 0008 004 000 00000000 4 2-3.4 * ss 0008 004 000 00000000 000004 2-3.4
* ................................................ * ................................................
* *
* Output includes socket fd instead of socket pointer address to avoid * 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,13 +44,13 @@ static void port_show_vhci(char **out, int hub, int port, struct vhci_device *vd
if (vdev->ud.status == VDEV_ST_USED) { if (vdev->ud.status == VDEV_ST_USED) {
*out += sprintf(*out, "%03u %08x ", *out += sprintf(*out, "%03u %08x ",
vdev->speed, vdev->devid); vdev->speed, vdev->devid);
*out += sprintf(*out, "%u %s", *out += sprintf(*out, "%06u %s",
vdev->ud.sockfd, vdev->ud.sockfd,
dev_name(&vdev->udev->dev)); dev_name(&vdev->udev->dev));
} else { } else {
*out += sprintf(*out, "000 00000000 "); *out += sprintf(*out, "000 00000000 ");
*out += sprintf(*out, "0000000000000000 0-0"); *out += sprintf(*out, "000000 0-0");
} }
*out += sprintf(*out, "\n"); *out += sprintf(*out, "\n");
...@@ -148,7 +148,7 @@ static ssize_t status_show(struct device *dev, ...@@ -148,7 +148,7 @@ static ssize_t status_show(struct device *dev,
int pdev_nr; int pdev_nr;
out += sprintf(out, out += sprintf(out,
"hub port sta spd dev socket local_busid\n"); "hub port sta spd dev sockfd local_busid\n");
pdev_nr = status_name_to_id(attr->attr.name); pdev_nr = status_name_to_id(attr->attr.name);
if (pdev_nr < 0) if (pdev_nr < 0)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment