|
From: | Kevin Wolf |
Subject: | Re: [Qemu-devel] [patch 1/7] add migration_active function |
Date: | Fri, 27 May 2011 19:43:06 +0200 |
User-agent: | Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110428 Fedora/3.1.10-1.fc15 Thunderbird/3.1.10 |
Am 23.05.2011 23:31, schrieb Marcelo Tosatti: > To query whether migration is active. > > Signed-off-by: Marcelo Tosatti <address@hidden> > > Index: qemu-block-copy/migration.c > =================================================================== > --- qemu-block-copy.orig/migration.c > +++ qemu-block-copy/migration.c > @@ -480,3 +480,13 @@ int get_migration_state(void) > return MIG_STATE_ERROR; > } > } > + > +bool migration_active(void) > +{ > + if (current_migration && > + current_migration->get_status(current_migration) == > MIG_STATE_ACTIVE) { > + return true; > + } > + > + return false; > +} The very same check already exists open-coded in do_migrate(). Maybe we should convert it now that a function is available for it? Kevin
[Prev in Thread] | Current Thread | [Next in Thread] |