Changeset 3faa03d in mainline for uspace/lib/label/include/types/liblabel.h
- Timestamp:
- 2015-07-02T16:30:16Z (9 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 1626cd4
- Parents:
- 78d50bd
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/label/include/types/liblabel.h
r78d50bd r3faa03d 42 42 #include <vol.h> 43 43 44 typedef struct label label_t; 45 typedef struct label_part label_part_t; 46 typedef struct label_part_info label_part_info_t; 47 typedef struct label_part_spec label_part_spec_t; 48 49 /** Ops for individual label type */ 50 typedef struct { 51 int (*open)(service_id_t, label_t **); 52 int (*create)(service_id_t, label_t **); 53 void (*close)(label_t *); 54 int (*destroy)(label_t *); 55 label_part_t *(*part_first)(label_t *); 56 label_part_t *(*part_next)(label_part_t *); 57 void (*part_get_info)(label_part_t *, label_part_info_t *); 58 int (*part_create)(label_t *, label_part_spec_t *, label_part_t **); 59 int (*part_destroy)(label_part_t *); 60 } label_ops_t; 61 44 62 typedef struct { 45 63 /** Disk contents */ … … 49 67 } label_info_t; 50 68 51 typedef struct{69 struct label_part_info { 52 70 /** Address of first block */ 53 71 aoff64_t block0; 54 72 /** Number of blocks */ 55 73 aoff64_t nblocks; 56 } label_part_info_t;74 }; 57 75 58 76 /** Partition */ 59 typedef struct {77 struct label_part { 60 78 /** Containing label */ 61 79 struct label *label; 62 80 /** Link to label_t.parts */ 63 81 link_t llabel; 64 } label_part_t; 82 aoff64_t block0; 83 aoff64_t nblocks; 84 }; 65 85 66 86 /** Specification of new partition */ 67 typedef struct{68 } label_part_spec_t;87 struct label_part_spec { 88 }; 69 89 70 90 /** Label instance */ 71 typedef struct label { 91 struct label { 92 /** Label type ops */ 93 label_ops_t *ops; 94 /** Label type */ 95 label_type_t ltype; 72 96 /** Partitions */ 73 97 list_t parts; /* of label_part_t */ 74 } label_t;98 }; 75 99 76 100 #endif
Note:
See TracChangeset
for help on using the changeset viewer.