mirror of https://github.com/vitalif/e2fsprogs
ChangeLog, getsize.c:
getsize.c (main): Add debugging code under #ifdef DEBUGbitmap-optimize
parent
bbd47d76b7
commit
abf7d3880b
|
@ -1,3 +1,7 @@
|
|||
2000-06-10 Theodore Ts'o <tytso@valinux.com>
|
||||
|
||||
* getsize.c (main): Add debugging code under #ifdef DEBUG
|
||||
|
||||
2000-05-27 Theodore Ts'o <tytso@valinux.com>
|
||||
|
||||
* mkdir.c (ext2fs_mkdir): Read the parent directory's inode
|
||||
|
|
|
@ -138,3 +138,25 @@ errcode_t ext2fs_get_device_size(const char *file, int blocksize,
|
|||
*retblocks = (low + 1) / blocksize;
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
blk_t blocks;
|
||||
int retval;
|
||||
|
||||
if (argc < 2) {
|
||||
fprintf(stderr, "Usage: %s device\n", argv[0]);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
retval = ext2fs_get_device_size(argv[1], 1024, &blocks);
|
||||
if (retval) {
|
||||
com_err(argv[0], retval,
|
||||
"while calling ext2fs_get_device_size");
|
||||
exit(1);
|
||||
}
|
||||
printf("Device %s has %d 1k blocks.\n", argv[1], blocks);
|
||||
exit(0);
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue