Merge remote-tracking branch 'alanc/master'

This commit is contained in:
Keith Packard 2011-09-21 14:30:19 -07:00
commit 98f4940093
12 changed files with 621 additions and 543 deletions

View File

@ -3442,8 +3442,7 @@ CloseDownClient(ClientPtr client)
* now. If it hasn't gotten to Running, nClients has *not*
* been incremented, so *don't* decrement it.
*/
if (client->clientState != ClientStateInitial &&
client->clientState != ClientStateAuthenticating )
if (client->clientState != ClientStateInitial)
{
--nClients;
}
@ -3705,19 +3704,8 @@ ProcEstablishConnection(ClientPtr client)
auth_proto,
(unsigned short)prefix->nbytesAuthString,
auth_string);
/*
* If Kerberos is being used for this client, the clientState
* will be set to ClientStateAuthenticating at this point.
* More messages need to be exchanged among the X server, Kerberos
* server, and client to figure out if everyone is authorized.
* So we don't want to send the connection setup info yet, since
* the auth step isn't really done.
*/
if (client->clientState == ClientStateCheckingSecurity)
client->clientState = ClientStateCheckedSecurity;
else if (client->clientState != ClientStateAuthenticating)
return(SendConnSetup(client, reason));
return Success;
return(SendConnSetup(client, reason));
}
void

View File

@ -103,6 +103,8 @@ xf86InfoRec xf86Info = {
.vtPendingNum = -1,
#endif
.dontVTSwitch = FALSE,
.autoVTSwitch = TRUE,
.ShareVTs = FALSE,
.dontZap = FALSE,
.dontZoom = FALSE,
.notrapSignals = FALSE,

View File

@ -1352,6 +1352,16 @@ ddxProcessArgument(int argc, char **argv, int i)
xf86xkbdirFlag = TRUE;
return 0;
}
if (!strcmp(argv[i], "-novtswitch"))
{
xf86Info.autoVTSwitch = FALSE;
return 1;
}
if (!strcmp(argv[i], "-sharevts"))
{
xf86Info.ShareVTs = TRUE;
return 1;
}
/* OS-specific processing */
return xf86ProcessArgument(argc, argv, i);
@ -1408,6 +1418,8 @@ ddxUseMsg(void)
ErrorF("-version show the server version\n");
ErrorF("-showDefaultModulePath show the server default module path\n");
ErrorF("-showDefaultLibPath show the server default library path\n");
ErrorF("-novtswitch don't automatically switch VT at reset & exit\n");
ErrorF("-sharevts share VTs with another X server\n");
/* OS-specific usage */
xf86UseMsg();
ErrorF("\n");

View File

