mirror of
https://git.kernel.org/pub/scm/fs/ext2/e2fsprogs.git
synced 2024-12-13 11:54:31 +08:00
bmap.c:
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
This commit is contained in:
parent
4e27d7641a
commit
78d8f90ffa
@ -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.
|
||||
|
||||
|
@ -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_
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user