mrc0mmand / rpms / libguestfs

Forked from rpms/libguestfs 3 years ago
Clone

Blame SOURCES/0004-RHEL-7-Remove-User-Mode-Linux-RHBZ-1144197.patch

e9bfca
From adeeafce7f7ada1c8b98120745388d5a51b27ca3 Mon Sep 17 00:00:00 2001
151578
From: "Richard W.M. Jones" <rjones@redhat.com>
151578
Date: Fri, 19 Sep 2014 13:38:20 +0100
151578
Subject: [PATCH] RHEL 7: Remove User-Mode Linux (RHBZ#1144197).
151578
151578
This isn't supported in RHEL 7.
151578
---
151578
 lib/launch-uml.c | 13 +++++++++++++
151578
 1 file changed, 13 insertions(+)
151578
151578
diff --git a/lib/launch-uml.c b/lib/launch-uml.c
e9bfca
index b8825cf56..1acf8db27 100644
151578
--- a/lib/launch-uml.c
151578
+++ b/lib/launch-uml.c
151578
@@ -44,7 +44,9 @@ struct backend_uml_data {
151578
   char umid[UML_UMID_LEN+1];    /* umid=<...> unique ID. */
151578
 };
151578
 
151578
+#if 0
151578
 static void print_vmlinux_command_line (guestfs_h *g, char **argv);
151578
+#endif
151578
 
151578
 /* Run uml_mkcow to create a COW overlay. */
151578
 static char *
151578
@@ -81,6 +83,7 @@ create_cow_overlay_uml (guestfs_h *g, void *datav, struct drive *drv)
151578
   return make_cow_overlay (g, drv->src.u.path);
151578
 }
151578
 
151578
+#if 0
151578
 /* Test for features which are not supported by the UML backend.
151578
  * Possibly some of these should just be warnings, not errors.
151578
  */
151578
@@ -128,10 +131,17 @@ uml_supported (guestfs_h *g)
151578
 
151578
   return true;
151578
 }
151578
+#endif
151578
 
151578
 static int
151578
 launch_uml (guestfs_h *g, void *datav, const char *arg)
151578
 {
151578
+  error (g,
151578
+	 "launch: In RHEL, only the 'libvirt' or 'direct' method is supported.\n"
151578
+	 "In particular, User-Mode Linux (UML) is not supported.");
151578
+  return -1;
151578
+
151578
+#if 0
151578
   struct backend_uml_data *data = datav;
151578
   CLEANUP_FREE_STRINGSBUF DECLARE_STRINGSBUF (cmdline);
151578
   int console_sock = -1, daemon_sock = -1;
151578
@@ -491,8 +501,10 @@ launch_uml (guestfs_h *g, void *datav, const char *arg)
151578
   }
151578
   g->state = CONFIG;
151578
   return -1;
151578
+#endif
151578
 }
151578
 
151578
+#if 0
151578
 /* This is called from the forked subprocess just before vmlinux runs,
151578
  * so it can just print the message straight to stderr, where it will
151578
  * be picked up and funnelled through the usual appliance event API.
151578
@@ -522,6 +534,7 @@ print_vmlinux_command_line (guestfs_h *g, char **argv)
151578
 
151578
   fputc ('\n', stderr);
151578
 }
151578
+#endif
151578
 
151578
 static int
151578
 shutdown_uml (guestfs_h *g, void *datav, int check_for_errors)
151578
-- 
8ff76f
2.20.1
151578