Changeset 5a58ae2 in mainline


Ignore:
Timestamp:
2011-03-17T20:30:51Z (13 years ago)
Author:
Maurizio Lombardi <m.lombardi85@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
7d04324
Parents:
e54ba607
Message:

Link mfs_is_directory() function to the libfs_ops structure

Location:
uspace/srv/fs/minixfs
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/fs/minixfs/mfs.h

    re54ba607 r5a58ae2  
    100100extern void mfs_mounted(ipc_callid_t rid, ipc_call_t *request);
    101101extern void mfs_mount(ipc_callid_t rid, ipc_call_t *request);
     102extern bool mfs_is_directory(fs_node_t *fsnode);
    102103extern devmap_handle_t mfs_device_get(fs_node_t *fsnode);
    103104extern int  mfs_get_instance(devmap_handle_t handle,
  • uspace/srv/fs/minixfs/mfs_ops.c

    re54ba607 r5a58ae2  
    4545
    4646libfs_ops_t mfs_libfs_ops = {
    47         .device_get = mfs_device_get
     47        .device_get = mfs_device_get,
     48        .is_directory = mfs_is_directory
    4849};
    4950
     
    202203}
    203204
     205bool mfs_is_directory(fs_node_t *fsnode)
     206{
     207        struct mfs_node *node = fsnode->data;
     208        struct mfs_sb_info *sbi = node->instance->sbi;
     209
     210        if (sbi->fs_version == MFS_VERSION_V1)
     211                return S_ISDIR(node->ino->i_mode);
     212        else
     213                return S_ISDIR(node->ino2->i_mode);
     214}
     215
    204216/*
    205217 * Find a filesystem instance given the devmap handle
Note: See TracChangeset for help on using the changeset viewer.