Changeset 58195 in vbox for trunk/src/VBox/Additions/linux/sharedfolders
- Timestamp:
- Oct 12, 2015 3:13:47 PM (9 years ago)
- Location:
- trunk/src/VBox/Additions/linux/sharedfolders
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/linux/sharedfolders/dirops.c
r58143 r58195 63 63 ; 64 64 65 LogFunc(("sf_dir_open(): calling vboxCallCreate, folder %s, flags %#x\n",65 LogFunc(("sf_dir_open(): calling VbglR0SfCreate, folder %s, flags %#x\n", 66 66 sf_i->path->String.utf8, params.CreateFlags)); 67 rc = vboxCallCreate(&client_handle, &sf_g->map, sf_i->path, ¶ms);67 rc = VbglR0SfCreate(&client_handle, &sf_g->map, sf_i->path, ¶ms); 68 68 if (RT_SUCCESS(rc)) 69 69 { … … 77 77 err = -ENOENT; 78 78 79 rc = vboxCallClose(&client_handle, &sf_g->map, params.Handle);79 rc = VbglR0SfClose(&client_handle, &sf_g->map, params.Handle); 80 80 if (RT_FAILURE(rc)) 81 LogFunc(("sf_dir_open(): vboxCallClose(%s) after err=%d failed rc=%Rrc\n",81 LogFunc(("sf_dir_open(): VbglR0SfClose(%s) after err=%d failed rc=%Rrc\n", 82 82 sf_i->path->String.utf8, err, rc)); 83 83 } … … 174 174 ; 175 175 176 LogFunc(("sf_getdent: calling vboxCallCreate, folder %s, flags %#x\n",176 LogFunc(("sf_getdent: calling VbglR0SfCreate, folder %s, flags %#x\n", 177 177 sf_i->path->String.utf8, params.CreateFlags)); 178 rc = vboxCallCreate(&client_handle, &sf_g->map, sf_i->path, ¶ms);178 rc = VbglR0SfCreate(&client_handle, &sf_g->map, sf_i->path, ¶ms); 179 179 if (RT_FAILURE(rc)) 180 180 { 181 LogFunc((" vboxCallCreate(%s) failed rc=%Rrc\n",181 LogFunc(("VbglR0SfCreate(%s) failed rc=%Rrc\n", 182 182 sf_i->path->String.utf8, rc)); 183 183 return -EPERM; … … 193 193 sf_dir_info_empty(sf_d); 194 194 err = sf_dir_read_all(sf_g, sf_i, sf_d, params.Handle); 195 rc = vboxCallClose(&client_handle, &sf_g->map, params.Handle);195 rc = VbglR0SfClose(&client_handle, &sf_g->map, params.Handle); 196 196 if (RT_FAILURE(rc)) 197 LogFunc((" vboxCallClose(%s) failed rc=%Rrc\n", sf_i->path->String.utf8, rc));197 LogFunc(("VbglR0SfClose(%s) failed rc=%Rrc\n", sf_i->path->String.utf8, rc)); 198 198 if (err) 199 199 return err; … … 562 562 params.Info.Attr.enmAdditional = RTFSOBJATTRADD_NOTHING; 563 563 564 LogFunc(("sf_create_aux: calling vboxCallCreate, folder %s, flags %#x\n",564 LogFunc(("sf_create_aux: calling VbglR0SfCreate, folder %s, flags %#x\n", 565 565 path->String.utf8, params.CreateFlags)); 566 rc = vboxCallCreate(&client_handle, &sf_g->map, path, ¶ms);566 rc = VbglR0SfCreate(&client_handle, &sf_g->map, path, ¶ms); 567 567 if (RT_FAILURE(rc)) 568 568 { … … 573 573 } 574 574 err = -EPROTO; 575 LogFunc(("(%d): vboxCallCreate(%s) failed rc=%Rrc\n",575 LogFunc(("(%d): VbglR0SfCreate(%s) failed rc=%Rrc\n", 576 576 fDirectory, sf_i->path->String.utf8, rc)); 577 577 goto fail1; … … 602 602 if (fDirectory) 603 603 { 604 rc = vboxCallClose(&client_handle, &sf_g->map, params.Handle);604 rc = VbglR0SfClose(&client_handle, &sf_g->map, params.Handle); 605 605 if (RT_FAILURE(rc)) 606 LogFunc(("(%d): vboxCallClose failed rc=%Rrc\n", fDirectory, rc));606 LogFunc(("(%d): VbglR0SfClose failed rc=%Rrc\n", fDirectory, rc)); 607 607 } 608 608 … … 611 611 612 612 fail2: 613 rc = vboxCallClose(&client_handle, &sf_g->map, params.Handle);613 rc = VbglR0SfClose(&client_handle, &sf_g->map, params.Handle); 614 614 if (RT_FAILURE(rc)) 615 LogFunc(("(%d): vboxCallClose failed rc=%Rrc\n", fDirectory, rc));615 LogFunc(("(%d): VbglR0SfClose failed rc=%Rrc\n", fDirectory, rc)); 616 616 617 617 fail1: … … 691 691 && ((dentry->d_inode->i_mode & S_IFLNK) == S_IFLNK)) 692 692 fFlags |= SHFL_REMOVE_SYMLINK; 693 rc = vboxCallRemove(&client_handle, &sf_g->map, path, fFlags);693 rc = VbglR0SfRemove(&client_handle, &sf_g->map, path, fFlags); 694 694 if (RT_FAILURE(rc)) 695 695 { 696 LogFunc(("(%d): vboxCallRemove(%s) failed rc=%Rrc\n", fDirectory, 697 path->String.utf8, rc)); 696 LogFunc(("(%d): VbglR0SfRemove(%s) failed rc=%Rrc\n", fDirectory, path->String.utf8, rc)); 698 697 err = -RTErrConvertToErrno(rc); 699 698 goto fail1; … … 785 784 int fDir = ((old_dentry->d_inode->i_mode & S_IFDIR) != 0); 786 785 787 rc = vboxCallRename(&client_handle, &sf_g->map, old_path,786 rc = VbglR0SfRename(&client_handle, &sf_g->map, old_path, 788 787 new_path, fDir ? 0 : SHFL_RENAME_FILE | SHFL_RENAME_REPLACE_IF_EXISTS); 789 788 if (RT_SUCCESS(rc)) … … 797 796 else 798 797 { 799 LogFunc((" vboxCallRename failed rc=%Rrc\n", rc));798 LogFunc(("VbglR0SfRename failed rc=%Rrc\n", rc)); 800 799 err = -RTErrConvertToErrno(rc); 801 800 kfree(new_path); … … 840 839 memcpy(ssymname->String.utf8, symname, symname_len); 841 840 842 rc = vboxCallSymlink(&client_handle, &sf_g->map, path, ssymname, &info);841 rc = VbglR0SfSymlink(&client_handle, &sf_g->map, path, ssymname, &info); 843 842 kfree(ssymname); 844 843 … … 850 849 goto fail1; 851 850 } 852 LogFunc((" vboxCallSymlink(%s) failed rc=%Rrc\n",851 LogFunc(("VbglR0SfSymlink(%s) failed rc=%Rrc\n", 853 852 sf_i->path->String.utf8, rc)); 854 853 err = -EPROTO; -
trunk/src/VBox/Additions/linux/sharedfolders/lnkops.c
r57132 r58195 37 37 { 38 38 error = 0; 39 rc = vboxReadLink(&client_handle, &sf_g->map, sf_i->path, PATH_MAX, path);39 rc = VbglR0SfReadLink(&client_handle, &sf_g->map, sf_i->path, PATH_MAX, path); 40 40 if (RT_FAILURE(rc)) 41 41 { 42 LogFunc((" vboxReadLink failed, caller=%s, rc=%Rrc\n", __func__, rc));42 LogFunc(("VbglR0SfReadLink failed, caller=%s, rc=%Rrc\n", __func__, rc)); 43 43 free_page((unsigned long)path); 44 44 error = -EPROTO; -
trunk/src/VBox/Additions/linux/sharedfolders/regops.c
r53757 r58195 64 64 * contiguous in physical memory (kmalloc or single page), we should 65 65 * use a physical address here to speed things up. */ 66 int rc = vboxCallRead(&client_handle, &sf_g->map, sf_r->handle,66 int rc = VbglR0SfRead(&client_handle, &sf_g->map, sf_r->handle, 67 67 pos, nread, buf, false /* already locked? */); 68 68 if (RT_FAILURE(rc)) 69 69 { 70 LogFunc((" vboxCallRead failed. caller=%s, rc=%Rrc\n", caller, rc));70 LogFunc(("VbglR0SfRead failed. caller=%s, rc=%Rrc\n", caller, rc)); 71 71 return -EPROTO; 72 72 } … … 81 81 * contiguous in physical memory (kmalloc or single page), we should 82 82 * use a physical address here to speed things up. */ 83 int rc = vboxCallWrite(&client_handle, &sf_g->map, sf_r->handle,83 int rc = VbglR0SfWrite(&client_handle, &sf_g->map, sf_r->handle, 84 84 pos, nwritten, buf, false /* already locked? */); 85 85 if (RT_FAILURE(rc)) 86 86 { 87 LogFunc((" vboxCallWrite failed. caller=%s, rc=%Rrc\n",87 LogFunc(("VbglR0SfWrite failed. caller=%s, rc=%Rrc\n", 88 88 caller, rc)); 89 89 return -EPROTO; … … 374 374 375 375 params.Info.Attr.fMode = inode->i_mode; 376 LogFunc(("sf_reg_open: calling vboxCallCreate, file %s, flags=%#x, %#x\n",376 LogFunc(("sf_reg_open: calling VbglR0SfCreate, file %s, flags=%#x, %#x\n", 377 377 sf_i->path->String.utf8 , file->f_flags, params.CreateFlags)); 378 rc = vboxCallCreate(&client_handle, &sf_g->map, sf_i->path, ¶ms);378 rc = VbglR0SfCreate(&client_handle, &sf_g->map, sf_i->path, ¶ms); 379 379 if (RT_FAILURE(rc)) 380 380 { 381 LogFunc((" vboxCallCreate failed flags=%d,%#x rc=%Rrc\n",381 LogFunc(("VbglR0SfCreate failed flags=%d,%#x rc=%Rrc\n", 382 382 file->f_flags, params.CreateFlags, rc)); 383 383 kfree(sf_r); … … 439 439 filemap_fdatawait(inode->i_mapping); 440 440 #endif 441 rc = vboxCallClose(&client_handle, &sf_g->map, sf_r->handle);441 rc = VbglR0SfClose(&client_handle, &sf_g->map, sf_r->handle); 442 442 if (RT_FAILURE(rc)) 443 LogFunc((" vboxCallClose failed rc=%Rrc\n", rc));443 LogFunc(("VbglR0SfClose failed rc=%Rrc\n", rc)); 444 444 445 445 kfree(sf_r); … … 482 482 #endif 483 483 484 /* Don't use GFP_HIGHUSER as long as sf_reg_read_aux() calls vboxCallRead()484 /* Don't use GFP_HIGHUSER as long as sf_reg_read_aux() calls VbglR0SfRead() 485 485 * which works on virtual addresses. On Linux cannot reliably determine the 486 486 * physical address for high memory, see rtR0MemObjNativeLockKernel(). */ -
trunk/src/VBox/Additions/linux/sharedfolders/utils.c
r54391 r58195 183 183 params.Handle = SHFL_HANDLE_NIL; 184 184 params.CreateFlags = SHFL_CF_LOOKUP | SHFL_CF_ACT_FAIL_IF_NEW; 185 LogFunc(("sf_stat: calling vboxCallCreate, file %s, flags %#x\n",185 LogFunc(("sf_stat: calling VbglR0SfCreate, file %s, flags %#x\n", 186 186 path->String.utf8, params.CreateFlags)); 187 rc = vboxCallCreate(&client_handle, &sf_g->map, path, ¶ms);187 rc = VbglR0SfCreate(&client_handle, &sf_g->map, path, ¶ms); 188 188 if (rc == VERR_INVALID_NAME) 189 189 { … … 193 193 if (RT_FAILURE(rc)) 194 194 { 195 LogFunc((" vboxCallCreate(%s) failed. caller=%s, rc=%Rrc\n",195 LogFunc(("VbglR0SfCreate(%s) failed. caller=%s, rc=%Rrc\n", 196 196 path->String.utf8, rc, caller)); 197 197 return -EPROTO; … … 200 200 { 201 201 if (!ok_to_fail) 202 LogFunc((" vboxCallCreate(%s) file does not exist. caller=%s, result=%d\n",202 LogFunc(("VbglR0SfCreate(%s) file does not exist. caller=%s, result=%d\n", 203 203 path->String.utf8, params.Result, caller)); 204 204 return -ENOENT; … … 329 329 params.CreateFlags |= SHFL_CF_ACCESS_WRITE; 330 330 331 rc = vboxCallCreate(&client_handle, &sf_g->map, sf_i->path, ¶ms);331 rc = VbglR0SfCreate(&client_handle, &sf_g->map, sf_i->path, ¶ms); 332 332 if (RT_FAILURE(rc)) 333 333 { 334 LogFunc((" vboxCallCreate(%s) failed rc=%Rrc\n",334 LogFunc(("VbglR0SfCreate(%s) failed rc=%Rrc\n", 335 335 sf_i->path->String.utf8, rc)); 336 336 err = -RTErrConvertToErrno(rc); … … 379 379 380 380 cbBuffer = sizeof(info); 381 rc = vboxCallFSInfo(&client_handle, &sf_g->map, params.Handle,382 SHFL_INFO_SET | SHFL_INFO_FILE, &cbBuffer,383 (PSHFLDIRINFO)&info);381 rc = VbglR0SfFsInfo(&client_handle, &sf_g->map, params.Handle, 382 SHFL_INFO_SET | SHFL_INFO_FILE, &cbBuffer, 383 (PSHFLDIRINFO)&info); 384 384 if (RT_FAILURE(rc)) 385 385 { 386 LogFunc((" vboxCallFSInfo(%s, FILE) failed rc=%Rrc\n",386 LogFunc(("VbglR0SfFsInfo(%s, FILE) failed rc=%Rrc\n", 387 387 sf_i->path->String.utf8, rc)); 388 388 err = -RTErrConvertToErrno(rc); … … 396 396 info.cbObject = iattr->ia_size; 397 397 cbBuffer = sizeof(info); 398 rc = vboxCallFSInfo(&client_handle, &sf_g->map, params.Handle,398 rc = VbglR0SfFsInfo(&client_handle, &sf_g->map, params.Handle, 399 399 SHFL_INFO_SET | SHFL_INFO_SIZE, &cbBuffer, 400 400 (PSHFLDIRINFO)&info); 401 401 if (RT_FAILURE(rc)) 402 402 { 403 LogFunc((" vboxCallFSInfo(%s, SIZE) failed rc=%Rrc\n",403 LogFunc(("VbglR0SfFsInfo(%s, SIZE) failed rc=%Rrc\n", 404 404 sf_i->path->String.utf8, rc)); 405 405 err = -RTErrConvertToErrno(rc); … … 408 408 } 409 409 410 rc = vboxCallClose(&client_handle, &sf_g->map, params.Handle);410 rc = VbglR0SfClose(&client_handle, &sf_g->map, params.Handle); 411 411 if (RT_FAILURE(rc)) 412 LogFunc((" vboxCallClose(%s) failed rc=%Rrc\n", sf_i->path->String.utf8, rc));412 LogFunc(("VbglR0SfClose(%s) failed rc=%Rrc\n", sf_i->path->String.utf8, rc)); 413 413 414 414 return sf_inode_revalidate(dentry); 415 415 416 416 fail1: 417 rc = vboxCallClose(&client_handle, &sf_g->map, params.Handle);417 rc = VbglR0SfClose(&client_handle, &sf_g->map, params.Handle); 418 418 if (RT_FAILURE(rc)) 419 LogFunc((" vboxCallClose(%s) failed rc=%Rrc\n", sf_i->path->String.utf8, rc));419 LogFunc(("VbglR0SfClose(%s) failed rc=%Rrc\n", sf_i->path->String.utf8, rc)); 420 420 421 421 fail2: … … 794 794 cbSize = b->cbFree; 795 795 796 rc = vboxCallDirInfo(&client_handle, &sf_g->map, handle, mask,796 rc = VbglR0SfDirInfo(&client_handle, &sf_g->map, handle, mask, 797 797 0, 0, &cbSize, buf, &cEntries); 798 798 switch (rc) … … 808 808 default: 809 809 err = -RTErrConvertToErrno(rc); 810 LogFunc((" vboxCallDirInfo failed rc=%Rrc\n", rc));810 LogFunc(("VbglR0SfDirInfo failed rc=%Rrc\n", rc)); 811 811 goto fail1; 812 812 } … … 837 837 sf_g = GET_GLOB_INFO(sb); 838 838 cbBuffer = sizeof(SHFLVolumeInfo); 839 rc = vboxCallFSInfo(&client_handle, &sf_g->map, 0, SHFL_INFO_GET | SHFL_INFO_VOLUME,839 rc = VbglR0SfFsInfo(&client_handle, &sf_g->map, 0, SHFL_INFO_GET | SHFL_INFO_VOLUME, 840 840 &cbBuffer, (PSHFLDIRINFO)&SHFLVolumeInfo); 841 841 if (RT_FAILURE(rc)) -
trunk/src/VBox/Additions/linux/sharedfolders/vfsmod.c
r48941 r58195 145 145 } 146 146 147 rc = vboxCallMapFolder(&client_handle, str_name, &sf_g->map);147 rc = VbglR0SfMapFolder(&client_handle, str_name, &sf_g->map); 148 148 kfree(str_name); 149 149 … … 151 151 { 152 152 err = -EPROTO; 153 LogFunc((" vboxCallMapFolder failed rc=%d\n", rc));153 LogFunc(("VbglR0SfMapFolder failed rc=%d\n", rc)); 154 154 goto fail2; 155 155 } … … 194 194 195 195 TRACE(); 196 rc = vboxCallUnmapFolder(&client_handle, &sf_g->map);196 rc = VbglR0SfUnmapFolder(&client_handle, &sf_g->map); 197 197 if (RT_FAILURE(rc)) 198 LogFunc((" vboxCallUnmapFolder failed rc=%d\n", rc));198 LogFunc(("VbglR0SfUnmapFolder failed rc=%d\n", rc)); 199 199 200 200 if (sf_g->nls) … … 595 595 } 596 596 597 rcVBox = vboxInit();597 rcVBox = VbglR0SfInit(); 598 598 if (RT_FAILURE(rcVBox)) 599 599 { 600 LogRelFunc((" vboxInit failed, rc=%d\n", rcVBox));600 LogRelFunc(("VbglR0SfInit failed, rc=%d\n", rcVBox)); 601 601 rcRet = -EPROTO; 602 602 goto fail0; 603 603 } 604 604 605 rcVBox = vboxConnect(&client_handle);605 rcVBox = VbglR0SfConnect(&client_handle); 606 606 if (RT_FAILURE(rcVBox)) 607 607 { 608 LogRelFunc((" vboxConnect failed, rc=%d\n", rcVBox));608 LogRelFunc(("VbglR0SfConnect failed, rc=%d\n", rcVBox)); 609 609 rcRet = -EPROTO; 610 610 goto fail1; 611 611 } 612 612 613 rcVBox = vboxCallSetUtf8(&client_handle);613 rcVBox = VbglR0SfSetUtf8(&client_handle); 614 614 if (RT_FAILURE(rcVBox)) 615 615 { 616 LogRelFunc((" vboxCallSetUtf8 failed, rc=%d\n", rcVBox));616 LogRelFunc(("VbglR0SfSetUtf8 failed, rc=%d\n", rcVBox)); 617 617 rcRet = -EPROTO; 618 618 goto fail2; … … 622 622 if (!follow_symlinks) 623 623 { 624 rcVBox = vboxCallSetSymlinks(&client_handle);624 rcVBox = VbglR0SfSetSymlinks(&client_handle); 625 625 if (RT_FAILURE(rcVBox)) 626 626 { … … 639 639 640 640 fail2: 641 vboxDisconnect(&client_handle);641 VbglR0SfDisconnect(&client_handle); 642 642 643 643 fail1: 644 vboxUninit();644 VbglR0SfTerm(); 645 645 646 646 fail0: … … 653 653 TRACE(); 654 654 655 vboxDisconnect(&client_handle);656 vboxUninit();655 VbglR0SfDisconnect(&client_handle); 656 VbglR0SfTerm(); 657 657 unregister_filesystem(&vboxsf_fs_type); 658 658 }
Note:
See TracChangeset
for help on using the changeset viewer.