"console=ttyS0 " /* serial console */ \
"udevtimeout=300 " /* good for very slow systems (RHBZ#480319) */ \
"noapic " /* workaround for RHBZ#502058 - ok if not SMP */ \
+ "no_timer_check " /* fix for RHBZ#502058 */ \
"acpi=off " /* we don't need ACPI, turn it off */ \
"printk.time=1 " /* display timestamp before kernel messages */ \
"cgroup_disable=memory " /* saves us about 5 MB of RAM */
char cmd[1024];
FILE *fp;
+ free (g->qemu_help);
+ g->qemu_help = NULL;
+ free (g->qemu_version);
+ g->qemu_version = NULL;
+
snprintf (cmd, sizeof cmd, "LC_ALL=C '%s' -nographic -help", g->qemu);
/* qemu -help should always work (qemu -version OTOH wasn't
* probably indicates that the qemu binary is missing.
*/
if (test_qemu_cmd (g, cmd, &g->qemu_help) == -1) {
- perrorf (g, _("%s: command failed: If qemu is located on a non-standard path, try setting the LIBGUESTFS_QEMU environment variable."), cmd);
+ error (g, _("command failed: %s\n\nIf qemu is located on a non-standard path, try setting the LIBGUESTFS_QEMU\nenvironment variable. There may also be errors printed above."),
+ cmd);
return -1;
}
return -1;
}
- if (pclose (fp) == -1)
+ if (pclose (fp) != 0)
return -1;
return 0;