Subversion Repositories HelenOS

Rev

Rev 2893 | Rev 2951 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2893 Rev 2910
Line 89... Line 89...
89
        else
89
        else
90
            *buf++ = d->ext[i];
90
            *buf++ = d->ext[i];
91
    }
91
    }
92
}
92
}
93
 
93
 
94
/* TODO and also move somewhere else */
94
/* TODO move somewhere else */
95
typedef struct {
95
typedef struct {
96
    void *data;
96
    void *data;
97
} block_t;
97
} block_t;
98
 
98
 
99
static block_t *block_get(dev_handle_t dev_handle, off_t offset)
99
static block_t *block_get(dev_handle_t dev_handle, off_t offset)
Line 253... Line 253...
253
    if (idx->nodep) {
253
    if (idx->nodep) {
254
        /*
254
        /*
255
         * We are lucky.
255
         * We are lucky.
256
         * The node is already instantiated in memory.
256
         * The node is already instantiated in memory.
257
         */
257
         */
258
        idx->nodep->refcnt++;
258
        if (!idx->nodep->refcnt++)
-
 
259
            list_remove(&nodep->ffn_link);
259
        return idx->nodep;
260
        return idx->nodep;
260
    }
261
    }
261
 
262
 
262
    /*
263
    /*
263
     * We must instantiate the node from the file system.
264
     * We must instantiate the node from the file system.
Line 313... Line 314...
313
    return nodep;
314
    return nodep;
314
}
315
}
315
 
316
 
316
static void fat_node_put(void *node)
317
static void fat_node_put(void *node)
317
{
318
{
-
 
319
    fat_node_t *nodep = (fat_node_t *)node;
-
 
320
 
318
    /* TODO */
321
    if (!--nodep->refcnt) {
-
 
322
        list_append(&nodep->ffn_link, &ffn_head);
-
 
323
    }
319
}
324
}
320
 
325
 
321
static void *fat_create(int flags)
326
static void *fat_create(int flags)
322
{
327
{
323
    return NULL;    /* not supported at the moment */
328
    return NULL;    /* not supported at the moment */