Changes in uspace/srv/fs/mfs/mfs_balloc.c [1eaa3cf:b7fd2a0] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/fs/mfs/mfs_balloc.c
r1eaa3cf rb7fd2a0 38 38 const bool native, unsigned start_bit); 39 39 40 static int40 static errno_t 41 41 mfs_free_bit(struct mfs_instance *inst, uint32_t idx, bmap_id_t bid); 42 42 43 static int43 static errno_t 44 44 mfs_alloc_bit(struct mfs_instance *inst, uint32_t *idx, bmap_id_t bid); 45 45 46 static int46 static errno_t 47 47 mfs_count_free_bits(struct mfs_instance *inst, bmap_id_t bid, uint32_t *free); 48 48 … … 54 54 * the new inode will be saved. 55 55 * 56 * @return EOK on success or a negativeerror code.57 */ 58 int56 * @return EOK on success or an error code. 57 */ 58 errno_t 59 59 mfs_alloc_inode(struct mfs_instance *inst, uint32_t *inum) 60 60 { 61 int r = mfs_alloc_bit(inst, inum, BMAP_INODE);61 errno_t r = mfs_alloc_bit(inst, inum, BMAP_INODE); 62 62 return r; 63 63 } … … 68 68 * @param inum Number of the inode to free. 69 69 * 70 * @return EOK on success or a negativeerror code.71 */ 72 int70 * @return EOK on success or an error code. 71 */ 72 errno_t 73 73 mfs_free_inode(struct mfs_instance *inst, uint32_t inum) 74 74 { … … 82 82 * of the zone will be saved. 83 83 * 84 * @return EOK on success or a negativeerror code.85 */ 86 int84 * @return EOK on success or an error code. 85 */ 86 errno_t 87 87 mfs_alloc_zone(struct mfs_instance *inst, uint32_t *zone) 88 88 { 89 int r = mfs_alloc_bit(inst, zone, BMAP_ZONE);89 errno_t r = mfs_alloc_bit(inst, zone, BMAP_ZONE); 90 90 if (r != EOK) 91 91 return r; … … 105 105 * @param zone Index of the zone to free. 106 106 * 107 * @return EOK on success or a negativeerror code.108 */ 109 int107 * @return EOK on success or an error code. 108 */ 109 errno_t 110 110 mfs_free_zone(struct mfs_instance *inst, uint32_t zone) 111 111 { 112 int r;112 errno_t r; 113 113 114 114 zone -= inst->sbi->firstdatazone - 1; … … 132 132 * will be stored. 133 133 * 134 * @return EOK on success or a negativeerror code.135 */ 136 int134 * @return EOK on success or an error code. 135 */ 136 errno_t 137 137 mfs_count_free_zones(struct mfs_instance *inst, uint32_t *zones) 138 138 { … … 146 146 * will be stored. 147 147 * 148 * @return EOK on success or a negativeerror code.149 */ 150 151 int148 * @return EOK on success or an error code. 149 */ 150 151 errno_t 152 152 mfs_count_free_inodes(struct mfs_instance *inst, uint32_t *inodes) 153 153 { … … 162 162 * will be stores. 163 163 * 164 * @return EOK on success or a negativeerror code.165 */ 166 static int164 * @return EOK on success or an error code. 165 */ 166 static errno_t 167 167 mfs_count_free_bits(struct mfs_instance *inst, bmap_id_t bid, uint32_t *free) 168 168 { 169 int r;169 errno_t r; 170 170 unsigned start_block; 171 171 unsigned long nblocks; … … 226 226 * BMAP_INODE if operating on the inode's bitmap. 227 227 * 228 * @return EOK on success or a negativeerror code.229 */ 230 static int228 * @return EOK on success or an error code. 229 */ 230 static errno_t 231 231 mfs_free_bit(struct mfs_instance *inst, uint32_t idx, bmap_id_t bid) 232 232 { 233 233 struct mfs_sb_info *sbi; 234 int r;234 errno_t r; 235 235 unsigned start_block; 236 236 unsigned *search; … … 246 246 printf(NAME ": Error! Trying to free beyond the " 247 247 "bitmap max size\n"); 248 return -1;248 return EIO; 249 249 } 250 250 } else { … … 254 254 printf(NAME ": Error! Trying to free beyond the " 255 255 "bitmap max size\n"); 256 return -1;256 return EIO; 257 257 } 258 258 } … … 293 293 * BMAP_INODE if operating on the inode's bitmap. 294 294 * 295 * @return EOK on success or a negativeerror code.296 */ 297 static int295 * @return EOK on success or an error code. 296 */ 297 static errno_t 298 298 mfs_alloc_bit(struct mfs_instance *inst, uint32_t *idx, bmap_id_t bid) 299 299 { … … 303 303 unsigned *search, i, start_block; 304 304 unsigned bits_per_block; 305 int r, freebit; 305 errno_t r; 306 int freebit; 306 307 307 308 sbi = inst->sbi;
Note:
See TracChangeset
for help on using the changeset viewer.