Whamcloud - gitweb
b=1719
[fs/lustre-release.git] / lustre / tests / munlink.c
1 /* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
2  * vim:expandtab:shiftwidth=8:tabstop=8:
3  */
4 #include <stdio.h>
5 #include <sys/types.h>
6 #include <sys/stat.h>
7 #include <errno.h>
8 #include <string.h>
9 #include <fcntl.h>
10 #include <unistd.h>
11
12 int main(int argc, char ** argv)
13 {
14         int rc, i;
15
16         if (argc < 2) { 
17                 printf("Usage %s filename\n", argv[0]);
18                 return 1;
19         }
20
21         for (i = 1; i < argc; i++) {
22                 rc = unlink(argv[i]);
23                 if (rc)
24                         printf("unlink(%s) error: %s\n", argv[i],
25                                strerror(errno));
26         }
27         return rc;
28