summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAmit Shah <amit.shah@redhat.com>2013-03-15 16:36:42 +0530
committerAmit Shah <amit.shah@redhat.com>2013-03-15 16:39:02 +0530
commit0c6b913846a92fe8395dfb2456386311425f30b3 (patch)
tree3be63677abcc90aa0b2d2b03869f7397154e25be
parent264e4dcfce3d30f700d2c5e222758d54ba2a864f (diff)
downloadtest-virtserial-0c6b913846a92fe8395dfb2456386311425f30b3.tar.gz
test-virtserial-0c6b913846a92fe8395dfb2456386311425f30b3.tar.xz
test-virtserial-0c6b913846a92fe8395dfb2456386311425f30b3.zip
auto-guest: use port names to open ports
With the recent changes in upstream kernel, it's no longer guaranteed that /dev/vport0pNN will be the port dev names. So use the names given by the host. This still doesn't work for the sysfs and udev tests, fixes for those will come later. Signed-off-by: Amit Shah <amit.shah@redhat.com>
-rw-r--r--auto-virtserial-guest.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/auto-virtserial-guest.c b/auto-virtserial-guest.c
index 2b72b31..4fb22e6 100644
--- a/auto-virtserial-guest.c
+++ b/auto-virtserial-guest.c
@@ -145,10 +145,10 @@ static int safepoll(struct pollfd *fds, nfds_t nfds, int timeout)
static char *get_port_dev(unsigned int nr)
{
char *buf;
- buf = malloc(strlen("/dev/vport0p10") + 1);
+ buf = malloc(strlen("/dev/virtio-ports/test10") + 1);
if (!buf)
return NULL;
- sprintf(buf, "/dev/vport0p%u", nr);
+ sprintf(buf, "/dev/virtio-ports/test%u", nr);
return buf;
}