From b31f4ec5230147737601f1de8074068e8fe8a9dd Mon Sep 17 00:00:00 2001 From: braam Date: Wed, 6 Nov 2002 01:30:12 +0000 Subject: [PATCH] - add new file --- lustre/tests/stat.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 lustre/tests/stat.c diff --git a/lustre/tests/stat.c b/lustre/tests/stat.c new file mode 100644 index 0000000..b719900 --- /dev/null +++ b/lustre/tests/stat.c @@ -0,0 +1,24 @@ +#include +#include +#include +#include +#include +#include +#include + +int main(int argc, char ** argv) +{ + int rc; + struct stat buf; + + if (argc < 2) { + printf("Usage %s filename\n", argv[0]); + return 1; + } + + rc = stat(argv[1], &buf); + if (rc) { + printf("stat(%s) error: %s\n", argv[1], strerror(errno)); + } + return rc; +} -- 1.8.3.1