Changeset 74ea3c6 in mainline


Ignore:
Timestamp:
2008-04-12T22:38:32Z (16 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
32fb10ed
Parents:
e22632a9
Message:

Add fat_root_get() and fat_plb_get_char().

Location:
uspace
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/libfs/libfs.c

    re22632a9 r74ea3c6  
    148148
    149149        void *par = NULL;
    150         void *cur = ops->root_get();
     150        void *cur = ops->root_get(dev_handle);
    151151        void *tmp;
    152152
  • uspace/lib/libfs/libfs.h

    re22632a9 r74ea3c6  
    5353        unsigned (* lnkcnt_get)(void *);
    5454        bool (* has_children)(void *);
    55         void *(* root_get)(void);
     55        void *(* root_get)(dev_handle_t);
    5656        char (* plb_get_char)(unsigned pos);   
    5757        bool (* is_directory)(void *);
  • uspace/srv/fs/fat/fat_ops.c

    re22632a9 r74ea3c6  
    238238        if (!(d->attr & (FAT_ATTR_SUBDIR | FAT_ATTR_VOLLABEL)))
    239239                node->type = FAT_FILE;
    240         if ((d->attr & FAT_ATTR_SUBDIR) || !pindex)
     240        if ((d->attr & FAT_ATTR_SUBDIR) || !index)
    241241                node->type = FAT_DIRECTORY;
    242242        assert((node->type == FAT_FILE) || (node->type == FAT_DIRECTORY));
     
    331331{
    332332        return ((fat_node_t *)node)->lnkcnt;
     333}
     334
     335static void *fat_root_get(dev_handle_t dev_handle)
     336{
     337        return fat_node_get(dev_handle, 0, 0); 
     338}
     339
     340static char fat_plb_get_char(unsigned pos)
     341{
     342        return fat_reg.plb_ro[pos % PLB_SIZE];
    333343}
    334344
     
    355365        .lnkcnt_get = fat_lnkcnt_get,
    356366        .has_children = NULL,
    357         .root_get = NULL,
    358         .plb_get_char = NULL,
     367        .root_get = fat_root_get,
     368        .plb_get_char = fat_plb_get_char,
    359369        .is_directory = fat_is_directory,
    360370        .is_file = fat_is_file
  • uspace/srv/fs/tmpfs/tmpfs_ops.c

    re22632a9 r74ea3c6  
    9898}
    9999
    100 static void *tmpfs_root_get(void)
     100static void *tmpfs_root_get(dev_handle_t dev_handle)
    101101{
    102102        return root;
Note: See TracChangeset for help on using the changeset viewer.