summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Jones <rjones@trick.home.annexia.org>2009-07-22 21:11:10 +0100
committerRichard Jones <rjones@trick.home.annexia.org>2009-07-22 21:11:10 +0100
commit23e6fc3f61294acf1bce2003dc4060df25e899f9 (patch)
tree1310443730d2cc78ae7611aeac958b6cf1419bb7
parent1a5755dbbff0fa4d87984cb7d67cb8239fd71a84 (diff)
downloadlibguestfs-23e6fc3f61294acf1bce2003dc4060df25e899f9.tar.gz
libguestfs-23e6fc3f61294acf1bce2003dc4060df25e899f9.tar.xz
libguestfs-23e6fc3f61294acf1bce2003dc4060df25e899f9.zip
Revert "Add 'set-kernel'/'get-kernel'/LIBGUESTFS_KERNEL to override appliance kernel."
This reverts commit 34d2df41626f1ee4172a6d40b06d72d6ed9d6348.
-rw-r--r--guestfish.pod4
-rw-r--r--guestfs.pod4
-rwxr-xr-xsrc/generator.ml25
-rw-r--r--src/guestfs.c25
4 files changed, 1 insertions, 57 deletions
diff --git a/guestfish.pod b/guestfish.pod
index 6f35ac46..f2255f16 100644
--- a/guestfish.pod
+++ b/guestfish.pod
@@ -553,10 +553,6 @@ Pass additional options to the guest kernel.
Set C<LIBGUESTFS_DEBUG=1> to enable verbose messages. This has the
same effect as using the B<-v> option.
-=item LIBGUESTFS_KERNEL
-
-Override the ordinary selection of appliance kernel.
-
=item LIBGUESTFS_MEMSIZE
Set the memory allocated to the qemu process, in megabytes. For
diff --git a/guestfs.pod b/guestfs.pod
index 9e0d4d31..4235454e 100644
--- a/guestfs.pod
+++ b/guestfs.pod
@@ -917,10 +917,6 @@ Pass additional options to the guest kernel.
Set C<LIBGUESTFS_DEBUG=1> to enable verbose messages. This
has the same effect as calling C<guestfs_set_verbose (handle, 1)>.
-=item LIBGUESTFS_KERNEL
-
-Override the ordinary selection of appliance kernel.
-
=item LIBGUESTFS_MEMSIZE
Set the memory allocated to the qemu process, in megabytes. For
diff --git a/src/generator.ml b/src/generator.ml
index f851606a..de3b4f62 100755
--- a/src/generator.ml
+++ b/src/generator.ml
@@ -530,31 +530,6 @@ guest kernel command line.
If C<NULL> then no options are added.");
- ("set_kernel", (RErr, [OptString "kernel"]), -1, [FishAlias "kernel"],
- [],
- "override the normal appliance kernel",
- "\
-This function lets you override the ordinary selection
-of kernel used in the appliance.
-
-The default is C<NULL> unless overridden by setting
-C<LIBGUESTFS_KERNEL> environment variable.
-
-Setting C<kernel> to C<NULL> means the ordinary appliance
-kernel is selected by the usual means.");
-
- ("get_kernel", (RConstString "kernel", []), -1, [],
- (* This cannot be tested with the current framework. The
- * function can return NULL in normal operations, which the
- * test framework interprets as an error.
- *)
- [],
- "get the override appliance kernel",
- "\
-Return the override appliance kernel (see C<guestfs_set_kernel>).
-
-If C<NULL> then the ordinary appliance kernel is used.");
-
("set_autosync", (RErr, [Bool "autosync"]), -1, [FishAlias "autosync"],
[],
"set autosync mode",
diff --git a/src/guestfs.c b/src/guestfs.c
index 5750a4f4..db6db910 100644
--- a/src/guestfs.c
+++ b/src/guestfs.c
@@ -174,7 +174,6 @@ struct guestfs_h
char *path; /* Path to kernel, initrd. */
char *qemu; /* Qemu binary. */
char *append; /* Append to kernel command line. */
- char *kernel; /* Override appliance kernel. */
int memsize; /* Size of RAM (megabytes). */
@@ -250,12 +249,6 @@ guestfs_create (void)
if (!g->append) goto error;
}
- str = getenv ("LIBGUESTFS_KERNEL");
- if (str) {
- g->kernel = strdup (str);
- if (!g->kernel) goto error;
- }
-
/* Choose a suitable memory size. Previously we tried to choose
* a minimal memory size, but this isn't really necessary since
* recent QEMU and KVM don't do anything nasty like locking
@@ -681,22 +674,6 @@ guestfs_get_append (guestfs_h *g)
}
int
-guestfs_set_kernel (guestfs_h *g, const char *kernel)
-{
- free (g->kernel);
- g->kernel = NULL;
-
- g->kernel = kernel ? safe_strdup (g, kernel) : NULL;
- return 0;
-}
-
-const char *
-guestfs_get_kernel (guestfs_h *g)
-{
- return g->kernel;
-}
-
-int
guestfs_set_memsize (guestfs_h *g, int memsize)
{
g->memsize = memsize;
@@ -1081,7 +1058,7 @@ guestfs_launch (guestfs_h *g)
add_cmdline (g, memsize_str);
add_cmdline (g, "-no-reboot"); /* Force exit instead of reboot on panic */
add_cmdline (g, "-kernel");
- add_cmdline (g, g->kernel ? : (char *) kernel);
+ add_cmdline (g, (char *) kernel);
add_cmdline (g, "-initrd");
add_cmdline (g, (char *) initrd);
add_cmdline (g, "-append");