- Timestamp:
- May 9, 2002, 3:55:35 PM (23 years ago)
- Location:
- trunk/src/kernel32
- Files:
-
- 2 added
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kernel32/dbglocal.cpp
r7886 r8397 1 /* $Id: dbglocal.cpp,v 1.2 3 2002-02-12 12:00:41sandervl Exp $ */1 /* $Id: dbglocal.cpp,v 1.24 2002-05-09 13:55:32 sandervl Exp $ */ 2 2 3 3 /* … … 136 136 "system", 137 137 "string", 138 "char" 138 "char", 139 "osliblvm" 139 140 }; 140 141 //****************************************************************************** -
trunk/src/kernel32/dbglocal.h
r7886 r8397 134 134 #define DBG_string 114 135 135 #define DBG_char 115 136 #define DBG_MAXFILES 116 136 #define DBG_osliblvm 116 137 #define DBG_MAXFILES 117 137 138 138 139 extern USHORT DbgEnabledKERNEL32[DBG_MAXFILES]; -
trunk/src/kernel32/dbgwrap.cpp
r8392 r8397 656 656 657 657 658 NODEF_DEBUGWRAP8(FindFirstVolumeA); 659 NODEF_DEBUGWRAP8(FindFirstVolumeW); 660 NODEF_DEBUGWRAP12(FindNextVolumeA); 661 NODEF_DEBUGWRAP12(FindNextVolumeW); 662 NODEF_DEBUGWRAP4(FindVolumeClose); 663 664 NODEF_DEBUGWRAP12(FindFirstVolumeMountPointA); 665 NODEF_DEBUGWRAP12(FindFirstVolumeMountPointW); 666 NODEF_DEBUGWRAP12(FindNextVolumeMountPointA); 667 NODEF_DEBUGWRAP12(FindNextVolumeMountPointW); 668 NODEF_DEBUGWRAP4(FindVolumeMountPointClose); 669 670 NODEF_DEBUGWRAP12(GetVolumeNameForVolumeMountPointA); 671 NODEF_DEBUGWRAP12(GetVolumeNameForVolumeMountPointW); 658 DEBUGWRAP8(FindFirstVolumeA); 659 DEBUGWRAP8(FindFirstVolumeW); 660 DEBUGWRAP12(FindNextVolumeA); 661 DEBUGWRAP12(FindNextVolumeW); 662 DEBUGWRAP4(FindVolumeClose); 663 DEBUGWRAP12(FindFirstVolumeMountPointA); 664 DEBUGWRAP12(FindFirstVolumeMountPointW); 665 DEBUGWRAP12(FindNextVolumeMountPointA); 666 DEBUGWRAP12(FindNextVolumeMountPointW); 667 DEBUGWRAP4(FindVolumeMountPointClose); 668 DEBUGWRAP12(GetVolumeNameForVolumeMountPointA); 669 DEBUGWRAP12(GetVolumeNameForVolumeMountPointW); 672 670 673 671 #undef DBG_LOCALLOG -
trunk/src/kernel32/disk.cpp
r8392 r8397 1 /* $Id: disk.cpp,v 1.3 4 2002-05-08 15:02:58sandervl Exp $ */1 /* $Id: disk.cpp,v 1.35 2002-05-09 13:55:33 sandervl Exp $ */ 2 2 3 3 /* … … 17 17 18 18 #include <os2win.h> 19 #include <stdio.h> 19 20 #include <stdlib.h> 20 21 #include <string.h> 22 #include <versionos2.h> 21 23 #include "unicode.h" 22 24 #include "oslibdos.h" 25 #include "osliblvm.h" 23 26 #include "exceptutil.h" 24 27 #include "profile.h" 28 #include "hmdisk.h" 25 29 26 30 #define DBG_LOCALLOG DBG_disk … … 29 33 30 34 ODINDEBUGCHANNEL(KERNEL32-DISK) 35 31 36 32 37 //****************************************************************************** … … 225 230 } 226 231 else { 232 //Volume functions only available in Windows 2000 and up 233 if(VERSION_IS_WIN2000_OR_HIGHER() && !strncmp(lpszDrive, VOLUME_NAME_PREFIX, sizeof(VOLUME_NAME_PREFIX)-1)) 234 { 235 char *pszVolume; 236 int length; 237 238 //strip volume name prefix (\\\\?\\Volume\\) 239 length = strlen(lpszDrive); 240 pszVolume = (char *)alloca(length); 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; 246 rc = OSLibLVMGetDriveType(pszVolume); 247 dprintf(("KERNEL32: GetDriveType %s = %d (LVM)", lpszDrive, rc)); 248 return rc; 249 } 250 } 227 251 return DRIVE_NO_ROOT_DIR; //return value checked in NT4, SP6 (GetDriveType(""), GetDriveType("4"); 228 252 } … … 263 287 CHAR szOrgFileSystemName[256] = ""; 264 288 ULONG drive; 265 BOOL rc; 289 BOOL rc, fVolumeName = FALSE; 290 char *pszVolume; 266 291 267 292 dprintf(("GetVolumeInformationA %s", lpRootPathName)); … … 280 305 } 281 306 else { 307 //Volume functions only available in Windows 2000 and up 308 if(LOBYTE(GetVersion()) >= 5 && !strncmp(lpRootPathName, VOLUME_NAME_PREFIX, sizeof(VOLUME_NAME_PREFIX)-1)) 309 { 310 int length; 311 312 //strip volume name prefix (\\\\?\\Volume\\) 313 length = strlen(lpRootPathName); 314 pszVolume = (char *)alloca(length); 315 316 strcpy(pszVolume, &lpRootPathName[sizeof(VOLUME_NAME_PREFIX)-1]); 317 length -= sizeof(VOLUME_NAME_PREFIX)-1; 318 if(pszVolume[length-1] == '}') { 319 fVolumeName = TRUE; 320 goto proceed; 321 } 322 } 282 323 SetLastError(ERROR_INVALID_PARAMETER); 283 324 return FALSE; 284 325 } 326 proceed: 285 327 286 328 if(lpVolumeSerialNumber || lpVolumeNameBuffer) { 287 rc = OSLibDosQueryVolumeSerialAndName(drive, lpVolumeSerialNumber, lpVolumeNameBuffer, nVolumeNameSize); 329 if(fVolumeName) { 330 rc = OSLibLVMQueryVolumeSerialAndName(pszVolume, lpVolumeSerialNumber, lpVolumeNameBuffer, nVolumeNameSize); 331 } 332 else rc = OSLibDosQueryVolumeSerialAndName(drive, lpVolumeSerialNumber, lpVolumeNameBuffer, nVolumeNameSize); 288 333 if(lpVolumeSerialNumber) { 289 334 dprintf2(("Volume serial number: %x", *lpVolumeSerialNumber)); … … 299 344 nFileSystemNameSize = sizeof(tmpstring); 300 345 } 301 rc = OSLibDosQueryVolumeFS(drive, lpFileSystemNameBuffer, nFileSystemNameSize); 346 if(fVolumeName) { 347 rc = OSLibLVMQueryVolumeFS(pszVolume, lpFileSystemNameBuffer, nFileSystemNameSize); 348 } 349 else rc = OSLibDosQueryVolumeFS(drive, lpFileSystemNameBuffer, nFileSystemNameSize); 350 302 351 //save original file system name 303 352 if(rc == ERROR_SUCCESS) strcpy(szOrgFileSystemName, lpFileSystemNameBuffer); … … 435 484 } 436 485 //****************************************************************************** 486 typedef struct { 487 HANDLE hLVMVolumeControlData; 488 DWORD lastvol; 489 } VOLINFO; 437 490 //****************************************************************************** 438 491 HANDLE WIN32API FindFirstVolumeA(LPTSTR lpszVolumeName, DWORD cchBufferLength) 439 492 { 493 HANDLE hVolume; 494 VOLINFO *pVolInfo; 495 char szdrive[3]; 496 char szVolume[256]; 497 498 if(!VERSION_IS_WIN2000_OR_HIGHER()) { 499 SetLastError(ERROR_NOT_SUPPORTED); 500 return FALSE; 501 } 502 503 hVolume = GlobalAlloc(0, sizeof(VOLINFO)); 504 if(hVolume == 0) { 505 dprintf(("ERROR: FindFirstVolumeA: out of memory!!")); 506 SetLastError(ERROR_NOT_ENOUGH_MEMORY); 507 return 0; 508 } 509 pVolInfo = (VOLINFO *)GlobalLock(hVolume); 510 pVolInfo->hLVMVolumeControlData = OSLibLVMQueryVolumeControlData(); 511 pVolInfo->lastvol = 0; 512 513 if(OSLibLVMQueryVolumeName(pVolInfo->hLVMVolumeControlData, pVolInfo->lastvol, szVolume, sizeof(szVolume)) == FALSE) { 514 SetLastError(ERROR_NO_MORE_FILES); 515 goto fail; 516 } 517 if(strlen(szVolume) + 14 + 1 > cchBufferLength) { 518 SetLastError(ERROR_INSUFFICIENT_BUFFER); 519 goto fail; 520 } 521 sprintf(lpszVolumeName, VOLUME_NAME_PREFIX"{%s}\\", szVolume); 522 dprintf(("FindFirstVolumeA returned %s", lpszVolumeName)); 523 pVolInfo->lastvol++; 524 GlobalUnlock(hVolume); 525 SetLastError(ERROR_SUCCESS); 526 return hVolume; 527 528 fail: 529 GlobalUnlock(hVolume); 530 GlobalFree(hVolume); 440 531 return 0; 441 532 } … … 444 535 HANDLE WIN32API FindFirstVolumeW(LPWSTR lpszVolumeName, DWORD cchBufferLength) 445 536 { 446 return 0; 537 LPSTR pszvolname = NULL; 538 HANDLE hVolume; 539 540 if(!VERSION_IS_WIN2000_OR_HIGHER()) { 541 SetLastError(ERROR_NOT_SUPPORTED); 542 return FALSE; 543 } 544 545 if(cchBufferLength) { 546 pszvolname = (char *)alloca(cchBufferLength); 547 } 548 hVolume = FindFirstVolumeA(pszvolname, cchBufferLength); 549 if(hVolume) { 550 int len = MultiByteToWideChar( CP_ACP, 0, pszvolname, -1, NULL, 0); 551 MultiByteToWideChar(CP_ACP, 0, pszvolname, -1, lpszVolumeName, len); 552 } 553 return hVolume; 447 554 } 448 555 //****************************************************************************** … … 451 558 DWORD cchBufferLength) 452 559 { 453 return FALSE; 560 VOLINFO *pVolInfo; 561 char szdrive[3]; 562 DWORD DeviceType; 563 char szVolume[256]; 564 565 if(!VERSION_IS_WIN2000_OR_HIGHER()) { 566 SetLastError(ERROR_NOT_SUPPORTED); 567 return FALSE; 568 } 569 570 pVolInfo = (VOLINFO *)GlobalLock(hFindVolume); 571 if(pVolInfo == NULL) { 572 SetLastError(ERROR_INVALID_PARAMETER); 573 return FALSE; 574 } 575 if(OSLibLVMQueryVolumeName(pVolInfo->hLVMVolumeControlData, pVolInfo->lastvol, 576 szVolume, sizeof(szVolume)) == FALSE) { 577 SetLastError(ERROR_NO_MORE_FILES); 578 GlobalUnlock(hFindVolume); 579 return FALSE; 580 } 581 if(strlen(szVolume) + 14 + 1 > cchBufferLength) { 582 SetLastError(ERROR_INSUFFICIENT_BUFFER); 583 GlobalUnlock(hFindVolume); 584 return FALSE; 585 } 586 sprintf(lpszVolumeName, VOLUME_NAME_PREFIX"{%s}\\", szVolume); 587 dprintf(("FindNextVolumeA returned %s", lpszVolumeName)); 588 pVolInfo->lastvol++; 589 GlobalUnlock(hFindVolume); 590 SetLastError(ERROR_SUCCESS); 591 return TRUE; 454 592 } 455 593 //****************************************************************************** … … 458 596 DWORD cchBufferLength) 459 597 { 598 LPSTR pszvolnameA = NULL; 599 BOOL ret; 600 601 if(!VERSION_IS_WIN2000_OR_HIGHER()) { 602 SetLastError(ERROR_NOT_SUPPORTED); 603 return FALSE; 604 } 605 606 if(cchBufferLength) { 607 pszvolnameA = (char *)alloca(cchBufferLength); 608 } 609 ret = FindNextVolumeA(hFindVolume, pszvolnameA, cchBufferLength); 610 if(ret) { 611 int len = MultiByteToWideChar( CP_ACP, 0, pszvolnameA, -1, NULL, 0); 612 MultiByteToWideChar(CP_ACP, 0, pszvolnameA, -1, lpszVolumeName, len); 613 } 614 return ret; 615 } 616 //****************************************************************************** 617 //****************************************************************************** 618 BOOL WIN32API FindVolumeClose(HANDLE hFindVolume) 619 { 620 VOLINFO *pVolInfo; 621 622 if(!VERSION_IS_WIN2000_OR_HIGHER()) { 623 SetLastError(ERROR_NOT_SUPPORTED); 624 return FALSE; 625 } 626 627 if(hFindVolume) { 628 pVolInfo = (VOLINFO *)GlobalLock(hFindVolume); 629 OSLibLVMFreeVolumeControlData(pVolInfo->hLVMVolumeControlData); 630 GlobalUnlock(hFindVolume); 631 GlobalFree(hFindVolume); 632 return TRUE; 633 } 460 634 return FALSE; 461 }462 //******************************************************************************463 //******************************************************************************464 BOOL WIN32API FindVolumeClose(HANDLE hFindVolume)465 {466 return TRUE;467 635 } 468 636 //****************************************************************************** … … 472 640 DWORD cchBufferLength) 473 641 { 642 if(!VERSION_IS_WIN2000_OR_HIGHER()) { 643 SetLastError(ERROR_NOT_SUPPORTED); 644 return FALSE; 645 } 646 647 SetLastError(ERROR_NO_MORE_FILES); 474 648 return 0; 475 649 } … … 480 654 DWORD cchBufferLength) 481 655 { 482 return 0; 656 LPSTR pszmountpointnameA = NULL; 657 LPSTR pszrootA = NULL; 658 HANDLE hVolume; 659 660 if(!VERSION_IS_WIN2000_OR_HIGHER()) { 661 SetLastError(ERROR_NOT_SUPPORTED); 662 return FALSE; 663 } 664 665 if(cchBufferLength) { 666 pszmountpointnameA = (char *)alloca(cchBufferLength); 667 } 668 if(lpszRootPathName) { 669 pszrootA = (char *)alloca(lstrlenW(lpszRootPathName)+1); 670 671 int len = WideCharToMultiByte( CP_ACP, 0, lpszRootPathName, -1, NULL, 0, 0, NULL); 672 WideCharToMultiByte(CP_ACP, 0, lpszRootPathName, -1, pszrootA, len, 0, NULL); 673 } 674 675 hVolume = FindFirstVolumeMountPointA(pszrootA, pszmountpointnameA, cchBufferLength); 676 if(hVolume) { 677 int len = MultiByteToWideChar( CP_ACP, 0, pszmountpointnameA, -1, NULL, 0); 678 MultiByteToWideChar(CP_ACP, 0, pszmountpointnameA, -1, lpszVolumeMountPoint, len); 679 } 680 return hVolume; 483 681 } 484 682 //****************************************************************************** … … 488 686 DWORD cchBufferLength) 489 687 { 688 if(!VERSION_IS_WIN2000_OR_HIGHER()) { 689 SetLastError(ERROR_NOT_SUPPORTED); 690 return FALSE; 691 } 692 SetLastError(ERROR_NO_MORE_FILES); 490 693 return FALSE; 491 694 } … … 496 699 DWORD cchBufferLength) 497 700 { 701 LPSTR pszmoutpointnameA = NULL; 702 BOOL ret; 703 704 if(!VERSION_IS_WIN2000_OR_HIGHER()) { 705 SetLastError(ERROR_NOT_SUPPORTED); 706 return FALSE; 707 } 708 709 if(cchBufferLength) { 710 pszmoutpointnameA = (char *)alloca(cchBufferLength); 711 } 712 ret = FindFirstVolumeA(pszmoutpointnameA, cchBufferLength); 713 if(ret) { 714 int len = MultiByteToWideChar( CP_ACP, 0, pszmoutpointnameA, -1, NULL, 0); 715 MultiByteToWideChar(CP_ACP, 0, pszmoutpointnameA, -1, lpszVolumeMountPoint, len); 716 } 717 return ret; 718 } 719 //****************************************************************************** 720 //****************************************************************************** 721 BOOL WIN32API FindVolumeMountPointClose(HANDLE hFindVolumeMountPoint) 722 { 723 if(!VERSION_IS_WIN2000_OR_HIGHER()) { 724 SetLastError(ERROR_NOT_SUPPORTED); 725 return FALSE; 726 } 727 728 if(hFindVolumeMountPoint) { 729 GlobalFree(hFindVolumeMountPoint); 730 return TRUE; 731 } 498 732 return FALSE; 499 }500 //******************************************************************************501 //******************************************************************************502 BOOL WIN32API FindVolumeMountPointClose(HANDLE hFindVolumeMountPoint)503 {504 return TRUE;505 733 } 506 734 //****************************************************************************** … … 510 738 DWORD cchBufferLength) 511 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, 747 cchBufferLength) == TRUE) 748 { 749 SetLastError(ERROR_SUCCESS); 750 return TRUE; 751 } 752 SetLastError(ERROR_FILE_NOT_FOUND); 512 753 return FALSE; 513 754 } … … 518 759 DWORD cchBufferLength) 519 760 { 520 return FALSE; 521 } 522 //****************************************************************************** 523 //****************************************************************************** 761 LPSTR pszmoutpointnameA = NULL; 762 LPSTR pszvolumenameA = NULL; 763 BOOL ret; 764 int len; 765 766 if(!VERSION_IS_WIN2000_OR_HIGHER()) { 767 SetLastError(ERROR_NOT_SUPPORTED); 768 return FALSE; 769 } 770 len = WideCharToMultiByte( CP_ACP, 0, lpszVolumeMountPoint, -1, NULL, 0, 0, NULL); 771 pszmoutpointnameA = (char *)alloca(len+1); 772 WideCharToMultiByte(CP_ACP, 0, lpszVolumeMountPoint, -1, pszmoutpointnameA, len, 0, NULL); 773 774 if(cchBufferLength && lpszVolumeName) { 775 pszvolumenameA = (char *)alloca(cchBufferLength); 776 } 777 ret = GetVolumeNameForVolumeMountPointA(pszmoutpointnameA, pszvolumenameA, cchBufferLength); 778 if(ret) { 779 int len = MultiByteToWideChar( CP_ACP, 0, pszvolumenameA, -1, NULL, 0); 780 MultiByteToWideChar(CP_ACP, 0, pszvolumenameA, -1, lpszVolumeName, len); 781 } 782 return ret; 783 } 784 //****************************************************************************** 785 //****************************************************************************** -
trunk/src/kernel32/hmdisk.cpp
r8258 r8397 1 /* $Id: hmdisk.cpp,v 1.4 2 2002-04-13 06:21:39 birdExp $ */1 /* $Id: hmdisk.cpp,v 1.43 2002-05-09 13:55:33 sandervl Exp $ */ 2 2 3 3 /* … … 12 12 #include <os2win.h> 13 13 #include <string.h> 14 #include <versionos2.h> 14 15 15 16 #include <misc.h> 16 17 #include "hmdisk.h" 17 18 #include "mmap.h" 18 #include "oslibdos.h"19 19 #include <win\winioctl.h> 20 20 #include <win\ntddscsi.h> 21 21 #include <win\wnaspi32.h> 22 22 #include <win\aspi.h> 23 #include "oslibdos.h" 24 #include "osliblvm.h" 23 25 24 26 #define DBG_LOCALLOG DBG_hmdisk … … 50 52 { 51 53 HMDeviceRegisterEx("\\\\.\\PHYSICALDRIVE", this, NULL); 54 HMDeviceRegisterEx(VOLUME_NAME_PREFIX, this, NULL); 52 55 } 53 56 … … 83 86 //\\.\PHYSICALDRIVEn -> length 18 84 87 if(namelength != 6 && namelength != 18) { 88 if(VERSION_IS_WIN2000_OR_HIGHER()) { 89 if(!strncmp(lpDeviceName, VOLUME_NAME_PREFIX, sizeof(VOLUME_NAME_PREFIX)-1)) { 90 return TRUE; 91 } 92 } 85 93 return FALSE; 86 94 } … … 124 132 125 133 char szDrive[4]; 126 szDrive[0] = *lpFileName;127 134 szDrive[1] = ':'; 128 135 szDrive[2] = '\0'; 136 137 //if volume name, query 138 if(VERSION_IS_WIN2000_OR_HIGHER() && !strncmp(lpFileName, VOLUME_NAME_PREFIX, sizeof(VOLUME_NAME_PREFIX)-1)) { 139 char *pszVolume; 140 int length; 141 142 //strip volume name prefix (\\\\?\\Volume\\) 143 length = strlen(lpFileName); 144 pszVolume = (char *)alloca(length); 145 146 strcpy(pszVolume, &lpFileName[sizeof(VOLUME_NAME_PREFIX)-1+1]); //-zero term + starting '{' 147 length -= sizeof(VOLUME_NAME_PREFIX)-1+1; 148 if(pszVolume[length-2] == '}') { 149 pszVolume[length-2] = 0; 150 szDrive[0] = OSLibLVMQueryDriveFromVolumeName(pszVolume); 151 } 152 else return ERROR_FILE_NOT_FOUND; 153 154 } 155 else { 156 szDrive[0] = *lpFileName; 157 } 129 158 dwDriveType = GetDriveTypeA(szDrive); 130 159 … … 550 579 msg = "IOCTL_CDROM_FIND_NEW_DEVICES"; 551 580 break; 581 case IOCTL_VOLUME_GET_VOLUME_DISK_EXTENTS: 582 msg = "IOCTL_VOLUME_GET_VOLUME_DISK_EXTENTS"; 583 break; 552 584 } 553 585 if(msg) { … … 713 745 714 746 case IOCTL_DISK_GET_PARTITION_INFO: 747 { 748 PPARTITION_INFORMATION pPartition = (PPARTITION_INFORMATION)lpOutBuffer; 749 if(nOutBufferSize < sizeof(PARTITION_INFORMATION) || !pPartition) { 750 SetLastError(ERROR_INSUFFICIENT_BUFFER); 751 return FALSE; 752 } 753 if(lpBytesReturned) { 754 *lpBytesReturned = sizeof(PARTITION_INFORMATION); 755 } 756 if(OSLibLVMGetPartitionInfo(drvInfo->driveLetter, pPartition)) { 757 SetLastError(ERROR_NOT_ENOUGH_MEMORY); //wrong error, but who cares 758 return FALSE; 759 } 760 761 SetLastError(ERROR_SUCCESS); 762 return TRUE; 763 } 764 715 765 case IOCTL_DISK_LOAD_MEDIA: 716 766 case IOCTL_DISK_MEDIA_REMOVAL: … … 723 773 break; 724 774 775 776 case IOCTL_VOLUME_GET_VOLUME_DISK_EXTENTS: 777 { 778 PVOLUME_DISK_EXTENTS pVolExtent = (PVOLUME_DISK_EXTENTS)lpOutBuffer; 779 if(nOutBufferSize < sizeof(VOLUME_DISK_EXTENTS) || !pVolExtent) { 780 SetLastError(ERROR_INSUFFICIENT_BUFFER); 781 return FALSE; 782 } 783 if(OSLibLVMGetVolumeExtents(drvInfo->driveLetter, pVolExtent)) { 784 SetLastError(ERROR_NOT_ENOUGH_MEMORY); //wrong error, but who cares 785 return FALSE; 786 } 787 788 if(lpBytesReturned) { 789 *lpBytesReturned = sizeof(VOLUME_DISK_EXTENTS); 790 } 791 SetLastError(ERROR_SUCCESS); 792 return TRUE; 793 } 725 794 726 795 // ----------- -
trunk/src/kernel32/hmdisk.h
r7549 r8397 1 /* $Id: hmdisk.h,v 1. 8 2001-12-05 14:16:01sandervl Exp $ */1 /* $Id: hmdisk.h,v 1.9 2002-05-09 13:55:33 sandervl Exp $ */ 2 2 3 3 #ifndef __HMDISK_H__ … … 11 11 #include "HMDevice.h" 12 12 #include "HMObjects.h" 13 14 #define VOLUME_NAME_PREFIX "\\\\?\\Volume\\" 13 15 14 16 /***************************************************************************** -
trunk/src/kernel32/initkernel32.cpp
r8340 r8397 1 /* $Id: initkernel32.cpp,v 1.1 6 2002-04-30 09:54:44sandervl Exp $1 /* $Id: initkernel32.cpp,v 1.17 2002-05-09 13:55:33 sandervl Exp $ 2 2 * 3 3 * KERNEL32 DLL entry point … … 52 52 #include <exitlist.h> 53 53 #include "oslibdos.h" 54 #include "osliblvm.h" 54 55 #include <cpuhlp.h> 55 56 #include <Win32k.h> … … 191 192 InitDynamicRegistry(); 192 193 194 //Load LVM subsystem for volume/mountpoint win32 functions 195 OSLibLVMInit(); 196 193 197 //Set the process affinity mask to the system affinity mask 194 198 DWORD dwProcessAffinityMask, dwSystemAffinityMask; … … 225 229 226 230 WriteOutProfiles(); 231 //Unload LVM subsystem for volume/mountpoint win32 functions 232 OSLibLVMExit(); 233 227 234 DestroyTIB(); 228 235 DestroySharedHeap(); -
trunk/src/kernel32/kernel32.mak
r8339 r8397 1 # $Id: kernel32.mak,v 1.2 8 2002-04-30 09:36:09sandervl Exp $1 # $Id: kernel32.mak,v 1.29 2002-05-09 13:55:33 sandervl Exp $ 2 2 3 3 # … … 118 118 $(OBJDIR)\atom.obj \ 119 119 $(OBJDIR)\disk.obj \ 120 $(OBJDIR)\osliblvm.obj \ 120 121 $(OBJDIR)\directory.obj \ 121 122 $(OBJDIR)\hmmmap.obj \ -
trunk/src/kernel32/oslibdos.cpp
r8273 r8397 1 /* $Id: oslibdos.cpp,v 1.10 0 2002-04-16 00:21:04 birdExp $ */1 /* $Id: oslibdos.cpp,v 1.101 2002-05-09 13:55:34 sandervl Exp $ */ 2 2 /* 3 3 * Wrappers for OS/2 Dos* API … … 3395 3395 //****************************************************************************** 3396 3396 //****************************************************************************** 3397 DWORD OSLibDosGetNumPhysDrives() 3398 { 3399 USHORT usNumDrives = 0; /* Data return buffer */ 3400 ULONG ulDataLen = sizeof(USHORT); /* Data return buffer length */ 3401 APIRET rc = NO_ERROR; /* Return code */ 3402 3403 /* Request a count of the number of partitionable disks in the system */ 3404 3405 rc = DosPhysicalDisk(INFO_COUNT_PARTITIONABLE_DISKS, 3406 &usNumDrives, 3407 ulDataLen, 3408 NULL, /* No parameter for this function */ 3409 0L); 3410 3411 if (rc != NO_ERROR) { 3412 dprintf(("DosPhysicalDisk error: return code = %u\n", rc)); 3413 return 0; 3414 } 3415 else { 3416 dprintf(("DosPhysicalDisk: %u partitionable disk(s)\n",usNumDrives)); 3417 } 3418 return usNumDrives; 3419 } 3420 //****************************************************************************** 3421 //****************************************************************************** 3422 -
trunk/src/kernel32/oslibdos.h
r8030 r8397 1 /* $Id: oslibdos.h,v 1.4 4 2002-02-28 19:27:48sandervl Exp $ */1 /* $Id: oslibdos.h,v 1.45 2002-05-09 13:55:34 sandervl Exp $ */ 2 2 3 3 /* … … 390 390 DWORD OSLibDosSetPriority(ULONG tid, int priority); 391 391 392 //functions for physical disk & partition information 393 DWORD OSLibDosGetNumPhysDrives(); 394 392 395 #endif //__OSLIBDOS_H__ 393 396
Note:
See TracChangeset
for help on using the changeset viewer.