summaryrefslogtreecommitdiffstats
path: root/include/fs.h
diff options
context:
space:
mode:
authorSascha Hauer <sha@octopus.labnet.pengutronix.de>2007-09-27 16:33:35 +0200
committerSascha Hauer <sha@octopus.labnet.pengutronix.de>2007-09-27 16:33:35 +0200
commit79ed00ba92a0c2dd209d94e0550d582897ca176e (patch)
treeaf5684bf31b6e7ae5f5ca1fc9aa26ba9919d6185 /include/fs.h
parent9e13a384c005d26411b53d4c4f643700957c8345 (diff)
downloadbarebox-79ed00ba92a0c2dd209d94e0550d582897ca176e.tar.gz
barebox-79ed00ba92a0c2dd209d94e0550d582897ca176e.tar.xz
pass file size from read_file
Diffstat (limited to 'include/fs.h')
-rw-r--r--include/fs.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/fs.h b/include/fs.h
index c17df207ed..fcc04f4158 100644
--- a/include/fs.h
+++ b/include/fs.h
@@ -148,9 +148,10 @@ struct mtab_entry {
* Read a file into memory. Memory is allocated with malloc and must
* be freed with free() afterwards. This function allocates one
* byte more than actually needed and sets this to zero, so that
- * it cn be used for text files.
+ * it can be used for text files.
+ * If size is nonzero it s set to the file size.
*/
-void *read_file(const char *filename);
+void *read_file(const char *filename, size_t *size);
/*
* This function turn 'path' into an absolute path and removes all occurrences