Received: from eggs.gnu.org ([2001:4830:134:3::10]:44687) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XGlE6-0002Ol-R7 for qemu-devel@nongnu.org; Mon, 11 Aug 2014 04:45:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XGlDy-0003Bd-UU for qemu-devel@nongnu.org; Mon, 11 Aug 2014 04:45:10 -0400 Received: from mx1.redhat.com ([209.132.183.28]:39702) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XGlDy-00039K-M8 for qemu-devel@nongnu.org; Mon, 11 Aug 2014 04:45:02 -0400 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s7B8j1OE021536 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Mon, 11 Aug 2014 04:45:02 -0400 From: Fam Zheng Date: Mon, 11 Aug 2014 16:45:16 +0800 Message-Id: <1407746718-16527-1-git-send-email-famz@redhat.com> Subject: [Qemu-devel] [PATCH v3 0/2] scsi: Change device init to realize List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: kwolf@redhat.com, pbonzini@redhat.com, armbru@redhat.com, stefanha@redhat.com v3: Fix error handling of scsi_device_init (Kevin) Thanks for reviewing! DeviceClass->init is the old interface, let's convert scsi devices to the new ->realize API. A user visible change is the error message shown in qemu-iotests reference output, but I don't know what's the best way to retain it. So please review if and how this could be improved. Fam Fam Zheng (2): block: Pass errp in blkconf_geometry scsi-bus: Convert DeviceClass init to realize hw/block/block.c | 18 +++++----- hw/block/virtio-blk.c | 7 ++-- hw/ide/qdev.c | 11 ++++-- hw/scsi/lsi53c895a.c | 2 ++ hw/scsi/scsi-bus.c | 69 ++++++++++++++++++-------------------- hw/scsi/scsi-disk.c | 83 +++++++++++++++++++++++++--------------------- hw/scsi/scsi-generic.c | 37 ++++++++++----------- include/hw/block/block.h | 6 ++-- include/hw/scsi/scsi.h | 7 ++-- tests/qemu-iotests/051.out | 4 +-- 10 files changed, 128 insertions(+), 116 deletions(-) -- 2.0.3