Commit | Line | Data |
---|---|---|
805e021f CE |
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 | #include <roken.h> | |
14 | ||
15 | #include "AFS_component_version_number.c" | |
16 | ||
17 | main(argc, argv) | |
18 | char **argv; | |
19 | { | |
20 | ||
21 | struct stat status; | |
22 | int count; | |
23 | char buf[50000]; | |
24 | if (stat("/vicepa", &status) == -1) { | |
25 | perror("stat"); | |
26 | exit(1); | |
27 | } | |
28 | if (--argc != 3) { | |
29 | printf("Usage: iread inode offset count\n"); | |
30 | exit(1); | |
31 | } | |
32 | count = | |
33 | xiread(status.st_dev, atoi(argv[1]), 17, atoi(argv[2]), buf, | |
34 | atoi(argv[3])); | |
35 | if (count == -1) { | |
36 | perror("iread"); | |
37 | exit(1); | |
38 | } | |
39 | printf("iread(%x) successful, count==%d. Data follows:\n%s\n", | |
40 | status.st_dev, count, buf); | |
41 | exit(0); | |
42 | } |