2005-12-01 22:14:27 +00:00
|
|
|
/*
|
|
|
|
*
|
2008-04-20 16:20:54 +00:00
|
|
|
* (c) 2005-2008 Laurent Vivier <Laurent@lvivier.info>
|
2005-12-01 22:14:27 +00:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "libcontainer.h"
|
2008-04-20 16:20:54 +00:00
|
|
|
#include "container.h"
|
2005-12-01 22:14:27 +00:00
|
|
|
|
2008-04-20 16:20:54 +00:00
|
|
|
int container_fstat(stream_FILE *_file, struct stream_stat *buf)
|
2005-12-01 22:14:27 +00:00
|
|
|
{
|
2008-04-20 16:20:54 +00:00
|
|
|
container_FILE *file = (container_FILE*)_file;
|
2005-12-01 22:14:27 +00:00
|
|
|
if (buf == NULL)
|
|
|
|
return -1;
|
|
|
|
if (file->container->size == -1)
|
|
|
|
return -1;
|
|
|
|
|
|
|
|
buf->st_size = file->container->size;
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|