@ -66,6 +66,8 @@ typedef struct {
int vtPendingNum;
#endif
Bool dontVTSwitch;
Bool autoVTSwitch;
Bool ShareVTs;
Bool dontZap;
Bool dontZoom;
Bool notrapSignals; /* don't exit cleanly - die at fault */

File diff suppressed because it is too large Load Diff

View File

@ -334,6 +334,10 @@ as root (i.e, with real-uid 0).
.B \-nosilk
Disable Silken Mouse support.
.TP 8
.B \-novtswitch
Disable the automatic switching on X server reset and shutdown to the
VT that was active when the server started, if supported by the OS.
.TP 8
.B \-pixmap24
Set the internal pixmap format for depth 24 pixmaps to 24 bits per pixel.
The default is usually 32 bits per pixel. There is normally little
@ -376,6 +380,9 @@ and
.B \-ggamma
options.
.TP 8
.B \-sharevts
Share virtual terminals with another X server, if supported by the OS.
.TP 8
.BI \-screen " screen-name"
Use the __xconfigfile__(__filemansuffix__) file
.B Screen

View File

@ -45,7 +45,6 @@ static int devConsoleFd = -1;
#if defined (SYSCONS_SUPPORT) || defined (PCVT_SUPPORT)
static int VTnum = -1;
static int initialVT = -1;
static Bool ShareVTs = FALSE;
#endif
#ifdef PCCONS_SUPPORT
@ -266,7 +265,7 @@ xf86OpenConsole()
}
#endif
acquire_vt:
if (!ShareVTs) {
if (!xf86Info.ShareVTs) {
/*
* now get the VT
*/
@ -304,7 +303,7 @@ acquire_vt:
{
FatalError("xf86OpenConsole: KDSETMODE KD_GRAPHICS failed");
}
} else { /* ShareVTs */
} else { /* xf86Info.ShareVTs */
close(xf86Info.consoleFd);
}
break;
@ -320,7 +319,8 @@ acquire_vt:
{
/* serverGeneration != 1 */
#if defined (SYSCONS_SUPPORT) || defined (PCVT_SUPPORT)
if (!ShareVTs) if (xf86Info.consType == SYSCONS || xf86Info.consType == PCVT)
if (!xf86Info.ShareVTs &&
(xf86Info.consType == SYSCONS || xf86Info.consType == PCVT))
{
if (ioctl(xf86Info.consoleFd, VT_ACTIVATE, xf86Info.vtno) != 0)
{
@ -393,7 +393,7 @@ xf86OpenSyscons()
if (ioctl(fd, VT_GETACTIVE, &initialVT) < 0)
initialVT = -1;
#endif
if (ShareVTs)
if (xf86Info.ShareVTs)
xf86Info.vtno = initialVT;
if (xf86Info.vtno == -1)
@ -655,7 +655,7 @@ xf86CloseConsole()
struct vt_mode VT;
#endif
if (ShareVTs) return;
if (xf86Info.ShareVTs) return;
switch (xf86Info.consType)
{
@ -723,11 +723,6 @@ xf86ProcessArgument(int argc, char *argv[], int i)
return 1;
}
#if defined (SYSCONS_SUPPORT) || defined (PCVT_SUPPORT)
if (!strcmp(argv[i], "-sharevts"))
{
ShareVTs = TRUE;
return 1;
}
if ((argv[i][0] == 'v') && (argv[i][1] == 't'))
{
if (sscanf(argv[i], "vt%2d", &VTnum) == 0 ||

View File

@ -39,8 +39,6 @@
#include <sys/stat.h>
static Bool KeepTty = FALSE;
static Bool VTSwitch = TRUE;
static Bool ShareVTs = FALSE;
static int activeVT = -1;
static char vtname[11];
@ -109,7 +107,7 @@ xf86OpenConsole(void)
"xf86OpenConsole: Cannot open /dev/tty0 (%s)\n",
strerror(errno));
if (ShareVTs)
if (xf86Info.ShareVTs)
{
SYSCALL(ret = ioctl(fd, VT_GETSTATE, &vts));
if (ret < 0)
@ -184,7 +182,7 @@ xf86OpenConsole(void)
}
#endif
if (!ShareVTs)
if (!xf86Info.ShareVTs)
{
struct termios nTty;
@ -240,7 +238,7 @@ xf86OpenConsole(void)
* of Init?$#*&Device(). So I just place it here */
}
} else { /* serverGeneration != 1 */
if (!ShareVTs && VTSwitch)
if (!xf86Info.ShareVTs && xf86Info.autoVTSwitch)
{
/* now get the VT */
switch_to(xf86Info.vtno, "xf86OpenConsole");
@ -254,7 +252,7 @@ xf86CloseConsole(void)
struct vt_mode VT;
int ret;
if (ShareVTs) {
if (xf86Info.ShareVTs) {
close(xf86Info.consoleFd);
return;
}
@ -286,7 +284,7 @@ xf86CloseConsole(void)
strerror(errno));
}
if (VTSwitch)
if (xf86Info.autoVTSwitch)
{
/*
* Perform a switch back to the active VT when we were started
@ -311,16 +309,7 @@ xf86ProcessArgument(int argc, char *argv[], int i)
KeepTty = TRUE;
return 1;
}
if (!strcmp(argv[i], "-novtswitch"))
{
VTSwitch = FALSE;
return 1;
}
if (!strcmp(argv[i], "-sharevts"))
{
ShareVTs = TRUE;
return 1;
}
if ((argv[i][0] == 'v') && (argv[i][1] == 't'))
{
if (sscanf(argv[i], "vt%2d", &xf86Info.vtno) == 0)
@ -340,6 +329,4 @@ xf86UseMsg(void)
ErrorF("vtXX use the specified VT number\n");
ErrorF("-keeptty ");
ErrorF("don't detach controlling tty (for debugging only)\n");
ErrorF("-novtswitch don't immediately switch to new VT\n");
ErrorF("-sharevts share VTs with another X server\n");
}

View File

@ -63,6 +63,22 @@ static char consoleDev[PATH_MAX] = "/dev/fb";
Used by hw/xfree86/common/xf86AutoConfig.c for VIS_GETIDENTIFIER */
_X_HIDDEN char xf86SolarisFbDev[PATH_MAX] = "/dev/fb";
static void
switch_to(int vt, const char *from)
{
int ret;
SYSCALL(ret = ioctl(xf86Info.consoleFd, VT_ACTIVATE, vt));
if (ret != 0)
xf86Msg(X_WARNING, "%s: VT_ACTIVATE failed: %s\n",
from, strerror(errno));
SYSCALL(ret = ioctl(xf86Info.consoleFd, VT_WAITACTIVE, vt));
if (ret != 0)
xf86Msg(X_WARNING, "%s: VT_WAITACTIVE failed: %s\n",
from, strerror(errno));
}
void
xf86OpenConsole(void)
{
@ -170,6 +186,11 @@ xf86OpenConsole(void)
xf86Info.vtno = VTnum;
from = X_CMDLINE;
}
else if (xf86Info.ShareVTs)
{
xf86Info.vtno = vtinfo.v_active;
from = X_CMDLINE;
}
else
{
if ((ioctl(fd, VT_OPENQRY, &xf86Info.vtno) < 0) ||
@ -201,16 +222,15 @@ OPENCONSOLE:
chown(consoleDev, getuid(), getgid());
#ifdef HAS_USL_VTS
if (xf86Info.ShareVTs)
return;
if (vtEnabled)
{
/*
* Now get the VT
*/
if (ioctl(xf86Info.consoleFd, VT_ACTIVATE, xf86Info.vtno) != 0)
xf86Msg(X_WARNING, "xf86OpenConsole: VT_ACTIVATE failed\n");
if (ioctl(xf86Info.consoleFd, VT_WAITACTIVE, xf86Info.vtno) != 0)
xf86Msg(X_WARNING, "xf86OpenConsole: VT_WAITACTIVE failed\n");
switch_to(xf86Info.vtno, "xf86OpenConsole");
#ifdef VT_SET_CONSUSER /* added in snv_139 */
if (strcmp(display, "0") == 0)
@ -249,16 +269,13 @@ OPENCONSOLE:
else /* serverGeneration != 1 */
{
#ifdef HAS_USL_VTS
if (vtEnabled)
if (vtEnabled && !xf86Info.ShareVTs)
{
/*
* Now re-get the VT
*/
if (ioctl(xf86Info.consoleFd, VT_ACTIVATE, xf86Info.vtno) != 0)
xf86Msg(X_WARNING, "xf86OpenConsole: VT_ACTIVATE failed\n");
if (ioctl(xf86Info.consoleFd, VT_WAITACTIVE, xf86Info.vtno) != 0)
xf86Msg(X_WARNING, "xf86OpenConsole: VT_WAITACTIVE failed\n");
if (xf86Info.autoVTSwitch)
switch_to(xf86Info.vtno, "xf86OpenConsole");
#ifdef VT_SET_CONSUSER /* added in snv_139 */
if (strcmp(display, "0") == 0)
@ -347,7 +364,8 @@ xf86CloseConsole(void)
}
/* Activate the VT that X was started on */
ioctl(xf86Info.consoleFd, VT_ACTIVATE, xf86StartVT);
if (xf86Info.autoVTSwitch)
switch_to(xf86StartVT, "xf86CloseConsole");
}
#endif /* HAS_USL_VTS */

View File

@ -1,4 +1,3 @@
.\" $XFree86$
.TH CVT 1 __vendorversion__
.SH NAME
cvt - calculate VESA CVT mode lines
@ -32,7 +31,7 @@ Create a mode with reduced blanking. This allows for higher frequency signals,
with a lower or equal dotclock. Not for Cathode Ray Tube based displays though.
.SH "SEE ALSO"
__xconfigfile__(__filemansuffix__)
__xconfigfile__(__filemansuffix__), gtf(__appmansuffix__)
.SH AUTHOR
Luc Verhaegen.
.PP

View File

@ -1,4 +1,3 @@
.\" $XFree86$
.TH GTF 1 __vendorversion__
.SH NAME
gtf - calculate VESA GTF mode lines
@ -35,7 +34,7 @@ default format.
Print the mode parameters in a format suitable for
.BR fbset(8) .
.SH "SEE ALSO"
__xconfigfile__(__filemansuffix__)
__xconfigfile__(__filemansuffix__), cvt(__appmansuffix__)
.SH AUTHOR
Andy Ritger.
.PP

View File

@ -57,12 +57,11 @@ extern _X_EXPORT void ReplyNotSwappd (
void * /* pbuf */) _X_NORETURN;
typedef enum {ClientStateInitial,
ClientStateAuthenticating,
ClientStateRunning,
/* 1 is unused now, was ClientStateAuthenticating */
ClientStateRunning = 2,
ClientStateRetained,
ClientStateGone,
ClientStateCheckingSecurity,
ClientStateCheckedSecurity} ClientState;
ClientStateGone
} ClientState;
#ifdef XFIXES
typedef struct _saveSet {