On Wed, 08/16 09:32, Stefan Hajnoczi wrote:
> On Wed, Aug 16, 2017 at 03:20:58PM +0800, Fam Zheng wrote:
> > Signed-off-by: Fam Zheng <f...@redhat.com>
> > ---
> >  scripts/qemu.py | 5 +++++
> >  1 file changed, 5 insertions(+)
> > 
> > diff --git a/scripts/qemu.py b/scripts/qemu.py
> > index e5f314efdb..3e7eb44035 100644
> > --- a/scripts/qemu.py
> > +++ b/scripts/qemu.py
> > @@ -144,6 +144,11 @@ class QEMUMachine(object):
> >              self._post_shutdown()
> >              raise
> >  
> > +    def wait(self):
> > +        self._popen.wait()
> > +        self._qmp.close()
> > +        self._post_shutdown()
> > +
> 
> Please include docstrings for public methods.

OK.

> 
> Is this method for users who do not use shutdown() because the guest
> halts itself?

Yes, cooperative shutdown (e.g. "shutdown" command from guest or acpi signal) is
cleaner when we want to make sure changes are flushed to disk.

> 
> Why is self._load_io_log() not called?

Will add it.

Fam

Reply via email to