Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2014-10-09 17:24:37 +0400
committerCorinna Vinschen <corinna@vinschen.de>2014-10-09 17:24:37 +0400
commit54338f169f98409a0efd45a323cc9f358a78ac12 (patch)
treed8698a3200918f95346a5d76dd69ce918f813d18 /winsup/cygwin/fhandler_process.cc
parent633cf9b5dd846d6dbd5ab6102de24cf2a7c4582c (diff)
* fhandler_proc.cc (fhandler_proc::readdir): Set dirent d_type.
* fhandler_process.cc (fhandler_process::readdir): Ditto. * fhandler_procnet.cc (fhandler_procnet::readdir): Ditto. * fhandler_procsys.cc (fhandler_procsys::readdir): Ditto. * fhandler_procsysvipc.cc (fhandler_procsysvipc::readdir): Ditto. * fhandler_virtual.h (virt_ftype_to_dtype): Define new inline function to generate dirent d_type from virtual_ftype_t.
Diffstat (limited to 'winsup/cygwin/fhandler_process.cc')
-rw-r--r--winsup/cygwin/fhandler_process.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/winsup/cygwin/fhandler_process.cc b/winsup/cygwin/fhandler_process.cc
index 077ea9990..e2de05b3c 100644
--- a/winsup/cygwin/fhandler_process.cc
+++ b/winsup/cygwin/fhandler_process.cc
@@ -230,9 +230,14 @@ fhandler_process::readdir (DIR *dir, dirent *de)
{
int *p = (int *) filebuf;
__small_sprintf (de->d_name, "%d", p[dir->__d_position++ - 2]);
+ de->d_type = DT_LNK;
}
else
- strcpy (de->d_name, process_tab[dir->__d_position++].name);
+ {
+ strcpy (de->d_name, process_tab[dir->__d_position].name);
+ de->d_type = virt_ftype_to_dtype (process_tab[dir->__d_position].type);
+ dir->__d_position++;
+ }
dir->__flags |= dirent_saw_dot | dirent_saw_dot_dot;
res = 0;
out: