X-Git-Url: http://git.annexia.org/?p=libguestfs.git;a=blobdiff_plain;f=src%2Fguestfs.c;h=802c1d21c36e33a98fe859bf94d02a97f85bf8c5;hp=db6db9107c636b2a416695e0635ea7db46f428db;hb=d0fa2e6b7bccb00dbaae09a4d4c1a87b1dea0351;hpb=23e6fc3f61294acf1bce2003dc4060df25e899f9 diff --git a/src/guestfs.c b/src/guestfs.c index db6db91..802c1d2 100644 --- a/src/guestfs.c +++ b/src/guestfs.c @@ -443,9 +443,11 @@ guestfs_perrorf (guestfs_h *g, const char *fs, ...) int err = errno; va_start (args, fs); - vasprintf (&msg, fs, args); + int err = vasprintf (&msg, fs, args); va_end (args); + if (err < 0) return; + #ifndef _GNU_SOURCE char buf[256]; strerror_r (err, buf, sizeof buf); @@ -1043,7 +1045,9 @@ guestfs_launch (guestfs_h *g) "console=ttyS0 " /* serial console */ \ "udevtimeout=300 " /* good for very slow systems (RHBZ#480319) */ \ "noapic " /* workaround for RHBZ#502058 - ok if not SMP */ \ - "acpi=off " /* we don't need ACPI, turn it off */ + "acpi=off " /* we don't need ACPI, turn it off */ \ + "cgroup_disable=memory " /* saves us about 5 MB of RAM */ \ + "selinux=0 " /* SELinux is messed up if there's no policy */ /* Linux kernel command line. */ snprintf (append, sizeof append,