From 0c6b913846a92fe8395dfb2456386311425f30b3 Mon Sep 17 00:00:00 2001 From: Amit Shah Date: Fri, 15 Mar 2013 16:36:42 +0530 Subject: 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 --- auto-virtserial-guest.c | 4 ++-- 1 file 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; } -- cgit