Cygwin: dll_list: drop FILE_BASIC_INFORMATION

Querying FILE_BASIC_INFORMATION is needless since using win pid+threadid
for forkables dirname rather than newest last write time.
This commit is contained in:
Michael Haubenwallner 2019-04-30 16:14:09 +02:00 committed by Corinna Vinschen
parent a4e62e3a4c
commit 4c79da8017
3 changed files with 3 additions and 6 deletions

View File

@ -372,7 +372,6 @@ dll_list::alloc (HINSTANCE h, per_process *p, dll_type type)
d->image_size = ((pefile*)h)->optional_hdr ()->SizeOfImage; d->image_size = ((pefile*)h)->optional_hdr ()->SizeOfImage;
d->preferred_base = (void*) ((pefile*)h)->optional_hdr()->ImageBase; d->preferred_base = (void*) ((pefile*)h)->optional_hdr()->ImageBase;
d->type = type; d->type = type;
d->fbi.FileAttributes = INVALID_FILE_ATTRIBUTES;
d->fii.IndexNumber.QuadPart = -1LL; d->fii.IndexNumber.QuadPart = -1LL;
if (!forkntsize) if (!forkntsize)
d->forkable_ntname = NULL; d->forkable_ntname = NULL;

View File

@ -59,7 +59,6 @@ struct dll
DWORD image_size; DWORD image_size;
void* preferred_base; void* preferred_base;
PWCHAR modname; PWCHAR modname;
FILE_BASIC_INFORMATION fbi;
FILE_INTERNAL_INFORMATION fii; FILE_INTERNAL_INFORMATION fii;
PWCHAR forkable_ntname; PWCHAR forkable_ntname;
WCHAR ntname[1]; /* must be the last data member */ WCHAR ntname[1]; /* must be the last data member */

View File

@ -158,7 +158,7 @@ rmdirs (WCHAR ntmaxpathbuf[NT_MAX_PATH])
static bool static bool
stat_real_file_once (dll *d) stat_real_file_once (dll *d)
{ {
if (d->fbi.FileAttributes != INVALID_FILE_ATTRIBUTES) if (d->fii.IndexNumber.QuadPart != -1LL)
return true; return true;
tmp_pathbuf tp; tmp_pathbuf tp;
@ -194,13 +194,12 @@ stat_real_file_once (dll *d)
if (fhandle == INVALID_HANDLE_VALUE) if (fhandle == INVALID_HANDLE_VALUE)
return false; return false;
if (!dll_list::read_fii (fhandle, &d->fii) || if (!dll_list::read_fii (fhandle, &d->fii))
!dll_list::read_fbi (fhandle, &d->fbi))
system_printf ("WARNING: Unable to read real file attributes for %W", system_printf ("WARNING: Unable to read real file attributes for %W",
pmsi1->SectionFileName.Buffer); pmsi1->SectionFileName.Buffer);
NtClose (fhandle); NtClose (fhandle);
return d->fbi.FileAttributes != INVALID_FILE_ATTRIBUTES; return d->fii.IndexNumber.QuadPart != -1LL;
} }
/* easy use of NtOpenFile */ /* easy use of NtOpenFile */