Coverity: Ignore return value from guestfs_launch in virt-rescue.
[libguestfs.git] / rescue / virt-rescue.c
index 8341e97..dd033aa 100644 (file)
@@ -1,5 +1,5 @@
 /* virt-rescue
- * Copyright (C) 2010 Red Hat Inc.
+ * Copyright (C) 2010-2011 Red Hat Inc.
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
 
 #include <stdio.h>
 #include <stdlib.h>
+#include <string.h>
 #include <inttypes.h>
 #include <unistd.h>
 #include <getopt.h>
 #include <errno.h>
 #include <locale.h>
 #include <assert.h>
+#include <libintl.h>
 
+#include "ignore-value.h"
 #include "progname.h"
 #include "xvasprintf.h"
 
@@ -95,6 +98,8 @@ main (int argc, char *argv[])
   bindtextdomain (PACKAGE, LOCALEBASEDIR);
   textdomain (PACKAGE);
 
+  parse_config ();
+
   enum { HELP_OPTION = CHAR_MAX + 1 };
 
   static const char *options = "a:c:d:m:rvVx";
@@ -285,7 +290,9 @@ main (int argc, char *argv[])
    * appliance.
    */
   guestfs_set_error_handler (g, NULL, NULL);
-  guestfs_launch (g);
+
+  /* We expect launch to fail, so ignore the return value. */
+  ignore_value (guestfs_launch (g));
 
   /* launch() expects guestfsd to start. However, virt-rescue doesn't
    * run guestfsd, so this will always fail with ECHILD when the