mrc0mmand / rpms / libguestfs

Forked from rpms/libguestfs 3 years ago
Clone

Blame SOURCES/0068-RHEL-8-Remove-User-Mode-Linux-RHBZ-1144197.patch

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