afsconfig-and-rcsid-all-around-20010705
[openafs.git] / src / sys / icreate.c
1 /*
2  * Copyright 2000, International Business Machines Corporation and others.
3  * All Rights Reserved.
4  * 
5  * This software has been released under the terms of the IBM Public
6  * License.  For details, see the LICENSE file in the top-level source
7  * directory or online at http://www.openafs.org/dl/license10.html
8  */
9
10 #include <sys/types.h>
11 #include <sys/stat.h>
12 #include <sys/file.h>
13 #include <stdio.h>
14 #include <afs/param.h>
15 #include <afsconfig.h>
16
17 RCSID("$Header$");
18
19
20 #include "AFS_component_version_number.c"
21
22 main(argc,argv)
23 char **argv;
24 {
25     int inode;
26     struct stat status;
27 #ifdef AFS_SGI61_ENV
28     int vnode, unique, datav;
29 #else /* AFS_SGI61_ENV */
30     afs_int32 vnode, unique, datav;
31 #endif /* AFS_SGI61_ENV */
32
33     if (stat("/vicepa", &status) == -1) {
34         perror("stat");
35         exit(1);
36     }
37     vnode = atoi(argv[1]);
38     unique = atoi(argv[2]);
39     datav = atoi(argv[3]);
40     inode = icreate(status.st_dev, 0, 17, vnode, unique, datav);
41     if (inode == -1) {
42         perror("icreate");
43         exit(1);
44     }
45     printf("icreate successful, inode=%d\n", inode);
46     exit(0);
47 }