Whamcloud - gitweb
e4defrag: skip "rootfs" entry when checking for ext4 filesystem
authorEric Sandeen <sandeen@redhat.com>
Tue, 8 Sep 2009 06:13:50 +0000 (06:13 +0000)
committerTheodore Ts'o <tytso@mit.edu>
Mon, 13 Dec 2010 14:29:19 +0000 (09:29 -0500)
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
misc/e4defrag.c

index 424e0ca..8b0894f 100644 (file)
@@ -430,6 +430,8 @@ static int is_ext4(const char *file)
        }
 
        while ((mnt = getmntent(fp)) != NULL) {
+               if (mnt->mnt_fsname[0] != '/')
+                       continue;
                len = strlen(mnt->mnt_dir);
                ret = memcmp(file_path, mnt->mnt_dir, len);
                if (ret != 0)