From: Marc-André Lureau Date: Wed, 14 Dec 2016 12:23:13 +0000 (+0300) Subject: xen: use a better chardev type check X-Git-Tag: v2.10.0-rc0~211^2~18 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=315dd72d7580b74232cfc8381a86d37999b95199;p=users%2Fdwmw2%2Fqemu.git xen: use a better chardev type check Signed-off-by: Marc-André Lureau Reviewed-by: Eric Blake Reviewed-by: Philippe Mathieu-Daudé --- diff --git a/hw/xen/xen-common.c b/hw/xen/xen-common.c index ae76150e8a..a9055e9eba 100644 --- a/hw/xen/xen-common.c +++ b/hw/xen/xen-common.c @@ -38,7 +38,7 @@ static int store_dev_info(int domid, Chardev *cs, const char *string) int ret = -1; /* Only continue if we're talking to a pty. */ - if (strncmp(cs->filename, "pty:", 4)) { + if (!CHARDEV_IS_PTY(cs)) { return 0; } pts = cs->filename + 4;