configure: Drop --with-qemu-options / QEMU_OPTIONS.

In its current form this is very hard to implement because it requires
us to "unparse" the options, including removing any shell quoting.

It wasn't implemented at all for the libvirt backend.

Also contrary to the documentation, the configure script did not use
these options for testing, but constructed its own set of qemu test
options.
This commit is contained in:
Richard W.M. Jones
2017-04-27 10:42:19 +01:00
parent 581c4bcc1d
commit bb5ffd7497
4 changed files with 1 additions and 88 deletions

View File

@@ -321,7 +321,7 @@ echo "This is how we have configured the optional components for you today:"
echo
echo "Daemon .............................. $enable_daemon"
echo "Appliance ........................... $ENABLE_APPLIANCE"
echo "QEMU ................................ $QEMU $QEMU_OPTIONS"
echo "QEMU ................................ $QEMU"
echo "guestfish and C-based virt tools .... yes"
echo "FUSE filesystem ..................... $enable_fuse"
AS_ECHO_N(["GNU gettext for i18n ................ "])

View File

@@ -667,11 +667,6 @@ Provide an alternate qemu binary (or list of binaries). This can be
overridden at runtime by setting the C<LIBGUESTFS_HV> environment
variable.
=item B<--with-qemu-options=">-M ... -cpu ...B<">
If qemu requires extra options to work on this platform, you can pass
them here, and they will be used both when testing and running qemu.
=item B<--with-supermin-packager-config=>I<yum.conf>
This passes the I<--packager-config> option to L<supermin(1)>.

View File

@@ -97,64 +97,6 @@ create_cow_overlay_direct (guestfs_h *g, void *datav, struct drive *drv)
return overlay;
}
#ifdef QEMU_OPTIONS
/* Like 'add_cmdline' but allowing a shell-quoted string of zero or
* more options. XXX The unquoting is not very clever.
*/
static void
add_cmdline_shell_unquoted (guestfs_h *g, struct stringsbuf *sb,
const char *options)
{
char quote;
const char *startp, *endp, *nextp;
while (*options) {
quote = *options;
if (quote == '\'' || quote == '"')
startp = options+1;
else {
startp = options;
quote = ' ';
}
endp = strchr (options, quote);
if (endp == NULL) {
if (quote != ' ') {
fprintf (stderr,
_("unclosed quote character (%c) in command line near: %s"),
quote, options);
_exit (EXIT_FAILURE);
}
endp = options + strlen (options);
}
if (quote == ' ') {
if (endp[0] == '\0')
nextp = endp;
else
nextp = endp+1;
}
else {
if (!endp[1])
nextp = endp+1;
else if (endp[1] == ' ')
nextp = endp+2;
else {
fprintf (stderr, _("cannot parse quoted string near: %s"), options);
_exit (EXIT_FAILURE);
}
}
while (*nextp && *nextp == ' ')
nextp++;
guestfs_int_add_string_nodup (g, sb,
safe_strndup (g, startp, endp-startp));
options = nextp;
}
}
#endif /* defined QEMU_OPTIONS */
/* On Debian, /dev/kvm is mode 0660 and group kvm, so users need to
* add themselves to the kvm group otherwise things are going to be
* very slow (this is Debian bug 640328). Warn about this.
@@ -604,14 +546,6 @@ launch_direct (guestfs_h *g, void *datav, const char *arg)
* qemu -set parameters can modify previously added options.
*/
/* Add the extra options for the qemu command line specified
* at configure time.
*/
#ifdef QEMU_OPTIONS
if (STRNEQ (QEMU_OPTIONS, ""))
add_cmdline_shell_unquoted (g, &cmdline, QEMU_OPTIONS);
#endif
/* Add any qemu parameters. */
for (hp = g->hv_params; hp; hp = hp->next) {
ADD_CMDLINE (hp->hv_param);

View File

@@ -43,22 +43,6 @@ AS_IF([test "x$with_qemu" = "xno"],[
AC_DEFINE_UNQUOTED([QEMU],["$QEMU"],[Location of qemu binary.])
dnl Does the user wish to specify -M, -cpu or other qemu options?
AC_MSG_CHECKING([if the user specified extra options for qemu command line])
AC_ARG_WITH([qemu-options],
[AS_HELP_STRING([--with-qemu-options="-M ... -cpu ... etc"],
[pass extra options for qemu command line @<:@default=no@:>@])],
[QEMU_OPTIONS="$withval"],
[QEMU_OPTIONS=no])
AS_IF([test "x$QEMU_OPTIONS" = "xno"],[
AC_MSG_RESULT([no])
QEMU_OPTIONS=
],[
AC_MSG_RESULT([$QEMU_OPTIONS])
])
AC_DEFINE_UNQUOTED([QEMU_OPTIONS],["$QEMU_OPTIONS"],
[Extra options for qemu command line.])
dnl Check that the chosen qemu has virtio-serial support.
dnl For historical reasons this can be disabled by setting
dnl vmchannel_test=no.