2005-11-23 22:39:03 +00:00
|
|
|
/*
|
|
|
|
*
|
2006-09-15 14:55:39 +00:00
|
|
|
* (c) 2005 Laurent Vivier <Laurent@lvivier.info>
|
2005-11-23 22:39:03 +00:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "libblock.h"
|
2008-04-20 16:16:53 +00:00
|
|
|
#include "block.h"
|
2005-11-23 22:39:03 +00:00
|
|
|
|
2008-04-20 16:16:53 +00:00
|
|
|
int block_fstat(stream_FILE *_file, struct stream_stat *buf)
|
2005-11-23 22:39:03 +00:00
|
|
|
{
|
2008-04-20 16:16:53 +00:00
|
|
|
block_FILE *file = (block_FILE*)_file;
|
2005-11-23 22:39:03 +00:00
|
|
|
if (buf == NULL)
|
|
|
|
return -1;
|
|
|
|
if (file->size == -1)
|
|
|
|
return -1;
|
|
|
|
|
|
|
|
buf->st_size = file->size;
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|