On Thu, Aug 26, 2010 at 12:12:00PM +0100, Matthew Booth wrote:
+ /* We actually hard reboot here rather than power off. For some
reason
+ * reboot causes the qemu process to die, whereas poweroff doesn't.
+ *
+ * This should not return */
+ reboot(RB_AUTOBOOT);
We run qemu with -no-reboot which turns reboots into poweroffs.
As to why poweroff doesn't work, I'd guess it's something to do with
the fact that we disable ACPI support in the kernel.
+ perror("Power off failed");
+ return 1;
This should probably be exit (or return) EXIT_FAILURE.
This patch now looks good in general. I'm going to play with it on my
machine to make sure it works and there are no regressions that I can
find.
Rich.
--
Richard Jones, Virtualization Group, Red Hat
http://people.redhat.com/~rjones
virt-top is 'top' for virtual machines. Tiny program with many
powerful monitoring features, net stats, disk stats, logging, etc.
http://et.redhat.com/~rjones/virt-top