Changeset 2d78d88 in mainline for uspace/lib/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.

Location:
uspace/lib/c
Files:
4 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 *
  • uspace/lib/c/include/ipc/vol.h

    rbec18a9 r2d78d88  
    4646        VOL_PART_EMPTY,
    4747        VOL_PART_LSUPP,
    48         VOL_PART_MKFS
     48        VOL_PART_MKFS,
     49        VOL_PART_SET_MOUNTP
    4950} vol_request_t;
    5051
  • uspace/lib/c/include/types/label.h

    rbec18a9 r2d78d88  
    8686        lf_can_create_log = 0x10,
    8787        /** Currently it is possible to delete a partition */
    88         lf_can_delete_part = 0x20
     88        lf_can_delete_part = 0x20,
     89        /** Currently it is possible to modify a partition */
     90        lf_can_modify_part = 0x40
    8991} label_flags_t;
    9092
  • uspace/lib/c/include/vol.h

    rbec18a9 r2d78d88  
    5353extern errno_t vol_part_mkfs(vol_t *, service_id_t, vol_fstype_t, const char *,
    5454    const char *);
     55extern errno_t vol_part_set_mountp(vol_t *, service_id_t, const char *);
    5556
    5657extern errno_t vol_fstype_format(vol_fstype_t, char **);
Note: See TracChangeset for help on using the changeset viewer.