testInternal(): fixed return value for non-existing files
authorEnrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
Sun, 23 Oct 2005 22:55:12 +0000 (22:55 +0000)
committerEnrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
Sun, 23 Oct 2005 22:55:12 +0000 (22:55 +0000)
git-svn-id: http://svn.linux-vserver.org/svn/util-vserver/trunk@2174 94cd875c-1c1d-0410-91d2-eb244daf1a30

util-vserver/src/chroot-sh.c

index fcd2fc1..b26eb93 100644 (file)
@@ -85,7 +85,7 @@ testInternal(int argc, char *argv[], char const *operation)
     return wrapper_exit_code;
   }
 
-  if (stat(argv[1], &st)==-1) return 0;
+  if (stat(argv[1], &st)==-1) return -1;
   else                        return st.st_mode;
 }