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

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