@@ -36,14 +36,16 @@ static int ncheck_proc(struct ext2_dir_entry *dirent,
int i;
char *pathname;
errcode_t retval;
+ static ext2_ino_t parent;
iw->position++;
+ if (iw->position == 2)
+ parent = dirent->inode;
if (iw->position <= 2)
return 0;
for (i=0; i < iw->num_inodes; i++) {
if (iw->iarray[i] == dirent->inode) {
- retval = ext2fs_get_pathname(current_fs, iw->parent,
- iw->iarray[i],
+ retval = ext2fs_get_pathname(current_fs, parent, iw->parent,
&pathname);
if (retval)
com_err("ncheck", retval,
@@ -51,7 +53,7 @@ static int ncheck_proc(struct ext2_dir_entry *dirent,
"inode %d (%d)", iw->parent,
iw->iarray[i]);
else
- printf("%u\t%s\n", iw->iarray[i], pathname);
+ printf("%u\t%s/%s\n", iw->iarray[i], pathname, dirent->name);
}
}
if (!iw->inodes_left)