fixed code to determine file inode - should work now

svn path=/trunk/; revision=2749
This commit is contained in:
KJK::Hyperion 2002-03-21 22:38:13 +00:00
parent 54802d46db
commit 82e00a0128

View file

@ -1,4 +1,4 @@
/* $Id: readdir.c,v 1.2 2002/02/20 09:17:56 hyperion Exp $
/* $Id: readdir.c,v 1.3 2002/03/21 22:38:13 hyperion Exp $
*/
/*
* COPYRIGHT: See COPYING in the top level directory
@ -136,7 +136,6 @@ struct _Wdirent *_Wreaddir(DIR *dirp)
INFO("this entry: %ls", pidData->info.FileName);
#if 0
/* file inodes are not returned by NtQueryDirectoryFile, we have to open every file */
/* set file's object attributes */
wstrFileName.Length = pidData->info.FileNameLength;
@ -144,7 +143,7 @@ struct _Wdirent *_Wreaddir(DIR *dirp)
wstrFileName.Buffer = &pidData->info.FileName[0];
oaFileAttribs.Length = sizeof(OBJECT_ATTRIBUTES);
oaFileAttribs.RootDirectory = pidData->dirhandle;
oaFileAttribs.RootDirectory = hDir;
oaFileAttribs.ObjectName = &wstrFileName;
oaFileAttribs.Attributes = 0;
oaFileAttribs.SecurityDescriptor = NULL;
@ -154,7 +153,7 @@ struct _Wdirent *_Wreaddir(DIR *dirp)
nErrCode = NtOpenFile
(
&hFile,
FILE_READ_ATTRIBUTES,
FILE_READ_ATTRIBUTES | SYNCHRONIZE,
&oaFileAttribs,
&isbStatus,
0,
@ -192,10 +191,6 @@ struct _Wdirent *_Wreaddir(DIR *dirp)
/* return file inode */
pidData->ent.de_unicode.d_ino = (ino_t)fiiInfo.IndexNumber.QuadPart;
#endif
FIXME("file inodes currently hardcoded to 0");
pidData->ent.de_unicode.d_ino = 0;
/* return file name */
pidData->ent.de_unicode.d_name = &pidData->info.FileName[0];