volinfo: print namei filenames of index files
authorMichael Meffie <mmeffie@sinenomine.net>
Sun, 22 May 2011 00:56:23 +0000 (20:56 -0400)
committerDerrick Brashear <shadow@dementia.org>
Sun, 22 May 2011 14:00:53 +0000 (07:00 -0700)
On namei fileservers, also print the namei filenames of the volume special
files when the -header flag is given.

Change-Id: I90112f13d0f39348ee3862fdbdb55074e8877108
Reviewed-on: http://gerrit.openafs.org/4696
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

src/vol/vol-info.c

index b41d762..4663c64 100644 (file)
@@ -448,6 +448,9 @@ HandleSpecialFile(const char *name, struct DiskPartition64 *dp,
     afs_sfsize_t size = 0;
     IHandle_t *ih = NULL;
     FdHandle_t *fdP = NULL;
+#ifdef AFS_NAMEI_ENV
+    namei_t filename;
+#endif /* AFS_NAMEI_ENV */
 
     IH_INIT(ih, dp->device, header->parent, inode);
     fdP = IH_OPEN(ih);
@@ -469,6 +472,10 @@ HandleSpecialFile(const char *name, struct DiskPartition64 *dp,
     if (!dsizeOnly && !saveinodes) {
        printf("\t%s inode\t= %s (size = %lld)\n",
               name, PrintInode(NULL, inode), size);
+#ifdef AFS_NAMEI_ENV
+       namei_HandleToName(&filename, ih);
+       printf("\t%s namei\t= %s\n", name, filename.n_path);
+#endif /* AFS_NAMEI_ENV */
     }
     *psize += size;