From nobody Thu May 2 03:04:22 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail header.i=@wdc.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=wdc.com ARC-Seal: i=1; a=rsa-sha256; t=1584742073; cv=none; d=zohomail.com; s=zohoarc; b=N0m7uInwtq2H2vLOkCJj0heCV/rS/2YeMBx0VWnnsnssnSth8AAbC8GwXzRz4SDu7J+gDrHzl+qfTa6Vos/SutKoJYf3P+X+qsOjKpqQlFpBJ+kXWjZBvM7CoLCa9aiOWOyZaUY51e8v7lFInaayiCOStE3sFUMmk8Mj1YVoPIs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1584742073; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=HQGyZKGLKSzpmjxbyHPYLXeP3a0W/Br3ZLP2DzmwVrY=; b=jSqn2nj4gcdYn1sXXw20FFL23Mi6KC29fhbKwn95gtqjnqyb3k10Ic3iwzhqVOVfGUtCCfBVOQF5pihdK15Qx9y0G7QGBqOd0Qw0hhS6R++sCHVCMyvTJpycElAjz01e4r0l2urI9RCZiNGjvxPeAJxwoLozyV5D7Iu0KslIqrQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail header.i=@wdc.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1584742073294699.198599468781; Fri, 20 Mar 2020 15:07:53 -0700 (PDT) Received: from localhost ([::1]:59690 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jFPnz-0006pN-SK for importer@patchew.org; Fri, 20 Mar 2020 18:07:51 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50856) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jFPn6-0005uG-Mu for qemu-devel@nongnu.org; Fri, 20 Mar 2020 18:06:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jFPn5-0005Bl-L5 for qemu-devel@nongnu.org; Fri, 20 Mar 2020 18:06:56 -0400 Received: from esa2.hgst.iphmx.com ([68.232.143.124]:56412) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1jFPn5-0005AG-Bn for qemu-devel@nongnu.org; Fri, 20 Mar 2020 18:06:55 -0400 Received: from h199-255-45-15.hgst.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 21 Mar 2020 06:07:06 +0800 Received: from uls-op-cesaip01.wdc.com ([10.248.3.36]) by uls-op-cesaep02.wdc.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Mar 2020 14:58:12 -0700 Received: from 2kbcp12.ad.shared (HELO risc6-mainframe.hgst.com) ([10.86.54.155]) by uls-op-cesaip01.wdc.com with ESMTP; 20 Mar 2020 15:06:50 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1584742033; x=1616278033; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=G78v3GAJXzyaOCKFOiYbSCcg8DjRRNX4Nt71P0W/f2k=; b=BcadV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XRxsHKjmwunZ0+7B7P0drUcM6+S9dcYvAbhWfO7hQu7i8rn+MuVr /IFQhCQgHJPOYUiMA1gWcJ2Z1sqQlEuiub8s1th85iuwz9vQpVeNsk/P8fpg75TUrdaV/q0Q/Z jEctzeqLgJAcoBEClRo9CaNIenakRYfj9UOvEXXFuUgJaEdYCHyPGllr8k3Ng7scPwkm8py58L P+XZrW79uMHXsKDY/aJD5ltMRt1KM01tHgTBbSRtCIRjAFuLamssZV/u+Ip4SSHm+vTG713c91 8sM= WDCIronportException: Internal From: Alistair Francis To: qemu-devel@nongnu.org Subject: [PULL 1/1] device_tree: Add info message when dumping dtb to file Date: Fri, 20 Mar 2020 14:59:16 -0700 Message-Id: <20200320215916.3054194-2-alistair.francis@wdc.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200320215916.3054194-1-alistair.francis@wdc.com> References: <20200320215916.3054194-1-alistair.francis@wdc.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: FreeBSD 9.x [fuzzy] X-Received-From: 68.232.143.124 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.maydell@linaro.org, David Gibson , Alistair Francis , Leonardo Bras , alistair23@gmail.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" From: Leonardo Bras When dumping dtb to a file, qemu exits silently before starting the VM. Add info message so user can easily track why the proccess exits. Add error message if dtb dump failed. Signed-off-by: Leonardo Bras Message-Id: <20200319040326.391090-1-leonardo@linux.ibm.com> Reviewed-by: David Gibson Reviewed-by: Alistair Francis Signed-off-by: Alistair Francis --- device_tree.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/device_tree.c b/device_tree.c index f8b46b3c73..bba6cc2164 100644 --- a/device_tree.c +++ b/device_tree.c @@ -530,7 +530,12 @@ void qemu_fdt_dumpdtb(void *fdt, int size) =20 if (dumpdtb) { /* Dump the dtb to a file and quit */ - exit(g_file_set_contents(dumpdtb, fdt, size, NULL) ? 0 : 1); + if (g_file_set_contents(dumpdtb, fdt, size, NULL)) { + info_report("dtb dumped to %s. Exiting.", dumpdtb); + exit(0); + } + error_report("%s: Failed dumping dtb to %s", __func__, dumpdtb); + exit(1); } } =20 --=20 2.25.1