Changeset d70d80ed in mainline
- Timestamp:
- 2010-11-27T17:51:00Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- ea28272, f0e1ac9
- Parents:
- a6ba0c9
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/fs/fat/fat_fat.c
ra6ba0c9 rd70d80ed 671 671 int rc; 672 672 673 printf("fat_sanity_check() begin\n");674 675 673 /* Check number of FATs. */ 676 674 if (bs->fatcnt == 0) … … 679 677 /* Check total number of sectors. */ 680 678 681 printf("fat_sanity_check() totsec\n");682 683 679 if (bs->totsec16 == 0 && bs->totsec32 == 0) 684 680 return ENOTSUP; 685 686 printf("fat_sanity_check() totsec16 vs 32\n");687 681 688 682 if (bs->totsec16 != 0 && bs->totsec32 != 0 && … … 690 684 return ENOTSUP; 691 685 692 printf("fat_sanity_check() media descriptor\n");693 694 686 /* Check media descriptor. Must be between 0xf0 and 0xff. */ 695 687 if ((bs->mdesc & 0xf0) != 0xf0) 696 688 return ENOTSUP; 697 689 698 printf("fat_sanity_check() sec_pre_fat\n");699 700 690 /* Check number of sectors per FAT. */ 701 691 if (bs->sec_per_fat == 0) 702 692 return ENOTSUP; 703 704 printf("fat_sanity_check() root dir size\n");705 693 706 694 /* … … 717 705 /* Check signature of each FAT. */ 718 706 719 printf("fat_sanity_check() FAT signatures\n");720 721 707 for (fat_no = 0; fat_no < bs->fatcnt; fat_no++) { 722 printf("fat_sanity_check() read cluster 0\n");723 708 rc = fat_get_cluster(bs, devmap_handle, fat_no, 0, &e0); 724 709 if (rc != EOK) 725 710 return EIO; 726 711 727 printf("fat_sanity_check() read cluster 1\n");728 712 rc = fat_get_cluster(bs, devmap_handle, fat_no, 1, &e1); 729 713 if (rc != EOK) 730 714 return EIO; 731 715 732 printf("fat_sanity_check() check FAT mdesc\n");733 716 /* Check that first byte of FAT contains the media descriptor. */ 734 717 if ((e0 & 0xff) != bs->mdesc) 735 718 return ENOTSUP; 736 737 printf("fat_sanity_check() e0/e1\n");738 719 739 720 /* … … 744 725 return ENOTSUP; 745 726 } 746 printf("fat_sanity_check() succeeded\n");747 727 748 728 return EOK;
Note:
See TracChangeset
for help on using the changeset viewer.