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
merge b_devel into HEAD (20030703)
[fs/lustre-release.git]
/
lustre
/
tests
/
stat.c
1
#include <stdio.h>
2
#include <sys/types.h>
3
#include <sys/stat.h>
4
#include <errno.h>
5
#include <string.h>
6
#include <fcntl.h>
7
#include <unistd.h>
8
9
int main(int argc, char ** argv)
10
{
11
int rc;
12
struct stat buf;
13
14
if (argc < 2) {
15
printf("Usage %s filename\n", argv[0]);
16
return 1;
17
}
18
19
rc = stat(argv[1], &buf);
20
if (rc) {
21
printf("stat(%s) error: %s\n", argv[1], strerror(errno));
22
}
23
return rc;
24
}