Changeset 96861 in vbox for trunk/src/VBox/Runtime/common
- Timestamp:
- Sep 26, 2022 10:52:54 AM (2 years ago)
- Location:
- trunk/src/VBox/Runtime/common
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/common/fs/isovfs.cpp
r96407 r96861 5060 5060 { 5061 5061 case RTVFSQIEX_VOL_LABEL: 5062 { 5063 if (pThis->enmType == RTFSISOVOLTYPE_UDF) 5062 case RTVFSQIEX_VOL_LABEL_ALT: 5063 { 5064 if (pThis->enmType == RTFSISOVOLTYPE_UDF 5065 && ( enmInfo == RTVFSQIEX_VOL_LABEL 5066 || pThis->offPrimaryVolDesc == 0)) 5064 5067 return rtFsIsoVol_ReturnUdfDString(pThis->Udf.VolInfo.achLogicalVolumeID, 5065 5068 sizeof(pThis->Udf.VolInfo.achLogicalVolumeID), pvInfo, cbInfo, pcbRet); 5069 5070 bool const fPrimary = enmInfo == RTVFSQIEX_VOL_LABEL_ALT 5071 || pThis->enmType == RTFSISOVOLTYPE_ISO9960; 5072 5066 5073 int rc = RTVfsFileReadAt(pThis->hVfsBacking, 5067 pThis->enmType == RTFSISOVOLTYPE_ISO9960 5068 ? pThis->offPrimaryVolDesc : pThis->offSecondaryVolDesc, 5074 fPrimary ? pThis->offPrimaryVolDesc : pThis->offSecondaryVolDesc, 5069 5075 uBuf.ab, RT_MAX(RT_MIN(pThis->cbSector, sizeof(uBuf)), sizeof(uBuf.PriVolDesc)), NULL); 5070 5076 AssertRCReturn(rc, rc); 5071 switch (enmInfo) 5072 { 5073 case RTVFSQIEX_VOL_LABEL: 5074 if (pThis->enmType == RTFSISOVOLTYPE_ISO9960) 5075 return rtFsIsoVol_ReturnIso9660DString(uBuf.PriVolDesc.achVolumeId, sizeof(uBuf.PriVolDesc.achVolumeId), 5076 pvInfo, cbInfo, pcbRet); 5077 return rtFsIsoVol_ReturnIso9660D1String(uBuf.SupVolDesc.achVolumeId, sizeof(uBuf.SupVolDesc.achVolumeId), 5078 pvInfo, cbInfo, pcbRet); 5079 default: 5080 AssertFailedReturn(VERR_INTERNAL_ERROR); 5081 } 5082 break; 5077 5078 if (fPrimary) 5079 return rtFsIsoVol_ReturnIso9660DString(uBuf.PriVolDesc.achVolumeId, sizeof(uBuf.PriVolDesc.achVolumeId), 5080 pvInfo, cbInfo, pcbRet); 5081 return rtFsIsoVol_ReturnIso9660D1String(uBuf.SupVolDesc.achVolumeId, sizeof(uBuf.SupVolDesc.achVolumeId), 5082 pvInfo, cbInfo, pcbRet); 5083 5083 } 5084 5084 -
trunk/src/VBox/Runtime/common/vfs/vfsbase.cpp
r96407 r96861 2319 2319 2320 2320 2321 RTDECL(int) RTVfsQueryLabel(RTVFS hVfs, char *pszLabel, size_t cbLabel, size_t *pcbActual)2321 RTDECL(int) RTVfsQueryLabel(RTVFS hVfs, bool fAlternative, char *pszLabel, size_t cbLabel, size_t *pcbActual) 2322 2322 { 2323 2323 RTVFSINTERNAL *pThis = hVfs; … … 2336 2336 2337 2337 RTVfsLockAcquireRead(pThis->Base.hLock); 2338 rc = pThis->pOps->Obj.pfnQueryInfoEx(pThis->Base.pvThis, RTVFSQIEX_VOL_LABEL, pszLabel, cbLabel, pcbActual); 2338 rc = pThis->pOps->Obj.pfnQueryInfoEx(pThis->Base.pvThis, !fAlternative ? RTVFSQIEX_VOL_LABEL : RTVFSQIEX_VOL_LABEL_ALT, 2339 pszLabel, cbLabel, pcbActual); 2339 2340 RTVfsLockReleaseRead(pThis->Base.hLock); 2340 2341 }
Note:
See TracChangeset
for help on using the changeset viewer.