Whamcloud - gitweb
land 0.5.20.3 b_devel onto HEAD (b_devel will remain)
[fs/lustre-release.git] / lustre / tests / mlink.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
13         if (argc < 3) { 
14                 printf("Usage: %s file link\n", argv[0]);
15                 return 1;
16         }
17
18         rc = link(argv[1], argv[2]);
19         if (rc) { 
20                 printf("link(%s, %s) error: %s\n", argv[1], argv[2],
21                        strerror(errno));
22                 return errno;
23         }
24         return 0;
25