diff options
author | Ulrich Drepper <drepper@redhat.com> | 2003-08-22 18:11:32 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2003-08-22 18:11:32 +0000 |
commit | 089d05d5c2271fe619f5967e01c97d169b165947 (patch) | |
tree | 54af9ed3937aaffc4437aca64447da1a9939e22c /sysdeps/posix/posix_fallocate.c | |
parent | 87865838da97993a22a4414d29b6b90f5e750970 (diff) | |
download | glibc-089d05d5c2271fe619f5967e01c97d169b165947.tar glibc-089d05d5c2271fe619f5967e01c97d169b165947.tar.gz glibc-089d05d5c2271fe619f5967e01c97d169b165947.tar.bz2 glibc-089d05d5c2271fe619f5967e01c97d169b165947.zip |
Update.
2003-08-22 Ulrich Drepper <drepper@redhat.com>
* io/fcntl.h (posix_fallocate): Change type of third parameter to
off_t.
(posix_fallocate64): Change type of third parameter to off64_t.
* sysdeps/generic/posix_fallocate.c: Adjust for type change.
* sysdeps/posix/posix_fallocate.c: Likewise.
* sysdeps/generic/posix_fallocate64.c: Likewise.
* sysdeps/posix/posix_fallocate64.c: Likewise. Add compatibility
code for 32-bit platforms.
* sysdeps/unix/sysv/linux/i386/Versions: Add new version for
posix_fallocate64.
* sysdeps/unix/sysv/linux/powerpc/powerpc32/Versions: Likewise.
* sysdeps/unix/sysv/linux/s390/s390-32/Versions: Likewise.
* sysdeps/unix/sysv/linux/sparc/sparc32/Versions: Likewise.
Diffstat (limited to 'sysdeps/posix/posix_fallocate.c')
-rw-r--r-- | sysdeps/posix/posix_fallocate.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sysdeps/posix/posix_fallocate.c b/sysdeps/posix/posix_fallocate.c index 955cf2e127..838e7a004a 100644 --- a/sysdeps/posix/posix_fallocate.c +++ b/sysdeps/posix/posix_fallocate.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2000 Free Software Foundation, Inc. +/* Copyright (C) 2000, 2003 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -25,7 +25,7 @@ /* Reserve storage for the data of the file associated with FD. */ int -posix_fallocate (int fd, __off_t offset, size_t len) +posix_fallocate (int fd, __off_t offset, __off_t len) { struct stat64 st; struct statfs f; @@ -33,7 +33,7 @@ posix_fallocate (int fd, __off_t offset, size_t len) /* `off_tī is a signed type. Therefore we can determine whether OFFSET + LEN is too large if it is a negative value. */ - if (offset < 0 || len == 0) + if (offset < 0 || len < 0) return EINVAL; if (offset + len < 0) return EFBIG; |