From 3e41913c48614e93dc266ae66fdf0824a8c76ffb Mon Sep 17 00:00:00 2001 From: Eric Sandeen Date: Tue, 10 Apr 2007 15:40:04 -0400 Subject: [PATCH] Handle large setb/testb/freeb commands in debugfs Fix a signed vs. unsigned problem by using blk_t instead of int Signed-off-by: Eric Sandeen --- debugfs/debugfs.c | 6 +++--- debugfs/debugfs.h | 2 +- debugfs/util.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/debugfs/debugfs.c b/debugfs/debugfs.c index 5efeb07c..c19f2a91 100644 --- a/debugfs/debugfs.c +++ b/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; diff --git a/debugfs/debugfs.h b/debugfs/debugfs.h index 449563f9..d72c7aca 100644 --- a/debugfs/debugfs.h +++ b/debugfs/debugfs.h @@ -41,7 +41,7 @@ extern int common_args_process(int argc, char *argv[], int min_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, diff --git a/debugfs/util.c b/debugfs/util.c index c6096ab7..714d799b 100644 --- a/debugfs/util.c +++ b/debugfs/util.c @@ -325,7 +325,7 @@ int common_inode_args_process(int argc, char *argv[], * 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; -- 2.11.0