Changeset 8227d63 in mainline for uspace/lib/fdisk/include/types/fdisk.h
- Timestamp:
- 2015-06-22T21:20:23Z (9 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 1356f85a
- Parents:
- e96047c
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/fdisk/include/types/fdisk.h
re96047c r8227d63 41 41 #include <stdint.h> 42 42 43 typedef enum { 44 cu_byte = 0, 45 cu_kbyte, 46 cu_mbyte, 47 cu_gbyte, 48 cu_tbyte, 49 cu_pbyte, 50 cu_ebyte, 51 cu_zbyte, 52 cu_ybyte 53 } fdisk_cunit_t; 54 55 #define CU_LIMIT (cu_ybyte + 1) 56 57 /** File system type */ 58 typedef enum { 59 fdfs_none = 0, 60 fdfs_unknown, 61 fdfs_exfat, 62 fdfs_fat, 63 fdfs_minix, 64 fdfs_ext4 65 } fdisk_fstype_t; 66 67 /** Highest fstype value + 1 */ 68 #define FDFS_LIMIT (fdfs_ext4 + 1) 69 /** Lowest fstype allowed for creation */ 70 #define FDFS_CREATE_LO fdfs_exfat 71 /** Highest fstype allowed for creation + 1 */ 72 #define FDFS_CREATE_HI (fdfs_ext4 + 1) 73 74 /** Partition capacity */ 75 typedef struct { 76 uint64_t value; 77 fdisk_cunit_t cunit; 78 } fdisk_cap_t; 79 43 80 /** List of devices available for managing by fdisk */ 44 81 typedef struct { … … 70 107 } fdisk_label_type_t; 71 108 109 /** Highest label type + 1 */ 110 #define FDL_LIMIT (fdl_gpt + 1) 111 /** Lowest label type allowed for creation */ 112 #define FDL_CREATE_LO fdl_mbr 113 /** Highest label type allowed for creation + 1 */ 114 #define FDL_CREATE_HI (fdl_gpt + 1) 115 72 116 /** Open fdisk device */ 73 117 typedef struct { 118 /** Label type */ 74 119 fdisk_label_type_t ltype; 120 /** Partitions */ 121 list_t parts; /* of fdisk_part_t */ 122 /** Service ID */ 123 service_id_t sid; 75 124 } fdisk_dev_t; 76 125 … … 82 131 /** Partition */ 83 132 typedef struct { 133 /** Containing device */ 134 fdisk_dev_t *dev; 135 /** Link to fdisk_dev_t.parts */ 136 link_t ldev; 137 /** Capacity */ 138 fdisk_cap_t capacity; 139 /** File system type */ 140 fdisk_fstype_t fstype; 84 141 } fdisk_part_t; 85 86 typedef enum {87 cu_byte = 0,88 cu_kbyte,89 cu_mbyte,90 cu_gbyte,91 cu_tbyte,92 cu_pbyte,93 cu_ebyte,94 cu_zbyte,95 cu_ybyte96 } fdisk_cunit_t;97 98 /** Partition capacity */99 typedef struct {100 uint64_t value;101 fdisk_cunit_t cunit;102 } fdisk_cap_t;103 142 104 143 /** Specification of new partition */ 105 144 typedef struct { 106 } fdisk_partspec_t; 145 /** Desired capacity */ 146 fdisk_cap_t capacity; 147 /** File system type */ 148 fdisk_fstype_t fstype; 149 } fdisk_part_spec_t; 150 151 /** Partition info */ 152 typedef struct { 153 fdisk_cap_t capacity; 154 /** File system type */ 155 fdisk_fstype_t fstype; 156 } fdisk_part_info_t; 107 157 108 158 #endif
Note:
See TracChangeset
for help on using the changeset viewer.