Fix buggy use of the INLINE macros.
ChangeLog, dblist.c, ext2_err.et.in, mkdir.c:
  dblist.c, mkdir.c: use EXT2_DIR_EXISTS and EXT2_DB_NOT_FOUND instead
  	of the system error messages.
  ext2_err.et.in: Added new error messages EXT2_DIR_EXISTS and
  	EXT2_DB_NOT_FOUND
bitmap-optimize
Theodore Ts'o 1997-10-26 01:53:39 +00:00
parent 4e27d7641a
commit 78d8f90ffa
5 changed files with 16 additions and 4 deletions

View File

@ -1,5 +1,11 @@
Sat Oct 25 00:06:58 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
* dblist.c, mkdir.c: use EXT2_DIR_EXISTS and EXT2_DB_NOT_FOUND
instead of the system error messages.
* ext2_err.et.in: Added new error messages EXT2_DIR_EXISTS and
EXT2_DB_NOT_FOUND
* ext2fs.h: Added function declarations and constants for bmap.c
and fileio.c.

View File

@ -20,7 +20,7 @@
#include "ext2fs.h"
#ifdef NO_INLINE_FUNCS
#if defined(__GNUC__) && !defined(NO_INLINE_FUNCS)
#define _BMAP_INLINE_ __inline__
#else
#define _BMAP_INLINE_

View File

@ -190,7 +190,7 @@ errcode_t ext2fs_set_dir_block(ext2_dblist dblist, ino_t ino, blk_t blk,
dblist->sorted = 0;
return 0;
}
return ENOENT;
return EXT2_DB_NOT_FOUND;
}
/*

View File

@ -138,7 +138,7 @@ ec EXT2_ET_NO_INODE_BITMAP,
"Inode bitmap not loaded"
ec EXT2_ET_NO_BLOCK_BITMAP,
"BLOCK bitmap not loaded"
"Block bitmap not loaded"
ec EXT2_ET_BAD_INODE_NUM,
"Illegal inode number"
@ -251,4 +251,10 @@ ec EXT2_FILE_NOT_FOUND,
ec EXT2_FILE_RO,
"File open read-only"
ec EXT2_DB_NOT_FOUND,
"Ext2 directory block not found"
ec EXT2_DIR_EXISTS,
"Ext2 directory already exists"
end

View File

@ -107,7 +107,7 @@ errcode_t ext2fs_mkdir(ext2_filsys fs, ino_t parent, ino_t inum,
retval = ext2fs_lookup(fs, parent, name, strlen(name), 0,
&scratch_ino);
if (!retval) {
retval = EEXIST;
retval = EXT2_DIR_EXISTS;
name = 0;
goto cleanup;
}