Changeset b7a4d06 in mainline for uspace/lib/c
- Timestamp:
- 2015-07-18T12:55:12Z (10 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- c43db5f
- Parents:
- 70815a24
- Location:
- uspace/lib/c
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/generic/vbd.c
r70815a24 rb7a4d06 264 264 { 265 265 async_exch_t *exch; 266 sysarg_t index; 267 sysarg_t b0_lo, b0_hi; 268 sysarg_t nb_lo, nb_hi; 269 int retval; 270 271 exch = async_exchange_begin(vbd->sess); 272 retval = async_req_1_5(exch, VBD_PART_GET_INFO, part, &index, 273 &b0_lo, &b0_hi, &nb_lo, &nb_hi); 274 async_exchange_end(exch); 275 276 if (retval != EOK) 277 return EIO; 278 279 pinfo->index = index; 280 pinfo->block0 = MERGE_LOUP32(b0_lo, b0_hi); 281 pinfo->nblocks = MERGE_LOUP32(nb_lo, nb_hi); 266 sysarg_t retval; 267 ipc_call_t answer; 268 269 exch = async_exchange_begin(vbd->sess); 270 aid_t req = async_send_1(exch, VBD_PART_GET_INFO, part, &answer); 271 int rc = async_data_read_start(exch, pinfo, sizeof(vbd_part_info_t)); 272 async_exchange_end(exch); 273 274 if (rc != EOK) { 275 async_forget(req); 276 return EIO; 277 } 278 279 async_wait_for(req, &retval); 280 if (retval != EOK) 281 return EIO; 282 282 283 return EOK; 283 284 } -
uspace/lib/c/generic/vol.c
r70815a24 rb7a4d06 192 192 { 193 193 async_exch_t *exch; 194 sysarg_t dcnt, ltype ;194 sysarg_t dcnt, ltype, flags; 195 195 int retval; 196 196 197 197 exch = async_exchange_begin(vol->sess); 198 retval = async_req_1_2(exch, VOL_DISK_INFO, sid, &dcnt, <ype); 198 retval = async_req_1_3(exch, VOL_DISK_INFO, sid, &dcnt, <ype, 199 &flags); 199 200 async_exchange_end(exch); 200 201 … … 204 205 vinfo->dcnt = (label_disk_cnt_t)dcnt; 205 206 vinfo->ltype = (label_type_t)ltype; 207 vinfo->flags = (label_flags_t)flags; 206 208 return EOK; 207 209 } -
uspace/lib/c/include/types/label.h
r70815a24 rb7a4d06 58 58 #define LT_LIMIT (lt_gpt + 1) 59 59 60 /** Partition kind */ 61 typedef enum { 62 /** Primary partition */ 63 lpk_primary, 64 /** Extended partition */ 65 lpk_extended, 66 /** Logical partition */ 67 lpk_logical 68 } label_pkind_t; 69 70 /** Label flags */ 71 typedef enum { 72 /** Label supports extended (and logical) partitions */ 73 lf_ext_supp = 0x1, 74 /** Currently it is possible to create a primary partition */ 75 lf_can_create_pri = 0x2, 76 /** Currently it is possible to create an extended partition */ 77 lf_can_create_ext = 0x4, 78 /** Currrently it is possible to create a logical partition */ 79 lf_can_create_log = 0x8 80 } label_flags_t; 60 81 61 82 #endif -
uspace/lib/c/include/vbd.h
r70815a24 rb7a4d06 51 51 /** Label type */ 52 52 label_type_t ltype; 53 /** Label flags */ 54 label_flags_t flags; 53 55 /** First block that can be allocated */ 54 56 aoff64_t ablock0; … … 67 69 /** Number of blocks */ 68 70 aoff64_t nblocks; 71 /** Partition kind */ 72 label_pkind_t pkind; 69 73 /** Partition type */ 70 74 uint64_t ptype; … … 75 79 /** Partition index */ 76 80 int index; 81 /** Partition kind */ 82 label_pkind_t pkind; 77 83 /** First block */ 78 84 aoff64_t block0; -
uspace/lib/c/include/vol.h
r70815a24 rb7a4d06 53 53 /** Label type, if disk contents is label */ 54 54 label_type_t ltype; 55 /** Label flags */ 56 label_flags_t flags; 55 57 } vol_disk_info_t; 56 58
Note:
See TracChangeset
for help on using the changeset viewer.