Changes in uspace/srv/fs/mfs/mfs_balloc.c [b7fd2a0:1eaa3cf] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/fs/mfs/mfs_balloc.c
rb7fd2a0 r1eaa3cf 38 38 const bool native, unsigned start_bit); 39 39 40 static errno_t40 static int 41 41 mfs_free_bit(struct mfs_instance *inst, uint32_t idx, bmap_id_t bid); 42 42 43 static errno_t43 static int 44 44 mfs_alloc_bit(struct mfs_instance *inst, uint32_t *idx, bmap_id_t bid); 45 45 46 static errno_t46 static int 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 nerror code.57 */ 58 errno_t56 * @return EOK on success or a negative error code. 57 */ 58 int 59 59 mfs_alloc_inode(struct mfs_instance *inst, uint32_t *inum) 60 60 { 61 errno_t r = mfs_alloc_bit(inst, inum, BMAP_INODE);61 int 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 nerror code.71 */ 72 errno_t70 * @return EOK on success or a negative error code. 71 */ 72 int 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 nerror code.85 */ 86 errno_t84 * @return EOK on success or a negative error code. 85 */ 86 int 87 87 mfs_alloc_zone(struct mfs_instance *inst, uint32_t *zone) 88 88 { 89 errno_t r = mfs_alloc_bit(inst, zone, BMAP_ZONE);89 int 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 nerror code.108 */ 109 errno_t107 * @return EOK on success or a negative error code. 108 */ 109 int 110 110 mfs_free_zone(struct mfs_instance *inst, uint32_t zone) 111 111 { 112 errno_t r;112 int r; 113 113 114 114 zone -= inst->sbi->firstdatazone - 1; … … 132 132 * will be stored. 133 133 * 134 * @return EOK on success or a nerror code.135 */ 136 errno_t134 * @return EOK on success or a negative error code. 135 */ 136 int 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 nerror code.149 */ 150 151 errno_t148 * @return EOK on success or a negative error code. 149 */ 150 151 int 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 nerror code.165 */ 166 static errno_t164 * @return EOK on success or a negative error code. 165 */ 166 static int 167 167 mfs_count_free_bits(struct mfs_instance *inst, bmap_id_t bid, uint32_t *free) 168 168 { 169 errno_t r;169 int 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 nerror code.229 */ 230 static errno_t228 * @return EOK on success or a negative error code. 229 */ 230 static int 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 errno_t r;234 int 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 EIO;248 return -1; 249 249 } 250 250 } else { … … 254 254 printf(NAME ": Error! Trying to free beyond the " 255 255 "bitmap max size\n"); 256 return EIO;256 return -1; 257 257 } 258 258 } … … 293 293 * BMAP_INODE if operating on the inode's bitmap. 294 294 * 295 * @return EOK on success or a nerror code.296 */ 297 static errno_t295 * @return EOK on success or a negative error code. 296 */ 297 static int 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 errno_t r; 306 int freebit; 305 int r, freebit; 307 306 308 307 sbi = inst->sbi;
Note:
See TracChangeset
for help on using the changeset viewer.