]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commitdiff
Don't abort filefrag if EXT3_IOC_GETFLAGS ioctl is not supported,
authorTheodore Ts'o <tytso@mit.edu>
Sat, 9 Apr 2005 05:24:04 +0000 (01:24 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Sat, 9 Apr 2005 05:24:04 +0000 (01:24 -0400)
so that filefrag can work on non-ext2/3 filesystems, as advertised.
(Addresses Debian Bug: #303509)

misc/ChangeLog
misc/filefrag.c

index 7a25de7c2d19a17e8b1db4e9fa7ff9c6973ac9c6..19b34a1dab6c1ae137cd3f71ad0b20fec4a902c8 100644 (file)
@@ -1,5 +1,10 @@
 2005-04-09  Theodore Ts'o  <tytso@mit.edu>
 
+       * filefrag.c (frag_report): Don't abort filefrag if
+               EXT3_IOC_GETFLAGS ioctl is not supported, so that filefrag
+               can work on non-ext2/3 filesystems, as advertised.
+               (Addresses Debian Bug: #303509)
+
        * mke2fs.8.in: Fix minor spelling typo.  (Addresses SourceForge
                Bug #1177804)
 
index 1ba7cc60d33148e3cc316736da37dc01781b88da..ea74028bd9c9bfc16ca5ac8eefa7c33b50a1ab86 100644 (file)
@@ -110,11 +110,8 @@ static void frag_report(const char *filename)
                close(fd);
                return;
        }
-       if (ioctl(fd, EXT3_IOC_GETFLAGS, &flags) < 0) {
-               perror("EXT3_IOC_GETFLAGS");
-               close(fd);
-               return;
-       }
+       if (ioctl(fd, EXT3_IOC_GETFLAGS, &flags) < 0)
+               flags = 0;
        if (flags & EXT3_EXTENTS_FL) {
                printf("File is stored in extents format\n");
                is_ext2 = 0;