All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Sandeen <sandeen@redhat.com>
To: ext4 development <linux-ext4@vger.kernel.org>
Subject: [PATCH] e2fsprogs - handle large setb/testb/freeb commands in debugfs
Date: Tue, 10 Apr 2007 13:43:33 -0500	[thread overview]
Message-ID: <461BDAD5.5060900@redhat.com> (raw)

I noticed that you can't give more than a 2^31 block count to the
debugfs commands setb, clearb, or freeb.  Looks ok?

Signed-off-by: Eric Sandeen <sandeen@redhat.com>

Index: e2fsprogs-1.39_ext4_hg/debugfs/debugfs.c
===================================================================
--- e2fsprogs-1.39_ext4_hg.orig/debugfs/debugfs.c
+++ e2fsprogs-1.39_ext4_hg/debugfs/debugfs.c
@@ -726,7 +726,7 @@ void do_testi(int argc, char *argv[])
 void do_freeb(int argc, char *argv[])
 {
 	blk_t block;
-	int count = 1;
+	blk_t count = 1;
 
 	if (common_block_args_process(argc, argv, &block, &count))
 		return;
@@ -745,7 +745,7 @@ void do_freeb(int argc, char *argv[])
 void do_setb(int argc, char *argv[])
 {
 	blk_t block;
-	int count = 1;
+	blk_t count = 1;
 
 	if (common_block_args_process(argc, argv, &block, &count))
 		return;
@@ -764,7 +764,7 @@ void do_setb(int argc, char *argv[])
 void do_testb(int argc, char *argv[])
 {
 	blk_t block;
-	int count = 1;
+	blk_t count = 1;
 
 	if (common_block_args_process(argc, argv, &block, &count))
 		return;
Index: e2fsprogs-1.39_ext4_hg/debugfs/util.c
===================================================================
--- e2fsprogs-1.39_ext4_hg.orig/debugfs/util.c
+++ e2fsprogs-1.39_ext4_hg/debugfs/util.c
@@ -325,7 +325,7 @@ int common_inode_args_process(int argc, 
  * This is a helper function used by do_freeb, do_setb, and do_testb
  */
 int common_block_args_process(int argc, char *argv[],
-			      blk_t *block, int *count)
+			      blk_t *block, blk_t *count)
 {
 	int	err;
 
Index: e2fsprogs-1.39_ext4_hg/debugfs/debugfs.h
===================================================================
--- e2fsprogs-1.39_ext4_hg.orig/debugfs/debugfs.h
+++ e2fsprogs-1.39_ext4_hg/debugfs/debugfs.h
@@ -41,7 +41,7 @@ extern int common_args_process(int argc,
 extern int common_inode_args_process(int argc, char *argv[],
 				     ext2_ino_t *inode, int flags);
 extern int common_block_args_process(int argc, char *argv[],
-				     blk_t *block, int *count);
+				     blk_t *block, blk_t *count);
 extern int debugfs_read_inode(ext2_ino_t ino, struct ext2_inode * inode,
 			      const char *cmd);
 extern int debugfs_read_inode_full(ext2_ino_t ino, struct ext2_inode * inode,

             reply	other threads:[~2007-04-10 18:45 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-10 18:43 Eric Sandeen [this message]
2007-04-10 19:40 ` [PATCH] e2fsprogs - handle large setb/testb/freeb commands in debugfs Theodore Tso

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=461BDAD5.5060900@redhat.com \
    --to=sandeen@redhat.com \
    --cc=linux-ext4@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.