]> git.ipfire.org Git - thirdparty/e2fsprogs.git/blobdiff - debugfs/debugfs.c
debugfs.c (do_stat): Check to make sure a filesystem is open
[thirdparty/e2fsprogs.git] / debugfs / debugfs.c
index ca73c993024954384a0b9529a4aa02998e16bdd7..e923403d916fed3956896c2e76ce57de65bfd0d1 100644 (file)
@@ -595,6 +595,9 @@ void do_stat(int argc, char *argv[])
        ext2_ino_t      inode;
        struct ext2_inode * inode_buf;
 
+       if (check_fs_open(argv[0]))
+               return 1;
+
        inode_buf = (struct ext2_inode *)
                        malloc(EXT2_INODE_SIZE(current_fs->super));
        if (!inode_buf) {