Changeset 3dbe4ca2 in mainline for uspace/srv/fs/fat/fat_ops.c
- Timestamp:
- 2011-04-29T11:10:24Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- ce8f4f4
- Parents:
- d260a95 (diff), 933cadf (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/fs/fat/fat_ops.c
rd260a95 r3dbe4ca2 55 55 #include <sys/mman.h> 56 56 #include <align.h> 57 #include <malloc.h> 57 58 58 59 #define FAT_NODE(node) ((node) ? (fat_node_t *) (node)->data : NULL) … … 724 725 (str_cmp((char *) d->name, FAT_NAME_DOT)) == 0) { 725 726 memset(d, 0, sizeof(fat_dentry_t)); 726 str_cpy((char *) d->name, 8, FAT_NAME_DOT);727 str_cpy((char *) d->ext, 3, FAT_EXT_PAD);727 memcpy(d->name, FAT_NAME_DOT, FAT_NAME_LEN); 728 memcpy(d->ext, FAT_EXT_PAD, FAT_EXT_LEN); 728 729 d->attr = FAT_ATTR_SUBDIR; 729 730 d->firstc = host2uint16_t_le(childp->firstc); … … 734 735 (str_cmp((char *) d->name, FAT_NAME_DOT_DOT) == 0)) { 735 736 memset(d, 0, sizeof(fat_dentry_t)); 736 str_cpy((char *) d->name, 8, FAT_NAME_DOT_DOT);737 str_cpy((char *) d->ext, 3, FAT_EXT_PAD);737 memcpy(d->name, FAT_NAME_DOT_DOT, FAT_NAME_LEN); 738 memcpy(d->ext, FAT_EXT_PAD, FAT_EXT_LEN); 738 739 d->attr = FAT_ATTR_SUBDIR; 739 740 d->firstc = (parentp->firstc == FAT_CLST_ROOT) ? … … 1002 1003 } 1003 1004 1004 /* Determining type of FAT */ 1005 if (FAT_IS_FAT12(bs)) { 1006 printf("Found FAT12 filesystem\n"); 1007 } else if (FAT_IS_FAT16(bs)) { 1008 printf("Found FAT16 filesystem\n"); 1009 } else { 1010 printf("FAT32 filesystem is not supported by FAT server.\n"); 1005 /* Return NOT SUPPORTED if try to mount FAT32 */ 1006 if (!FAT_IS_FAT12(bs) && !FAT_IS_FAT16(bs)) { 1011 1007 block_fini(devmap_handle); 1012 1008 async_answer_0(rid, ENOTSUP); … … 1017 1013 rc = fat_sanity_check(bs, devmap_handle); 1018 1014 if (rc != EOK) { 1019 printf("Sanity check failed\n");1020 1015 (void) block_cache_fini(devmap_handle); 1021 1016 block_fini(devmap_handle);
Note:
See TracChangeset
for help on using the changeset viewer.