Changes in uspace/lib/c/generic/vol.c [9c2c7d2:b7fd2a0] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/generic/vol.c
r9c2c7d2 rb7fd2a0 48 48 * cannot be contacted. 49 49 */ 50 int vol_create(vol_t **rvol)50 errno_t vol_create(vol_t **rvol) 51 51 { 52 52 vol_t *vol; 53 53 service_id_t vol_svcid; 54 int rc;54 errno_t rc; 55 55 56 56 vol = calloc(1, sizeof(vol_t)); … … 101 101 * @param act_size Place to store actual size of complete data. 102 102 * 103 * @return EOK on success or negativeerror 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 */ 105 static errno_t vol_get_ids_once(vol_t *vol, sysarg_t method, sysarg_t arg1, 106 106 sysarg_t *id_buf, size_t buf_size, size_t *act_size) 107 107 { … … 110 110 ipc_call_t answer; 111 111 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); 113 113 114 114 async_exchange_end(exch); … … 119 119 } 120 120 121 sysarg_t retval;121 errno_t retval; 122 122 async_wait_for(req, &retval); 123 123 … … 139 139 * @param data Place to store pointer to array of IDs 140 140 * @param count Place to store number of IDs 141 * @return EOK on success or negativeerror code142 */ 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 */ 143 static errno_t vol_get_ids_internal(vol_t *vol, sysarg_t method, sysarg_t arg1, 144 144 sysarg_t **data, size_t *count) 145 145 { … … 148 148 149 149 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); 151 151 if (rc != EOK) 152 152 return rc; … … 183 183 * @param count Place to store length of array (number of entries) 184 184 * 185 * @return EOK on success or negativeerror code186 */ 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 */ 187 errno_t vol_get_parts(vol_t *vol, service_id_t **data, size_t *count) 188 188 { 189 189 return vol_get_ids_internal(vol, VOL_GET_PARTS, 0, data, count); … … 196 196 * until it is discovered. 197 197 */ 198 int vol_part_add(vol_t *vol, service_id_t sid)199 { 200 async_exch_t *exch; 201 int retval;198 errno_t vol_part_add(vol_t *vol, service_id_t sid) 199 { 200 async_exch_t *exch; 201 errno_t retval; 202 202 203 203 exch = async_exchange_begin(vol->sess); … … 212 212 213 213 /** 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;214 errno_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; 218 218 ipc_call_t answer; 219 219 220 220 exch = async_exchange_begin(vol->sess); 221 221 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)); 223 223 async_exchange_end(exch); 224 224 … … 237 237 /** Erase partition (to the extent where we will consider it not containing 238 238 * a file system. */ 239 int vol_part_empty(vol_t *vol, service_id_t sid)240 { 241 async_exch_t *exch; 242 int retval;239 errno_t vol_part_empty(vol_t *vol, service_id_t sid) 240 { 241 async_exch_t *exch; 242 errno_t retval; 243 243 244 244 exch = async_exchange_begin(vol->sess); … … 253 253 254 254 /** Get volume label support. */ 255 int vol_part_get_lsupp(vol_t *vol, vol_fstype_t fstype,255 errno_t vol_part_get_lsupp(vol_t *vol, vol_fstype_t fstype, 256 256 vol_label_supp_t *vlsupp) 257 257 { 258 258 async_exch_t *exch; 259 sysarg_t retval;259 errno_t retval; 260 260 ipc_call_t answer; 261 261 262 262 exch = async_exchange_begin(vol->sess); 263 263 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)); 265 265 async_exchange_end(exch); 266 266 … … 278 278 279 279 /** Create file system. */ 280 int vol_part_mkfs(vol_t *vol, service_id_t sid, vol_fstype_t fstype,280 errno_t vol_part_mkfs(vol_t *vol, service_id_t sid, vol_fstype_t fstype, 281 281 const char *label) 282 282 { 283 283 async_exch_t *exch; 284 284 ipc_call_t answer; 285 sysarg_t retval;285 errno_t retval; 286 286 287 287 exch = async_exchange_begin(vol->sess);
Note:
See TracChangeset
for help on using the changeset viewer.