From patchwork Wed Jun 13 14:36:27 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robert Wang X-Patchwork-Id: 164700 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id B96E0B7024 for ; Thu, 14 Jun 2012 00:37:45 +1000 (EST) Received: from localhost ([::1]:39670 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Seohb-0005n9-K9 for incoming@patchwork.ozlabs.org; Wed, 13 Jun 2012 10:37:43 -0400 Received: from eggs.gnu.org ([208.118.235.92]:35414) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Seoh8-0004pN-Ae for qemu-devel@nongnu.org; Wed, 13 Jun 2012 10:37:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Seoh3-0001wW-BQ for qemu-devel@nongnu.org; Wed, 13 Jun 2012 10:37:13 -0400 Received: from mail-pz0-f45.google.com ([209.85.210.45]:50041) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Seoh3-0001rj-0n for qemu-devel@nongnu.org; Wed, 13 Jun 2012 10:37:09 -0400 Received: by mail-pz0-f45.google.com with SMTP id n2so62418dad.4 for ; Wed, 13 Jun 2012 07:37:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references; bh=Qi9jNhr7HD7qIIVXpxyIdPWClCAvfnRT+4LCvkMu2X4=; b=UIW/f/+fWHGkTiTk/1gy2Igj6vpKZEJ+/0DZTkiKuia/9kezVuJXVxcH+GRYE4198n O5HQdeleyUcyeQkwKwUcgM4pWPkL40mtLUAmLndIo/ul2gwFZthtKyhckWC+l17IQ4SF JpMqmqucoS5RchAVEy9wb6QyR+aG8FRQWqZNM/mr907a9B+U74GJT0Wwh49zfYRLQxF9 n3stz8H+9/u2K1E2sjviNNsLg4geZi5s4Mzxc2B4A+KTdcyWlZWlBzcBS2Vui5ZqBLPt s0rt+y1jBK+fdxhn3+7zJssLFMWk/X1FqqHFK9ivGqGfeDx6hyYMkNKMNgRFO8OBLV1Y uTNA== Received: by 10.68.219.226 with SMTP id pr2mr51666855pbc.1.1339598227993; Wed, 13 Jun 2012 07:37:07 -0700 (PDT) Received: from localhost.localdomain ([202.108.130.138]) by mx.google.com with ESMTPS id tj4sm5945250pbc.33.2012.06.13.07.37.05 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 13 Jun 2012 07:37:07 -0700 (PDT) From: Dong Xu Wang To: qemu-devel@nongnu.org Date: Wed, 13 Jun 2012 22:36:27 +0800 Message-Id: <1339598189-17933-4-git-send-email-wdongxu@linux.vnet.ibm.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1339598189-17933-1-git-send-email-wdongxu@linux.vnet.ibm.com> References: <1339598189-17933-1-git-send-email-wdongxu@linux.vnet.ibm.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.85.210.45 Cc: kwolf@redhat.com, Dong Xu Wang Subject: [Qemu-devel] [PATCH 4/6] qemu-img: add-cow will not support convert 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 add-cow file can't live alone, must together will image_file and backing_file. If we implement qemu-img convert operation for add-cow file format, we must create image_file and backing_file manually, that will be confused for users, so we just ignore add-cow format while doing converting. Signed-off-by: Dong Xu Wang --- qemu-img.c | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/qemu-img.c b/qemu-img.c index c8a70ff..0bce61c 100644 --- a/qemu-img.c +++ b/qemu-img.c @@ -756,6 +756,12 @@ static int img_convert(int argc, char **argv) } } + if (strcmp(out_fmt, "add-cow") == 0) { + error_report("Convert operation does not support %s format.", out_fmt); + ret = -1; + goto out; + } + /* Find driver and parse its options */ drv = bdrv_find_format(out_fmt); if (!drv) {