On Thu, Feb 05, 2009 at 06:49:52PM +0100, Jim Meyering wrote:
Guido Günther <agx(a)sigxcpu.org> wrote:
> we currently don't report errors to save qemu's domain status file back
> to the caller. That was o.k. as long as the code was there for testing
> but now that the XML is being picked up on daemon restart we must
> handle these.
> The attached patch does that, although I'm not confident that it's
> enough. While we return error on device attach/unattach the device
> actually got attached/unattached already. Same is true for
> suspend/resume.
> A better solution would be to write out the new domain status into a
> temp file and simply call rename(2) on it when the attach/unattach
> succeeds and discard it if it fails. This would minimize the possible
> error conditions like disk full, missing permissions to write into that
> directory etc. Does this sound reasonable?
Yes.
> O.k. to apply the attached version for now?
Looks good to me.
Minor formatting nits:
I've applied it with your indentation suggestions
fixed.
-- Guido