tags 408298 +pending
thanks

On Wed, Jan 24, 2007 at 09:20:58AM -0800, J.P. Larocque wrote:
> resize2fs isn't honoring the "s" unit designator.  Per resize2fs(8):

Thanks for the bug report!  It's been fixed in my sources and will be
in the next release of e2fsprogs.

Regards,

                                                - Ted

# HG changeset patch
# User [EMAIL PROTECTED]
# Date 1175555537 14400
# Node ID d9af9856b9bfcde55566064b3f18c1d25d48b4e2
# Parent  08dedee691b5d2ed415cdb0105a29dbfded9b30d
resize2fs (libe2p): Fix resize2fs parsing of size parameter (in sector units)

This was actually a bug in libe2p's parse_num_blocks() function.  When
handling the 's' suffix, it was ignoring the blocksize information
passed in from the caller and always interpreting the number in terms of
a 1k blocksize.

Addresses Debian Bug: #408298

Signed-off-by: "Theodore Ts'o" <[EMAIL PROTECTED]>

diff -r 08dedee691b5 -r d9af9856b9bf lib/e2p/ChangeLog
--- a/lib/e2p/ChangeLog Mon Apr 02 18:42:59 2007 -0400
+++ b/lib/e2p/ChangeLog Mon Apr 02 19:12:17 2007 -0400
@@ -1,3 +1,10 @@ 2007-03-21  Theodore Tso  <[EMAIL PROTECTED]
+2007-04-02  Theodore Tso  <[EMAIL PROTECTED]>
+
+       * parse_num.c (parse_num_blocks): When parsing the 's' prefix,
+               take into account the filesystem blocksize so we return
+               the correct answer for non-1k blocksize filesystems.
+               (Addresses Debian Bug: #408298)
+
 2007-03-21  Theodore Tso  <[EMAIL PROTECTED]>
 
        * feature.c (e2p_edit_feature), mntopts.c (e2p_edit_mntopts): Fix
diff -r 08dedee691b5 -r d9af9856b9bf lib/e2p/parse_num.c
--- a/lib/e2p/parse_num.c       Mon Apr 02 18:42:59 2007 -0400
+++ b/lib/e2p/parse_num.c       Mon Apr 02 19:12:17 2007 -0400
@@ -32,7 +32,7 @@ unsigned long parse_num_blocks(const cha
                num >>= log_block_size; 
                break;
        case 's': 
-               num >>= 1;
+               num >>= (1+log_block_size);
                break;
        case '\0':
                break;


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to