Changeset 395df52 in mainline for uspace/srv/fs/exfat/exfat_ops.c


Ignore:
Timestamp:
2017-05-12T19:58:27Z (7 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
e48947e
Parents:
de5b708
Message:

Probing for ExFAT, Ext4 and CDFS.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/fs/exfat/exfat_ops.c

    rde5b708 r395df52  
    10531053static int exfat_fsprobe(service_id_t service_id, vfs_fs_probe_info_t *info)
    10541054{
    1055         return ENOTSUP;
     1055        int rc;
     1056        exfat_bs_t *bs;
     1057
     1058        /* initialize libblock */
     1059        rc = block_init(service_id, BS_SIZE);
     1060        if (rc != EOK)
     1061                return rc;
     1062
     1063        /* prepare the boot block */
     1064        rc = block_bb_read(service_id, BS_BLOCK);
     1065        if (rc != EOK) {
     1066                block_fini(service_id);
     1067                return rc;
     1068        }
     1069
     1070        /* get the buffer with the boot sector */
     1071        bs = block_bb_get(service_id);
     1072
     1073        /* Do some simple sanity checks on the file system. */
     1074        rc = exfat_sanity_check(bs);
     1075
     1076        (void) block_cache_fini(service_id);
     1077        block_fini(service_id);
     1078        return rc;
    10561079}
    10571080
     
    10861109        bs = block_bb_get(service_id);
    10871110
     1111        /* Do some simple sanity checks on the file system. */
     1112        rc = exfat_sanity_check(bs);
     1113        if (rc != EOK) {
     1114                (void) block_cache_fini(service_id);
     1115                block_fini(service_id);
     1116                return rc;
     1117        }
     1118
    10881119        /* Initialize the block cache */
    10891120        rc = block_cache_init(service_id, BPS(bs), 0 /* XXX */, cmode);
    10901121        if (rc != EOK) {
    1091                 block_fini(service_id);
    1092                 return rc;
    1093         }
    1094 
    1095         /* Do some simple sanity checks on the file system. */
    1096         rc = exfat_sanity_check(bs, service_id);
    1097         if (rc != EOK) {
    1098                 (void) block_cache_fini(service_id);
    10991122                block_fini(service_id);
    11001123                return rc;
Note: See TracChangeset for help on using the changeset viewer.