Changeset 0ecfc62 in mainline for uspace/lib
- 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/lib
- Files:
-
- 9 edited
-
c/generic/vol.c (modified) (1 diff)
-
c/include/types/label.h (modified) (1 diff)
-
c/include/vol.h (modified) (1 diff)
-
fdisk/include/types/fdisk.h (modified) (2 diffs)
-
fdisk/src/fdisk.c (modified) (3 diffs)
-
label/include/types/liblabel.h (modified) (1 diff)
-
label/src/dummy.c (modified) (1 diff)
-
label/src/gpt.c (modified) (1 diff)
-
label/src/mbr.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/generic/vol.c
r372df8f r0ecfc62 192 192 { 193 193 async_exch_t *exch; 194 sysarg_t dcnt, ltype, flags;195 i nt retval;194 sysarg_t retval; 195 ipc_call_t answer; 196 196 197 197 exch = async_exchange_begin(vol->sess); 198 retval = async_req_1_3(exch, VOL_PART_INFO, sid, &dcnt, <ype,199 &flags);198 aid_t req = async_send_1(exch, VOL_PART_INFO, sid, &answer); 199 int rc = async_data_read_start(exch, vinfo, sizeof(vol_part_info_t)); 200 200 async_exchange_end(exch); 201 201 202 if (rc != EOK) { 203 async_forget(req); 204 return EIO; 205 } 206 207 async_wait_for(req, &retval); 202 208 if (retval != EOK) 203 209 return EIO; 204 210 205 vinfo->dcnt = (label_disk_cnt_t)dcnt;206 vinfo->ltype = (label_type_t)ltype;207 vinfo->flags = (label_flags_t)flags;208 211 return EOK; 209 212 } -
uspace/lib/c/include/types/label.h
r372df8f r0ecfc62 38 38 #include <types/uuid.h> 39 39 40 /** Diskcontents */40 /** Partition contents */ 41 41 typedef enum { 42 /** Disk is considered empty */ 43 dc_empty = 0, 44 /** Disk contains a recognized label */ 45 dc_label, 46 /** Disk contains a recognized filesystem */ 47 dc_fs, 48 /** Disk contains unrecognized data */ 49 dc_unknown 50 } label_disk_cnt_t; 42 /** Partition is considered empty */ 43 ptc_empty = 0, 44 /** Partition contains a recognized filesystem */ 45 ptc_fs, 46 /** Partition contains unrecognized data */ 47 ptc_unknown 48 } label_part_cnt_t; 51 49 52 50 /** Disk label type */ -
uspace/lib/c/include/vol.h
r372df8f r0ecfc62 47 47 } vol_t; 48 48 49 typedef enum { 50 /** Partition is empty */ 51 vpc_empty, 52 /** Partition contains a recognized filesystem */ 53 vpc_fs, 54 /** Partition contains unrecognized data */ 55 vpc_unknown 56 } vol_part_cnt_t; 57 58 /** File system type */ 59 typedef enum { 60 fs_exfat, 61 fs_fat, 62 fs_minix, 63 fs_ext4 64 } vol_fstype_t; 65 49 66 /** Partition information */ 50 67 typedef struct { 51 /** Partition contents */ 52 label_disk_cnt_t dcnt; 53 /** Label type, if partition contents is label XXX */ 54 label_type_t ltype; 55 /** Label flags */ 56 label_flags_t flags; 68 /** Partition content type */ 69 vol_part_cnt_t pcnt; 70 /** Filesystem type */ 71 vol_fstype_t fstype; 57 72 } vol_part_info_t; 58 73 -
uspace/lib/fdisk/include/types/fdisk.h
r372df8f r0ecfc62 102 102 /** Fdisk instance */ 103 103 struct fdisk *fdisk; 104 /** Disk contents */105 label_disk_cnt_t dcnt;106 104 /** Service ID */ 107 105 service_id_t sid; … … 123 121 124 122 typedef struct { 125 /** Disk contents */126 label_disk_cnt_t dcnt;127 123 /** Label type */ 128 124 label_type_t ltype; -
uspace/lib/fdisk/src/fdisk.c
r372df8f r0ecfc62 388 388 } 389 389 390 dev->dcnt = dc_label;391 392 390 printf("get label info\n"); 393 391 rc = fdisk_update_dev_info(dev); … … 486 484 } 487 485 488 info->dcnt = dc_label;489 486 info->ltype = vinfo.ltype; 490 487 info->flags = vinfo.flags; … … 526 523 return EIO; 527 524 528 dev->dcnt = dc_empty;529 525 return EOK; 530 526 } -
uspace/lib/label/include/types/liblabel.h
r372df8f r0ecfc62 65 65 66 66 struct label_info { 67 /** Disk contents */68 label_disk_cnt_t dcnt;69 67 /** Label type */ 70 68 label_type_t ltype; -
uspace/lib/label/src/dummy.c
r372df8f r0ecfc62 157 157 { 158 158 memset(linfo, 0, sizeof(label_info_t)); 159 linfo->dcnt = dc_label;160 159 linfo->ltype = lt_none; 161 160 linfo->flags = 0; -
uspace/lib/label/src/gpt.c
r372df8f r0ecfc62 547 547 { 548 548 memset(linfo, 0, sizeof(label_info_t)); 549 linfo->dcnt = dc_label;550 549 linfo->ltype = lt_gpt; 551 550 linfo->flags = lf_ptype_uuid; /* Partition type is in UUID format */ -
uspace/lib/label/src/mbr.c
r372df8f r0ecfc62 402 402 { 403 403 memset(linfo, 0, sizeof(label_info_t)); 404 linfo->dcnt = dc_label;405 404 linfo->ltype = lt_mbr; 406 405
Note:
See TracChangeset
for help on using the changeset viewer.
