summaryrefslogtreecommitdiff
path: root/libc/misc/dirent
diff options
context:
space:
mode:
authorManuel Novoa III <mjn3@codepoet.org>2001-06-25 20:26:29 +0000
committerManuel Novoa III <mjn3@codepoet.org>2001-06-25 20:26:29 +0000
commit96b91643c34a145a2e565247ca7594c1f77fb011 (patch)
treebd7eca717f2d473cf3bcdd7bffff62e082b65f72 /libc/misc/dirent
parent130ddae1735c638bddd24b3bd3e09e64c434f3c6 (diff)
Remove simulated d_type support for getdents and the dirent struct, and use
the straight getdents syscall instead of the wrapper (which leaked memory).
Diffstat (limited to 'libc/misc/dirent')
-rw-r--r--libc/misc/dirent/readdir.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/libc/misc/dirent/readdir.c b/libc/misc/dirent/readdir.c
index 0bb03f4c2..81575283d 100644
--- a/libc/misc/dirent/readdir.c
+++ b/libc/misc/dirent/readdir.c
@@ -55,15 +55,5 @@ struct dirent *readdir(DIR * dir)
/* We have to save the next offset here. */
dir->dd_nextoff = de->d_off;
- /* convert */
- dir->dd_buf->d_ino = de->d_ino;
- dir->dd_buf->d_off = de->d_off;
- dir->dd_buf->d_reclen = de->d_reclen;
- dir->dd_buf->d_type = 0;
- if (strlen((char *) &de->d_type) > 10)
- de->d_name[10] = 0;
- strcpy(dir->dd_buf->d_name, (char *) &de->d_name);
- __set_errno(0);
-
- return dir->dd_buf;
+ return de;
}