From 96b91643c34a145a2e565247ca7594c1f77fb011 Mon Sep 17 00:00:00 2001 From: Manuel Novoa III Date: Mon, 25 Jun 2001 20:26:29 +0000 Subject: Remove simulated d_type support for getdents and the dirent struct, and use the straight getdents syscall instead of the wrapper (which leaked memory). --- libc/misc/dirent/readdir.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) (limited to 'libc/misc') 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; } -- cgit v1.2.3