Package: e2fsprogs
Version: 1.42.5-1
Severity: minor
Tags: patch

Dear Maintainer,

in filefrag, the presentation of "perfect" ext2 files[*] lacks a
newline, disrupting the output:


    # mount | grep /boot
    /dev/sda1 on /boot type ext2 (ro,noatime,errors=continue,user_xattr,acl)
    # ls -l /boot/grub/be*
    -rw-r--r-- 1 root root 5004 Jan 18 22:22 /boot/grub/befs_be.mod
    -rw-r--r-- 1 root root 4832 Jan 18 22:22 /boot/grub/befs.mod
    #

    Expected behaviour:

    # filefrag /boot/grub/be*
    /boot/grub/befs_be.mod: 1 extent found
    /boot/grub/befs.mod: 1 extent found 
    #

    Observed behaviour:

    # filefrag /boot/grub/be*
    /boot/grub/befs_be.mod: 1 extent found/boot/grub/befs.mod: 1 extent found#

Fix is simple, see patch below. Works for me.

Cheers,

    Christoph

[*] expected == num_extents


--- a/misc/filefrag.c
+++ b/misc/filefrag.c
@@ -363,10 +363,10 @@
        if (is_ext2) {
                expected = (count/((bs*8)-(fsinfo.f_files/8/cylgroups)-3))+1;
                if (expected && expected < num_extents)
-                       printf(", perfection would be %d extent%s\n", expected,
+                       printf(", perfection would be %d extent%s", expected,
                                (expected>1) ? "s" : "");
-       } else
-               fputc('\n', stdout);
+       }
+       fputc('\n', stdout);
        close(fd);
        once = 0;
 }


-- System Information:
Debian Release: 7.0
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: i386 (i686)

Kernel: Linux 3.4.25 (SMP w/4 CPU cores)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages e2fsprogs depends on:
ii  e2fslibs    1.42.5-1
ii  libblkid1   2.20.1-5.3
ii  libc6       2.13-37
ii  libcomerr2  1.42.5-1
ii  libss2      1.42.5-1
ii  libuuid1    2.20.1-5.3
ii  util-linux  2.20.1-5.3

e2fsprogs recommends no packages.

Versions of packages e2fsprogs suggests:
ii  e2fsck-static  1.42.5-1
pn  gpart          <none>
pn  parted         <none>

-- Configuration Files:
/etc/mke2fs.conf changed [not included]

-- no debconf information

Attachment: signature.asc
Description: Digital signature

Reply via email to