Ignore:
File:
1 edited

Legend:

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

    r9c2c7d2 rb7fd2a0  
    4848 *             cannot be contacted.
    4949 */
    50 int vol_create(vol_t **rvol)
     50errno_t vol_create(vol_t **rvol)
    5151{
    5252        vol_t *vol;
    5353        service_id_t vol_svcid;
    54         int rc;
     54        errno_t rc;
    5555
    5656        vol = calloc(1, sizeof(vol_t));
     
    101101 * @param act_size Place to store actual size of complete data.
    102102 *
    103  * @return EOK on success or negative error code.
    104  */
    105 static int vol_get_ids_once(vol_t *vol, sysarg_t method, sysarg_t arg1,
     103 * @return EOK on success or an error code.
     104 */
     105static errno_t vol_get_ids_once(vol_t *vol, sysarg_t method, sysarg_t arg1,
    106106    sysarg_t *id_buf, size_t buf_size, size_t *act_size)
    107107{
     
    110110        ipc_call_t answer;
    111111        aid_t req = async_send_1(exch, method, arg1, &answer);
    112         int rc = async_data_read_start(exch, id_buf, buf_size);
     112        errno_t rc = async_data_read_start(exch, id_buf, buf_size);
    113113
    114114        async_exchange_end(exch);
     
    119119        }
    120120
    121         sysarg_t retval;
     121        errno_t retval;
    122122        async_wait_for(req, &retval);
    123123
     
    139139 * @param data   Place to store pointer to array of IDs
    140140 * @param count  Place to store number of IDs
    141  * @return       EOK on success or negative error code
    142  */
    143 static int vol_get_ids_internal(vol_t *vol, sysarg_t method, sysarg_t arg1,
     141 * @return       EOK on success or an error code
     142 */
     143static errno_t vol_get_ids_internal(vol_t *vol, sysarg_t method, sysarg_t arg1,
    144144    sysarg_t **data, size_t *count)
    145145{
     
    148148
    149149        size_t act_size = 0;
    150         int rc = vol_get_ids_once(vol, method, arg1, NULL, 0, &act_size);
     150        errno_t rc = vol_get_ids_once(vol, method, arg1, NULL, 0, &act_size);
    151151        if (rc != EOK)
    152152                return rc;
     
    183183 * @param count Place to store length of array (number of entries)
    184184 *
    185  * @return EOK on success or negative error code
    186  */
    187 int vol_get_parts(vol_t *vol, service_id_t **data, size_t *count)
     185 * @return EOK on success or an error code
     186 */
     187errno_t vol_get_parts(vol_t *vol, service_id_t **data, size_t *count)
    188188{
    189189        return vol_get_ids_internal(vol, VOL_GET_PARTS, 0, data, count);
     
    196196 * until it is discovered.
    197197 */
    198 int vol_part_add(vol_t *vol, service_id_t sid)
    199 {
    200         async_exch_t *exch;
    201         int retval;
     198errno_t vol_part_add(vol_t *vol, service_id_t sid)
     199{
     200        async_exch_t *exch;
     201        errno_t retval;
    202202
    203203        exch = async_exchange_begin(vol->sess);
     
    212212
    213213/** Get partition information. */
    214 int vol_part_info(vol_t *vol, service_id_t sid, vol_part_info_t *vinfo)
    215 {
    216         async_exch_t *exch;
    217         sysarg_t retval;
     214errno_t vol_part_info(vol_t *vol, service_id_t sid, vol_part_info_t *vinfo)
     215{
     216        async_exch_t *exch;
     217        errno_t retval;
    218218        ipc_call_t answer;
    219219
    220220        exch = async_exchange_begin(vol->sess);
    221221        aid_t req = async_send_1(exch, VOL_PART_INFO, sid, &answer);
    222         int rc = async_data_read_start(exch, vinfo, sizeof(vol_part_info_t));
     222        errno_t rc = async_data_read_start(exch, vinfo, sizeof(vol_part_info_t));
    223223        async_exchange_end(exch);
    224224
     
    237237/** Erase partition (to the extent where we will consider it not containing
    238238 * a file system. */
    239 int vol_part_empty(vol_t *vol, service_id_t sid)
    240 {
    241         async_exch_t *exch;
    242         int retval;
     239errno_t vol_part_empty(vol_t *vol, service_id_t sid)
     240{
     241        async_exch_t *exch;
     242        errno_t retval;
    243243
    244244        exch = async_exchange_begin(vol->sess);
     
    253253
    254254/** Get volume label support. */
    255 int vol_part_get_lsupp(vol_t *vol, vol_fstype_t fstype,
     255errno_t vol_part_get_lsupp(vol_t *vol, vol_fstype_t fstype,
    256256    vol_label_supp_t *vlsupp)
    257257{
    258258        async_exch_t *exch;
    259         sysarg_t retval;
     259        errno_t retval;
    260260        ipc_call_t answer;
    261261
    262262        exch = async_exchange_begin(vol->sess);
    263263        aid_t req = async_send_1(exch, VOL_PART_LSUPP, fstype, &answer);
    264         int rc = async_data_read_start(exch, vlsupp, sizeof(vol_label_supp_t));
     264        errno_t rc = async_data_read_start(exch, vlsupp, sizeof(vol_label_supp_t));
    265265        async_exchange_end(exch);
    266266
     
    278278
    279279/** Create file system. */
    280 int vol_part_mkfs(vol_t *vol, service_id_t sid, vol_fstype_t fstype,
     280errno_t vol_part_mkfs(vol_t *vol, service_id_t sid, vol_fstype_t fstype,
    281281    const char *label)
    282282{
    283283        async_exch_t *exch;
    284284        ipc_call_t answer;
    285         sysarg_t retval;
     285        errno_t retval;
    286286
    287287        exch = async_exchange_begin(vol->sess);
Note: See TracChangeset for help on using the changeset viewer.