From patchwork Sat Dec 12 01:25:25 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Snow X-Patchwork-Id: 555940 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id E032C1402F0 for ; Sat, 12 Dec 2015 12:26:08 +1100 (AEDT) Received: from localhost ([::1]:50142 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a7Ywo-000793-Nv for incoming@patchwork.ozlabs.org; Fri, 11 Dec 2015 20:26:06 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55294) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a7YwK-0006K3-KP for qemu-devel@nongnu.org; Fri, 11 Dec 2015 20:25:37 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a7YwJ-0000PK-Rc for qemu-devel@nongnu.org; Fri, 11 Dec 2015 20:25:36 -0500 Received: from mx1.redhat.com ([209.132.183.28]:51432) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a7YwF-0000NF-Gk; Fri, 11 Dec 2015 20:25:31 -0500 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (Postfix) with ESMTPS id 23B848E933; Sat, 12 Dec 2015 01:25:31 +0000 (UTC) Received: from scv.usersys.redhat.com (dhcp-17-163.bos.redhat.com [10.18.17.163]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id tBC1PTQu023216; Fri, 11 Dec 2015 20:25:30 -0500 From: John Snow To: qemu-block@nongnu.org Date: Fri, 11 Dec 2015 20:25:25 -0500 Message-Id: <1449883528-26477-2-git-send-email-jsnow@redhat.com> In-Reply-To: <1449883528-26477-1-git-send-email-jsnow@redhat.com> References: <1449883528-26477-1-git-send-email-jsnow@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.26 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: kwolf@redhat.com, John Snow , qemu-devel@nongnu.org, mreitz@redhat.com Subject: [Qemu-devel] [PATCH v2 1/4] block/qapi: do not redundantly print "actual path" X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 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-bounces+incoming=patchwork.ozlabs.org@nongnu.org If it happens to match the backing path, that was the actual path. Signed-off-by: John Snow Reviewed-by: Max Reitz --- block/qapi.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/block/qapi.c b/block/qapi.c index 267f147..01569da 100644 --- a/block/qapi.c +++ b/block/qapi.c @@ -676,7 +676,9 @@ void bdrv_image_info_dump(fprintf_function func_fprintf, void *f, if (info->has_backing_filename) { func_fprintf(f, "backing file: %s", info->backing_filename); - if (info->has_full_backing_filename) { + if (info->has_full_backing_filename && + (strcmp(info->backing_filename, + info->full_backing_filename) != 0)) { func_fprintf(f, " (actual path: %s)", info->full_backing_filename); } func_fprintf(f, "\n");