Back to index

avfs  1.0.1
tmpfile.h File Reference
#include "avfs.h"
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.


avoff_t av_tmpfile_blksize (const char *tmpf)

Function Documentation

avoff_t av_tmpfile_blksize ( const char *  tmpf)

Definition at line 179 of file tmpfile.c.

    int res;
    struct stat stbuf;
    if(tmpf == NULL)
        return -1;

    res = stat(tmpf, &stbuf);
    if(res == 0) {
        /* Ramfs returns 0 diskusage */
        if(stbuf.st_blocks == 0)
            return stbuf.st_size;
            return stbuf.st_blocks * 512;
    } else
        return -1;

Here is the call graph for this function:

Here is the caller graph for this function: