diff --git a/debugfs/dump.c b/debugfs/dump.c index 1dc61548..4d386515 100644 --- a/debugfs/dump.c +++ b/debugfs/dump.c @@ -210,7 +210,7 @@ static void rdump_symlink(ext2_ino_t ino, struct ext2_inode *inode, /* Apparently, this is the right way to detect and handle fast * symlinks; see do_stat() in debugfs.c. */ - if (inode->i_blocks == 0) + if (ext2fs_inode_data_blocks2(current_fs, inode) == 0) strcpy(buf, (char *) inode->i_block); else { unsigned bytes = inode->i_size; @@ -284,7 +284,7 @@ static void rdump_inode(ext2_ino_t ino, struct ext2_inode *inode, /* Create the directory with 0700 permissions, because we * expect to have to create entries it. Then fix its perms * once we've done the traversal. */ - if (mkdir(fullname, S_IRWXU) == -1) { + if (name[0] && mkdir(fullname, S_IRWXU) == -1) { com_err("rdump", errno, "while making directory %s", fullname); goto errout; }