Back to index

avfs  1.0.1
Classes | Functions
state.h File Reference
#include "avfs.h"
#include "namespace.h"
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.


struct  statefile


int av_state_new (struct vmodule *module, const char *name, struct namespace **resp, struct avfs **avfsp)

Function Documentation

int av_state_new ( struct vmodule module,
const char *  name,
struct namespace **  resp,
struct avfs **  avfsp 

Definition at line 385 of file state.c.

    int res;
    struct avfs *avfs;
    struct namespace *ns;

    res = av_new_avfs(name, NULL, AV_VER, AVF_ONLYROOT, module, &avfs);
    if(res < 0)
        return res;

    ns = av_namespace_new();

    avfs->data = ns;
    avfs->destroy = state_destroy;

    avfs->lookup    = state_lookup;
    avfs->putent    = state_putent;
    avfs->copyent   = state_copyent;
    avfs->getpath   = state_getpath;

    avfs->open      = state_open;
    avfs->close     = state_close;
    avfs->read      = state_read;
    avfs->write     = state_write;
    avfs->truncate  = state_truncate;
    avfs->readdir   = state_readdir;
    avfs->getattr   = state_getattr;
    avfs->access    = state_access;


    *resp = ns;
    *avfsp = avfs;
    return 0;

Here is the call graph for this function:

Here is the caller graph for this function: