Changeset b7fd2a0 in mainline for uspace/srv/fs/mfs/mfs_rw.c
- Timestamp:
- 2018-01-13T03:10:29Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- a53ed3a
- Parents:
- 36f0738
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/fs/mfs/mfs_rw.c
r36f0738 rb7fd2a0 34 34 #include "mfs.h" 35 35 36 static int36 static errno_t 37 37 rw_map_ondisk(uint32_t *b, const struct mfs_node *mnode, int rblock, 38 38 bool write_mode, uint32_t w_block); 39 39 40 static int40 static errno_t 41 41 reset_zone_content(struct mfs_instance *inst, uint32_t zone); 42 42 43 static int43 static errno_t 44 44 alloc_zone_and_clear(struct mfs_instance *inst, uint32_t *zone); 45 45 46 static int46 static errno_t 47 47 read_ind_zone(struct mfs_instance *inst, uint32_t zone, uint32_t **ind_zone); 48 48 49 static int49 static errno_t 50 50 write_ind_zone(struct mfs_instance *inst, uint32_t zone, uint32_t *ind_zone); 51 51 … … 61 61 * @return EOK on success or an error code. 62 62 */ 63 int63 errno_t 64 64 mfs_read_map(uint32_t *b, const struct mfs_node *mnode, uint32_t pos) 65 65 { 66 int r;66 errno_t r; 67 67 const struct mfs_sb_info *sbi = mnode->instance->sbi; 68 68 const int block_size = sbi->block_size; … … 83 83 } 84 84 85 int85 errno_t 86 86 mfs_write_map(struct mfs_node *mnode, const uint32_t pos, uint32_t new_zone, 87 87 uint32_t *old_zone) … … 100 100 } 101 101 102 static int102 static errno_t 103 103 rw_map_ondisk(uint32_t *b, const struct mfs_node *mnode, int rblock, 104 104 bool write_mode, uint32_t w_block) … … 107 107 int ptrs_per_block; 108 108 uint32_t *ind_zone = NULL, *ind2_zone = NULL; 109 int r = EOK;109 errno_t r = EOK; 110 110 111 111 struct mfs_ino_info *ino_i = mnode->ino_i; … … 238 238 * @return EOK on success or an error code. 239 239 */ 240 int240 errno_t 241 241 mfs_prune_ind_zones(struct mfs_node *mnode, size_t new_size) 242 242 { … … 245 245 struct mfs_ino_info *ino_i = mnode->ino_i; 246 246 int nr_direct, ptrs_per_block, rblock; 247 int r;247 errno_t r; 248 248 int i; 249 249 … … 312 312 } 313 313 314 static int314 static errno_t 315 315 reset_zone_content(struct mfs_instance *inst, uint32_t zone) 316 316 { 317 317 block_t *b; 318 int r;318 errno_t r; 319 319 320 320 r = block_get(&b, inst->service_id, zone, BLOCK_FLAGS_NOREAD); … … 328 328 } 329 329 330 static int330 static errno_t 331 331 alloc_zone_and_clear(struct mfs_instance *inst, uint32_t *zone) 332 332 { 333 int r;333 errno_t r; 334 334 335 335 r = mfs_alloc_zone(inst, zone); … … 341 341 } 342 342 343 static int343 static errno_t 344 344 read_ind_zone(struct mfs_instance *inst, uint32_t zone, uint32_t **ind_zone) 345 345 { 346 346 struct mfs_sb_info *sbi = inst->sbi; 347 int r;347 errno_t r; 348 348 unsigned i; 349 349 block_t *b; … … 376 376 } 377 377 378 static int378 static errno_t 379 379 write_ind_zone(struct mfs_instance *inst, uint32_t zone, uint32_t *ind_zone) 380 380 { 381 381 struct mfs_sb_info *sbi = inst->sbi; 382 int r;382 errno_t r; 383 383 unsigned i; 384 384 block_t *b;
Note:
See TracChangeset
for help on using the changeset viewer.