Changeset edebb4a1 in mainline for uspace/lib/c
- Timestamp:
- 2015-10-14T22:30:12Z (10 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- ea0ff6b
- Parents:
- 4b6635a7
- Location:
- uspace/lib/c
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/generic/vol.c
r4b6635a7 redebb4a1 188 188 } 189 189 190 /** Add partition. 191 * 192 * After a partition is created (e.g. as a result of deleting a label 193 * the dummy partition is created), it can take some (unknown) time 194 * until it is discovered. 195 */ 196 int vol_part_add(vol_t *vol, service_id_t sid) 197 { 198 async_exch_t *exch; 199 int retval; 200 201 exch = async_exchange_begin(vol->sess); 202 retval = async_req_1_0(exch, VOL_PART_ADD, sid); 203 async_exchange_end(exch); 204 205 if (retval != EOK) 206 return retval; 207 208 return EOK; 209 } 210 190 211 /** Get partition information. */ 191 212 int vol_part_info(vol_t *vol, service_id_t sid, vol_part_info_t *vinfo) -
uspace/lib/c/include/ipc/vol.h
r4b6635a7 redebb4a1 38 38 typedef enum { 39 39 VOL_GET_PARTS = IPC_FIRST_USER_METHOD, 40 VOL_PART_ADD, 40 41 VOL_PART_INFO, 41 42 VOL_PART_EMPTY -
uspace/lib/c/include/types/label.h
r4b6635a7 redebb4a1 81 81 /** Currently it is possible to create an extended partition */ 82 82 lf_can_create_ext = 0x8, 83 /** Currrently it is possible to create a logical partition */ 84 lf_can_create_log = 0x10 83 /** Currently it is possible to create a logical partition */ 84 lf_can_create_log = 0x10, 85 /** Currently it is possible to delete a partition */ 86 lf_can_delete_part = 0x20 85 87 } label_flags_t; 86 88 -
uspace/lib/c/include/types/vol.h
r4b6635a7 redebb4a1 55 55 #define VOL_FSTYPE_LIMIT (fs_ext4 + 1) 56 56 57 /** Volume service */ 58 typedef struct vol { 59 /** Volume service session */ 60 async_sess_t *sess; 61 } vol_t; 62 63 /** Partition information */ 64 typedef struct { 65 /** Partition content type */ 66 vol_part_cnt_t pcnt; 67 /** Filesystem type */ 68 vol_fstype_t fstype; 69 } vol_part_info_t; 70 57 71 #endif 58 72 -
uspace/lib/c/include/vol.h
r4b6635a7 redebb4a1 42 42 #include <types/vol.h> 43 43 44 /** Volume service */45 typedef struct vol {46 /** Volume service session */47 async_sess_t *sess;48 } vol_t;49 50 /** Partition information */51 typedef struct {52 /** Partition content type */53 vol_part_cnt_t pcnt;54 /** Filesystem type */55 vol_fstype_t fstype;56 } vol_part_info_t;57 58 44 extern int vol_create(vol_t **); 59 45 extern void vol_destroy(vol_t *); 60 46 extern int vol_get_parts(vol_t *, service_id_t **, size_t *); 47 extern int vol_part_add(vol_t *, service_id_t); 61 48 extern int vol_part_info(vol_t *, service_id_t, vol_part_info_t *); 62 49 extern int vol_part_empty(vol_t *, service_id_t);
Note:
See TracChangeset
for help on using the changeset viewer.