From 0c0feddbcda238efa82a47f456ef3008ffa53195 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Fri, 18 Apr 2014 14:54:02 -0700 Subject: [PATCH] kdrive: Ignore failure to chown console tty to current user I'm not sure what we'd do in this case anyways, other than fatal error. Signed-off-by: Keith Packard Reviewed-by: Jamey Sharp --- hw/kdrive/linux/linux.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/hw/kdrive/linux/linux.c b/hw/kdrive/linux/linux.c index 6284de576..73a8169bf 100644 --- a/hw/kdrive/linux/linux.c +++ b/hw/kdrive/linux/linux.c @@ -68,13 +68,16 @@ LinuxCheckChown(const char *file) struct stat st; __uid_t u; __gid_t g; + int r; if (stat(file, &st) < 0) return; u = getuid(); g = getgid(); - if (st.st_uid != u || st.st_gid != g) - chown(file, u, g); + if (st.st_uid != u || st.st_gid != g) { + r = chown(file, u, g); + (void) r; + } } static int