From c555aebde40afdc0d15d674f2c81c0e05cfded3f Mon Sep 17 00:00:00 2001 From: Theodore Ts'o Date: Sat, 25 Oct 1997 04:16:53 +0000 Subject: Many files: alloc.c (ext2fs_alloc_block): New function which allocates a block and updates the filesystem accounting records appropriately. ext2_err.et.in: Added new error codes: EXT2_NO_MEMORY, EXT2_INVALID_ARGUMENT, EXT2_BLOCK_ALLOC_FAIL, EXT2_INODE_ALLOC_FAIL, EXT2_NOT_DIRECTORY Change various library files to use these functions instead of EINVAL, ENOENT, etc. ChangeLog, pass1.c, pass3.c: pass3.c (get_lost_and_found): Check error return of EXT2_FILE_NOT_FOUND instead of ENOTDIR pass1.c (pass1_check_directory): Return EXT2_NO_DIRECTORY instead of ENOTDIR expect.icount: Change expected error string to be "Invalid argument passed to ext2 library" instead of just "Invalid argument" --- lib/ext2fs/dir_iterate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/ext2fs/dir_iterate.c') diff --git a/lib/ext2fs/dir_iterate.c b/lib/ext2fs/dir_iterate.c index 40c289b1..8d8de575 100644 --- a/lib/ext2fs/dir_iterate.c +++ b/lib/ext2fs/dir_iterate.c @@ -50,7 +50,7 @@ errcode_t ext2fs_dir_iterate(ext2_filsys fs, else { ctx.buf = malloc(fs->blocksize); if (!ctx.buf) - return ENOMEM; + return EXT2_NO_MEMORY; } ctx.func = func; ctx.func2 = 0; -- cgit v1.2.3