Changeset 2d78d88 in mainline for uspace/lib/c/generic/vol.c


Ignore:
Timestamp:
2018-07-25T17:04:03Z (7 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
efa3136
Parents:
bec18a9
Message:

Modifying mount point for a partition.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/generic/vol.c

    rbec18a9 r2d78d88  
    338338}
    339339
     340/** Set mount point for partition.
     341 *
     342 * @param vol Volume service
     343 * @param sid Partition service ID
     344 * @param mountp Mount point
     345 *
     346 * @return EOK on success or an error code
     347 */
     348errno_t vol_part_set_mountp(vol_t *vol, service_id_t sid,
     349    const char *mountp)
     350{
     351        async_exch_t *exch;
     352        ipc_call_t answer;
     353        errno_t retval;
     354
     355        exch = async_exchange_begin(vol->sess);
     356        aid_t req = async_send_1(exch, VOL_PART_SET_MOUNTP, sid,
     357            &answer);
     358
     359        retval = async_data_write_start(exch, mountp, str_size(mountp));
     360        if (retval != EOK) {
     361                async_exchange_end(exch);
     362                async_forget(req);
     363                return retval;
     364        }
     365
     366        async_exchange_end(exch);
     367        async_wait_for(req, &retval);
     368
     369        if (retval != EOK)
     370                return retval;
     371
     372        return EOK;
     373}
     374
    340375/** Format file system type as string.
    341376 *
Note: See TracChangeset for help on using the changeset viewer.