Changes in uspace/lib/fdisk/include/types/fdisk.h [6c4eedf:9c2c7d2] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/fdisk/include/types/fdisk.h
r6c4eedf r9c2c7d2 38 38 39 39 #include <adt/list.h> 40 #include <cap.h>41 40 #include <loc.h> 42 41 #include <stdint.h> … … 44 43 #include <types/vol.h> 45 44 #include <vbd.h> 45 46 /** Capacity unit */ 47 typedef enum { 48 cu_byte = 0, 49 cu_kbyte, 50 cu_mbyte, 51 cu_gbyte, 52 cu_tbyte, 53 cu_pbyte, 54 cu_ebyte, 55 cu_zbyte, 56 cu_ybyte 57 } fdisk_cunit_t; 58 59 /** Which of values within the precision of the capacity */ 60 typedef enum { 61 /** The nominal (middling) value */ 62 fcv_nom, 63 /** The minimum value */ 64 fcv_min, 65 /** The maximum value */ 66 fcv_max 67 } fdisk_cvsel_t; 46 68 47 69 typedef enum { … … 63 85 64 86 #define CU_LIMIT (cu_ybyte + 1) 87 88 /** Partition capacity. 89 * 90 * Partition capacity represents both value and precision. 91 * It is a decimal floating point value combined with a decimal 92 * capacity unit. There is an integer mantisa @c m which in combination 93 * with the number of decimal positions @c dp gives a decimal floating-point 94 * number. E.g. for m = 1025 and dp = 2 the number is 10.25. If the unit 95 * cunit = cu_kbyte, the capacity is 10.25 kByte, i.e. 10 250 bytes. 96 * 97 * Note that 1.000 kByte is equivalent to 1000 Byte, but 1 kByte is less 98 * precise. 99 */ 100 typedef struct { 101 /** Mantisa */ 102 uint64_t m; 103 /** Decimal positions */ 104 unsigned dp; 105 /** Capacity unit */ 106 fdisk_cunit_t cunit; 107 } fdisk_cap_t; 65 108 66 109 /** List of devices available for managing by fdisk */ … … 126 169 link_t llog_ba; 127 170 /** Capacity */ 128 cap_spec_t capacity;171 fdisk_cap_t capacity; 129 172 /** Partition kind */ 130 173 label_pkind_t pkind; … … 150 193 typedef struct { 151 194 /** Desired capacity */ 152 cap_spec_t capacity;195 fdisk_cap_t capacity; 153 196 /** Partition kind */ 154 197 label_pkind_t pkind; … … 162 205 typedef struct { 163 206 /** Capacity */ 164 cap_spec_t capacity;207 fdisk_cap_t capacity; 165 208 /** Partition kind */ 166 209 label_pkind_t pkind;
Note:
See TracChangeset
for help on using the changeset viewer.