diff options
author | Roland McGrath <roland@gnu.org> | 1999-04-28 12:03:33 +0000 |
---|---|---|
committer | Roland McGrath <roland@gnu.org> | 1999-04-28 12:03:33 +0000 |
commit | af275feae5fb9f2130589ed64eaf5984d6f76835 (patch) | |
tree | e89ca59bfed867caa5ae2f4c4f797e0a0dc0b200 | |
parent | f2a2816c0ab23ea905034f8c1e3b46f6fed10177 (diff) | |
download | glibc-af275feae5fb9f2130589ed64eaf5984d6f76835.zip glibc-af275feae5fb9f2130589ed64eaf5984d6f76835.tar.gz glibc-af275feae5fb9f2130589ed64eaf5984d6f76835.tar.bz2 |
1999-04-28 Roland McGrath <roland@baalperazim.frob.com>
* sysdeps/mach/hurd/getdents.c (__getdirentries): Remove
implementation and just always fail with ENOSYS. This entry point is
obsolete. Add link warning to that effect.
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | sysdeps/mach/hurd/getdents.c | 35 |
2 files changed, 13 insertions, 28 deletions
@@ -1,3 +1,9 @@ +1999-04-28 Roland McGrath <roland@baalperazim.frob.com> + + * sysdeps/mach/hurd/getdents.c (__getdirentries): Remove + implementation and just always fail with ENOSYS. This entry point is + obsolete. Add link warning to that effect. + 1999-04-27 Roland McGrath <roland@baalperazim.frob.com> * hurd/get-host.c: Include <hurd/lookup.h>. diff --git a/sysdeps/mach/hurd/getdents.c b/sysdeps/mach/hurd/getdents.c index 879d256..d331f31 100644 --- a/sysdeps/mach/hurd/getdents.c +++ b/sysdeps/mach/hurd/getdents.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1992, 93, 94, 95, 97, 98 Free Software Foundation, Inc. +/* Copyright (C) 1992,93,94,95,97,98,99 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 @@ -30,33 +30,12 @@ __getdirentries (int fd, size_t nbytes, off_t *basep) { - error_t err; - int entriesread; - char *data = buf; - mach_msg_type_number_t bytesread = nbytes; - - /* Fault before taking any locks. */ - *(volatile off_t *) basep = *basep; - - err = HURD_DPORT_USE (fd, __dir_readdir (port, &data, &bytesread, - *basep, -1, nbytes, &entriesread)); - if (err) - return __hurd_dfail (fd, err); - - if (data != buf) - { - size_t copy = bytesread; - if (copy > nbytes) - /* The server has a violated the dir_readdir protocol. */ - copy = nbytes; - memcpy (buf, data, copy); - __vm_deallocate (__mach_task_self (), (vm_address_t) data, bytesread); - bytesread = copy; - } - - *basep += entriesread; - - return bytesread; + /* Nothing should use this function. Use readdir instead. */ + errno = ENOSYS; + return -1; } weak_alias (__getdirentries, getdirentries) + +link_warning(getdirentries, "\ +warning: getdirentries is obsolete and will always fail; use readdir instead") |