Changeset 21916 for trunk/src/kernel32/osliblvm.cpp
- Timestamp:
- Dec 18, 2011, 10:28:22 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:ignore
-
old new 1 bin 2 Makefile.inc 1 env.cmd 2 LocalConfig.kmk
-
-
Property svn:mergeinfo
set to
/branches/gcc-kmk merged eligible
- Property svn:ignore
-
trunk/src/kernel32/osliblvm.cpp
r21583 r21916 21 21 #include <win32type.h> 22 22 #include <winconst.h> 23 #include <win \winioctl.h>23 #include <win/winioctl.h> 24 24 #include "osliblvm.h" 25 25 … … 89 89 rc = DosQueryProcAddr(hModLVM, 0, "Write_Sectors", (PFN *)&pfnWrite_Sectors); 90 90 if(rc) goto fail; 91 91 92 92 return TRUE; 93 93 … … 267 267 Volume_Control_Array *volctrl; 268 268 CARDINAL32 lasterror; 269 269 270 270 if(!hModLVM) { 271 271 dprintf(("LVM dll not loaded -> fail")); … … 310 310 //****************************************************************************** 311 311 //****************************************************************************** 312 BOOL OSLibLVMQueryVolumeName(HANDLE hVolumeControlData, ULONG *pVolIndex, 312 BOOL OSLibLVMQueryVolumeName(HANDLE hVolumeControlData, ULONG *pVolIndex, 313 313 LPSTR lpszVolumeName, DWORD cchBufferLength) 314 314 { … … 346 346 static Volume_Information_Record OSLibLVMFindVolumeByDriveLetter(ULONG driveLetter, 347 347 Volume_Control_Record *pVolRec, 348 CARDINAL32 *lasterror) 348 CARDINAL32 *lasterror) 349 349 { 350 350 Volume_Control_Array *volctrl; … … 356 356 return volinfo; 357 357 } 358 for(int i=0;i<volctrl->Count;i++) { 358 int i; 359 for(i=0;i<volctrl->Count;i++) { 359 360 volinfo = Get_Volume_Information(volctrl->Volume_Control_Data[i].Volume_Handle, lasterror); 360 361 if(*lasterror != LVM_ENGINE_NO_ERROR) { … … 384 385 static Volume_Information_Record OSLibLVMFindVolumeByName(LPSTR pszVolName, 385 386 Volume_Control_Record *pVolRec, 386 CARDINAL32 *lasterror) 387 CARDINAL32 *lasterror) 387 388 { 388 389 Volume_Control_Array *volctrl; … … 394 395 return volinfo; 395 396 } 396 for(int i=0;i<volctrl->Count;i++) { 397 int i; 398 for(i=0;i<volctrl->Count;i++) { 397 399 volinfo = Get_Volume_Information(volctrl->Volume_Control_Data[i].Volume_Handle, lasterror); 398 400 if(*lasterror != LVM_ENGINE_NO_ERROR) { … … 499 501 return FALSE; 500 502 } 501 for(int i=0;i<diskinfo.Count;i++) { 503 int i; 504 for(i=0;i<diskinfo.Count;i++) { 502 505 if(diskinfo.Drive_Control_Data[i].Drive_Handle == partctrl.Partition_Array[0].Drive_Handle) { 503 506 //win32 base = 0, os2 base = 1 … … 564 567 // - -1 if volume wasn't found 565 568 // - 0 if volume is present, but not mounted 566 // 569 // 567 570 //****************************************************************************** 568 571 CHAR OSLibLVMQueryDriveFromVolumeName(LPCSTR lpszVolume) … … 596 599 //****************************************************************************** 597 600 //****************************************************************************** 598 DWORD OSLibLVMQueryVolumeSerialAndName(LPSTR lpszVolume, LPDWORD lpVolumeSerialNumber, 601 DWORD OSLibLVMQueryVolumeSerialAndName(LPSTR lpszVolume, LPDWORD lpVolumeSerialNumber, 599 602 LPSTR lpVolumeNameBuffer, DWORD nVolumeNameSize) 600 603 { … … 621 624 //****************************************************************************** 622 625 //****************************************************************************** 623 BOOL OSLibLVMGetVolumeNameForVolumeMountPoint(LPCSTR lpszVolumeMountPoint, 624 LPSTR lpszVolumeName, 626 BOOL OSLibLVMGetVolumeNameForVolumeMountPoint(LPCSTR lpszVolumeMountPoint, 627 LPSTR lpszVolumeName, 625 628 DWORD cchBufferLength) 626 629 { … … 665 668 strncpy(lpszOS2VolumeName, &lpszWin32VolumeName[sizeof(VOLUME_NAME_PREFIX)-1+1], cchBufferLength-1); //-zero term + starting '{' 666 669 length -= sizeof(VOLUME_NAME_PREFIX)-1+1; 667 if(lpszOS2VolumeName[length-2] == '}') 670 if(lpszOS2VolumeName[length-2] == '}') 668 671 { 669 672 lpszOS2VolumeName[length-2] = 0; … … 671 674 } 672 675 else 673 if(lpszOS2VolumeName[length-1] == '}') 676 if(lpszOS2VolumeName[length-1] == '}') 674 677 { 675 678 lpszOS2VolumeName[length-1] = 0;
Note:
See TracChangeset
for help on using the changeset viewer.