mirror of https://github.com/vitalif/e2fsprogs
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_FOUNDbitmap-optimize
parent
4e27d7641a
commit
78d8f90ffa
|
@ -1,5 +1,11 @@
|
||||||
Sat Oct 25 00:06:58 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
|
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
|
* ext2fs.h: Added function declarations and constants for bmap.c
|
||||||
and fileio.c.
|
and fileio.c.
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
|
|
||||||
#include "ext2fs.h"
|
#include "ext2fs.h"
|
||||||
|
|
||||||
#ifdef NO_INLINE_FUNCS
|
#if defined(__GNUC__) && !defined(NO_INLINE_FUNCS)
|
||||||
#define _BMAP_INLINE_ __inline__
|
#define _BMAP_INLINE_ __inline__
|
||||||
#else
|
#else
|
||||||
#define _BMAP_INLINE_
|
#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;
|
dblist->sorted = 0;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
return ENOENT;
|
return EXT2_DB_NOT_FOUND;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -138,7 +138,7 @@ ec EXT2_ET_NO_INODE_BITMAP,
|
||||||
"Inode bitmap not loaded"
|
"Inode bitmap not loaded"
|
||||||
|
|
||||||
ec EXT2_ET_NO_BLOCK_BITMAP,
|
ec EXT2_ET_NO_BLOCK_BITMAP,
|
||||||
"BLOCK bitmap not loaded"
|
"Block bitmap not loaded"
|
||||||
|
|
||||||
ec EXT2_ET_BAD_INODE_NUM,
|
ec EXT2_ET_BAD_INODE_NUM,
|
||||||
"Illegal inode number"
|
"Illegal inode number"
|
||||||
|
@ -251,4 +251,10 @@ ec EXT2_FILE_NOT_FOUND,
|
||||||
ec EXT2_FILE_RO,
|
ec EXT2_FILE_RO,
|
||||||
"File open read-only"
|
"File open read-only"
|
||||||
|
|
||||||
|
ec EXT2_DB_NOT_FOUND,
|
||||||
|
"Ext2 directory block not found"
|
||||||
|
|
||||||
|
ec EXT2_DIR_EXISTS,
|
||||||
|
"Ext2 directory already exists"
|
||||||
|
|
||||||
end
|
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,
|
retval = ext2fs_lookup(fs, parent, name, strlen(name), 0,
|
||||||
&scratch_ino);
|
&scratch_ino);
|
||||||
if (!retval) {
|
if (!retval) {
|
||||||
retval = EEXIST;
|
retval = EXT2_DIR_EXISTS;
|
||||||
name = 0;
|
name = 0;
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue