VirtualBox

Changeset 58195 in vbox for trunk/src/VBox/Additions/solaris


Ignore:
Timestamp:
Oct 12, 2015 3:13:47 PM (9 years ago)
Author:
vboxsync
Message:

VBoxGuestR0LibSharedFolders: Prefixed functions ('vbox' wasn't a very good one). Hope I found all places these functions are called...

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/solaris/SharedFolders/vboxfs_prov.c

    r51729 r58195  
    9090                return NULL;
    9191        }
    92         rc = vboxInit();
     92        rc = VbglR0SfInit();
    9393        if (RT_SUCCESS(rc))
    9494        {
    95                 rc = vboxConnect(&vbox_client);
     95                rc = VbglR0SfConnect(&vbox_client);
    9696                if (RT_SUCCESS(rc))
    9797                {
    98                         rc = vboxCallSetUtf8(&vbox_client);
     98                        rc = VbglR0SfSetUtf8(&vbox_client);
    9999                        if (RT_SUCCESS(rc))
    100100                        {
     
    102102                        }
    103103                        else
    104                                 cmn_err(CE_WARN, "sfprov_connect: vboxCallSetUtf8() failed\n");
    105 
    106                         vboxDisconnect(&vbox_client);
     104                                cmn_err(CE_WARN, "sfprov_connect: VbglR0SfSetUtf8() failed\n");
     105
     106                        VbglR0SfDisconnect(&vbox_client);
    107107                }
    108108                else
    109                         cmn_err(CE_WARN, "sfprov_connect: vboxConnect() failed rc=%d\n", rc);
    110                 vboxUninit();
     109                        cmn_err(CE_WARN, "sfprov_connect: VbglR0SfConnect() failed rc=%d\n", rc);
     110                VbglR0SfTerm();
    111111        }
    112112        else
    113                 cmn_err(CE_WARN, "sfprov_connect: vboxInit() failed rc=%d\n", rc);
     113                cmn_err(CE_WARN, "sfprov_connect: VbglR0SfInit() failed rc=%d\n", rc);
    114114        return (NULL);
    115115}
     
    120120        if (conn != (sfp_connection_t *)&vbox_client)
    121121                cmn_err(CE_WARN, "sfprov_disconnect: bad argument\n");
    122         vboxDisconnect(&vbox_client);
    123         vboxUninit();
     122        VbglR0SfDisconnect(&vbox_client);
     123        VbglR0SfTerm();
    124124}
    125125
     
    135135        m = kmem_zalloc(sizeof (*m), KM_SLEEP);
    136136        str = sfprov_string(path, &size);
    137         rc = vboxCallMapFolder(&vbox_client, str, &m->map);
     137        rc = VbglR0SfMapFolder(&vbox_client, str, &m->map);
    138138        if (RT_FAILURE(rc)) {
    139                 cmn_err(CE_WARN, "sfprov_mount: vboxCallMapFolder() failed. path=%s rc=%d\n", path, rc);
     139                cmn_err(CE_WARN, "sfprov_mount: VbglR0SfMapFolder() failed. path=%s rc=%d\n", path, rc);
    140140                kmem_free(m, sizeof (*m));
    141141                *mnt = NULL;
     
    154154        int rc;
    155155
    156         rc = vboxCallUnmapFolder(&vbox_client, &mnt->map);
     156        rc = VbglR0SfUnmapFolder(&vbox_client, &mnt->map);
    157157        if (RT_FAILURE(rc)) {
    158                 cmn_err(CE_WARN, "sfprov_mount: vboxCallUnmapFolder() failed rc=%d\n", rc);
     158                cmn_err(CE_WARN, "sfprov_mount: VbglR0SfUnmapFolder() failed rc=%d\n", rc);
    159159                rc = EINVAL;
    160160        } else {
     
    175175        uint32_t bytes = sizeof(SHFLVOLINFO);
    176176
    177         rc = vboxCallFSInfo(&vbox_client, &mnt->map, 0,
    178             (SHFL_INFO_GET | SHFL_INFO_VOLUME), &bytes, (SHFLDIRINFO *)&info);
     177        rc = VbglR0SfFsInfo(&vbox_client, &mnt->map, 0, SHFL_INFO_GET | SHFL_INFO_VOLUME,
     178                            &bytes, (SHFLDIRINFO *)&info);
    179179        if (RT_FAILURE(rc))
    180180                return (EINVAL);
     
    336336        parms.CreateFlags = SHFL_CF_ACT_CREATE_IF_NEW |
    337337            SHFL_CF_ACT_REPLACE_IF_EXISTS | SHFL_CF_ACCESS_READWRITE;
    338         rc = vboxCallCreate(&vbox_client, &mnt->map, str, &parms);
     338        rc = VbglR0SfCreate(&vbox_client, &mnt->map, str, &parms);
    339339        kmem_free(str, size);
    340340
     
    342342        {
    343343                if (rc != VERR_ACCESS_DENIED && rc != VERR_WRITE_PROTECT)
    344                         cmn_err(CE_WARN, "sfprov_create: vboxCallCreate failed! path=%s rc=%d\n", path, rc);
     344                        cmn_err(CE_WARN, "sfprov_create: VbglR0SfCreate failed! path=%s rc=%d\n", path, rc);
    345345                return (sfprov_vbox2errno(rc));
    346346        }
     
    379379         * Open the host directory.
    380380         */
    381         rc = vboxCallCreate(&vbox_client, &mnt->map, str, &parms);
     381        rc = VbglR0SfCreate(&vbox_client, &mnt->map, str, &parms);
    382382
    383383        /*
     
    439439         * Open/create the host file.
    440440         */
    441         rc = vboxCallCreate(&vbox_client, &mnt->map, str, &parms);
     441        rc = VbglR0SfCreate(&vbox_client, &mnt->map, str, &parms);
    442442
    443443        /*
     
    467467        int rc;
    468468
    469         rc = vboxCallClose(&vbox_client, &fp->map, fp->handle);
     469        rc = VbglR0SfClose(&vbox_client, &fp->map, fp->handle);
    470470        kmem_free(fp, sizeof(sfp_file_t));
    471471        return (0);
     
    477477        int rc;
    478478
    479         rc = vboxCallRead(&vbox_client, &fp->map, fp->handle, offset,
    480             numbytes, (uint8_t *)buffer, 0);    /* what is that last arg? */
     479        rc = VbglR0SfRead(&vbox_client, &fp->map, fp->handle, offset,
     480                          numbytes, (uint8_t *)buffer, 0 /*fLocked*/);
    481481        if (RT_FAILURE(rc))
    482482                return (EINVAL);
     
    489489        int rc;
    490490
    491         rc = vboxCallWrite(&vbox_client, &fp->map, fp->handle, offset,
    492             numbytes, (uint8_t *)buffer, 0);    /* what is that last arg? */
     491        rc = VbglR0SfWrite(&vbox_client, &fp->map, fp->handle, offset,
     492                           numbytes, (uint8_t *)buffer, 0 /*fLocked*/);
    493493        if (RT_FAILURE(rc))
    494494                return (EINVAL);
     
    501501        int rc;
    502502
    503         rc = vboxCallFlush(&vbox_client, &fp->map, fp->handle);
     503        rc = VbglR0SfFlush(&vbox_client, &fp->map, fp->handle);
    504504        if (RT_FAILURE(rc))
    505505                return (EIO);
     
    520520        parms.Info.cbObject = 0;
    521521        parms.CreateFlags = SHFL_CF_LOOKUP | SHFL_CF_ACT_FAIL_IF_NEW;
    522         rc = vboxCallCreate(&vbox_client, &mnt->map, str, &parms);
     522        rc = VbglR0SfCreate(&vbox_client, &mnt->map, str, &parms);
    523523        kmem_free(str, size);
    524524
     
    644644                          | SHFL_CF_ACCESS_ATTR_WRITE;
    645645
    646         rc = vboxCallCreate(&vbox_client, &mnt->map, str, &parms);
     646        rc = VbglR0SfCreate(&vbox_client, &mnt->map, str, &parms);
    647647
    648648        if (RT_FAILURE(rc)) {
    649                 cmn_err(CE_WARN, "sfprov_set_attr: vboxCallCreate(%s) failed rc=%d\n",
     649                cmn_err(CE_WARN, "sfprov_set_attr: VbglR0SfCreate(%s) failed rc=%d\n",
    650650                    path, rc);
    651651                err = EINVAL;
     
    668668
    669669        bytes = sizeof(info);
    670         rc = vboxCallFSInfo(&vbox_client, &mnt->map, parms.Handle,
    671             (SHFL_INFO_SET | SHFL_INFO_FILE), &bytes, (SHFLDIRINFO *)&info);
     670        rc = VbglR0SfFsInfo(&vbox_client, &mnt->map, parms.Handle, SHFL_INFO_SET | SHFL_INFO_FILE,
     671                            &bytes, (SHFLDIRINFO *)&info);
    672672        if (RT_FAILURE(rc)) {
    673673                if (rc != VERR_ACCESS_DENIED && rc != VERR_WRITE_PROTECT)
    674674                {
    675                         cmn_err(CE_WARN, "sfprov_set_attr: vboxCallFSInfo(%s, FILE) failed rc=%d\n",
     675                        cmn_err(CE_WARN, "sfprov_set_attr: VbglR0SfFsInfo(%s, FILE) failed rc=%d\n",
    676676                    path, rc);
    677677                }
     
    683683
    684684fail1:
    685         rc = vboxCallClose(&vbox_client, &mnt->map, parms.Handle);
     685        rc = VbglR0SfClose(&vbox_client, &mnt->map, parms.Handle);
    686686        if (RT_FAILURE(rc)) {
    687                 cmn_err(CE_WARN, "sfprov_set_attr: vboxCallClose(%s) failed rc=%d\n",
     687                cmn_err(CE_WARN, "sfprov_set_attr: VbglR0SfClose(%s) failed rc=%d\n",
    688688                    path, rc);
    689689        }
     
    710710                          | SHFL_CF_ACCESS_WRITE;
    711711
    712         rc = vboxCallCreate(&vbox_client, &mnt->map, str, &parms);
     712        rc = VbglR0SfCreate(&vbox_client, &mnt->map, str, &parms);
    713713
    714714        if (RT_FAILURE(rc)) {
    715                 cmn_err(CE_WARN, "sfprov_set_size: vboxCallCreate(%s) failed rc=%d\n",
     715                cmn_err(CE_WARN, "sfprov_set_size: VbglR0SfCreate(%s) failed rc=%d\n",
    716716                    path, rc);
    717717                err = EINVAL;
     
    726726        info.cbObject = size;
    727727        bytes = sizeof(info);
    728         rc = vboxCallFSInfo(&vbox_client, &mnt->map, parms.Handle,
    729             (SHFL_INFO_SET | SHFL_INFO_SIZE), &bytes, (SHFLDIRINFO *)&info);
     728        rc = VbglR0SfFsInfo(&vbox_client, &mnt->map, parms.Handle, SHFL_INFO_SET | SHFL_INFO_SIZE,
     729                            &bytes, (SHFLDIRINFO *)&info);
    730730        if (RT_FAILURE(rc)) {
    731                 cmn_err(CE_WARN, "sfprov_set_size: vboxCallFSInfo(%s, SIZE) failed rc=%d\n",
     731                cmn_err(CE_WARN, "sfprov_set_size: VbglR0SfFsInfo(%s, SIZE) failed rc=%d\n",
    732732                    path, rc);
    733733                err = sfprov_vbox2errno(rc);
     
    738738
    739739fail1:
    740         rc = vboxCallClose(&vbox_client, &mnt->map, parms.Handle);
     740        rc = VbglR0SfClose(&vbox_client, &mnt->map, parms.Handle);
    741741        if (RT_FAILURE(rc)) {
    742                 cmn_err(CE_WARN, "sfprov_set_size: vboxCallClose(%s) failed rc=%d\n",
     742                cmn_err(CE_WARN, "sfprov_set_size: VbglR0SfClose(%s) failed rc=%d\n",
    743743                    path, rc);
    744744        }
     
    771771        parms.CreateFlags = SHFL_CF_DIRECTORY | SHFL_CF_ACT_CREATE_IF_NEW |
    772772            SHFL_CF_ACT_FAIL_IF_EXISTS | SHFL_CF_ACCESS_READ;
    773         rc = vboxCallCreate(&vbox_client, &mnt->map, str, &parms);
     773        rc = VbglR0SfCreate(&vbox_client, &mnt->map, str, &parms);
    774774        kmem_free(str, size);
    775775
     
    794794        int rc;
    795795
    796         rc = vboxCallSetSymlinks(&vbox_client);
     796        rc = VbglR0SfSetSymlinks(&vbox_client);
    797797        if (RT_FAILURE(rc))
    798798                return (sfprov_vbox2errno(rc));
     
    809809
    810810        str = sfprov_string(path, &size);
    811         rc = vboxCallRemove(&vbox_client, &mnt->map, str,
    812                 SHFL_REMOVE_FILE | (is_link ? SHFL_REMOVE_SYMLINK : 0));
     811        rc = VbglR0SfRemove(&vbox_client, &mnt->map, str,
     812                            SHFL_REMOVE_FILE | (is_link ? SHFL_REMOVE_SYMLINK : 0));
    813813        kmem_free(str, size);
    814814        if (RT_FAILURE(rc))
     
    830830        str = sfprov_string(path, &size);
    831831
    832         rc = vboxReadLink(&vbox_client, &mnt->map, str, (uint32_t) tgt_size,
     832        rc = VbglR0SfReadLink(&vbox_client, &mnt->map, str, (uint32_t) tgt_size,
    833833            target);
    834834        if (RT_FAILURE(rc))
     
    854854        tgt = sfprov_string(target, &tgt_size);
    855855
    856         rc = vboxCallSymlink(&vbox_client, &mnt->map, lnk, tgt, &info);
     856        rc = VbglR0SfSymlink(&vbox_client, &mnt->map, lnk, tgt, &info);
    857857        if (RT_FAILURE(rc)) {
    858858                rc = sfprov_vbox2errno(rc);
     
    878878
    879879        str = sfprov_string(path, &size);
    880         rc = vboxCallRemove(&vbox_client, &mnt->map, str, SHFL_REMOVE_DIR);
     880        rc = VbglR0SfRemove(&vbox_client, &mnt->map, str, SHFL_REMOVE_DIR);
    881881        kmem_free(str, size);
    882882        if (RT_FAILURE(rc))
     
    894894        old = sfprov_string(from, &old_size);
    895895        new = sfprov_string(to, &new_size);
    896         rc = vboxCallRename(&vbox_client, &mnt->map, old, new,
    897             (is_dir ? SHFL_RENAME_DIR : SHFL_RENAME_FILE) |
    898             SHFL_RENAME_REPLACE_IF_EXISTS);
     896        rc = VbglR0SfRename(&vbox_client, &mnt->map, old, new,
     897                            (is_dir ? SHFL_RENAME_DIR : SHFL_RENAME_FILE) | SHFL_RENAME_REPLACE_IF_EXISTS);
    899898        kmem_free(old, old_size);
    900899        kmem_free(new, new_size);
     
    974973
    975974        /*
    976          * Now loop using vboxCallDirInfo
     975         * Now loop using VbglR0SfDirInfo
    977976         */
    978977        infobuff = kmem_alloc(infobuff_alloc, KM_SLEEP);
     
    985984        for (;;) {
    986985                numbytes = infobuff_alloc;
    987                 error = vboxCallDirInfo(&vbox_client, &fp->map, fp->handle,
    988                     mask_str, 0, 0, &numbytes, infobuff, &nents);
     986                error = VbglR0SfDirInfo(&vbox_client, &fp->map, fp->handle,
     987                                        mask_str, 0, 0, &numbytes, infobuff, &nents);
    989988                switch (error) {
    990989
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette