kdrive: Ignore failure to chown console tty to current user
authorKeith Packard <keithp@keithp.com>
Fri, 18 Apr 2014 21:54:02 +0000 (14:54 -0700)
committerKeith Packard <keithp@keithp.com>
Fri, 18 Apr 2014 23:30:17 +0000 (16:30 -0700)
I'm not sure what we'd do in this case anyways, other than fatal
error.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Jamey Sharp <jamey@minilop.net>
hw/kdrive/linux/linux.c

index 6284de5..73a8169 100644 (file)
@@ -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