From patchwork Fri Dec 14 14:42:06 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 1013576 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="kgisGM5R"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 43GYRr1Yx4z9sB5 for ; Sat, 15 Dec 2018 01:52:24 +1100 (AEDT) Received: from localhost ([::1]:33921 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gXopB-0000ZB-Ma for incoming@patchwork.ozlabs.org; Fri, 14 Dec 2018 09:52:21 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38407) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gXofm-00008J-1i for qemu-devel@nongnu.org; Fri, 14 Dec 2018 09:42:41 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gXofj-0004Rh-C1 for qemu-devel@nongnu.org; Fri, 14 Dec 2018 09:42:37 -0500 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]:51898) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gXofj-0004RE-0L for qemu-devel@nongnu.org; Fri, 14 Dec 2018 09:42:35 -0500 Received: by mail-wm1-x32e.google.com with SMTP id s14so5926824wmh.1 for ; Fri, 14 Dec 2018 06:42:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=BczOP9zqmfzqTxFzarSwCSMPsknT71/oxF9WY4Jkbs0=; b=kgisGM5RpvcmtMD4VtaITxymAISbfJW/LnOIAUACk5a0/tZivl4E/PE3rCW4pQU2cc wnNcHSSvUKBlzv2jRA4pnuU52n/czCi9EsphZcIF84K1Dchcl9pYlyiPhMUqQmVxpLuY 2AQgiZmt7+CcBoKKu3yhTbV6P78DzZ39HG1TQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=BczOP9zqmfzqTxFzarSwCSMPsknT71/oxF9WY4Jkbs0=; b=llKoPFHf6Z+RjCMEzv41DJFzSDRTuh2YnbKlZ7l8tFh7Vlxln4eWiYhJc/OsWvD9Pw HDH46IGtK+77XzOnpGX6/aZNDsJbnUOHzYRxEw0eXnowA+mYwXiwwQAtvVeF6Tu/HYku usrC5bhv3ytsOb1WujEbxiQKuwUf0NRI1eR+EXkY6dx+d/p0HsueAzQ6MzKo+N4VnkMy +j+wL7MKAzigFxJf0wIwSlqy8M9vj7X3rV3Qw7a/D51kXeGR4e03yPNaoqcWh5f5vwF0 s2mQix2D0AN+0mbjxLgmwFJ0cFN1kO7q1Mr/QiW5owjyW9Mm+0esL+vllO0VNLICVWis Edow== X-Gm-Message-State: AA+aEWZ8WehrhszfT71EVg7JSqXRpqRK+OHKJCs/LbOyyUbr1nSFyMG5 SSARWJAgSKXATFQh8DNueGuZJ67h/Eo= X-Google-Smtp-Source: AFSGD/ULRZqYjm0dtiRVYGYuTa1wz0b6e56vGeE3JP8Nxrva8EsDztyVbcARYLSdP9BhpZWY6aoG4g== X-Received: by 2002:a1c:8851:: with SMTP id k78mr3511180wmd.51.1544798553662; Fri, 14 Dec 2018 06:42:33 -0800 (PST) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id m6sm3263204wrv.24.2018.12.14.06.42.32 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 14 Dec 2018 06:42:32 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Date: Fri, 14 Dec 2018 14:42:06 +0000 Message-Id: <20181214144214.1260-15-peter.maydell@linaro.org> X-Mailer: git-send-email 2.19.2 In-Reply-To: <20181214144214.1260-1-peter.maydell@linaro.org> References: <20181214144214.1260-1-peter.maydell@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::32e Subject: [Qemu-devel] [PULL 14/22] device_tree.c: Don't use load_image() X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" The load_image() function is deprecated, as it does not let the caller specify how large the buffer to read the file into is. Instead use load_image_size(). Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson Reviewed-by: Stefan Hajnoczi Reviewed-by: Michael S. Tsirkin Reviewed-by: Eric Blake Message-id: 20181130151712.2312-9-peter.maydell@linaro.org --- device_tree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/device_tree.c b/device_tree.c index 6d9c9726f66..296278e12ae 100644 --- a/device_tree.c +++ b/device_tree.c @@ -91,7 +91,7 @@ void *load_device_tree(const char *filename_path, int *sizep) /* First allocate space in qemu for device tree */ fdt = g_malloc0(dt_size); - dt_file_load_size = load_image(filename_path, fdt); + dt_file_load_size = load_image_size(filename_path, fdt, dt_size); if (dt_file_load_size < 0) { error_report("Unable to open device tree file '%s'", filename_path);