From: Theodore Ts'o Date: Sat, 9 Apr 2005 05:24:04 +0000 (-0400) Subject: Don't abort filefrag if EXT3_IOC_GETFLAGS ioctl is not supported, X-Git-Tag: E2FSPROGS-1_38-WIP-0509~31 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a4897d41c2e75c78521d3ddd07f76f76c66d7214;p=thirdparty%2Fe2fsprogs.git 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) --- diff --git a/misc/ChangeLog b/misc/ChangeLog index 7a25de7c2..19b34a1da 100644 --- a/misc/ChangeLog +++ b/misc/ChangeLog @@ -1,5 +1,10 @@ 2005-04-09 Theodore Ts'o + * 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) diff --git a/misc/filefrag.c b/misc/filefrag.c index 1ba7cc60d..ea74028bd 100644 --- a/misc/filefrag.c +++ b/misc/filefrag.c @@ -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;