mrc0mmand / rpms / libguestfs

Forked from rpms/libguestfs 3 years ago
Clone

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

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