diff options
author | Sascha Hauer <sha@octopus.labnet.pengutronix.de> | 2007-09-27 16:33:35 +0200 |
---|---|---|
committer | Sascha Hauer <sha@octopus.labnet.pengutronix.de> | 2007-09-27 16:33:35 +0200 |
commit | 79ed00ba92a0c2dd209d94e0550d582897ca176e (patch) | |
tree | af5684bf31b6e7ae5f5ca1fc9aa26ba9919d6185 /include/fs.h | |
parent | 9e13a384c005d26411b53d4c4f643700957c8345 (diff) | |
download | barebox-79ed00ba92a0c2dd209d94e0550d582897ca176e.tar.gz barebox-79ed00ba92a0c2dd209d94e0550d582897ca176e.tar.xz |
pass file size from read_file
Diffstat (limited to 'include/fs.h')
-rw-r--r-- | include/fs.h | 5 |
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 |