Changes in uspace/srv/bd/vbd/vbd.c [5772aa1:b7fd2a0] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/bd/vbd/vbd.c
r5772aa1 rb7fd2a0 36 36 #include <async.h> 37 37 #include <errno.h> 38 #include <str_error.h> 38 39 #include <io/log.h> 39 40 #include <ipc/services.h> … … 56 57 static service_id_t ctl_sid; 57 58 58 static int vbds_init(void)59 { 60 int rc;59 static errno_t vbds_init(void) 60 { 61 errno_t rc; 61 62 log_msg(LOG_DEFAULT, LVL_DEBUG, "vbds_init()"); 62 63 … … 69 70 rc = loc_server_register(NAME); 70 71 if (rc != EOK) { 71 log_msg(LOG_DEFAULT, LVL_ERROR, "Failed registering server (%d).", rc);72 log_msg(LOG_DEFAULT, LVL_ERROR, "Failed registering server: %s.", str_error(rc)); 72 73 return EEXIST; 73 74 } … … 75 76 rc = loc_service_register(SERVICE_NAME_VBD, &ctl_sid); 76 77 if (rc != EOK) { 77 log_msg(LOG_DEFAULT, LVL_ERROR, "Failed registering service (%d).", rc);78 log_msg(LOG_DEFAULT, LVL_ERROR, "Failed registering service: %s.", str_error(rc)); 78 79 return EEXIST; 79 80 } … … 91 92 size_t size; 92 93 size_t act_size; 93 int rc;94 errno_t rc; 94 95 95 96 if (!async_data_read_receive(&callid, &size)) { … … 114 115 } 115 116 116 sysarg_t retval = async_data_read_finalize(callid, id_buf, size);117 errno_t retval = async_data_read_finalize(callid, id_buf, size); 117 118 free(id_buf); 118 119 … … 124 125 service_id_t disk_sid; 125 126 vbd_disk_info_t dinfo; 126 int rc;127 errno_t rc; 127 128 128 129 log_msg(LOG_DEFAULT, LVL_DEBUG, "vbds_disk_info_srv()"); … … 164 165 service_id_t disk_sid; 165 166 label_type_t ltype; 166 int rc;167 errno_t rc; 167 168 168 169 log_msg(LOG_DEFAULT, LVL_DEBUG, "vbds_label_create_srv()"); … … 171 172 ltype = IPC_GET_ARG2(*icall); 172 173 rc = vbds_label_create(disk_sid, ltype); 173 async_answer_0(iid, (sysarg_t)rc);174 async_answer_0(iid, rc); 174 175 } 175 176 … … 177 178 { 178 179 service_id_t disk_sid; 179 int rc;180 errno_t rc; 180 181 181 182 log_msg(LOG_DEFAULT, LVL_DEBUG, "vbds_label_delete_srv()"); … … 183 184 disk_sid = IPC_GET_ARG1(*icall); 184 185 rc = vbds_label_delete(disk_sid); 185 async_answer_0(iid, (sysarg_t)rc);186 async_answer_0(iid, rc); 186 187 } 187 188 … … 192 193 size_t act_size; 193 194 service_id_t sid; 194 int rc;195 errno_t rc; 195 196 196 197 log_msg(LOG_DEFAULT, LVL_DEBUG, "vbds_label_get_parts_srv()"); … … 218 219 } 219 220 220 sysarg_t retval = async_data_read_finalize(callid, id_buf, size);221 errno_t retval = async_data_read_finalize(callid, id_buf, size); 221 222 free(id_buf); 222 223 … … 228 229 vbds_part_id_t part; 229 230 vbd_part_info_t pinfo; 230 int rc;231 errno_t rc; 231 232 232 233 log_msg(LOG_DEFAULT, LVL_DEBUG, "vbds_part_get_info_srv()"); … … 269 270 vbd_part_spec_t pspec; 270 271 vbds_part_id_t part; 271 int rc;272 errno_t rc; 272 273 273 274 log_msg(LOG_DEFAULT, LVL_DEBUG, "vbds_part_create_srv()"); … … 302 303 } 303 304 304 async_answer_1(iid, (sysarg_t)rc, (sysarg_t)part);305 async_answer_1(iid, rc, (sysarg_t)part); 305 306 } 306 307 … … 308 309 { 309 310 vbds_part_id_t part; 310 int rc;311 errno_t rc; 311 312 312 313 log_msg(LOG_DEFAULT, LVL_DEBUG, "vbds_part_delete_srv()"); … … 314 315 part = IPC_GET_ARG1(*icall); 315 316 rc = vbds_part_delete(part); 316 async_answer_0(iid, (sysarg_t)rc);317 async_answer_0(iid, rc); 317 318 } 318 319 … … 322 323 label_ptype_t ptype; 323 324 label_pcnt_t pcnt; 324 int rc;325 errno_t rc; 325 326 326 327 log_msg(LOG_DEFAULT, LVL_DEBUG, "vbds_suggest_ptype_srv()"); … … 427 428 int main(int argc, char *argv[]) 428 429 { 429 int rc;430 errno_t rc; 430 431 431 432 printf("%s: Virtual Block Device service\n", NAME);
Note:
See TracChangeset
for help on using the changeset viewer.