Changeset 75461 in vbox
- Timestamp:
- Nov 14, 2018 7:51:23 PM (6 years ago)
- Location:
- trunk/src/VBox/Additions/os2/VBoxSF
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/os2/VBoxSF/Makefile.kmk
r75337 r75461 210 210 # 211 211 PROGRAMS += VBoxSFUtil 212 ifdef VBOX_USE_WATCOM_FOR_OS2 212 213 VBoxSFUtil_TEMPLATE = DUMMY 213 214 VBoxSFUtil_TOOL = OPENWATCOM … … 216 217 VBoxSFUtil_INCS = $(PATH_TOOL_OPENWATCOM)/h/os2 217 218 VBoxSFUtil_LDFLAGS = -bcl=os2v2 219 else 220 VBoxSFUtil_TEMPLATE = VBoxGuestR3Exe 221 endif 218 222 VBoxSFUtil_SOURCES = \ 219 223 VBoxSFUtil.cpp \ -
trunk/src/VBox/Additions/os2/VBoxSF/VBoxSF.cpp
r75405 r75461 880 880 if (cRefs) 881 881 { 882 /* If there are no zero drives, unlink it from the list and release882 /* If there are now zero drives, unlink it from the list and release 883 883 the list reference. This should almost always drop end up with us 884 884 destroying the folder.*/ … … 897 897 vboxSfOs2DestroyFolder(pFolder); 898 898 } 899 rc = NO_ERROR; 899 900 } 900 901 else … … 1136 1137 else 1137 1138 { 1138 LogRel(("FS32_FSINFO: VbglR0SfFsInfo/SHFL_INFO_VOLUME failed: %Rrc\n", rc));1139 LogRel(("FS32_FSINFO: VbglR0SfFsInfo/SHFL_INFO_VOLUME failed: %Rrc\n", vrc)); 1139 1140 rc = ERROR_GEN_FAILURE; 1140 1141 } … … 1459 1460 if (RT_SUCCESS(vrc)) 1460 1461 rc = NO_ERROR; 1461 else if ( rc == VERR_FILE_NOT_FOUND)1462 else if (vrc == VERR_FILE_NOT_FOUND) 1462 1463 rc = vboxSfOs2ConvertStatusToOs2(vrc, ERROR_ACCESS_DENIED); 1463 1464 … … 1758 1759 pbSrc++; 1759 1760 cbGetEasLeft--; 1760 if (cbName + 1 > cbGetEasLeft)1761 if (cbName + 1U > cbGetEasLeft) 1761 1762 { 1762 1763 cbDstList = pbSrc - 1 - (uint8_t *)pEaOp->fpGEAList; … … 2006 2007 } 2007 2008 else 2008 rc = vboxSfOs2ConvertStatusToOs2( rc, ERROR_FILE_NOT_FOUND);2009 rc = vboxSfOs2ConvertStatusToOs2(vrc, ERROR_FILE_NOT_FOUND); 2009 2010 VbglR0PhysHeapFree(pParams); 2010 2011 } -
trunk/src/VBox/Additions/os2/VBoxSF/VBoxSFFile.cpp
r75337 r75461 212 212 } 213 213 } 214 else if ( rc == VERR_ALREADY_EXISTS)214 else if (vrc == VERR_ALREADY_EXISTS) 215 215 rc = ERROR_ACCESS_DENIED; 216 216 else … … 748 748 *pcb = cbActual; 749 749 pSfFsi->sfi_positionl = offRead + cbActual; 750 if ( pSfFsi->sfi_sizel < offRead + cbActual)750 if ((uint64_t)pSfFsi->sfi_sizel < offRead + cbActual) 751 751 pSfFsi->sfi_sizel = offRead + cbActual; 752 752 pSfFsi->sfi_tstamp |= ST_SREAD | ST_PREAD; … … 774 774 *pcb = cbActual; 775 775 pSfFsi->sfi_positionl = offRead + cbActual; 776 if ( pSfFsi->sfi_sizel < offRead + cbActual)776 if ((uint64_t)pSfFsi->sfi_sizel < offRead + cbActual) 777 777 pSfFsi->sfi_sizel = offRead + cbActual; 778 778 pSfFsi->sfi_tstamp |= ST_SREAD | ST_PREAD; … … 822 822 *pcb = cbActual; 823 823 pSfFsi->sfi_positionl = offWrite + cbActual; 824 if ( pSfFsi->sfi_sizel < offWrite + cbActual)824 if ((uint64_t)pSfFsi->sfi_sizel < offWrite + cbActual) 825 825 pSfFsi->sfi_sizel = offWrite + cbActual; 826 826 pSfFsi->sfi_tstamp |= ST_SWRITE | ST_PWRITE; … … 848 848 *pcb = cbActual; 849 849 pSfFsi->sfi_positionl = offWrite + cbActual; 850 if ( pSfFsi->sfi_sizel < offWrite + cbActual)850 if ((uint64_t)pSfFsi->sfi_sizel < offWrite + cbActual) 851 851 pSfFsi->sfi_sizel = offWrite + cbActual; 852 852 pSfFsi->sfi_tstamp |= ST_SWRITE | ST_PWRITE; -
trunk/src/VBox/Additions/os2/VBoxSF/VBoxSFFind.cpp
r75338 r75461 74 74 if (uCp == '.') 75 75 { 76 for (uint32_t cuc = 0; ; cuc++) 77 { 78 RTUNICP uCp; 76 for (cuc = 0; ; cuc++) 77 { 79 78 RTStrGetCpEx(&pszCursor, &uCp); 80 79 if (!uCp) … … 237 236 */ 238 237 EAOP EaOp; 239 PEAOP pEaOpUser ;238 PEAOP pEaOpUser = NULL; /* Shut up gcc */ 240 239 switch (uLevel) 241 240 { -
trunk/src/VBox/Additions/os2/VBoxSF/VBoxSFUtil.cpp
r75337 r75461 38 38 #include <stdlib.h> 39 39 #define INCL_BASE 40 #define OS2EMX_PLAIN_CHAR 40 41 #include <os2.h> 41 42 … … 79 80 else 80 81 { 81 fprintf(stderr, "syntax error: Shared folder name '%s' is too %s!\n", cchFolder >= 1 ? "long" : "short");82 fprintf(stderr, "syntax error: Shared folder name '%s' is too %s!\n", pszFolder, cchFolder >= 1 ? "long" : "short"); 82 83 return 2; 83 84 } … … 92 93 return 0; 93 94 } 94 fprintf(stderr, "error: DosFSAttach failed: % u\n", rc);95 fprintf(stderr, "error: DosFSAttach failed: %lu\n", rc); 95 96 return 1; 96 97 } … … 123 124 rc = DosQueryPathInfo(argv[i], FIL_STANDARD, &u.Lvl1r1, sizeof(u.Lvl1r1)); 124 125 printf("%s: FIL_STANDARD/%#x -> %u\n", argv[i], sizeof(u.Lvl1r1), rc); 126 #define D(x) (*(uint16_t *)&(x)) 127 #define T(x) (*(uint16_t *)&(x)) 125 128 if (rc == NO_ERROR) 126 129 { 127 130 printf(" Lvl1r1: creation=%u:%u write=%u:%u access=%u:%u\n", 128 u.Lvl1r1.fdateCreation, u.Lvl1r1.ftimeCreation, u.Lvl1r1.fdateLastWrite, u.Lvl1r1.ftimeLastWrite,129 u.Lvl1r1.fdateLastAccess, u.Lvl1r1.ftimeLastAccess);130 printf(" Lvl1r1: attrib=%#x size=% u alloc=%u\n", u.Lvl1r1.attrFile, u.Lvl1r1.cbFile, u.Lvl1r1.cbFileAlloc);131 D(u.Lvl1r1.fdateCreation), T(u.Lvl1r1.ftimeCreation), D(u.Lvl1r1.fdateLastWrite), T(u.Lvl1r1.ftimeLastWrite), 132 D(u.Lvl1r1.fdateLastAccess), T(u.Lvl1r1.ftimeLastAccess)); 133 printf(" Lvl1r1: attrib=%#x size=%lu alloc=%lu\n", u.Lvl1r1.attrFile, u.Lvl1r1.cbFile, u.Lvl1r1.cbFileAlloc); 131 134 132 135 } … … 138 141 { 139 142 printf(" Lvl1r3: creation=%u:%u write=%u:%u access=%u:%u\n", 140 u.Lvl1r3.fdateCreation, u.Lvl1r3.ftimeCreation, u.Lvl1r3.fdateLastWrite, u.Lvl1r3.ftimeLastWrite,141 u.Lvl1r3.fdateLastAccess, u.Lvl1r3.ftimeLastAccess);142 printf(" Lvl1r3: attrib=%# x size=%u alloc=%u\n", u.Lvl1r3.attrFile, u.Lvl1r3.cbFile, u.Lvl1r3.cbFileAlloc);143 D(u.Lvl1r3.fdateCreation), T(u.Lvl1r3.ftimeCreation), D(u.Lvl1r3.fdateLastWrite), T(u.Lvl1r3.ftimeLastWrite), 144 D(u.Lvl1r3.fdateLastAccess), T(u.Lvl1r3.ftimeLastAccess)); 145 printf(" Lvl1r3: attrib=%#lx size=%lu alloc=%lu\n", u.Lvl1r3.attrFile, u.Lvl1r3.cbFile, u.Lvl1r3.cbFileAlloc); 143 146 144 147 } … … 150 153 { 151 154 printf(" Lvl11: creation=%u:%u write=%u:%u access=%u:%u\n", 152 u.Lvl11.fdateCreation, u.Lvl11.ftimeCreation, u.Lvl11.fdateLastWrite, u.Lvl11.ftimeLastWrite,153 u.Lvl11.fdateLastAccess, u.Lvl11.ftimeLastAccess);154 printf(" Lvl11: attrib=%# x size=%llu alloc=%llu\n", u.Lvl11.attrFile, u.Lvl11.cbFile, u.Lvl11.cbFileAlloc);155 D(u.Lvl11.fdateCreation), T(u.Lvl11.ftimeCreation), D(u.Lvl11.fdateLastWrite), T(u.Lvl11.ftimeLastWrite), 156 D(u.Lvl11.fdateLastAccess), T(u.Lvl11.ftimeLastAccess)); 157 printf(" Lvl11: attrib=%#lx size=%llu alloc=%llu\n", u.Lvl11.attrFile, u.Lvl11.cbFile, u.Lvl11.cbFileAlloc); 155 158 } 156 159 … … 161 164 { 162 165 printf(" Lvl2: creation=%u:%u write=%u:%u access=%u:%u\n", 163 u.Lvl2r2.fdateCreation, u.Lvl2r2.ftimeCreation, u.Lvl2r2.fdateLastWrite, u.Lvl2r2.ftimeLastWrite,164 u.Lvl2r2.fdateLastAccess, u.Lvl2r2.ftimeLastAccess);165 printf(" Lvl2: attrib=%#x size=% u alloc=%u cbList=%#x\n",166 D(u.Lvl2r2.fdateCreation), T(u.Lvl2r2.ftimeCreation), D(u.Lvl2r2.fdateLastWrite), T(u.Lvl2r2.ftimeLastWrite), 167 D(u.Lvl2r2.fdateLastAccess), T(u.Lvl2r2.ftimeLastAccess)); 168 printf(" Lvl2: attrib=%#x size=%lu alloc=%lu cbList=%#lx\n", 166 169 u.Lvl2r2.attrFile, u.Lvl2r2.cbFile, u.Lvl2r2.cbFileAlloc, u.Lvl2r4.cbList); 167 170 } … … 173 176 { 174 177 printf(" Lvl2: creation=%u:%u write=%u:%u access=%u:%u\n", 175 u.Lvl2r4.fdateCreation, u.Lvl2r4.ftimeCreation, u.Lvl2r4.fdateLastWrite, u.Lvl2r4.ftimeLastWrite,176 u.Lvl2r4.fdateLastAccess, u.Lvl2r4.ftimeLastAccess);177 printf(" Lvl2: attrib=%# x size=%u alloc=%u cbList=%#x\n",178 D(u.Lvl2r4.fdateCreation), T(u.Lvl2r4.ftimeCreation), D(u.Lvl2r4.fdateLastWrite), T(u.Lvl2r4.ftimeLastWrite), 179 D(u.Lvl2r4.fdateLastAccess), T(u.Lvl2r4.ftimeLastAccess)); 180 printf(" Lvl2: attrib=%#lx size=%lu alloc=%lu cbList=%#lx\n", 178 181 u.Lvl2r4.attrFile, u.Lvl2r4.cbFile, u.Lvl2r4.cbFileAlloc, u.Lvl2r4.cbList); 179 182 } … … 185 188 { 186 189 printf(" Lvl12: creation=%u:%u write=%u:%u access=%u:%u\n", 187 u.Lvl12.fdateCreation, u.Lvl12.ftimeCreation, u.Lvl12.fdateLastWrite, u.Lvl12.ftimeLastWrite,188 u.Lvl12.fdateLastAccess, u.Lvl12.ftimeLastAccess);189 printf(" Lvl12: attrib=%# x size=%llu alloc=%llu cbList=%#x\n",190 D(u.Lvl12.fdateCreation), T(u.Lvl12.ftimeCreation), D(u.Lvl12.fdateLastWrite), T(u.Lvl12.ftimeLastWrite), 191 D(u.Lvl12.fdateLastAccess), T(u.Lvl12.ftimeLastAccess)); 192 printf(" Lvl12: attrib=%#lx size=%llu alloc=%llu cbList=%#lx\n", 190 193 u.Lvl12.attrFile, u.Lvl12.cbFile, u.Lvl12.cbFileAlloc, u.Lvl12.cbList); 191 194 } … … 237 240 BYTE cchName; 238 241 char szName[10]; 239 } Gea2List, constGea2ListOrg = { sizeof(Gea2List), 0, sizeof(".LONGNAME") - 1, ".LONGNAME" };242 } Gea2List, Gea2ListOrg = { sizeof(Gea2List), 0, sizeof(".LONGNAME") - 1, ".LONGNAME" }; 240 243 EAOP2 EaOp; 241 244 EaOp.fpGEA2List = (PGEA2LIST)memcpy(&Gea2List, &Gea2ListOrg, sizeof(Gea2List)); … … 247 250 printf("%s: FIL_QUERYEASFROMLIST -> %u\n", argv[i], rc); 248 251 if (rc == NO_ERROR) 249 printf(" Lvl3: FeaList.cbList=%# x oError=%#x\n", u.FeaList.cbList, EaOp.oError);252 printf(" Lvl3: FeaList.cbList=%#lx oError=%#lx\n", u.FeaList.cbList, EaOp.oError); 250 253 251 254 EaOp.fpGEA2List = (PGEA2LIST)memcpy(&Gea2List, &Gea2ListOrg, sizeof(Gea2List)); … … 266 269 printf("%s: FIL_QUERYALLEAS/4 -> %u\n", argv[i], rc); 267 270 if (rc == NO_ERROR) 268 printf(" Lvl4: FeaList.cbList=%# x oError=%#x\n", u.FeaList.cbList, EaOp.oError);271 printf(" Lvl4: FeaList.cbList=%#lx oError=%#lx\n", u.FeaList.cbList, EaOp.oError); 269 272 270 273 EaOp.fpGEA2List = (PGEA2LIST)memcpy(&Gea2List, &Gea2ListOrg, sizeof(Gea2List)); … … 285 288 printf("%s: FIL_QUERYALLEAS/8 -> %u\n", argv[i], rc); 286 289 if (rc == NO_ERROR) 287 printf(" Lvl8: FeaList.cbList=%# x oError=%#x\n", u.FeaList.cbList, EaOp.oError);290 printf(" Lvl8: FeaList.cbList=%#lx oError=%#lx\n", u.FeaList.cbList, EaOp.oError); 288 291 289 292 EaOp.fpGEA2List = (PGEA2LIST)memcpy(&Gea2List, &Gea2ListOrg, sizeof(Gea2List)); … … 420 423 memset(pbBuf, 0xf6, cbBuf); 421 424 APIRET rc = DosFindFirst(pszArg, &hDir, fAttribs, pbBuf, cbBuf, &cMatches, uLevel); 422 printf("DosFindFirst -> % u hDir=%p cMatches=%#x\n", rc, hDir, cMatches);425 printf("DosFindFirst -> %lu hDir=%#lx cMatches=%#lx\n", rc, hDir, cMatches); 423 426 if (rc == NO_ERROR) 424 427 { … … 434 437 { 435 438 PFILEFINDBUF3 pBuf = (PFILEFINDBUF3)pbTmp; 436 printf("#%u: nx=%# x sz=%#x at=%#x nm=%#x:%s\n",439 printf("#%u: nx=%#lx sz=%#lx at=%#lx nm=%#x:%s\n", 437 440 iMatch, pBuf->oNextEntryOffset, pBuf->cbFile, pBuf->attrFile, pBuf->cchName, pBuf->achName); 438 441 if (strlen(pBuf->achName) != pBuf->cchName) … … 443 446 { 444 447 PFILEFINDBUF3L pBuf = (PFILEFINDBUF3L)pbTmp; 445 printf("#%u: nx=%# x sz=%#llx at=%#x nm=%#x:%s\n",448 printf("#%u: nx=%#lx sz=%#llx at=%#lx nm=%#x:%s\n", 446 449 iMatch, pBuf->oNextEntryOffset, pBuf->cbFile, pBuf->attrFile, pBuf->cchName, pBuf->achName); 447 450 if (strlen(pBuf->achName) != pBuf->cchName) … … 452 455 { 453 456 PFILEFINDBUF4 pBuf = (PFILEFINDBUF4)pbTmp; 454 printf("#%u: nx=%# x sz=%#x at=%#x nm=%#x:%s\n",457 printf("#%u: nx=%#lx sz=%#lx at=%#lx nm=%#x:%s\n", 455 458 iMatch, pBuf->oNextEntryOffset, pBuf->cbFile, pBuf->attrFile, pBuf->cchName, pBuf->achName); 456 459 if (strlen(pBuf->achName) != pBuf->cchName) … … 461 464 { 462 465 PFILEFINDBUF4L pBuf = (PFILEFINDBUF4L)pbTmp; 463 printf("#%u: nx=%# x sz=%#llx at=%#x nm=%#x:%s\n",466 printf("#%u: nx=%#lx sz=%#llx at=%#lx nm=%#x:%s\n", 464 467 iMatch, pBuf->oNextEntryOffset, pBuf->cbFile, pBuf->attrFile, pBuf->cchName, pBuf->achName); 465 468 if (strlen(pBuf->achName) != pBuf->cchName) … … 477 480 cMatches = cMaxMatches; 478 481 rc = DosFindNext(hDir, pbBuf, cbBuf, &cMatches); 479 printf("DosFindNext -> % u hDir=%p cMatches=%#x\n", rc, hDir, cMatches);482 printf("DosFindNext -> %lu hDir=%#lx cMatches=%#lx\n", rc, hDir, cMatches); 480 483 } while (rc == NO_ERROR); 481 484 482 485 rc = DosFindClose(hDir); 483 printf("DosFindClose -> % u\n", rc);486 printf("DosFindClose -> %lu\n", rc); 484 487 } 485 488 } … … 494 497 { 495 498 APIRET rc = DosCreateDir(argv[i], NULL); 496 printf("DosCreateDir -> % u for '%s'\n", rc, argv[i]);499 printf("DosCreateDir -> %lu for '%s'\n", rc, argv[i]); 497 500 } 498 501 return 0; … … 517 520 return vboxSfOs2UtilMkDir(argc - i, argv + i); 518 521 519 fprintf(stderr, "Unknown command/option: % u\n", pszArg);522 fprintf(stderr, "Unknown command/option: %s\n", pszArg); 520 523 return 2; 521 524 }
Note:
See TracChangeset
for help on using the changeset viewer.