Changeset 94e3a03 in mainline
- Timestamp:
- 2017-12-09T21:15:26Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- c81132d
- Parents:
- bd253241
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/fs/cdfs/cdfs_ops.c
rbd253241 r94e3a03 963 963 964 964 /** Read the volume descriptors. */ 965 static booliso_read_vol_desc(service_id_t sid, cdfs_lba_t altroot,965 static int iso_read_vol_desc(service_id_t sid, cdfs_lba_t altroot, 966 966 uint32_t *rlba, uint32_t *rsize, cdfs_enc_t *enc, char **vol_ident) 967 967 { … … 970 970 int rc = block_get(&block, sid, altroot + 16, BLOCK_FLAGS_NONE); 971 971 if (rc != EOK) 972 return false;972 return rc; 973 973 974 974 cdfs_vol_desc_t *vol_desc = (cdfs_vol_desc_t *) block->data; … … 982 982 (vol_desc->version != 1)) { 983 983 block_put(block); 984 return false;984 return ENOTSUP; 985 985 } 986 986 … … 1002 1002 */ 1003 1003 block_put(block); 1004 return false;1004 return ENOTSUP; 1005 1005 } 1006 1006 … … 1008 1008 if (block_size != BLOCK_SIZE) { 1009 1009 block_put(block); 1010 return false;1010 return ENOTSUP; 1011 1011 } 1012 1012 … … 1033 1033 1034 1034 block_put(block); 1035 return true;1036 } 1037 1038 static booliso_readfs(cdfs_t *fs, fs_node_t *rfn,1035 return EOK; 1036 } 1037 1038 static int iso_readfs(cdfs_t *fs, fs_node_t *rfn, 1039 1039 cdfs_lba_t altroot) 1040 1040 { 1041 1041 cdfs_node_t *node = CDFS_NODE(rfn); 1042 1042 1043 if (!iso_read_vol_desc(fs->service_id, altroot, &node->lba, 1044 &node->size, &fs->enc, &fs->vol_ident)) 1045 return false; 1043 int rc = iso_read_vol_desc(fs->service_id, altroot, &node->lba, 1044 &node->size, &fs->enc, &fs->vol_ident); 1045 if (rc != EOK) 1046 return rc; 1046 1047 1047 1048 return cdfs_readdir(fs, rfn); … … 1074 1075 1075 1076 /* Check if there is cdfs in given session */ 1076 if ( !iso_readfs(fs, rfn, altroot))1077 if (iso_readfs(fs, rfn, altroot) != EOK) 1077 1078 goto error; 1078 1079 … … 1127 1128 uint32_t rsize; 1128 1129 cdfs_enc_t enc; 1129 if (!iso_read_vol_desc(service_id, altroot, &rlba, &rsize, &enc, 1130 &vol_ident)) { 1130 rc = iso_read_vol_desc(service_id, altroot, &rlba, &rsize, &enc, 1131 &vol_ident); 1132 if (rc != EOK) { 1131 1133 block_cache_fini(service_id); 1132 1134 block_fini(service_id); 1133 return EIO;1135 return rc; 1134 1136 } 1135 1137
Note:
See TracChangeset
for help on using the changeset viewer.