Changeset 395df52 in mainline for uspace/lib/ext4/src/filesystem.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/lib/ext4/src/filesystem.c

    rde5b708 r395df52  
    6161 *
    6262 * @param fs         Filesystem instance to be initialized
    63  * @param service_id Identifier if device with the filesystem
     63 * @param service_id Block device to open
    6464 * @param cmode      Cache mode
    6565 *
     
    155155        block_cache_fini(fs->device);
    156156        block_fini(fs->device);
     157}
     158
     159/** Probe filesystem.
     160 *
     161 * @param service_id Block device to probe
     162 *
     163 * @return EOK or negative error code.
     164 *
     165 */
     166int ext4_filesystem_probe(service_id_t service_id)
     167{
     168        ext4_filesystem_t *fs = NULL;
     169        int rc;
     170
     171        fs = calloc(1, sizeof(ext4_filesystem_t));
     172        if (fs == NULL)
     173                return ENOMEM;
     174
     175        /* Initialize the file system for opening */
     176        rc = ext4_filesystem_init(fs, service_id, CACHE_MODE_WT);
     177        if (rc != EOK) {
     178                free(fs);
     179                return rc;
     180        }
     181
     182        ext4_filesystem_fini(fs);
     183        return EOK;
    157184}
    158185
Note: See TracChangeset for help on using the changeset viewer.