Whamcloud - gitweb
land 0.5.20.3 b_devel onto HEAD (b_devel will remain)
[fs/lustre-release.git] / lustre / tests / tchmod.c
index 9fcb1ac..08732ff 100644 (file)
@@ -1,5 +1,6 @@
 #include <sys/types.h>
 #include <sys/stat.h>
+#include <errno.h>
 #include <stdio.h>
 #include <stdlib.h>
 
@@ -13,5 +14,5 @@ int main(int argc, char **argv)
         }
 
         mode = strtoul(argv[1], NULL, 8); 
-        return chmod(argv[2], mode);
+        return chmod(argv[2], mode) ? errno : 0;
 }