Changeset 46c20c8 in mainline for uspace/srv/fs/fat/fat.h
- Timestamp:
- 2010-11-26T20:08:10Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 45df59a
- Parents:
- fb150d78 (diff), ffdd2b9 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/fs/fat/fat.h
rfb150d78 r46c20c8 48 48 49 49 #define min(a, b) ((a) < (b) ? (a) : (b)) 50 51 /* 52 * Convenience macros for accessing some frequently used boot sector members. 53 */ 54 #define BPS(bs) uint16_t_le2host((bs)->bps) 55 #define SPC(bs) (bs)->spc 56 #define RSCNT(bs) uint16_t_le2host((bs)->rscnt) 57 #define FATCNT(bs) (bs)->fatcnt 58 #define SF(bs) uint16_t_le2host((bs)->sec_per_fat) 59 #define RDE(bs) uint16_t_le2host((bs)->root_ent_max) 60 #define TS(bs) (uint16_t_le2host((bs)->totsec16) != 0 ? \ 61 uint16_t_le2host((bs)->totsec16) : \ 62 uint32_t_le2host(bs->totsec32)) 50 63 51 64 #define BS_BLOCK 0 … … 89 102 uint16_t signature; 90 103 } __attribute__ ((packed)); 91 struct fat32{104 struct { 92 105 /* FAT32 only */ 93 106 /** Sectors per FAT. */ … … 119 132 /** Signature. */ 120 133 uint16_t signature; 121 } __attribute__ ((packed));122 }; 134 } fat32 __attribute__ ((packed)); 135 }; 123 136 } __attribute__ ((packed)) fat_bs_t; 124 137 … … 163 176 164 177 fibril_mutex_t lock; 165 dev _handle_t dev_handle;178 devmap_handle_t devmap_handle; 166 179 fs_index_t index; 167 180 /** … … 194 207 /** FAT in-core node free list link. */ 195 208 link_t ffn_link; 196 size_tsize;209 aoff64_t size; 197 210 unsigned lnkcnt; 198 211 unsigned refcnt; 199 212 bool dirty; 213 214 /* 215 * Cache of the node's last and "current" cluster to avoid some 216 * unnecessary FAT walks. 217 */ 218 /* Node's last cluster in FAT. */ 219 bool lastc_cached_valid; 220 fat_cluster_t lastc_cached_value; 221 /* Node's "current" cluster, i.e. where the last I/O took place. */ 222 bool currc_cached_valid; 223 aoff64_t currc_cached_bn; 224 fat_cluster_t currc_cached_value; 200 225 } fat_node_t; 201 226 … … 217 242 extern void fat_sync(ipc_callid_t, ipc_call_t *); 218 243 219 extern int fat_idx_get_new(fat_idx_t **, dev _handle_t);220 extern fat_idx_t *fat_idx_get_by_pos(dev _handle_t, fat_cluster_t, unsigned);221 extern fat_idx_t *fat_idx_get_by_index(dev _handle_t, fs_index_t);244 extern int fat_idx_get_new(fat_idx_t **, devmap_handle_t); 245 extern fat_idx_t *fat_idx_get_by_pos(devmap_handle_t, fat_cluster_t, unsigned); 246 extern fat_idx_t *fat_idx_get_by_index(devmap_handle_t, fs_index_t); 222 247 extern void fat_idx_destroy(fat_idx_t *); 223 248 extern void fat_idx_hashin(fat_idx_t *); … … 226 251 extern int fat_idx_init(void); 227 252 extern void fat_idx_fini(void); 228 extern int fat_idx_init_by_dev _handle(dev_handle_t);229 extern void fat_idx_fini_by_dev _handle(dev_handle_t);253 extern int fat_idx_init_by_devmap_handle(devmap_handle_t); 254 extern void fat_idx_fini_by_devmap_handle(devmap_handle_t); 230 255 231 256 #endif
Note:
See TracChangeset
for help on using the changeset viewer.