Changeset 73b1218 in mainline
- Timestamp:
- 2011-07-16T18:56:58Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 1f78546
- Parents:
- 27678a0
- Location:
- uspace/srv/fs/exfat
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/fs/exfat/exfat_directory.c
r27678a0 r73b1218 179 179 } 180 180 181 182 int exfat_directory_read_file(exfat_directory_t *di, char *name, exfat_file_dentry_t *df, exfat_stream_dentry_t *ds) 183 { 184 uint16_t wname[EXFAT_FILENAME_LEN+1]; 185 exfat_dentry_t *d = NULL; 186 int rc, i; 187 size_t offset = 0; 188 189 rc = exfat_directory_find(di, EXFAT_DENTRY_FILE, &d); 190 if (rc != EOK) 191 return rc; 192 *df = d->file; 193 194 rc = exfat_directory_next(di); 195 if (rc != EOK) 196 return rc; 197 rc = exfat_directory_get(di, &d); 198 if (rc != EOK) 199 return rc; 200 if (exfat_classify_dentry(d) != EXFAT_DENTRY_STREAM) 201 return ENOENT; 202 *ds = d->stream; 203 /* 204 if (ds->name_size > EXFAT_FILENAME_LEN) 205 return EOVERFLOW; 206 */ 207 for (i=0; i<df->count-1; i++) { 208 rc = exfat_directory_next(di); 209 if (rc != EOK) 210 return rc; 211 rc = exfat_directory_get(di, &d); 212 if (rc != EOK) 213 return rc; 214 if (exfat_classify_dentry(d) != EXFAT_DENTRY_NAME) 215 return ENOENT; 216 exfat_dentry_get_name(&d->name, ds->name_size, wname, &offset); 217 } 218 rc = utf16_to_str(name, EXFAT_FILENAME_LEN, wname); 219 if (rc != EOK) 220 return rc; 221 222 return EOK; 223 } 224 225 181 226 /** 182 227 * @} -
uspace/srv/fs/exfat/exfat_directory.h
r27678a0 r73b1218 63 63 exfat_dentry_clsf_t type, exfat_dentry_t **d); 64 64 65 extern int exfat_directory_read_file(exfat_directory_t *di, char *name, exfat_file_dentry_t *df, 66 exfat_stream_dentry_t *ds); 67 68 65 69 extern int exfat_directory_expand(exfat_directory_t *di); 66 70 extern int exfat_directory_lookup_free(exfat_directory_t *di, size_t count);
Note:
See TracChangeset
for help on using the changeset viewer.