From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:37822) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UWllP-00025Z-6z for qemu-devel@nongnu.org; Mon, 29 Apr 2013 06:56:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UWllO-0004sn-Dy for qemu-devel@nongnu.org; Mon, 29 Apr 2013 06:56:55 -0400 Received: from goliath.siemens.de ([192.35.17.28]:22868) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UWllO-0004sN-4n for qemu-devel@nongnu.org; Mon, 29 Apr 2013 06:56:54 -0400 Message-ID: <517E51F2.2050705@siemens.com> Date: Mon, 29 Apr 2013 12:56:50 +0200 From: Jan Kiszka MIME-Version: 1.0 References: <661021052fba1fed3d9d872b47ae050c5593ebfc.1361565596.git.jan.kiszka@siemens.com> <5128C6B0.8060303@suse.de> In-Reply-To: <5128C6B0.8060303@suse.de> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH v2 2/2] Add AT24Cxx I2C EEPROM device model List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?ISO-8859-15?Q?Andreas_F=E4rber?= Cc: Paolo Bonzini , Anthony Liguori , qemu-devel On 2013-02-23 14:40, Andreas F=E4rber wrote: >> +static int at24_init(I2CSlave *i2c) >=20 > hw/i2c.c:i2c_slave_qdev_init() calls I2CSlaveClass::init only, so pleas= e > use a realize function instead. Cf. hw/qdev-core.h. >=20 >> +{ >> + AT24State *s =3D DO_UPCAST(AT24State, i2c, i2c); >> + unsigned int page_size; >> + int64_t image_size; >> + int device_bits; >> + int hi_addr_bits; >> + int dev_no; >> + >> + assert(AT24_MAX_PAGE_LEN <=3D BDRV_SECTOR_SIZE); >=20 > This should instead do error_setg(errp, "...") then. I just noticed with my latest code that the messages set via error_setg do not make it to the terminal when initializing the device from the command line. Known issue? Jan --=20 Siemens AG, Corporate Technology, CT RTC ITP SDP-DE Corporate Competence Center Embedded Linux