Changeset 8401 for trunk/src/kernel32/disk.cpp
- Timestamp:
- May 10, 2002, 4:55:13 PM (23 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kernel32/disk.cpp
r8397 r8401 1 /* $Id: disk.cpp,v 1.3 5 2002-05-09 13:55:33sandervl Exp $ */1 /* $Id: disk.cpp,v 1.36 2002-05-10 14:55:10 sandervl Exp $ */ 2 2 3 3 /* … … 24 24 #include "oslibdos.h" 25 25 #include "osliblvm.h" 26 #include " exceptutil.h"26 #include "asmutil.h" 27 27 #include "profile.h" 28 28 #include "hmdisk.h" … … 240 240 pszVolume = (char *)alloca(length); 241 241 242 strcpy(pszVolume, &lpszDrive[sizeof(VOLUME_NAME_PREFIX)-1+1]); //-zero term + starting '{' 243 length -= sizeof(VOLUME_NAME_PREFIX)-1+1; 244 if(pszVolume[length-2] == '}') { 245 pszVolume[length-2] = 0; 242 if(OSLibLVMStripVolumeName(lpszDrive, pszVolume, length)) 243 { 246 244 rc = OSLibLVMGetDriveType(pszVolume); 247 245 dprintf(("KERNEL32: GetDriveType %s = %d (LVM)", lpszDrive, rc)); … … 314 312 pszVolume = (char *)alloca(length); 315 313 316 strcpy(pszVolume, &lpRootPathName[sizeof(VOLUME_NAME_PREFIX)-1]);317 length -= sizeof(VOLUME_NAME_PREFIX)-1;318 if(pszVolume[length-1] == '}') {314 if(OSLibLVMStripVolumeName(lpRootPathName, pszVolume, length)) 315 { 316 pszVolume[length-2] = 0; 319 317 fVolumeName = TRUE; 320 318 goto proceed; … … 361 359 else 362 360 if(!strcmp(lpFileSystemNameBuffer, "CDFS") || 363 !strcmp(lpFileSystemNameBuffer, "UDF")) 361 !strcmp(lpFileSystemNameBuffer, "UDF") || 362 !strcmp(lpFileSystemNameBuffer, "NTFS") || 363 !strcmp(lpFileSystemNameBuffer, "FAT32")) 364 364 { 365 365 //do nothing … … 738 738 DWORD cchBufferLength) 739 739 { 740 if(!VERSION_IS_WIN2000_OR_HIGHER()) { 741 SetLastError(ERROR_NOT_SUPPORTED); 742 return FALSE; 743 } 744 745 dprintf(("GetVolumeNameForVolumeMountPointA: %s", lpszVolumeMountPoint)); 746 if(OSLibLVMGetVolumeNameForVolumeMountPoint(lpszVolumeMountPoint, lpszVolumeName, 740 LPSTR pszvol; 741 742 pszvol = (char *)alloca(cchBufferLength); 743 if(pszvol == NULL) { 744 DebugInt3(); 745 return FALSE; 746 } 747 748 if(!VERSION_IS_WIN2000_OR_HIGHER()) { 749 SetLastError(ERROR_NOT_SUPPORTED); 750 return FALSE; 751 } 752 753 if(OSLibLVMGetVolumeNameForVolumeMountPoint(lpszVolumeMountPoint, pszvol, 747 754 cchBufferLength) == TRUE) 748 755 { 756 int length = strlen(pszvol); 757 if(length + sizeof(VOLUME_NAME_PREFIX) - 1 + 3 > cchBufferLength) { 758 SetLastError(ERROR_INSUFFICIENT_BUFFER); 759 return FALSE; 760 } 761 sprintf(lpszVolumeName, VOLUME_NAME_PREFIX"{%s}\\", pszvol); 762 763 dprintf(("GetVolumeNameForVolumeMountPointA %s returned %s", lpszVolumeMountPoint, lpszVolumeName)); 749 764 SetLastError(ERROR_SUCCESS); 750 765 return TRUE; 751 766 } 767 dprintf(("GetVolumeNameForVolumeMountPointA: %s not found!!", lpszVolumeMountPoint)); 752 768 SetLastError(ERROR_FILE_NOT_FOUND); 753 769 return FALSE;
Note:
See TracChangeset
for help on using the changeset viewer.