Received: from eggs.gnu.org ([2001:4830:134:3::10]:50654) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WCtx7-0005eW-2Z for qemu-devel@nongnu.org; Mon, 10 Feb 2014 11:43:29 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WCtx2-0005Ha-Ae for qemu-devel@nongnu.org; Mon, 10 Feb 2014 11:43:25 -0500 Received: from mx1.redhat.com ([209.132.183.28]:63255) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WCtx2-0005HS-2s for qemu-devel@nongnu.org; Mon, 10 Feb 2014 11:43:20 -0500 Date: Mon, 10 Feb 2014 18:48:15 +0200 From: "Michael S. Tsirkin" Message-ID: <1392050814-31814-11-git-send-email-mst@redhat.com> References: <1392050814-31814-1-git-send-email-mst@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1392050814-31814-1-git-send-email-mst@redhat.com> Subject: [Qemu-devel] [PULL 10/20] 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 , Anthony Liguori Document that get_image_size sets errno on failure. Suggested-by: Peter Maydell Reviewed-by: Eric Blake 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