Changeset 8e77b12f in mainline
- Timestamp:
- 2014-08-04T17:35:40Z (10 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- d4b63fa
- Parents:
- f2f4c00
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/fs/cdfs/cdfs_ops.c
rf2f4c00 r8e77b12f 66 66 #define CDFS_STANDARD_IDENT "CD001" 67 67 68 enum { 69 CDFS_NAME_CURDIR = '\x00', 70 CDFS_NAME_PARENTDIR = '\x01' 71 }; 72 68 73 typedef enum { 69 74 VOL_DESC_BOOT = 0, … … 409 414 return false; 410 415 411 cdfs_dir_t *dir = (cdfs_dir_t *) block->data;416 cdfs_dir_t *dir; 412 417 413 // FIXME: skip '.' and '..' 414 415 for (size_t offset = 0; 416 (dir->length != 0) && (offset < BLOCK_SIZE); 418 for (size_t offset = 0; offset < BLOCK_SIZE; 417 419 offset += dir->length) { 418 420 dir = (cdfs_dir_t *) (block->data + offset); 421 if (dir->length == 0) 422 break; 423 if (offset + dir->length > BLOCK_SIZE) { 424 /* XXX Incorrect FS structure */ 425 break; 426 } 419 427 420 428 cdfs_dentry_type_t dentry_type; … … 423 431 else 424 432 dentry_type = CDFS_FILE; 433 434 /* Skip special entries */ 435 436 if (dir->name_length == 1 && 437 dir->name[0] == CDFS_NAME_CURDIR) 438 continue; 439 if (dir->name_length == 1 && 440 dir->name[0] == CDFS_NAME_PARENTDIR) 441 continue; 425 442 426 443 // FIXME: hack - indexing by dentry byte offset on disc
Note:
See TracChangeset
for help on using the changeset viewer.