diff options
author | Stephen Hemminger <shemminger@vyatta.com> | 2010-11-09 22:20:29 -0800 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2010-11-24 15:21:12 +1030 |
commit | be6528b2e58d92ef2ffed6f130e2d42bb85dbf29 (patch) | |
tree | b16de122d65f8f2891748e76f94bc117dfaaa396 /drivers/virtio/virtio.c | |
parent | 22e132ff2645aab1e1a25c45e9544a39ae1dc106 (diff) | |
download | linux-be6528b2e58d92ef2ffed6f130e2d42bb85dbf29.tar.gz linux-be6528b2e58d92ef2ffed6f130e2d42bb85dbf29.tar.bz2 linux-be6528b2e58d92ef2ffed6f130e2d42bb85dbf29.zip |
virtio: fix format of sysfs driver/vendor files
The sysfs files for virtio produce the wrong format and are missing
the required newline. The output for virtio bus vendor/device should
have the same format as the corresponding entries for PCI devices.
Although this technically changes the ABI for sysfs, these files were
broken to start with!
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'drivers/virtio/virtio.c')
-rw-r--r-- | drivers/virtio/virtio.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/virtio/virtio.c b/drivers/virtio/virtio.c index 3a43ebf83a49..efb35aa8309a 100644 --- a/drivers/virtio/virtio.c +++ b/drivers/virtio/virtio.c @@ -9,19 +9,19 @@ static ssize_t device_show(struct device *_d, struct device_attribute *attr, char *buf) { struct virtio_device *dev = container_of(_d,struct virtio_device,dev); - return sprintf(buf, "%hu", dev->id.device); + return sprintf(buf, "0x%04x\n", dev->id.device); } static ssize_t vendor_show(struct device *_d, struct device_attribute *attr, char *buf) { struct virtio_device *dev = container_of(_d,struct virtio_device,dev); - return sprintf(buf, "%hu", dev->id.vendor); + return sprintf(buf, "0x%04x\n", dev->id.vendor); } static ssize_t status_show(struct device *_d, struct device_attribute *attr, char *buf) { struct virtio_device *dev = container_of(_d,struct virtio_device,dev); - return sprintf(buf, "0x%08x", dev->config->get_status(dev)); + return sprintf(buf, "0x%08x\n", dev->config->get_status(dev)); } static ssize_t modalias_show(struct device *_d, struct device_attribute *attr, char *buf) |