Received: from eggs.gnu.org ([2001:4830:134:3::10]:49831) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VTTc0-00084G-KX for qemu-devel@nongnu.org; Tue, 08 Oct 2013 05:29:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VTTbu-0007bw-L3 for qemu-devel@nongnu.org; Tue, 08 Oct 2013 05:29:52 -0400 Received: from mx1.redhat.com ([209.132.183.28]:41276) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VTTbu-0007bp-DX for qemu-devel@nongnu.org; Tue, 08 Oct 2013 05:29:46 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r989TjlE000842 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 8 Oct 2013 05:29:45 -0400 From: Fam Zheng Date: Tue, 8 Oct 2013 17:29:37 +0800 Message-Id: <1381224580-14950-1-git-send-email-famz@redhat.com> Subject: [Qemu-devel] [PATCH 0/3] qapi: introduce BlockJobType enum List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: kwolf@redhat.com, stefanha@redhat.com Currently, block job type is hard coded string and could be repeated in different places in the code base. Introduce a enum type in QAPI to make it better for maintenance and introspection. The old BlockJobType struct is renamed to BlockJobDriver and its field "job_type" becomes a BlockJobType enum. Nothing is changed to the interface. Fam Zheng (3): blockjob: rename BlockJobType to BlockJobDriver qapi: Introduce enum BlockJobType qapi: make use of new BlockJobType block/backup.c | 6 +++--- block/commit.c | 6 +++--- block/mirror.c | 6 +++--- block/stream.c | 6 +++--- blockjob.c | 22 +++++++++++----------- include/block/blockjob.h | 14 +++++++------- qapi-schema.json | 18 ++++++++++++++++++ 7 files changed, 48 insertions(+), 30 deletions(-) -- 1.8.3.1