mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-06-06 21:08:26 +02:00
Merge branch 'xorg_no_dbus' into 'main'
xf86: add an option to avoid connecting to D-Bus Closes #554 See merge request xorg/xserver!2182
This commit is contained in:
commit
a6c9935ed7
7 changed files with 32 additions and 4 deletions
|
|
@ -650,6 +650,7 @@ typedef enum {
|
|||
FLAG_IGLX,
|
||||
FLAG_DEBUG,
|
||||
FLAG_ALLOW_BYTE_SWAPPED_CLIENTS,
|
||||
FLAG_NODBUS,
|
||||
} FlagValues;
|
||||
|
||||
/**
|
||||
|
|
@ -711,6 +712,8 @@ static OptionInfoRec FlagOptions[] = {
|
|||
{0}, FALSE},
|
||||
{FLAG_ALLOW_BYTE_SWAPPED_CLIENTS, "AllowByteSwappedClients", OPTV_BOOLEAN,
|
||||
{0}, FALSE},
|
||||
{FLAG_NODBUS, "NoDbus", OPTV_BOOLEAN,
|
||||
{0}, FALSE},
|
||||
{-1, NULL, OPTV_NONE,
|
||||
{0}, FALSE},
|
||||
};
|
||||
|
|
@ -820,6 +823,9 @@ configServerFlags(XF86ConfFlagsPtr flagsconf, XF86OptionPtr layoutopts)
|
|||
if (xf86GetOptValBool(FlagOptions, FLAG_ALLOWMOUSEOPENFAIL, &value))
|
||||
xf86Info.allowMouseOpenFail = value;
|
||||
|
||||
if (xf86GetOptValBool(FlagOptions, FLAG_NODBUS, &value))
|
||||
xf86Info.noDbus = value;
|
||||
|
||||
xf86Info.pmFlag = TRUE;
|
||||
if (xf86GetOptValBool(FlagOptions, FLAG_NOPM, &value))
|
||||
xf86Info.pmFlag = !value;
|
||||
|
|
@ -2473,6 +2479,9 @@ xf86HandleConfigFile(Bool autoconfig)
|
|||
if (xf86AllowMouseOpenFail)
|
||||
xf86Info.allowMouseOpenFail = TRUE;
|
||||
|
||||
if (xf86DbusDisabled)
|
||||
xf86Info.noDbus = TRUE;
|
||||
|
||||
return CONFIG_OK;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -133,6 +133,7 @@ xf86InfoRec xf86Info = {
|
|||
.autoAddGPU = FALSE,
|
||||
#endif
|
||||
.autoBindGPU = TRUE,
|
||||
.noDbus = FALSE,
|
||||
};
|
||||
|
||||
const char *xf86ConfigFile = NULL;
|
||||
|
|
@ -199,3 +200,4 @@ Bool xf86VidModeDisabled = FALSE;
|
|||
Bool xf86VidModeAllowNonLocal = FALSE;
|
||||
#endif
|
||||
Bool xorgHWAccess = FALSE;
|
||||
Bool xf86DbusDisabled = FALSE;
|
||||
|
|
|
|||
|
|
@ -335,8 +335,10 @@ InitOutput(ScreenInfo * pScreenInfo, int argc, char **argv)
|
|||
if (xf86DoShowOptions)
|
||||
DoShowOptions();
|
||||
|
||||
dbus_core_init();
|
||||
systemd_logind_init();
|
||||
if (!xf86Info.noDbus) {
|
||||
dbus_core_init();
|
||||
systemd_logind_init();
|
||||
}
|
||||
|
||||
/* Do a general bus probe. This will be a PCI probe for x86 platforms */
|
||||
xf86BusProbe();
|
||||
|
|
@ -844,8 +846,10 @@ ddxGiveUp(enum ExitCode error)
|
|||
if (xorgHWOpenConsole)
|
||||
xf86CloseConsole();
|
||||
|
||||
systemd_logind_fini();
|
||||
dbus_core_fini();
|
||||
if (!xf86Info.noDbus) {
|
||||
systemd_logind_fini();
|
||||
dbus_core_fini();
|
||||
}
|
||||
|
||||
xf86CloseLog(error);
|
||||
}
|
||||
|
|
@ -969,6 +973,10 @@ ddxProcessArgument(int argc, char **argv, int i)
|
|||
xf86AllowMouseOpenFail = TRUE;
|
||||
return 1;
|
||||
}
|
||||
if (!strcmp(argv[i], "-noDbus")) {
|
||||
xf86DbusDisabled = TRUE;
|
||||
return 1;
|
||||
}
|
||||
if (!strcmp(argv[i], "-ignoreABI")) {
|
||||
LoaderSetOptions(LDR_OPT_ABI_MISMATCH_NONFATAL);
|
||||
return 1;
|
||||
|
|
|
|||
|
|
@ -47,6 +47,7 @@ extern _X_EXPORT const char *xf86ConfigFile;
|
|||
extern _X_EXPORT const char *xf86ConfigDir;
|
||||
extern _X_EXPORT Bool xf86AllowMouseOpenFail;
|
||||
extern _X_EXPORT Bool xf86AutoBindGPUDisabled;
|
||||
extern _X_EXPORT Bool xf86DbusDisabled;
|
||||
|
||||
#ifdef XF86VIDMODE
|
||||
extern _X_EXPORT Bool xf86VidModeDisabled;
|
||||
|
|
|
|||
|
|
@ -97,6 +97,8 @@ typedef struct {
|
|||
Bool autoAddGPU;
|
||||
const char *debug;
|
||||
Bool autoBindGPU;
|
||||
|
||||
Bool noDbus;
|
||||
} xf86InfoRec, *xf86InfoPtr;
|
||||
|
||||
/* ISC's cc can't handle ~ of UL constants, so explicitly type cast them. */
|
||||
|
|
|
|||
|
|
@ -308,6 +308,9 @@ sources. This is equivalent to setting the
|
|||
file option. To
|
||||
.B false.
|
||||
.TP 8
|
||||
.B \-noDbus
|
||||
Do not connect to D-Bus.
|
||||
.TP 8
|
||||
.B \-nosilk
|
||||
Disable Silken Mouse support.
|
||||
.TP 8
|
||||
|
|
|
|||
|
|
@ -687,6 +687,9 @@ Unset by default.
|
|||
.TP 7
|
||||
.BI "Option \*qAllowByteSwappedClients\*q \*q" boolean \*q
|
||||
Allow clients with a different byte-order than the server. Disabled by default.
|
||||
.TP 7
|
||||
.BI "Option \*qNoDbus\*q \*q" boolean \*q
|
||||
Do not connect to D-Bus.
|
||||
.SH "MODULE SECTION"
|
||||
The
|
||||
.B Module
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue