Fix up usage and decrement error messages in the test_icount program

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
bitmap-optimize
Theodore Ts'o 2007-04-07 09:06:46 -04:00
parent 39efa4c500
commit 080fbf2bac
4 changed files with 24 additions and 18 deletions

View File

@ -1,3 +1,7 @@
2007-04-06 Theodore Tso <tytso@mit.edu>
* test_icount.c: Fix up usage and decrement error messages
2006-06-30 Theodore Ts'o <tytso@mit.edu>
* Release of E2fsprogs 1.38

View File

@ -1,19 +1,21 @@
test_icount: validate
Icount structure successfully validated
test_icount: store 0
usage: store inode counttest_icount: fetch 0
test_icount: store 0 0
store: Invalid argument passed to ext2 library while calling ext2fs_icount_store
test_icount: fetch 0
fetch: Invalid argument passed to ext2 library while calling ext2fs_icount_fetch
test_icount: increment 0
increment: Invalid argument passed to ext2 library while calling ext2fs_icount_increment
test_icount: decrement 0
decrement: Invalid argument passed to ext2 library while calling ext2fs_icount_increment
test_icount: store 20001
usage: store inode counttest_icount: fetch 20001
decrement: Invalid argument passed to ext2 library while calling ext2fs_icount_decrement
test_icount: store 20001 0
store: Invalid argument passed to ext2 library while calling ext2fs_icount_store
test_icount: fetch 20001
fetch: Invalid argument passed to ext2 library while calling ext2fs_icount_fetch
test_icount: increment 20001
increment: Invalid argument passed to ext2 library while calling ext2fs_icount_increment
test_icount: decrement 20001
decrement: Invalid argument passed to ext2 library while calling ext2fs_icount_increment
decrement: Invalid argument passed to ext2 library while calling ext2fs_icount_decrement
test_icount: validate
Icount structure successfully validated
test_icount: fetch 1
@ -56,7 +58,7 @@ Count is 0
test_icount: get_size
Size of icount is: 5
test_icount: decrement 2
decrement: Invalid argument passed to ext2 library while calling ext2fs_icount_increment
decrement: Invalid argument passed to ext2 library while calling ext2fs_icount_decrement
test_icount: increment 2
Count is now 1
test_icount: fetch 2
@ -88,7 +90,7 @@ Count is 1
test_icount: decrement 2
Count is now 0
test_icount: decrement 2
decrement: Invalid argument passed to ext2 library while calling ext2fs_icount_increment
decrement: Invalid argument passed to ext2 library while calling ext2fs_icount_decrement
test_icount: store 3 1
test_icount: increment 3
Count is now 2
@ -128,9 +130,9 @@ Count is now 1
test_icount: decrement 4
Count is now 0
test_icount: decrement 4
decrement: Invalid argument passed to ext2 library while calling ext2fs_icount_increment
decrement: Invalid argument passed to ext2 library while calling ext2fs_icount_decrement
test_icount: decrement 4
decrement: Invalid argument passed to ext2 library while calling ext2fs_icount_increment
decrement: Invalid argument passed to ext2 library while calling ext2fs_icount_decrement
test_icount: store 5 4
test_icount: decrement 5
Count is now 3
@ -141,7 +143,7 @@ Count is now 1
test_icount: decrement 5
Count is now 0
test_icount: decrement 5
decrement: Invalid argument passed to ext2 library while calling ext2fs_icount_increment
decrement: Invalid argument passed to ext2 library while calling ext2fs_icount_decrement
test_icount: get_size
Size of icount is: 105
test_icount: validate

View File

@ -8,11 +8,11 @@
# First let's test the boundary cases for illegal arguments
#
validate
store 0
store 0 0
fetch 0
increment 0
decrement 0
store 20001
store 20001 0
fetch 20001
increment 20001
decrement 20001

View File

@ -101,7 +101,7 @@ void do_free_icount(int argc, char **argv)
void do_fetch(int argc, char **argv)
{
const char *usage = "usage: %s inode";
const char *usage = "usage: %s inode\n";
errcode_t retval;
ext2_ino_t ino;
__u16 count;
@ -124,7 +124,7 @@ void do_fetch(int argc, char **argv)
void do_increment(int argc, char **argv)
{
const char *usage = "usage: %s inode";
const char *usage = "usage: %s inode\n";
errcode_t retval;
ext2_ino_t ino;
__u16 count;
@ -148,7 +148,7 @@ void do_increment(int argc, char **argv)
void do_decrement(int argc, char **argv)
{
const char *usage = "usage: %s inode";
const char *usage = "usage: %s inode\n";
errcode_t retval;
ext2_ino_t ino;
__u16 count;
@ -164,7 +164,7 @@ void do_decrement(int argc, char **argv)
retval = ext2fs_icount_decrement(test_icount, ino, &count);
if (retval) {
com_err(argv[0], retval,
"while calling ext2fs_icount_increment");
"while calling ext2fs_icount_decrement");
return;
}
printf("Count is now %u\n", count);
@ -172,7 +172,7 @@ void do_decrement(int argc, char **argv)
void do_store(int argc, char **argv)
{
const char *usage = "usage: %s inode count";
const char *usage = "usage: %s inode count\n";
errcode_t retval;
ext2_ino_t ino;
ext2_ino_t count;