mrc0mmand / rpms / libguestfs

Forked from rpms/libguestfs 3 years ago
Clone

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

90a56e
From 07dfad456fb78bbb5c3c1342f45c48dff4db2c36 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
---
90a56e
 lib/launch-uml.c | 13 +++++++++++++
ffd6ed
 1 file changed, 13 insertions(+)
0d20ef
90a56e
diff --git a/lib/launch-uml.c b/lib/launch-uml.c
90a56e
index c391af3..3033daa 100644
90a56e
--- a/lib/launch-uml.c
90a56e
+++ b/lib/launch-uml.c
e76f14
@@ -44,7 +44,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 *
e76f14
@@ -82,6 +84,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
  */
e76f14
@@ -129,10 +132,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;
90a56e
@@ -486,8 +496,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.
90a56e
@@ -517,6 +529,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
-- 
90a56e
2.9.4
0d20ef