This is the mail archive of the cygwin-cvs@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[newlib-cygwin] Rename FileId to IndexNumber in NT structures to align with upstream


https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=d0f5f4c422f0bcb89a7dcfc692202ccc1ee12316

commit d0f5f4c422f0bcb89a7dcfc692202ccc1ee12316
Author: Corinna Vinschen <corinna@vinschen.de>
Date:   Tue Dec 8 14:33:07 2015 +0100

    Rename FileId to IndexNumber in NT structures to align with upstream
    
            * ntdll.h (FILE_ID_BOTH_DIR_INFORMATION): Rename FileId to IndexNumber
            to align with Microsoft naming scheme.
            (FILE_INTERNAL_INFORMATION): Ditto.
            * fhandler_disk_file.cc: Rename FileId to IndexNumber throughout.
            * syscalls.cc: Ditto.
    
    Signed-off-by: Corinna Vinschen <corinna@vinschen.de>

Diff:
---
 winsup/cygwin/ChangeLog             |  8 ++++++++
 winsup/cygwin/fhandler_disk_file.cc | 16 ++++++++--------
 winsup/cygwin/ntdll.h               |  4 ++--
 winsup/cygwin/syscalls.cc           |  4 ++--
 4 files changed, 20 insertions(+), 12 deletions(-)

diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index b085254..c585dd9 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,11 @@
+2015-12-08  Corinna Vinschen  <corinna@vinschen.de>
+
+	* ntdll.h (FILE_ID_BOTH_DIR_INFORMATION): Rename FileId to IndexNumber
+	to align with Microsoft naming scheme.
+	(FILE_INTERNAL_INFORMATION): Ditto.
+	* fhandler_disk_file.cc: Rename FileId to IndexNumber throughout.
+	* syscalls.cc: Ditto.
+
 2015-12-07  Johannes Schindelin  <johannes.schindelin@gmx.de>
 
 	* mount.cc (mount_info::from_fstab_line): Support mounting the current
diff --git a/winsup/cygwin/fhandler_disk_file.cc b/winsup/cygwin/fhandler_disk_file.cc
index cf87d2c..178cafa 100644
--- a/winsup/cygwin/fhandler_disk_file.cc
+++ b/winsup/cygwin/fhandler_disk_file.cc
@@ -228,8 +228,8 @@ path_conv::get_ino_by_handle (HANDLE hdl)
 
   if (NT_SUCCESS (NtQueryInformationFile (hdl, &io, &fai, sizeof fai,
 					  FileInternalInformation))
-      && isgood_inode (fai.FileId.QuadPart))
-    return fai.FileId.QuadPart;
+      && isgood_inode (fai.IndexNumber.QuadPart))
+    return fai.IndexNumber.QuadPart;
   return 0;
 }
 
@@ -449,8 +449,8 @@ fhandler_base::fstat_by_handle (struct stat *buf)
 			    status, pc.get_nt_native_path ());
 	      return -1;
 	    }
-	  else if (pc.isgood_inode (fii.FileId.QuadPart))
-	    ino = fii.FileId.QuadPart;
+	  else if (pc.isgood_inode (fii.IndexNumber.QuadPart))
+	    ino = fii.IndexNumber.QuadPart;
 	}
     }
   return fstat_helper (buf, fsi.NumberOfLinks);
@@ -494,7 +494,7 @@ fhandler_base::fstat_by_name (struct stat *buf)
 	    debug_printf ("%y = NtQueryDirectoryFile(%S)", status,
 			  pc.get_nt_native_path ());
 	  else
-	    ino = fdi_buf.fdi.FileId.QuadPart;
+	    ino = fdi_buf.fdi.IndexNumber.QuadPart;
 	}
     }
   return fstat_helper (buf, 1);
@@ -2339,7 +2339,7 @@ go_ahead:
 	  FileNameLength = buf->FileNameLength;
 	  FileAttributes = buf->FileAttributes;
 	  if ((dir->__flags & dirent_set_d_ino))
-	    de->d_ino = buf->FileId.QuadPart;
+	    de->d_ino = buf->IndexNumber.QuadPart;
 	}
       else if ((dir->__flags & dirent_nfs_d_ino))
 	{
@@ -2413,8 +2413,8 @@ go_ahead:
 		  NtClose (hdl);
 		  if (NT_SUCCESS (f_status))
 		    {
-		      if (pc.isgood_inode (fai.FileId.QuadPart))
-			de->d_ino = fai.FileId.QuadPart;
+		      if (pc.isgood_inode (fai.IndexNumber.QuadPart))
+			de->d_ino = fai.IndexNumber.QuadPart;
 		      else
 			/* Untrusted file system.  Don't try to fetch inode
 			   number again. */
diff --git a/winsup/cygwin/ntdll.h b/winsup/cygwin/ntdll.h
index 050e848..7119c1a 100644
--- a/winsup/cygwin/ntdll.h
+++ b/winsup/cygwin/ntdll.h
@@ -265,7 +265,7 @@ typedef struct _FILE_ID_BOTH_DIR_INFORMATION
   ULONG  EaSize;
   CCHAR  ShortNameLength;
   WCHAR  ShortName[12];
-  LARGE_INTEGER  FileId;
+  LARGE_INTEGER  IndexNumber;
   WCHAR  FileName[1];
 } FILE_ID_BOTH_DIR_INFORMATION, *PFILE_ID_BOTH_DIR_INFORMATION;
 
@@ -858,7 +858,7 @@ typedef struct _FILE_NETWORK_OPEN_INFORMATION
 /* Checked on 64 bit. */
 typedef struct _FILE_INTERNAL_INFORMATION
 {
-  LARGE_INTEGER FileId;
+  LARGE_INTEGER IndexNumber;
 } FILE_INTERNAL_INFORMATION, *PFILE_INTERNAL_INFORMATION;
 
 /* Checked on 64 bit. */
diff --git a/winsup/cygwin/syscalls.cc b/winsup/cygwin/syscalls.cc
index 86faa31..9d01955 100644
--- a/winsup/cygwin/syscalls.cc
+++ b/winsup/cygwin/syscalls.cc
@@ -405,7 +405,7 @@ try_to_bin (path_conv &pc, HANDLE &fh, ACCESS_MASK access, ULONG flags)
 		    "failed, status = %y", pc.get_nt_native_path (), status);
       goto out;
     }
-  RtlInt64ToHexUnicodeString (pfii->FileId.QuadPart, &recycler, TRUE);
+  RtlInt64ToHexUnicodeString (pfii->IndexNumber.QuadPart, &recycler, TRUE);
   RtlInt64ToHexUnicodeString (hash_path_name (0, pc.get_nt_native_path ()),
 			      &recycler, TRUE);
   /* Shoot. */
@@ -2548,7 +2548,7 @@ rename (const char *oldpath, const char *newpath)
 	      && NT_SUCCESS (NtQueryInformationFile (nfh, &io, &nfii,
 						     sizeof nfii,
 						     FileInternalInformation))
-	      && ofii.FileId.QuadPart == nfii.FileId.QuadPart)
+	      && ofii.IndexNumber.QuadPart == nfii.IndexNumber.QuadPart)
 	    {
 	      debug_printf ("%s and %s are the same file", oldpath, newpath);
 	      NtClose (nfh);


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]