Whamcloud - gitweb
land 0.5.20.3 b_devel onto HEAD (b_devel will remain)
[fs/lustre-release.git] / lustre / tests / tchmod.c
1 #include <sys/types.h>
2 #include <sys/stat.h>
3 #include <errno.h>
4 #include <stdio.h>
5 #include <stdlib.h>
6
7 int main(int argc, char **argv)
8 {
9         mode_t mode;
10
11         if (argc != 3) { 
12                 printf("usage: %s mode name\n", argv[0]);
13                 return 1;
14         }
15
16         mode = strtoul(argv[1], NULL, 8); 
17         return chmod(argv[2], mode) ? errno : 0;
18 }