On 12/10/13, 7:19 PM, Darrick J. Wong wrote: > debugfs should use strtoull wrappers for reading block numbers from > the command line. "unsigned long" isn't wide enough to handle block > numbers on 32bit platforms. > > Signed-off-by: Darrick J. Wong <darrick.wong@xxxxxxxxxx> > --- > debugfs/debugfs.c | 33 ++++++++++++++++++++++----------- > debugfs/extent_inode.c | 22 +++++++++------------- > debugfs/util.c | 2 +- > 3 files changed, 32 insertions(+), 25 deletions(-) > > > diff --git a/debugfs/debugfs.c b/debugfs/debugfs.c > index c5f8a1f..578d577 100644 > --- a/debugfs/debugfs.c > +++ b/debugfs/debugfs.c > @@ -181,8 +181,7 @@ void do_open_filesys(int argc, char **argv) > return; > break; > case 's': > - superblock = parse_ulong(optarg, argv[0], > - "superblock number", &err); > + err = strtoblk(argv[0], optarg, &superblock); > if (err) > return; > break; > @@ -278,14 +277,17 @@ void do_init_filesys(int argc, char **argv) > struct ext2_super_block param; > errcode_t retval; > int err; > + blk64_t blocks; > > if (common_args_process(argc, argv, 3, 3, "initialize", > "<device> <blocks>", CHECK_FS_NOTOPEN)) > return; > > memset(¶m, 0, sizeof(struct ext2_super_block)); > - ext2fs_blocks_count_set(¶m, parse_ulong(argv[2], argv[0], > - "blocks count", &err)); > + err = strtoblk(argv[0], argv[2], &blocks); > + if (err) > + return; > + ext2fs_blocks_count_set(¶m, blocks); > if (err) > return; err cannot be true here, is the 2nd "if (err)" extraneous? CID 1138573 Thanks, -Eric -- To unsubscribe from this list: send the line "unsubscribe linux-ext4" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html