]> sourceware.org Git - newlib-cygwin.git/commitdiff
Cygwin: dll_list: drop FILE_BASIC_INFORMATION
authorMichael Haubenwallner <michael.haubenwallner@ssi-schaefer.com>
Tue, 30 Apr 2019 14:14:09 +0000 (16:14 +0200)
committerCorinna Vinschen <corinna@vinschen.de>
Tue, 30 Apr 2019 16:10:08 +0000 (18:10 +0200)
Querying FILE_BASIC_INFORMATION is needless since using win pid+threadid
for forkables dirname rather than newest last write time.

winsup/cygwin/dll_init.cc
winsup/cygwin/dll_init.h
winsup/cygwin/forkable.cc

index 4baa48dc18a00eff217456de2743b9749a6b9c4d..28f4e53a8e06cfa5308cf817529a3f78073dee1c 100644 (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->preferred_base = (void*) ((pefile*)h)->optional_hdr()->ImageBase;
       d->type = type;
-      d->fbi.FileAttributes = INVALID_FILE_ATTRIBUTES;
       d->fii.IndexNumber.QuadPart = -1LL;
       if (!forkntsize)
        d->forkable_ntname = NULL;
index c4a133f01d170e77f3bf3a2435f42ee9b0688bd3..0a97496382d750dcbe77b91031c7e6f7a29f11ff 100644 (file)
@@ -59,7 +59,6 @@ struct dll
   DWORD image_size;
   void* preferred_base;
   PWCHAR modname;
-  FILE_BASIC_INFORMATION fbi;
   FILE_INTERNAL_INFORMATION fii;
   PWCHAR forkable_ntname;
   WCHAR ntname[1]; /* must be the last data member */
index 4580610b1d540f2cdab4ac9530619171655cd87f..30833c406c0d3f66311069ede7bfd46117af2ec8 100644 (file)
@@ -158,7 +158,7 @@ rmdirs (WCHAR ntmaxpathbuf[NT_MAX_PATH])
 static bool
 stat_real_file_once (dll *d)
 {
-  if (d->fbi.FileAttributes != INVALID_FILE_ATTRIBUTES)
+  if (d->fii.IndexNumber.QuadPart != -1LL)
     return true;
 
   tmp_pathbuf tp;
@@ -194,13 +194,12 @@ stat_real_file_once (dll *d)
   if (fhandle == INVALID_HANDLE_VALUE)
     return false;
 
-  if (!dll_list::read_fii (fhandle, &d->fii) ||
-      !dll_list::read_fbi (fhandle, &d->fbi))
+  if (!dll_list::read_fii (fhandle, &d->fii))
     system_printf ("WARNING: Unable to read real file attributes for %W",
                   pmsi1->SectionFileName.Buffer);
 
   NtClose (fhandle);
-  return d->fbi.FileAttributes != INVALID_FILE_ATTRIBUTES;
+  return d->fii.IndexNumber.QuadPart != -1LL;
 }
 
 /* easy use of NtOpenFile */
This page took 0.031312 seconds and 5 git commands to generate.