Changeset 7d04324 in mainline for uspace/srv/fs/minixfs/mfs_ops.c


Ignore:
Timestamp:
2011-03-17T21:10:13Z (13 years ago)
Author:
Maurizio Lombardi <m.lombardi85@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
f213ae7
Parents:
5a58ae2
Message:

Link mfs_is_directory() and mfs_is_file() functions to the libfs_ops structure

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/fs/minixfs/mfs_ops.c

    r5a58ae2 r7d04324  
    4646libfs_ops_t mfs_libfs_ops = {
    4747        .device_get = mfs_device_get,
    48         .is_directory = mfs_is_directory
     48        .is_directory = mfs_is_directory,
     49        .is_file = mfs_is_file
    4950};
    5051
     
    214215}
    215216
     217bool mfs_is_file(fs_node_t *fsnode)
     218{
     219        struct mfs_node *node = fsnode->data;
     220        struct mfs_sb_info *sbi = node->instance->sbi;
     221
     222        if (sbi->fs_version == MFS_VERSION_V1)
     223                return S_ISREG(node->ino->i_mode);
     224        else
     225                return S_ISREG(node->ino2->i_mode);
     226}
     227
    216228/*
    217229 * Find a filesystem instance given the devmap handle
Note: See TracChangeset for help on using the changeset viewer.