From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=46236 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PsAtR-0002HY-N9 for qemu-devel@nongnu.org; Wed, 23 Feb 2011 04:20:22 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PsAtQ-0001B9-EA for qemu-devel@nongnu.org; Wed, 23 Feb 2011 04:20:21 -0500 Received: from mx1.redhat.com ([209.132.183.28]:16697) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PsAtQ-0001B4-2m for qemu-devel@nongnu.org; Wed, 23 Feb 2011 04:20:20 -0500 From: Juan Quintela In-Reply-To: (Yoshiaki Tamura's message of "Wed, 23 Feb 2011 17:42:29 +0900") References: <03353a90bb08ef0f82e1caa0a294524d0ea2baa0.1298421307.git.quintela@redhat.com> Date: Wed, 23 Feb 2011 10:18:43 +0100 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: [Qemu-devel] Re: [PATCH 14/22] migration: Remove get_status() accessor Reply-To: quintela@redhat.com List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Yoshiaki Tamura Cc: qemu-devel@nongnu.org Yoshiaki Tamura wrote: > 2011/2/23 Juan Quintela : >> It is only used inside migration.c, and fields on that struct are >> accessed all around the place on that file. > > I agree to access s->state directly inside of migration.c, but I > disagree to remove get_status() accessor right away. We don't > have strong motivations for doing that AFAIK. Only user outside of migration.c was ui/spice-core.c, and it just wanted to know if migration has finished at all. At this point I was trying to isolate what other parts of MigrationState are used externally. That way, it gets easier to change that later. At this point, only things used outside of migration.c are: - write, clase, get_error: trivial to fix, just add setters for them. - fd: that is not enterely trivial to fix. Later, Juan.