mirror of
git://sourceware.org/git/glibc.git
synced 2024-11-27 03:41:23 +08:00
* sysdeps/mach/hurd/pread.c: Fail with EINVAL if OFFSET is negative.
* sysdeps/mach/hurd/pwrite.c: Likewise. * shlib-versions [USE_IN_LIBIO] (.*-.*-gnu-gnu.*): libc=0.3 [USE_IN_LIBIO && !GLIBC_OLDEST_ABI] (.*-.*-gnu-gnu.*): Use GLIBC_2.2.4 as default version set. (test_ftello): Check for EFBIG and ENOSPC, clean up error messages.
This commit is contained in:
parent
e418753ce9
commit
c0c71388a7
11
ChangeLog
11
ChangeLog
@ -1,3 +1,12 @@
|
||||
2001-06-13 Roland McGrath <roland@frob.com>
|
||||
|
||||
* sysdeps/mach/hurd/pread.c: Fail with EINVAL if OFFSET is negative.
|
||||
* sysdeps/mach/hurd/pwrite.c: Likewise.
|
||||
|
||||
* shlib-versions [USE_IN_LIBIO] (.*-.*-gnu-gnu.*): libc=0.3
|
||||
[USE_IN_LIBIO && !GLIBC_OLDEST_ABI] (.*-.*-gnu-gnu.*): Use GLIBC_2.2.4
|
||||
as default version set.
|
||||
|
||||
2001-06-13 Ulrich Drepper <drepper@redhat.com>
|
||||
|
||||
* libio/iolibio.h (_IO_freopen): Correct last parameter to
|
||||
@ -60,7 +69,7 @@
|
||||
Michael Deutschmann <michael@talamasca.ocis.net>
|
||||
|
||||
* io/test-lfs.c (do_prepare): Clean up error messages.
|
||||
(test_ftello): Check for EFBIG and ENOSP, clean up error messages.
|
||||
(test_ftello): Check for EFBIG and ENOSPC, clean up error messages.
|
||||
(do_test): Likewise.
|
||||
|
||||
2001-06-11 Andreas Jaeger <aj@suse.de>
|
||||
|
@ -1,6 +1,6 @@
|
||||
/* Read block from given position in file without changing file pointer.
|
||||
Hurd version.
|
||||
Copyright (C) 1999 Free Software Foundation, Inc.
|
||||
Copyright (C) 1999,2001 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,8 +25,11 @@
|
||||
ssize_t
|
||||
__pread (int fd, void *buf, size_t nbytes, off_t offset)
|
||||
{
|
||||
error_t err = HURD_FD_USE (fd, _hurd_fd_read (descriptor,
|
||||
buf, &nbytes, offset));
|
||||
error_t err;
|
||||
if (offset < 0)
|
||||
err = EINVAL;
|
||||
else
|
||||
err = HURD_FD_USE (fd, _hurd_fd_read (descriptor, buf, &nbytes, offset));
|
||||
return err ? __hurd_dfail (fd, err) : nbytes;
|
||||
}
|
||||
weak_alias (__pread, pread)
|
||||
|
@ -1,6 +1,6 @@
|
||||
/* Write block at given position in file without changing file pointer.
|
||||
Hurd version.
|
||||
Copyright (C) 1999 Free Software Foundation, Inc.
|
||||
Copyright (C) 1999,2001 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
|
||||
@ -27,8 +27,11 @@
|
||||
ssize_t
|
||||
__pwrite (int fd, const void *buf, size_t nbytes, off_t offset)
|
||||
{
|
||||
error_t err = HURD_FD_USE (fd, _hurd_fd_write (descriptor,
|
||||
buf, &nbytes, offset));
|
||||
error_t err;
|
||||
if (offset < 0)
|
||||
err = EINVAL;
|
||||
else
|
||||
err = HURD_FD_USE (fd, _hurd_fd_write (descriptor, buf, &nbytes, offset));
|
||||
return err ? __hurd_dfail (fd, err) : nbytes;
|
||||
}
|
||||
weak_alias (__pwrite, pwrite)
|
||||
|
Loading…
Reference in New Issue
Block a user