Changeset 0ecfc62 in mainline for uspace/srv/volsrv
- Timestamp:
- 2015-10-09T18:11:08Z (10 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 3a43785
- Parents:
- 372df8f
- Location:
- uspace/srv/volsrv
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/volsrv/part.c
r372df8f r0ecfc62 113 113 114 114 link_initialize(&part->lparts); 115 part-> dcnt = dc_empty;115 part->pcnt = vpc_empty; 116 116 117 117 return part; … … 149 149 log_msg(LOG_DEFAULT, LVL_NOTE, "Probe partition %s", part->svc_name); 150 150 151 part-> dcnt = dc_unknown;151 part->pcnt = vpc_unknown; 152 152 list_append(&part->lparts, &vol_parts); 153 153 … … 227 227 int vol_part_empty_part(vol_part_t *part) 228 228 { 229 part->dcnt = dc_empty; 230 231 return EOK; 232 } 233 234 int vol_part_get_info(vol_part_t *part, vol_part_info_t *dinfo) 235 { 236 dinfo->dcnt = part->dcnt; 229 part->pcnt = vpc_empty; 230 231 return EOK; 232 } 233 234 int vol_part_get_info(vol_part_t *part, vol_part_info_t *pinfo) 235 { 236 pinfo->pcnt = part->pcnt; 237 pinfo->fstype = part->fstype; 237 238 return EOK; 238 239 } -
uspace/srv/volsrv/types/part.h
r372df8f r0ecfc62 48 48 /** Service name */ 49 49 char *svc_name; 50 /** Diskcontents */51 label_disk_cnt_t dcnt;52 /** Labeltype */53 label_type_t ltype;50 /** Partition contents */ 51 vol_part_cnt_t pcnt; 52 /** Filesystem type */ 53 vol_fstype_t fstype; 54 54 } vol_part_t; 55 55 -
uspace/srv/volsrv/volsrv.c
r372df8f r0ecfc62 40 40 #include <ipc/vol.h> 41 41 #include <loc.h> 42 #include <macros.h> 42 43 #include <stdio.h> 43 44 #include <stdlib.h> … … 135 136 } 136 137 137 async_answer_3(iid, rc, pinfo.dcnt, pinfo.ltype, pinfo.flags); 138 ipc_callid_t callid; 139 size_t size; 140 if (!async_data_read_receive(&callid, &size)) { 141 async_answer_0(callid, EREFUSED); 142 async_answer_0(iid, EREFUSED); 143 return; 144 } 145 146 if (size != sizeof(vol_part_info_t)) { 147 async_answer_0(callid, EINVAL); 148 async_answer_0(iid, EINVAL); 149 return; 150 } 151 152 rc = async_data_read_finalize(callid, &pinfo, 153 min(size, sizeof(pinfo))); 154 if (rc != EOK) { 155 async_answer_0(callid, rc); 156 async_answer_0(iid, rc); 157 return; 158 } 159 160 async_answer_0(iid, EOK); 138 161 } 139 162
Note:
See TracChangeset
for help on using the changeset viewer.
