diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index b08525496..c585dd984 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,11 @@ +2015-12-08 Corinna Vinschen + + * 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 * 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 cf87d2c68..178cafa65 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 050e8485d..7119c1a9e 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 86faa31e4..9d01955cf 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);