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>
This commit is contained in:
parent
87db9e0680
commit
d0f5f4c422
@ -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
|
||||
|
@ -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. */
|
||||
|
@ -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. */
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user