diff options
| author | Michael S. Tsirkin | 2014-02-05 20:57:55 +0100 |
|---|---|---|
| committer | Michael S. Tsirkin | 2014-02-10 09:23:35 +0100 |
| commit | a1483f88b6e21dd3ea481a021e5d4f7f273204c6 (patch) | |
| tree | 180655d179cdbdb19d02eebe8a419b329eb572b6 /include/hw/loader.h | |
| parent | pc.c: better error message on initrd sizing failure (diff) | |
| download | qemu-a1483f88b6e21dd3ea481a021e5d4f7f273204c6.tar.gz qemu-a1483f88b6e21dd3ea481a021e5d4f7f273204c6.tar.xz qemu-a1483f88b6e21dd3ea481a021e5d4f7f273204c6.zip | |
loader: document that errno is set
Document that get_image_size sets errno
on failure.
Suggested-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'include/hw/loader.h')
| -rw-r--r-- | include/hw/loader.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/hw/loader.h b/include/hw/loader.h index 7a23d6bdc1..91b01224a3 100644 --- a/include/hw/loader.h +++ b/include/hw/loader.h @@ -4,6 +4,13 @@ #include "hw/nvram/fw_cfg.h" /* loader.c */ +/** + * get_image_size: retrieve size of an image file + * @filename: Path to the image file + * + * Returns the size of the image file on success, -1 otherwise. + * On error, errno is also set as appropriate. + */ int get_image_size(const char *filename); int load_image(const char *filename, uint8_t *addr); /* deprecated */ int load_image_targphys(const char *filename, hwaddr, |
