Changeset b82985e in mainline for uspace/lib/c/generic/vol.c


Ignore:
Timestamp:
2018-10-12T13:16:04Z (6 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
d09eeb2
Parents:
6d00aff
Message:

Inserting volume by path.

File:
1 edited

Legend:

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

    r6d00aff rb82985e  
    312312}
    313313
     314/** Insert volume by path.
     315 *
     316 * @param vol Volume service
     317 * @param path Filesystem path
     318 *
     319 * @return EOK on success or an error code
     320 */
     321errno_t vol_part_insert_by_path(vol_t *vol, const char *path)
     322{
     323        async_exch_t *exch;
     324        ipc_call_t answer;
     325        errno_t retval;
     326
     327        exch = async_exchange_begin(vol->sess);
     328        aid_t req = async_send_0(exch, VOL_PART_INSERT_BY_PATH, &answer);
     329
     330        retval = async_data_write_start(exch, path, str_size(path));
     331        if (retval != EOK) {
     332                async_exchange_end(exch);
     333                async_forget(req);
     334                return retval;
     335        }
     336
     337        async_exchange_end(exch);
     338        async_wait_for(req, &retval);
     339
     340        if (retval != EOK)
     341                return retval;
     342
     343        return EOK;
     344}
     345
    314346/** Get volume label support.
    315347 *
Note: See TracChangeset for help on using the changeset viewer.