makefiles-attempt-to-support-gmake-j-20011023
[openafs.git] / src / sys / iwrite.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 <afsconfig.h>
11 #include <afs/param.h>
12
13 RCSID("$Header$");
14
15 #include <sys/types.h>
16 #include <sys/stat.h>
17 #include <sys/file.h>
18 #include <stdio.h>
19
20 #include "AFS_component_version_number.c"
21
22 main(argc,argv)
23 char **argv;
24 {
25     
26     struct stat status;
27     int count;
28
29     if (stat("/vicepa", &status) == -1) {
30         perror("stat");
31         exit(1);
32     }
33     if (--argc != 4) {
34         printf("Usage: iwrite inode offset string count\n");
35         exit(1);
36     }
37     count = xiwrite(status.st_dev, atoi(argv[1]), 17, atoi(argv[2]), argv[3], atoi(argv[4]));
38     if (count == -1) {
39         perror("iwrite");
40         exit(1);
41     }
42     printf("iwrite successful, count==%d\n", count);
43     exit(0);
44 }