Changeset 64ffd83 in mainline for uspace/srv/volsrv/volsrv.c
- Timestamp:
- 2018-07-24T09:43:38Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- bec18a9
- Parents:
- 05208d9
- git-author:
- Jiri Svoboda <jiri@…> (2018-07-23 18:41:45)
- git-committer:
- Jiri Svoboda <jiri@…> (2018-07-24 09:43:38)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/volsrv/volsrv.c
r05208d9 r64ffd83 49 49 #include "mkfs.h" 50 50 #include "part.h" 51 #include "volume.h" 51 52 52 53 #define NAME "volsrv" … … 57 58 { 58 59 errno_t rc; 60 vol_volumes_t *volumes = NULL; 59 61 vol_parts_t *parts = NULL; 60 62 61 63 log_msg(LOG_DEFAULT, LVL_DEBUG, "vol_init()"); 62 64 63 rc = vol_parts_create(&parts); 65 rc = vol_volumes_create(&volumes); 66 if (rc != EOK) 67 goto error; 68 69 rc = vol_parts_create(volumes, &parts); 64 70 if (rc != EOK) 65 71 goto error; … … 87 93 return EOK; 88 94 error: 95 vol_volumes_destroy(volumes); 89 96 vol_parts_destroy(parts); 90 97 return rc; … … 131 138 sid = IPC_GET_ARG1(*icall); 132 139 133 rc = vol_part_add (parts, sid);140 rc = vol_part_add_part(parts, sid); 134 141 if (rc != EOK) { 135 142 async_answer_0(icall, rc); … … 285 292 vol_fstype_t fstype; 286 293 char *label; 294 char *mountp; 287 295 errno_t rc; 288 296 … … 304 312 } 305 313 314 rc = async_data_write_accept((void **)&mountp, true, 0, VOL_MOUNTP_MAXLEN, 315 0, NULL); 316 if (rc != EOK) { 317 free(label); 318 async_answer_0(icall, rc); 319 return; 320 } 321 322 if (mountp != NULL) { 323 log_msg(LOG_DEFAULT, LVL_NOTE, "vol_part_mkfs_srv: mountp='%s'", 324 mountp); 325 } 326 306 327 rc = vol_part_find_by_id_ref(parts, sid, &part); 307 328 if (rc != EOK) { … … 311 332 } 312 333 313 rc = vol_part_mkfs_part(part, fstype, label );334 rc = vol_part_mkfs_part(part, fstype, label, mountp); 314 335 if (rc != EOK) { 315 336 free(label);
Note:
See TracChangeset
for help on using the changeset viewer.