mirror of
https://git.openafs.org/openafs.git
synced 2025-01-18 23:10:58 +00:00
vol-gi-prototyping-20030513
FIXES 1432 changed slightly by shadow@dementia.org to not need forward decl.
This commit is contained in:
parent
49358c8ae7
commit
bdd9476a9a
18
src/vol/gi.c
18
src/vol/gi.c
@ -20,6 +20,13 @@ int statflag;
|
|||||||
|
|
||||||
#include "AFS_component_version_number.c"
|
#include "AFS_component_version_number.c"
|
||||||
|
|
||||||
|
void Perror(char *err, int a1, int a2, int a3)
|
||||||
|
{
|
||||||
|
char msg[200];
|
||||||
|
sprintf(msg, err, a1, a2, a3);
|
||||||
|
perror(msg);
|
||||||
|
}
|
||||||
|
|
||||||
int main(int argc, char **argv)
|
int main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
int error=0;
|
int error=0;
|
||||||
@ -53,12 +60,12 @@ int main(int argc, char **argv)
|
|||||||
inode = atoi(*++argv);
|
inode = atoi(*++argv);
|
||||||
fd = iopen(dev, inode, 0);
|
fd = iopen(dev, inode, 0);
|
||||||
if (fd < 0) {
|
if (fd < 0) {
|
||||||
Perror("Unable to open inode %d", inode);
|
Perror("Unable to open inode %d", inode, 0, 0);
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
if (statflag) {
|
if (statflag) {
|
||||||
if (fstat(fd, &status) != 0) {
|
if (fstat(fd, &status) != 0) {
|
||||||
Perror("Unable to fstat the inode!");
|
Perror("Unable to fstat the inode!", 0, 0, 0);
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
printf("Inode status: dev=%d, ino=%d, mode=%o, nlink=%d, uid=%d, gid=%d, size=%d, mtime=%d, blocks=%d\n", status.st_dev, status.st_ino, status.st_mode, status.st_nlink, status.st_uid, status.st_gid, status.st_size, status.st_mtime);
|
printf("Inode status: dev=%d, ino=%d, mode=%o, nlink=%d, uid=%d, gid=%d, size=%d, mtime=%d, blocks=%d\n", status.st_dev, status.st_ino, status.st_mode, status.st_nlink, status.st_uid, status.st_gid, status.st_size, status.st_mtime);
|
||||||
@ -73,10 +80,3 @@ int main(int argc, char **argv)
|
|||||||
#endif /* AFS_NT40_ENV || AFS_NAMEI_ENV */
|
#endif /* AFS_NT40_ENV || AFS_NAMEI_ENV */
|
||||||
}
|
}
|
||||||
|
|
||||||
void Perror(char *err, int a1, int a2, int a3)
|
|
||||||
{
|
|
||||||
char msg[200];
|
|
||||||
sprintf(msg, err, a1, a2, a3);
|
|
||||||
perror(msg);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user