- Timestamp:
- Nov 9, 2016 6:30:42 PM (8 years ago)
- Location:
- trunk/src/VBox/Runtime
- Files:
-
- 3 edited
-
include/internal/dir.h (modified) (1 diff)
-
r3/nt/direnum-r3-nt.cpp (modified) (3 diffs)
-
testcase/tstDir.cpp (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/include/internal/dir.h
r62477 r64623 125 125 * fDataUnread indicates valid data. */ 126 126 uint8_t *pabBuffer; 127 /** The device number for the directory (serial number). */ 128 RTDEV uDirDev; 127 129 # endif 128 130 # else /* 'POSIX': */ -
trunk/src/VBox/Runtime/r3/nt/direnum-r3-nt.cpp
r64620 r64623 123 123 */ 124 124 pDir->fDataUnread = false; /* spelling it out */ 125 pDir->uDirDev = 0; 125 126 #ifdef IPRT_WITH_NT_PATH_PASSTHRU 126 127 if (fObjDir) … … 295 296 return VERR_NO_MEMORY; 296 297 } 298 299 /* 300 * Also try determining the device number. 301 */ 302 PFILE_FS_VOLUME_INFORMATION pVolInfo = (PFILE_FS_VOLUME_INFORMATION)pThis->pabBuffer; 303 pVolInfo->VolumeSerialNumber = 0; 304 IO_STATUS_BLOCK Ios = RTNT_IO_STATUS_BLOCK_INITIALIZER; 305 NTSTATUS rcNt = NtQueryVolumeInformationFile(pThis->hDir, &Ios, 306 pVolInfo, RT_MIN(_2K, pThis->cbBufferAlloc), 307 FileFsVolumeInformation); 308 if (NT_SUCCESS(rcNt) && NT_SUCCESS(Ios.Status)) 309 pThis->uDirDev = pVolInfo->VolumeSerialNumber; 310 else 311 pThis->uDirDev = 0; 312 AssertCompile(sizeof(pThis->uDirDev) == sizeof(pVolInfo->VolumeSerialNumber)); 313 /** @todo Grow RTDEV to 64-bit and add low dword of VolumeCreationTime to the top of uDirDev. */ 297 314 } 298 315 … … 735 752 pDirEntry->Info.Attr.u.Unix.gid = ~0U; 736 753 pDirEntry->Info.Attr.u.Unix.cHardlinks = 1; 737 pDirEntry->Info.Attr.u.Unix.INodeIdDevice = 0; /** @todo Use the volume serial number (see GetFileInformationByHandle). */ 738 pDirEntry->Info.Attr.u.Unix.INodeId = 0; /** @todo Use the fileid (see GetFileInformationByHandle). */ 754 pDirEntry->Info.Attr.u.Unix.INodeIdDevice = pDir->uDirDev; 755 pDirEntry->Info.Attr.u.Unix.INodeId = 0; 756 if ( pDir->enmInfoClass == FileIdBothDirectoryInformation 757 && pDir->uCurData.pBothId->FileId.QuadPart != UINT64_MAX) 758 pDirEntry->Info.Attr.u.Unix.INodeId = pDir->uCurData.pBothId->FileId.QuadPart; 739 759 pDirEntry->Info.Attr.u.Unix.fFlags = 0; 740 760 pDirEntry->Info.Attr.u.Unix.GenerationId = 0; -
trunk/src/VBox/Runtime/testcase/tstDir.cpp
r62477 r64623 41 41 */ 42 42 bool fLong = false; 43 bool fTimes = false; 44 bool fInode = false; 43 45 bool fShortName = false; 44 46 bool fFiltered = false; … … 55 57 fLong = true; 56 58 break; 59 case 'i': 60 fLong = fInode = true; 61 break; 62 case 't': 63 fLong = fTimes = true; 64 break; 57 65 case 's': 58 f ShortName = true;66 fLong = fShortName = true; 59 67 break; 60 68 case 'f': … … 168 176 fMode & RTFS_DOS_NT_NOT_CONTENT_INDEXED ? 'I' : '-', 169 177 fMode & RTFS_DOS_NT_ENCRYPTED ? 'E' : '-'); 170 RTPrintf(" %d %4d %4d %10lld %10lld %#llx %#llx %#llx %#llx",178 RTPrintf(" %d %4d %4d %10lld %10lld", 171 179 DirEntry.Info.Attr.u.Unix.cHardlinks, 172 180 DirEntry.Info.Attr.u.Unix.uid, 173 181 DirEntry.Info.Attr.u.Unix.gid, 174 182 DirEntry.Info.cbObject, 175 DirEntry.Info.cbAllocated, 176 DirEntry.Info.BirthTime, 177 DirEntry.Info.ChangeTime, 178 DirEntry.Info.ModificationTime, 179 DirEntry.Info.AccessTime); 183 DirEntry.Info.cbAllocated); 184 if (fTimes) 185 RTPrintf(" %#llx %#llx %#llx %#llx", 186 DirEntry.Info.BirthTime, 187 DirEntry.Info.ChangeTime, 188 DirEntry.Info.ModificationTime, 189 DirEntry.Info.AccessTime); 190 191 if (fInode) 192 RTPrintf(" %#x:%#018llx", 193 DirEntry.Info.Attr.u.Unix.INodeIdDevice, DirEntry.Info.Attr.u.Unix.INodeId); 180 194 if (fShortName) 181 195 RTPrintf(" %2d %-12ls ", DirEntry.cwcShortName, DirEntry.wszShortName);
Note:
See TracChangeset
for help on using the changeset viewer.

