From patchwork Mon Dec 14 19:55:14 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Snow X-Patchwork-Id: 556611 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 1B056140311 for ; Tue, 15 Dec 2015 06:56:19 +1100 (AEDT) Received: from localhost ([::1]:33550 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a8ZEG-0003Au-W6 for incoming@patchwork.ozlabs.org; Mon, 14 Dec 2015 14:56:17 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42044) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a8ZDX-000239-R0 for qemu-devel@nongnu.org; Mon, 14 Dec 2015 14:55:36 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a8ZDT-0007yT-7G for qemu-devel@nongnu.org; Mon, 14 Dec 2015 14:55:31 -0500 Received: from mx1.redhat.com ([209.132.183.28]:54372) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a8ZDO-0007sT-7E; Mon, 14 Dec 2015 14:55:22 -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 B45FB3017A2; Mon, 14 Dec 2015 19:55:21 +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 tBEJtI2F021250; Mon, 14 Dec 2015 14:55:20 -0500 From: John Snow To: qemu-block@nongnu.org Date: Mon, 14 Dec 2015 14:55:14 -0500 Message-Id: <1450122916-4706-4-git-send-email-jsnow@redhat.com> In-Reply-To: <1450122916-4706-1-git-send-email-jsnow@redhat.com> References: <1450122916-4706-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 v3 3/5] block/qapi: explicitly warn if !has_full_backing_filename 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 Disambiguate "Backing filename and full backing filename" are equivalent from "full backing filename could not be determined." Signed-off-by: John Snow Reviewed-by: Max Reitz --- block/qapi.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/block/qapi.c b/block/qapi.c index 0e6b333..c61fb30 100644 --- a/block/qapi.c +++ b/block/qapi.c @@ -677,9 +677,10 @@ 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 && - (strcmp(info->backing_filename, - info->full_backing_filename) != 0)) { + if (!info->has_full_backing_filename) { + func_fprintf(f, " (cannot determine actual path)"); + } else if (strcmp(info->backing_filename, + info->full_backing_filename) != 0) { func_fprintf(f, " (actual path: %s)", info->full_backing_filename); } func_fprintf(f, "\n");