From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48737) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WB8eZ-0005L6-Af for qemu-devel@nongnu.org; Wed, 05 Feb 2014 15:01:04 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WB8eU-0008Sm-Gx for qemu-devel@nongnu.org; Wed, 05 Feb 2014 15:00:59 -0500 Received: from mx1.redhat.com ([209.132.183.28]:7541) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WB8eU-0008Sf-9a for qemu-devel@nongnu.org; Wed, 05 Feb 2014 15:00:54 -0500 Date: Wed, 5 Feb 2014 22:05:42 +0200 From: "Michael S. Tsirkin" Message-ID: <1391630732-8369-1-git-send-email-mst@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Subject: [Qemu-devel] [PATCH] loader: document that errno is set List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Peter Maydell Document that get_image_size sets errorno on failure. Suggested-by: Peter Maydell Signed-off-by: Michael S. Tsirkin --- include/hw/loader.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/include/hw/loader.h b/include/hw/loader.h index 7a23d6b..91b0122 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, -- MST