mi: List extensions in usage message
Not all extensions can be enabled or disabled at runtime, list the extensions which can from the help message rather than on error only. v2: * Print the header message in the ListStaticExtensions() (Peter Hutterer) * Do not export ListStaticExtensions() as Xserver API Signed-off-by: Olivier Fourdan <ofourdan@redhat.com> Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
This commit is contained in:
parent
a81c98e42a
commit
3cdac5ba07
|
@ -65,6 +65,7 @@ Xdmx_SOURCES = dmx.c \
|
||||||
dmxwindow.c \
|
dmxwindow.c \
|
||||||
dmxwindow.h \
|
dmxwindow.h \
|
||||||
$(top_srcdir)/mi/miinitext.c \
|
$(top_srcdir)/mi/miinitext.c \
|
||||||
|
$(top_srcdir)/mi/miinitext.h \
|
||||||
$(GLX_SRCS)
|
$(GLX_SRCS)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -20,6 +20,7 @@ srcs = [
|
||||||
'dmxvisual.c',
|
'dmxvisual.c',
|
||||||
'dmxwindow.c',
|
'dmxwindow.c',
|
||||||
'../../mi/miinitext.c',
|
'../../mi/miinitext.c',
|
||||||
|
'../../mi/miinitext.h',
|
||||||
'../../Xext/panoramiX.c',
|
'../../Xext/panoramiX.c',
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,8 @@ libkdrive_la_SOURCES = \
|
||||||
kinput.c \
|
kinput.c \
|
||||||
kshadow.c \
|
kshadow.c \
|
||||||
$(KDRIVE_XV_SOURCES) \
|
$(KDRIVE_XV_SOURCES) \
|
||||||
$(top_srcdir)/mi/miinitext.c
|
$(top_srcdir)/mi/miinitext.c \
|
||||||
|
$(top_srcdir)/mi/miinitext.h
|
||||||
|
|
||||||
if CONFIG_UDEV
|
if CONFIG_UDEV
|
||||||
libkdrive_la_LIBADD = $(top_builddir)/config/libconfig.la
|
libkdrive_la_LIBADD = $(top_builddir)/config/libconfig.la
|
||||||
|
|
|
@ -5,6 +5,7 @@ srcs_kdrive = [
|
||||||
'kinput.c',
|
'kinput.c',
|
||||||
'kshadow.c',
|
'kshadow.c',
|
||||||
'../../../mi/miinitext.c',
|
'../../../mi/miinitext.c',
|
||||||
|
'../../../mi/miinitext.h',
|
||||||
]
|
]
|
||||||
|
|
||||||
if build_xv
|
if build_xv
|
||||||
|
|
|
@ -8,7 +8,8 @@ AM_CFLAGS = -DHAVE_DIX_CONFIG_H \
|
||||||
|
|
||||||
SRCS = InitInput.c \
|
SRCS = InitInput.c \
|
||||||
InitOutput.c \
|
InitOutput.c \
|
||||||
$(top_srcdir)/mi/miinitext.c
|
$(top_srcdir)/mi/miinitext.c \
|
||||||
|
$(top_srcdir)/mi/miinitext.h
|
||||||
|
|
||||||
Xvfb_SOURCES = $(SRCS)
|
Xvfb_SOURCES = $(SRCS)
|
||||||
|
|
||||||
|
|
|
@ -2,6 +2,7 @@ srcs = [
|
||||||
'InitInput.c',
|
'InitInput.c',
|
||||||
'InitOutput.c',
|
'InitOutput.c',
|
||||||
'../../mi/miinitext.c',
|
'../../mi/miinitext.c',
|
||||||
|
'../../mi/miinitext.h',
|
||||||
]
|
]
|
||||||
|
|
||||||
xvfb_server = executable(
|
xvfb_server = executable(
|
||||||
|
|
|
@ -35,5 +35,7 @@ libshadow_la_LDFLAGS = -module -avoid-version $(LD_NO_UNDEFINED_FLAG)
|
||||||
libshadow_la_LIBADD = $(top_builddir)/miext/shadow/libshadow.la
|
libshadow_la_LIBADD = $(top_builddir)/miext/shadow/libshadow.la
|
||||||
libshadow_la_SOURCES = shmodule.c
|
libshadow_la_SOURCES = shmodule.c
|
||||||
|
|
||||||
libdixmods_la_SOURCES = $(top_srcdir)/mi/miinitext.c
|
libdixmods_la_SOURCES = \
|
||||||
|
$(top_srcdir)/mi/miinitext.c \
|
||||||
|
$(top_srcdir)/mi/miinitext.h
|
||||||
libdixmods_la_CFLAGS = $(AM_CFLAGS)
|
libdixmods_la_CFLAGS = $(AM_CFLAGS)
|
||||||
|
|
|
@ -40,7 +40,8 @@ subdir('ramdac')
|
||||||
subdir('xkb')
|
subdir('xkb')
|
||||||
|
|
||||||
srcs_xorg = [
|
srcs_xorg = [
|
||||||
'../../mi/miinitext.c'
|
'../../mi/miinitext.c',
|
||||||
|
'../../mi/miinitext.h',
|
||||||
]
|
]
|
||||||
|
|
||||||
# Extract all the objects so that all symbols get brought into the
|
# Extract all the objects so that all symbols get brought into the
|
||||||
|
|
|
@ -41,7 +41,8 @@ SRCS = Args.c \
|
||||||
XNPixmap.h \
|
XNPixmap.h \
|
||||||
XNWindow.h \
|
XNWindow.h \
|
||||||
xnest-config.h \
|
xnest-config.h \
|
||||||
$(top_srcdir)/mi/miinitext.c
|
$(top_srcdir)/mi/miinitext.c \
|
||||||
|
$(top_srcdir)/mi/miinitext.h
|
||||||
|
|
||||||
XNEST_LIBS = \
|
XNEST_LIBS = \
|
||||||
@XNEST_LIBS@ \
|
@XNEST_LIBS@ \
|
||||||
|
|
|
@ -16,6 +16,7 @@ srcs = [
|
||||||
'Visual.c',
|
'Visual.c',
|
||||||
'Window.c',
|
'Window.c',
|
||||||
'../../mi/miinitext.c',
|
'../../mi/miinitext.c',
|
||||||
|
'../../mi/miinitext.h',
|
||||||
]
|
]
|
||||||
|
|
||||||
executable(
|
executable(
|
||||||
|
|
|
@ -21,6 +21,7 @@ DIST_SUBDIRS = bundle . GL xpr pbproxy mach-startup man
|
||||||
|
|
||||||
libXquartz_la_SOURCES = \
|
libXquartz_la_SOURCES = \
|
||||||
$(top_srcdir)/mi/miinitext.c \
|
$(top_srcdir)/mi/miinitext.c \
|
||||||
|
$(top_srcdir)/mi/miinitext.h \
|
||||||
X11Application.m \
|
X11Application.m \
|
||||||
X11Controller.m \
|
X11Controller.m \
|
||||||
applewm.c \
|
applewm.c \
|
||||||
|
|
|
@ -34,6 +34,7 @@ srcs_libxquartz = [
|
||||||
'quartzRandR.c',
|
'quartzRandR.c',
|
||||||
'console_redirect.c',
|
'console_redirect.c',
|
||||||
'../../mi/miinitext.c',
|
'../../mi/miinitext.c',
|
||||||
|
'../../mi/miinitext.h',
|
||||||
]
|
]
|
||||||
|
|
||||||
libxquartz_defs = [
|
libxquartz_defs = [
|
||||||
|
|
|
@ -41,7 +41,8 @@ Xwayland_SOURCES = \
|
||||||
xwayland-window-buffers.c \
|
xwayland-window-buffers.c \
|
||||||
xwayland-window-buffers.h \
|
xwayland-window-buffers.h \
|
||||||
$(top_srcdir)/Xi/stubs.c \
|
$(top_srcdir)/Xi/stubs.c \
|
||||||
$(top_srcdir)/mi/miinitext.c
|
$(top_srcdir)/mi/miinitext.c \
|
||||||
|
$(top_srcdir)/mi/miinitext.h
|
||||||
|
|
||||||
if GLAMOR
|
if GLAMOR
|
||||||
if GLX
|
if GLX
|
||||||
|
|
|
@ -25,6 +25,7 @@ srcs = [
|
||||||
'xwayland-window-buffers.c',
|
'xwayland-window-buffers.c',
|
||||||
'xwayland-window-buffers.h',
|
'xwayland-window-buffers.h',
|
||||||
'../../mi/miinitext.c',
|
'../../mi/miinitext.c',
|
||||||
|
'../../mi/miinitext.h',
|
||||||
]
|
]
|
||||||
|
|
||||||
scanner_dep = dependency('wayland-scanner', native: true)
|
scanner_dep = dependency('wayland-scanner', native: true)
|
||||||
|
|
|
@ -88,6 +88,7 @@ SRCS = InitInput.c \
|
||||||
windisplay.h \
|
windisplay.h \
|
||||||
XWin.rc \
|
XWin.rc \
|
||||||
$(top_srcdir)/mi/miinitext.c \
|
$(top_srcdir)/mi/miinitext.c \
|
||||||
|
$(top_srcdir)/mi/miinitext.h \
|
||||||
$(SRCS_CLIPBOARD) \
|
$(SRCS_CLIPBOARD) \
|
||||||
$(SRCS_MULTIWINDOW) \
|
$(SRCS_MULTIWINDOW) \
|
||||||
$(SRCS_RANDR)
|
$(SRCS_RANDR)
|
||||||
|
|
|
@ -104,6 +104,7 @@ srcs_windows += [
|
||||||
'windisplay.c',
|
'windisplay.c',
|
||||||
'windisplay.h',
|
'windisplay.h',
|
||||||
'../../mi/miinitext.c',
|
'../../mi/miinitext.c',
|
||||||
|
'../../mi/miinitext.h',
|
||||||
]
|
]
|
||||||
|
|
||||||
rsrc = windows.compile_resources('XWin.rc', include_directories: include_directories('../../include/'))
|
rsrc = windows.compile_resources('XWin.rc', include_directories: include_directories('../../include/'))
|
||||||
|
|
|
@ -107,6 +107,8 @@ SOFTWARE.
|
||||||
#include "os.h"
|
#include "os.h"
|
||||||
#include "globals.h"
|
#include "globals.h"
|
||||||
|
|
||||||
|
#include "miinitext.h"
|
||||||
|
|
||||||
/* List of built-in (statically linked) extensions */
|
/* List of built-in (statically linked) extensions */
|
||||||
static const ExtensionModule staticExtensions[] = {
|
static const ExtensionModule staticExtensions[] = {
|
||||||
{GEExtensionInit, "Generic Event Extension", &noGEExtension},
|
{GEExtensionInit, "Generic Event Extension", &noGEExtension},
|
||||||
|
@ -182,6 +184,21 @@ static const ExtensionModule staticExtensions[] = {
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
|
void
|
||||||
|
ListStaticExtensions(void)
|
||||||
|
{
|
||||||
|
const ExtensionModule *ext;
|
||||||
|
int i;
|
||||||
|
|
||||||
|
ErrorF(" Only the following extensions can be run-time enabled/disabled:\n");
|
||||||
|
for (i = 0; i < ARRAY_SIZE(staticExtensions); i++) {
|
||||||
|
ext = &staticExtensions[i];
|
||||||
|
if (ext->disablePtr != NULL) {
|
||||||
|
ErrorF("\t%s\n", ext->name);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Bool
|
Bool
|
||||||
EnableDisableExtension(const char *name, Bool enable)
|
EnableDisableExtension(const char *name, Bool enable)
|
||||||
{
|
{
|
||||||
|
@ -227,14 +244,7 @@ EnableDisableExtensionError(const char *name, Bool enable)
|
||||||
if (enable == FALSE)
|
if (enable == FALSE)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
ErrorF("[mi] Only the following extensions can be run-time %s:\n",
|
ListStaticExtensions();
|
||||||
enable ? "enabled" : "disabled");
|
|
||||||
for (i = 0; i < ARRAY_SIZE(staticExtensions); i++) {
|
|
||||||
ext = &staticExtensions[i];
|
|
||||||
if (ext->disablePtr != NULL) {
|
|
||||||
ErrorF("[mi] %s\n", ext->name);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static ExtensionModule *ExtensionModuleList = NULL;
|
static ExtensionModule *ExtensionModuleList = NULL;
|
||||||
|
|
|
@ -0,0 +1,83 @@
|
||||||
|
/***********************************************************
|
||||||
|
|
||||||
|
Copyright 1987, 1998 The Open Group
|
||||||
|
|
||||||
|
Permission to use, copy, modify, distribute, and sell this software and its
|
||||||
|
documentation for any purpose is hereby granted without fee, provided that
|
||||||
|
the above copyright notice appear in all copies and that both that
|
||||||
|
copyright notice and this permission notice appear in supporting
|
||||||
|
documentation.
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in
|
||||||
|
all copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
|
||||||
|
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||||
|
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
|
Except as contained in this notice, the name of The Open Group shall not be
|
||||||
|
used in advertising or otherwise to promote the sale, use or other dealings
|
||||||
|
in this Software without prior written authorization from The Open Group.
|
||||||
|
|
||||||
|
Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
|
||||||
|
|
||||||
|
All Rights Reserved
|
||||||
|
|
||||||
|
Permission to use, copy, modify, and distribute this software and its
|
||||||
|
documentation for any purpose and without fee is hereby granted,
|
||||||
|
provided that the above copyright notice appear in all copies and that
|
||||||
|
both that copyright notice and this permission notice appear in
|
||||||
|
supporting documentation, and that the name of Digital not be
|
||||||
|
used in advertising or publicity pertaining to distribution of the
|
||||||
|
software without specific, written prior permission.
|
||||||
|
|
||||||
|
DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
|
||||||
|
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
|
||||||
|
DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
|
||||||
|
ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
||||||
|
WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
|
||||||
|
ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
||||||
|
SOFTWARE.
|
||||||
|
|
||||||
|
******************************************************************/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2000 by The XFree86 Project, Inc.
|
||||||
|
*
|
||||||
|
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||||
|
* copy of this software and associated documentation files (the "Software"),
|
||||||
|
* to deal in the Software without restriction, including without limitation
|
||||||
|
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||||
|
* and/or sell copies of the Software, and to permit persons to whom the
|
||||||
|
* Software is furnished to do so, subject to the following conditions:
|
||||||
|
*
|
||||||
|
* The above copyright notice and this permission notice shall be included in
|
||||||
|
* all copies or substantial portions of the Software.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||||
|
* THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
||||||
|
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||||
|
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||||
|
* OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
*
|
||||||
|
* Except as contained in this notice, the name of the copyright holder(s)
|
||||||
|
* and author(s) shall not be used in advertising or otherwise to promote
|
||||||
|
* the sale, use or other dealings in this Software without prior written
|
||||||
|
* authorization from the copyright holder(s) and author(s).
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef HAVE_DIX_CONFIG_H
|
||||||
|
#include <dix-config.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef MIINITEXT_H
|
||||||
|
#define MIINITEXT_H
|
||||||
|
|
||||||
|
void ListStaticExtensions(void);
|
||||||
|
|
||||||
|
#endif /* MIINITEXT_H */
|
|
@ -110,6 +110,8 @@ __stdcall unsigned long GetTickCount(void);
|
||||||
|
|
||||||
#include "picture.h"
|
#include "picture.h"
|
||||||
|
|
||||||
|
#include "miinitext.h"
|
||||||
|
|
||||||
Bool noTestExtensions;
|
Bool noTestExtensions;
|
||||||
|
|
||||||
#ifdef COMPOSITE
|
#ifdef COMPOSITE
|
||||||
|
@ -576,6 +578,7 @@ UseMsg(void)
|
||||||
ErrorF("-sigstop Enable SIGSTOP based startup\n");
|
ErrorF("-sigstop Enable SIGSTOP based startup\n");
|
||||||
ErrorF("+extension name Enable extension\n");
|
ErrorF("+extension name Enable extension\n");
|
||||||
ErrorF("-extension name Disable extension\n");
|
ErrorF("-extension name Disable extension\n");
|
||||||
|
ListStaticExtensions();
|
||||||
#ifdef XDMCP
|
#ifdef XDMCP
|
||||||
XdmcpUseMsg();
|
XdmcpUseMsg();
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -122,6 +122,7 @@ if build_xorg
|
||||||
# For now, requires xf86 ddx, could be adjusted to use another
|
# For now, requires xf86 ddx, could be adjusted to use another
|
||||||
unit_sources = [
|
unit_sources = [
|
||||||
'../mi/miinitext.c',
|
'../mi/miinitext.c',
|
||||||
|
'../mi/miinitext.h',
|
||||||
'fixes.c',
|
'fixes.c',
|
||||||
'input.c',
|
'input.c',
|
||||||
'list.c',
|
'list.c',
|
||||||
|
|
Loading…
Reference in New Issue