ChangeLog, mke2fs.c, badblocks.c:

Pass the blocksize to the bad blocks command so that all of the
  filesystem gets tested in the case where the blocksize 2048 or 4096.
ChangeLog, badblocks.c:
  Fix bug where ext2fs_badblocks_list_test would test the list (and
  exceed array boundaries) if there were no bad blocks on the bad blocks
  list.  (Showed up when user tried: mke2fs -c -b 4096).
bitmap-optimize
Theodore Ts'o 1997-05-09 02:50:16 +00:00
parent 9559ea33eb
commit f635d7f65b
6 changed files with 26 additions and 4 deletions

View File

@ -1,3 +1,9 @@
Thu May 8 22:45:27 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
* badblocks.c (read_bad_blocks_file): Pass the blocksize to the
bad blocks command so that all of the filesystem gets
tested in the case where the blocksize 2048 or 4096.
Thu Apr 24 12:16:42 1997 Theodre Ts'o <tytso@localhost.mit.edu>
* Release of E2fsprogs version 1.10

View File

@ -71,8 +71,8 @@ void read_bad_blocks_file(ext2_filsys fs, const char *bad_blocks_file,
fatal_error(0);
}
} else {
sprintf(buf, "badblocks %s%s %d", preen ? "" : "-s ",
fs->device_name,
sprintf(buf, "badblocks -b %d %s%s %d", fs->blocksize,
preen ? "" : "-s ", fs->device_name,
fs->super->s_blocks_count);
f = popen(buf, "r");
if (!f) {

View File

@ -1,3 +1,10 @@
Thu May 8 22:19:09 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
* badblocks.c (ext2fs_badblocks_list_test): Fix bug where
ext2fs_badblocks_list_test would test the list (and exceed
array boundaries) if there were no bad blocks on the bad
blocks list. (Showed up when user tried: mke2fs -c -b 4096).
Thu Apr 24 12:16:42 1997 Theodre Ts'o <tytso@localhost.mit.edu>
* Release of E2fsprogs version 1.10

View File

@ -131,6 +131,9 @@ int ext2fs_badblocks_list_test(ext2_badblocks_list bb, blk_t blk)
if (bb->magic != EXT2_ET_MAGIC_BADBLOCKS_LIST)
return 0;
if (bb->num == 0)
return 0;
low = 0;
high = bb->num-1;
if (blk == bb->list[low])

View File

@ -1,3 +1,9 @@
Thu May 8 22:22:08 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
* mke2fs.c (test_disk): Pass the blocksize to the bad blocks
command so that all of the filesystem gets tested in the
case where the blocksize 2048 or 4096.
Thu Apr 24 12:16:42 1997 Theodre Ts'o <tytso@localhost.mit.edu>
* Release of E2fsprogs version 1.10

View File

@ -203,8 +203,8 @@ static void test_disk(ext2_filsys fs, badblocks_list *bb_list)
errcode_t retval;
char buf[1024];
sprintf(buf, "badblocks %s%s %d", quiet ? "" : "-s ",
fs->device_name,
sprintf(buf, "badblocks -b %d %s%s %d", fs->blocksize,
quiet ? "" : "-s ", fs->device_name,
fs->super->s_blocks_count);
if (verbose)
printf("Running command: %s\n", buf);