Message ID | 20170316092121.25672-4-marcandre.lureau@redhat.com |
---|---|
State | New |
Headers | show |
On 03/16/2017 06:21 AM, Marc-André Lureau wrote: > Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> > Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> > --- > xen-common.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/xen-common.c b/xen-common.c > index fd2c92847e..d46685ef4e 100644 > --- a/xen-common.c > +++ b/xen-common.c > @@ -34,7 +34,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; >
diff --git a/xen-common.c b/xen-common.c index fd2c92847e..d46685ef4e 100644 --- a/xen-common.c +++ b/xen-common.c @@ -34,7 +34,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;