Make Windows pioctl prototypes consistent with Unix
[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 <afsconfig.h>
15 #include <afs/param.h>
16
17
18
19 #include "AFS_component_version_number.c"
20
21 main(argc, argv)
22      char **argv;
23 {
24     int inode;
25     struct stat status;
26 #ifdef AFS_SGI61_ENV
27     int vnode, unique, datav;
28 #else /* AFS_SGI61_ENV */
29     afs_int32 vnode, unique, datav;
30 #endif /* AFS_SGI61_ENV */
31
32     if (stat("/vicepa", &status) == -1) {
33         perror("stat");
34         exit(1);
35     }
36     vnode = atoi(argv[1]);
37     unique = atoi(argv[2]);
38     datav = atoi(argv[3]);
39     inode = icreate(status.st_dev, 0, 17, vnode, unique, datav);
40     if (inode == -1) {
41         perror("icreate");
42         exit(1);
43     }
44     printf("icreate successful, inode=%d\n", inode);
45     exit(0);
46 }