Changeset 1313ee9 in mainline for uspace/srv/fs/fat/fat_ops.c


Ignore:
Timestamp:
2009-12-13T15:17:08Z (15 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
963dd91
Parents:
fc6dd18
Message:

introduce device namespaces

  • add support for explicit open in libfs (needed by devfs, but also possibly for other filesystems which need to track some stateful information)
  • extend libfs to be more generic, make proper adjustments to libc, tmpfs and fat
  • various updates to make use of the device namespaces
  • code cleanup
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/fs/fat/fat_ops.c

    rfc6dd18 r1313ee9  
    7171static int fat_match(fs_node_t **, fs_node_t *, const char *);
    7272static int fat_node_get(fs_node_t **, dev_handle_t, fs_index_t);
     73static int fat_node_open(fs_node_t *);
    7374static int fat_node_put(fs_node_t *);
    7475static int fat_create_node(fs_node_t **, dev_handle_t, int);
     
    8384static bool fat_is_directory(fs_node_t *);
    8485static bool fat_is_file(fs_node_t *node);
     86static dev_handle_t fat_device_get(fs_node_t *node);
    8587
    8688/*
     
    407409}
    408410
     411int fat_node_open(fs_node_t *fn)
     412{
     413        /*
     414         * Opening a file is stateless, nothing
     415         * to be done here.
     416         */
     417        return EOK;
     418}
     419
    409420int fat_node_put(fs_node_t *fn)
    410421{
     
    867878}
    868879
     880dev_handle_t fat_device_get(fs_node_t *node)
     881{
     882        return 0;
     883}
     884
    869885/** libfs operations */
    870886libfs_ops_t fat_libfs_ops = {
     
    872888        .match = fat_match,
    873889        .node_get = fat_node_get,
     890        .node_open = fat_node_open,
    874891        .node_put = fat_node_put,
    875892        .create = fat_create_node,
     
    881898        .size_get = fat_size_get,
    882899        .lnkcnt_get = fat_lnkcnt_get,
    883         .plb_get_char = fat_plb_get_char,
     900        .plb_get_char = fat_plb_get_char,
    884901        .is_directory = fat_is_directory,
    885         .is_file = fat_is_file
     902        .is_file = fat_is_file,
     903        .device_get = fat_device_get
    886904};
    887905
Note: See TracChangeset for help on using the changeset viewer.