diff options
author | Theodore Ts'o <tytso@mit.edu> | 1999-01-04 07:35:45 +0000 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 1999-01-04 07:35:45 +0000 |
commit | 73f17cfc391221a5466e95c9dc1802564ce38973 (patch) | |
tree | c220008f097802fda49009f38c5108ec1144e2df /lib/ext2fs/llseek.c | |
parent | 04c5b028a92be92d991e8c8a2d9ee2a9d9c8a937 (diff) | |
download | e2fsprogs-73f17cfc391221a5466e95c9dc1802564ce38973.tar.gz |
ChangeLog, unix.c:
unix.c (main): Reset the context before calling ext2fs_close(), to
avoid referencing already freed memory.
ChangeLog, llseek.c:
llseek.c (ext2fs_llseek): Change ext2fs_llseek() in the non-Linux case
to use EINVAL by default, unless it isn't defined, in which case we
use EXT2_ET_INVALID_ARGUMENT instead.
ChangeLog, mk_cmds.sh.in:
mk_cmds.sh.in: Fixed portability bug in shell script; we were
depending on a bash'ism.
ChangeLog, uuid.c:
uuid.c: Use asm/types.h instead of linux/types.h, to be consistent
with other locations where we've had to do this to work around glibc.
Diffstat (limited to 'lib/ext2fs/llseek.c')
-rw-r--r-- | lib/ext2fs/llseek.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/ext2fs/llseek.c b/lib/ext2fs/llseek.c index 5fd35596..d75f42db 100644 --- a/lib/ext2fs/llseek.c +++ b/lib/ext2fs/llseek.c @@ -109,11 +109,15 @@ ext2_loff_t ext2fs_llseek (int fd, ext2_loff_t offset, int origin) #else /* !linux */ +#ifndef EINVAL +#define EINVAL EXT2_ET_INVALID_ARGUMENT +#endif + ext2_loff_t ext2fs_llseek (int fd, ext2_loff_t offset, int origin) { if ((sizeof(off_t) < sizeof(ext2_loff_t)) && (offset >= ((ext2_loff_t) 1 << ((sizeof(off_t)*8) -1)))) { - errno = EXT2_ET_INVALID_ARGUMENT; + errno = EINVAL; return -1; } return lseek (fd, (off_t) offset, origin); |