Whamcloud - gitweb
git://git.whamcloud.com
/
fs
/
lustre-release.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
correct osc name
[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
}