summaryrefslogtreecommitdiff
path: root/lib/ext2fs/icount.c
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>1997-10-31 06:07:47 +0000
committerTheodore Ts'o <tytso@mit.edu>1997-10-31 06:07:47 +0000
commit1f0b6c1f895d189fea6999d0c07a7fee936a4baa (patch)
treeb26635ebdc8006dd5005111c42859a526e16eeb9 /lib/ext2fs/icount.c
parent7b4e4534f9361b21d3fafdd88a58f133decee38c (diff)
downloade2fsprogs-1f0b6c1f895d189fea6999d0c07a7fee936a4baa.tar.gz
Many files:
Rename new error codes to have _ET_ in them for consistency.
Diffstat (limited to 'lib/ext2fs/icount.c')
-rw-r--r--lib/ext2fs/icount.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/lib/ext2fs/icount.c b/lib/ext2fs/icount.c
index f321e68c..56e50139 100644
--- a/lib/ext2fs/icount.c
+++ b/lib/ext2fs/icount.c
@@ -280,14 +280,14 @@ errcode_t ext2fs_icount_validate(ext2_icount_t icount, FILE *out)
if (icount->count > icount->size) {
fprintf(out, "%s: count > size\n", bad);
- return EXT2_INVALID_ARGUMENT;
+ return EXT2_ET_INVALID_ARGUMENT;
}
for (i=1; i < icount->count; i++) {
if (icount->list[i-1].ino >= icount->list[i].ino) {
fprintf(out, "%s: list[%d].ino=%ld, list[%d].ino=%ld\n",
bad, i-1, icount->list[i-1].ino,
i, icount->list[i].ino);
- ret = EXT2_INVALID_ARGUMENT;
+ ret = EXT2_ET_INVALID_ARGUMENT;
}
}
return ret;
@@ -300,7 +300,7 @@ errcode_t ext2fs_icount_fetch(ext2_icount_t icount, ino_t ino, __u16 *ret)
EXT2_CHECK_MAGIC(icount, EXT2_ET_MAGIC_ICOUNT);
if (!ino || (ino > icount->num_inodes))
- return EXT2_INVALID_ARGUMENT;
+ return EXT2_ET_INVALID_ARGUMENT;
if (ext2fs_test_inode_bitmap(icount->single, ino)) {
*ret = 1;
@@ -328,7 +328,7 @@ errcode_t ext2fs_icount_increment(ext2_icount_t icount, ino_t ino,
EXT2_CHECK_MAGIC(icount, EXT2_ET_MAGIC_ICOUNT);
if (!ino || (ino > icount->num_inodes))
- return EXT2_INVALID_ARGUMENT;
+ return EXT2_ET_INVALID_ARGUMENT;
if (ext2fs_test_inode_bitmap(icount->single, ino)) {
/*
@@ -337,7 +337,7 @@ errcode_t ext2fs_icount_increment(ext2_icount_t icount, ino_t ino,
*/
el = get_icount_el(icount, ino, 1);
if (!el)
- return EXT2_NO_MEMORY;
+ return EXT2_ET_NO_MEMORY;
ext2fs_unmark_inode_bitmap(icount->single, ino);
el->count = 2;
} else if (icount->multiple) {
@@ -350,7 +350,7 @@ errcode_t ext2fs_icount_increment(ext2_icount_t icount, ino_t ino,
if (ext2fs_test_inode_bitmap(icount->multiple, ino)) {
el = get_icount_el(icount, ino, 1);
if (!el)
- return EXT2_NO_MEMORY;
+ return EXT2_ET_NO_MEMORY;
el->count++;
} else {
/*
@@ -375,7 +375,7 @@ errcode_t ext2fs_icount_increment(ext2_icount_t icount, ino_t ino,
}
el = get_icount_el(icount, ino, 1);
if (!el)
- return EXT2_NO_MEMORY;
+ return EXT2_ET_NO_MEMORY;
el->count++;
}
if (icount->multiple)
@@ -391,7 +391,7 @@ errcode_t ext2fs_icount_decrement(ext2_icount_t icount, ino_t ino,
struct ext2_icount_el *el;
if (!ino || (ino > icount->num_inodes))
- return EXT2_INVALID_ARGUMENT;
+ return EXT2_ET_INVALID_ARGUMENT;
EXT2_CHECK_MAGIC(icount, EXT2_ET_MAGIC_ICOUNT);
@@ -411,11 +411,11 @@ errcode_t ext2fs_icount_decrement(ext2_icount_t icount, ino_t ino,
if (icount->multiple &&
!ext2fs_test_inode_bitmap(icount->multiple, ino))
- return EXT2_INVALID_ARGUMENT;
+ return EXT2_ET_INVALID_ARGUMENT;
el = get_icount_el(icount, ino, 0);
if (!el || el->count == 0)
- return EXT2_INVALID_ARGUMENT;
+ return EXT2_ET_INVALID_ARGUMENT;
el->count--;
if (el->count == 1)
@@ -434,7 +434,7 @@ errcode_t ext2fs_icount_store(ext2_icount_t icount, ino_t ino,
struct ext2_icount_el *el;
if (!ino || (ino > icount->num_inodes))
- return EXT2_INVALID_ARGUMENT;
+ return EXT2_ET_INVALID_ARGUMENT;
EXT2_CHECK_MAGIC(icount, EXT2_ET_MAGIC_ICOUNT);
@@ -465,7 +465,7 @@ errcode_t ext2fs_icount_store(ext2_icount_t icount, ino_t ino,
*/
el = get_icount_el(icount, ino, 1);
if (!el)
- return EXT2_NO_MEMORY;
+ return EXT2_ET_NO_MEMORY;
el->count = count;
ext2fs_unmark_inode_bitmap(icount->single, ino);
if (icount->multiple)