trans_virtio.c (4d272f90a780f6545e46ba715c8961afa23511f3) | trans_virtio.c (179a5bc4b8cbe68ca675057b960dd805867e41c4) |
---|---|
1/* 2 * The Virtio 9p transport driver 3 * 4 * This is a block based transport driver based on the lguest block driver 5 * code. 6 * 7 * Copyright (C) 2007, 2008 Eric Van Hensbergen, IBM Corporation 8 * --- 490 unchanged lines hidden (view full) --- 499 struct device_attribute *attr, char *buf) 500{ 501 struct virtio_chan *chan; 502 struct virtio_device *vdev; 503 504 vdev = dev_to_virtio(dev); 505 chan = vdev->priv; 506 | 1/* 2 * The Virtio 9p transport driver 3 * 4 * This is a block based transport driver based on the lguest block driver 5 * code. 6 * 7 * Copyright (C) 2007, 2008 Eric Van Hensbergen, IBM Corporation 8 * --- 490 unchanged lines hidden (view full) --- 499 struct device_attribute *attr, char *buf) 500{ 501 struct virtio_chan *chan; 502 struct virtio_device *vdev; 503 504 vdev = dev_to_virtio(dev); 505 chan = vdev->priv; 506 |
507 return snprintf(buf, chan->tag_len + 1, "%s", chan->tag); | 507 memcpy(buf, chan->tag, chan->tag_len); 508 buf[chan->tag_len] = 0; 509 510 return chan->tag_len + 1; |
508} 509 510static DEVICE_ATTR(mount_tag, 0444, p9_mount_tag_show, NULL); 511 512/** 513 * p9_virtio_probe - probe for existence of 9P virtio channels 514 * @vdev: virtio device to probe 515 * --- 237 unchanged lines hidden --- | 511} 512 513static DEVICE_ATTR(mount_tag, 0444, p9_mount_tag_show, NULL); 514 515/** 516 * p9_virtio_probe - probe for existence of 9P virtio channels 517 * @vdev: virtio device to probe 518 * --- 237 unchanged lines hidden --- |