sys-warnings-and-unused-variables-cleanup-20010606
[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 #ifndef lint
11 #endif
12 #include <sys/types.h>
13 #include <sys/stat.h>
14 #include <sys/file.h>
15 #include <stdio.h>
16
17 #include "AFS_component_version_number.c"
18
19 main(argc,argv)
20 char **argv;
21 {
22     
23     struct stat status;
24     int count;
25
26     if (stat("/vicepa", &status) == -1) {
27         perror("stat");
28         exit(1);
29     }
30     if (--argc != 4) {
31         printf("Usage: iwrite inode offset string count\n");
32         exit(1);
33     }
34     count = xiwrite(status.st_dev, atoi(argv[1]), 17, atoi(argv[2]), argv[3], atoi(argv[4]));
35     if (count == -1) {
36         perror("iwrite");
37         exit(1);
38     }
39     printf("iwrite successful, count==%d\n", count);
40     exit(0);
41 }