From nobody Mon May 6 11:20:09 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 15282886816721002.7948711456795; Wed, 6 Jun 2018 05:38:01 -0700 (PDT) Received: from localhost ([::1]:52164 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fQXhQ-0007Nm-Pj for importer@patchew.org; Wed, 06 Jun 2018 08:38:00 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48591) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fQXfb-0006Sz-MS for qemu-devel@nongnu.org; Wed, 06 Jun 2018 08:36:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fQXfa-0002WS-7L for qemu-devel@nongnu.org; Wed, 06 Jun 2018 08:36:07 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:54764 helo=mx1.redhat.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fQXfT-0002J5-Ai; Wed, 06 Jun 2018 08:35:59 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 61BDE818BAF1; Wed, 6 Jun 2018 12:35:53 +0000 (UTC) Received: from thh440s.redhat.com (ovpn-116-65.ams2.redhat.com [10.36.116.65]) by smtp.corp.redhat.com (Postfix) with ESMTP id 22FB41C726; Wed, 6 Jun 2018 12:35:51 +0000 (UTC) From: Thomas Huth To: Kevin Wolf , Max Reitz , qemu-block@nongnu.org Date: Wed, 6 Jun 2018 14:35:51 +0200 Message-Id: <1528288551-31641-1-git-send-email-thuth@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.8]); Wed, 06 Jun 2018 12:35:53 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.8]); Wed, 06 Jun 2018 12:35:53 +0000 (UTC) for IP:'10.11.54.5' DOMAIN:'int-mx05.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'thuth@redhat.com' RCPT:'' X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 66.187.233.73 Subject: [Qemu-devel] [PATCH] qemu-img: Remove deprecated -s snapshot_id_or_name option 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: , Cc: qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" It has been marked as deprecated since QEMU v2.0 already, so it is time now to finally remove it. Signed-off-by: Thomas Huth Reviewed-by: Jeff Cody --- qemu-doc.texi | 7 ------- qemu-img-cmds.hx | 4 ++-- qemu-img.c | 7 +------ qemu-img.texi | 7 ++----- tests/qemu-iotests/029 | 2 +- tests/qemu-iotests/080 | 4 ++-- 6 files changed, 8 insertions(+), 23 deletions(-) diff --git a/qemu-doc.texi b/qemu-doc.texi index 2effe66..9aff6b4 100644 --- a/qemu-doc.texi +++ b/qemu-doc.texi @@ -2927,13 +2927,6 @@ Option @option{-virtioconsole} has been replaced by The @code{-clock} option is ignored since QEMU version 1.7.0. There is no replacement since it is not needed anymore. =20 -@section qemu-img command line arguments - -@subsection convert -s (since 2.0.0) - -The ``convert -s snapshot_id_or_name'' argument is obsoleted -by the ``convert -l snapshot_param'' argument instead. - @section QEMU Machine Protocol (QMP) commands =20 @subsection block-dirty-bitmap-add "autoload" parameter (since 2.12.0) diff --git a/qemu-img-cmds.hx b/qemu-img-cmds.hx index 3d2f7b2..69758fb 100644 --- a/qemu-img-cmds.hx +++ b/qemu-img-cmds.hx @@ -44,9 +44,9 @@ STEXI ETEXI =20 DEF("convert", img_convert, - "convert [--object objectdef] [--image-opts] [--target-image-opts] [-U= ] [-c] [-p] [-q] [-n] [-f fmt] [-t cache] [-T src_cache] [-O output_fmt] [-= B backing_file] [-o options] [-s snapshot_id_or_name] [-l snapshot_param] [= -S sparse_size] [-m num_coroutines] [-W] filename [filename2 [...]] output_= filename") + "convert [--object objectdef] [--image-opts] [--target-image-opts] [-U= ] [-c] [-p] [-q] [-n] [-f fmt] [-t cache] [-T src_cache] [-O output_fmt] [-= B backing_file] [-o options] [-l snapshot_param] [-S sparse_size] [-m num_c= oroutines] [-W] filename [filename2 [...]] output_filename") STEXI -@item convert [--object @var{objectdef}] [--image-opts] [--target-image-op= ts] [-U] [-c] [-p] [-q] [-n] [-f @var{fmt}] [-t @var{cache}] [-T @var{src_c= ache}] [-O @var{output_fmt}] [-B @var{backing_file}] [-o @var{options}] [-s= @var{snapshot_id_or_name}] [-l @var{snapshot_param}] [-S @var{sparse_size}= ] [-m @var{num_coroutines}] [-W] @var{filename} [@var{filename2} [...]] @va= r{output_filename} +@item convert [--object @var{objectdef}] [--image-opts] [--target-image-op= ts] [-U] [-c] [-p] [-q] [-n] [-f @var{fmt}] [-t @var{cache}] [-T @var{src_c= ache}] [-O @var{output_fmt}] [-B @var{backing_file}] [-o @var{options}] [-l= @var{snapshot_param}] [-S @var{sparse_size}] [-m @var{num_coroutines}] [-W= ] @var{filename} [@var{filename2} [...]] @var{output_filename} ETEXI =20 DEF("create", img_create, diff --git a/qemu-img.c b/qemu-img.c index 75f1610..24656e1 100644 --- a/qemu-img.c +++ b/qemu-img.c @@ -148,8 +148,6 @@ static void QEMU_NORETURN help(void) " 'snapshot_param' is param used for internal snapshot, format= \n" " is 'snapshot.id=3D[ID],snapshot.name=3D[NAME]', or\n" " '[ID_OR_NAME]'\n" - " 'snapshot_id_or_name' is deprecated, use 'snapshot_param'\n" - " instead\n" " '-c' indicates that target image must be compressed (qcow fo= rmat only)\n" " '-u' allows unsafe backing chains. For rebasing, it is assum= ed that old and\n" " new backing file match exactly. The image doesn't need = a working\n" @@ -1994,7 +1992,7 @@ static int img_convert(int argc, char **argv) {"target-image-opts", no_argument, 0, OPTION_TARGET_IMAGE_OPTS= }, {0, 0, 0, 0} }; - c =3D getopt_long(argc, argv, ":hf:O:B:co:s:l:S:pt:T:qnm:WU", + c =3D getopt_long(argc, argv, ":hf:O:B:co:l:S:pt:T:qnm:WU", long_options, NULL); if (c =3D=3D -1) { break; @@ -2035,9 +2033,6 @@ static int img_convert(int argc, char **argv) g_free(old_options); } break; - case 's': - snapshot_name =3D optarg; - break; case 'l': if (strstart(optarg, SNAPSHOT_OPT_BASE, NULL)) { sn_opts =3D qemu_opts_parse_noisily(&internal_snapshot_opt= s, diff --git a/qemu-img.texi b/qemu-img.texi index 2be8206..aeb1b9e 100644 --- a/qemu-img.texi +++ b/qemu-img.texi @@ -61,9 +61,6 @@ by the used format or see the format descriptions below f= or details. is param used for internal snapshot, format is 'snapshot.id=3D[ID],snapshot.name=3D[NAME]' or '[ID_OR_NAME]' =20 -@item snapshot_id_or_name -is deprecated, use snapshot_param instead - @end table =20 @table @option @@ -322,9 +319,9 @@ Error on reading data =20 @end table =20 -@item convert [--object @var{objectdef}] [--image-opts] [--target-image-op= ts] [-U] [-c] [-p] [-q] [-n] [-f @var{fmt}] [-t @var{cache}] [-T @var{src_c= ache}] [-O @var{output_fmt}] [-B @var{backing_file}] [-o @var{options}] [-s= @var{snapshot_id_or_name}] [-l @var{snapshot_param}] [-S @var{sparse_size}= ] [-m @var{num_coroutines}] [-W] @var{filename} [@var{filename2} [...]] @va= r{output_filename} +@item convert [--object @var{objectdef}] [--image-opts] [--target-image-op= ts] [-U] [-c] [-p] [-q] [-n] [-f @var{fmt}] [-t @var{cache}] [-T @var{src_c= ache}] [-O @var{output_fmt}] [-B @var{backing_file}] [-o @var{options}] [-l= @var{snapshot_param}] [-S @var{sparse_size}] [-m @var{num_coroutines}] [-W= ] @var{filename} [@var{filename2} [...]] @var{output_filename} =20 -Convert the disk image @var{filename} or a snapshot @var{snapshot_param}(@= var{snapshot_id_or_name} is deprecated) +Convert the disk image @var{filename} or a snapshot @var{snapshot_param} to disk image @var{output_filename} using format @var{output_fmt}. It can = be optionally compressed (@code{-c} option) or use any format specific options like encryption (@code{-o} opti= on). =20 diff --git a/tests/qemu-iotests/029 b/tests/qemu-iotests/029 index 30bab24..5cff687 100755 --- a/tests/qemu-iotests/029 +++ b/tests/qemu-iotests/029 @@ -92,7 +92,7 @@ _make_test_img 64M { $QEMU_IMG snapshot -c foo $TEST_IMG; } 2>&1 | _filter_qemu_io | _filter_= testdir poke_file "$TEST_IMG" "$offset_size" "\x00\x00\x00\x00\x00\x00\x02\x00" poke_file "$TEST_IMG" "$offset_l1_size" "\x00\x00\x00\x01" -{ $QEMU_IMG convert -s foo $TEST_IMG $TEST_IMG.snap; } 2>&1 | _filter_qemu= _io | _filter_testdir +{ $QEMU_IMG convert -l foo $TEST_IMG $TEST_IMG.snap; } 2>&1 | _filter_qemu= _io | _filter_testdir =20 =20 # success, all done diff --git a/tests/qemu-iotests/080 b/tests/qemu-iotests/080 index 4dbe68e..f0eb42f 100755 --- a/tests/qemu-iotests/080 +++ b/tests/qemu-iotests/080 @@ -176,7 +176,7 @@ _make_test_img 64M { $QEMU_IO -c "write 0 512" $TEST_IMG; } 2>&1 | _filter_qemu_io | _filter_= testdir { $QEMU_IMG snapshot -c test $TEST_IMG; } 2>&1 | _filter_testdir poke_file "$TEST_IMG" "$offset_snap1_l1_offset" "\x00\x00\x00\x00\x00\x40\= x02\x00" -{ $QEMU_IMG convert -s test $TEST_IMG $TEST_IMG.snap; } 2>&1 | _filter_tes= tdir +{ $QEMU_IMG convert -l test $TEST_IMG $TEST_IMG.snap; } 2>&1 | _filter_tes= tdir { $QEMU_IMG amend -o compat=3D0.10 $TEST_IMG; } 2>&1 | _filter_testdir { $QEMU_IO -c "open -o overlap-check.inactive-l2=3Don $TEST_IMG" \ -c 'write 0 4k'; } 2>&1 | _filter_qemu_io | _filter_testdir @@ -190,7 +190,7 @@ _make_test_img 64M { $QEMU_IO -c "write 0 512" $TEST_IMG; } 2>&1 | _filter_qemu_io | _filter_= testdir { $QEMU_IMG snapshot -c test $TEST_IMG; } 2>&1 | _filter_testdir poke_file "$TEST_IMG" "$offset_snap1_l1_size" "\x10\x00\x00\x00" -{ $QEMU_IMG convert -s test $TEST_IMG $TEST_IMG.snap; } 2>&1 | _filter_tes= tdir +{ $QEMU_IMG convert -l test $TEST_IMG $TEST_IMG.snap; } 2>&1 | _filter_tes= tdir { $QEMU_IMG amend -o compat=3D0.10 $TEST_IMG; } 2>&1 | _filter_testdir { $QEMU_IO -c "open -o overlap-check.inactive-l2=3Don $TEST_IMG" \ -c 'write 0 4k'; } 2>&1 | _filter_qemu_io | _filter_testdir --=20 1.8.3.1