OpenCores
URL https://opencores.org/ocsvn/c0or1k/c0or1k/trunk

Subversion Repositories c0or1k

[/] [c0or1k/] [trunk/] [conts/] [posix/] [mm0/] [fs/] [file.c] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 drasko
/*
2
 * File content tracking.
3
 *
4
 * Copyright (C) 2008 Bahadir Balban
5
 */
6
#include <fs.h>
7
#include <file.h>
8
#include <l4/lib/list.h>
9
#include <l4/macros.h>
10
#include INC_GLUE(memory.h)
11
#include <stdio.h>
12
 
13
/*
14
 * This reads contents of a file in pages, calling the fs-specific file read function to read-in
15
 * those pages' contents.
16
 *
17
 * Normally this is ought to be called by mm0 when a file's pages cannot be found in the page
18
 * cache.
19
 */
20
int generic_file_read(struct vnode *v, unsigned long pfn, unsigned long npages, void *page_buf)
21
{
22
        BUG_ON(!is_page_aligned(page_buf));
23
 
24
        return v->fops.read(v, pfn, npages, page_buf);
25
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.