mirror of
https://github.com/reactos/reactos.git
synced 2024-12-26 17:14:41 +00:00
PSX: more work on the terminal emulator that runs in the W32 subsystem.
svn path=/trunk/; revision=2839
This commit is contained in:
parent
f1bc2201f0
commit
b9b1d40823
1 changed files with 23 additions and 9 deletions
|
@ -1,4 +1,4 @@
|
||||||
/* $Id: csrterm.c,v 1.3 2002/04/07 14:06:46 ea Exp $
|
/* $Id: csrterm.c,v 1.4 2002/04/10 21:12:41 ea Exp $
|
||||||
*
|
*
|
||||||
* PROJECT : ReactOS Operating System / POSIX+ Environment Subsystem
|
* PROJECT : ReactOS Operating System / POSIX+ Environment Subsystem
|
||||||
* DESCRIPTION: CSRTERM - A DEC VT-100 terminal emulator for the PSX subsystem
|
* DESCRIPTION: CSRTERM - A DEC VT-100 terminal emulator for the PSX subsystem
|
||||||
|
@ -99,8 +99,8 @@ TRACE;
|
||||||
TerminalRead.PsxHeader.Procedure = PSX_TERMINAL_INTERRUPT;
|
TerminalRead.PsxHeader.Procedure = PSX_TERMINAL_INTERRUPT;
|
||||||
/* Terminal I/O */
|
/* Terminal I/O */
|
||||||
TerminalRead.Size = Size;
|
TerminalRead.Size = Size;
|
||||||
RtlCopyMemory (TerminalRead.Buffer, Buffer, Size);
|
|
||||||
#if 0
|
#if 0
|
||||||
|
RtlCopyMemory (TerminalRead.Buffer, Buffer, Size);
|
||||||
Status = NtRequestWaitReplyPort (
|
Status = NtRequestWaitReplyPort (
|
||||||
Session.ServerPort.Handle,
|
Session.ServerPort.Handle,
|
||||||
& TerminalRead
|
& TerminalRead
|
||||||
|
@ -123,9 +123,21 @@ TRACE;
|
||||||
* Initialize our data for managing the control connection
|
* Initialize our data for managing the control connection
|
||||||
* initiated by the PSXSS.EXE process.
|
* initiated by the PSXSS.EXE process.
|
||||||
*/
|
*/
|
||||||
PRIVATE NTSTATUS STDCALL ProcessConnectionRequest (PPSX_MAX_MESSAGE Request)
|
PRIVATE NTSTATUS STDCALL ProcessConnectionRequest (PLPC_MAX_MESSAGE Request)
|
||||||
{
|
{
|
||||||
|
PPSX_CONNECT_PORT_DATA ConnectData = (PPSX_CONNECT_PORT_DATA) & Request->Data;
|
||||||
|
|
||||||
TRACE;
|
TRACE;
|
||||||
|
if (PSX_CONNECTION_TYPE_SERVER != ConnectData->ConnectionType)
|
||||||
|
{
|
||||||
|
|
||||||
|
return STATUS_UNSUCCESSFUL;
|
||||||
|
}
|
||||||
|
if (PSX_LPC_PROTOCOL_VERSION != ConnectData->Version)
|
||||||
|
{
|
||||||
|
|
||||||
|
return STATUS_UNSUCCESSFUL;
|
||||||
|
}
|
||||||
Session.SsLinkIsActive = TRUE;
|
Session.SsLinkIsActive = TRUE;
|
||||||
return STATUS_SUCCESS;
|
return STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
@ -167,6 +179,7 @@ TRACE;
|
||||||
while (TRUE)
|
while (TRUE)
|
||||||
{
|
{
|
||||||
Reply = NULL;
|
Reply = NULL;
|
||||||
|
NullReply = FALSE;
|
||||||
while (!NullReply)
|
while (!NullReply)
|
||||||
{
|
{
|
||||||
Status = NtReplyWaitReceivePort (
|
Status = NtReplyWaitReceivePort (
|
||||||
|
@ -183,7 +196,7 @@ TRACE;
|
||||||
switch (RequestType)
|
switch (RequestType)
|
||||||
{
|
{
|
||||||
case LPC_CONNECTION_REQUEST:
|
case LPC_CONNECTION_REQUEST:
|
||||||
ProcessConnectionRequest (& Request);
|
ProcessConnectionRequest ((PLPC_MAX_MESSAGE) & Request);
|
||||||
NullReply = TRUE;
|
NullReply = TRUE;
|
||||||
continue;
|
continue;
|
||||||
case LPC_CLIENT_DIED:
|
case LPC_CLIENT_DIED:
|
||||||
|
@ -227,7 +240,7 @@ PRIVATE NTSTATUS STDCALL CreateSessionObjects (DWORD Pid)
|
||||||
NTSTATUS Status;
|
NTSTATUS Status;
|
||||||
ULONG Id = 0;
|
ULONG Id = 0;
|
||||||
OBJECT_ATTRIBUTES Oa;
|
OBJECT_ATTRIBUTES Oa;
|
||||||
LARGE_INTEGER SectionSize = {65536L,0};
|
LARGE_INTEGER SectionSize = {PSX_TERMINAL_SECTION_SIZE,0};
|
||||||
|
|
||||||
TRACE;
|
TRACE;
|
||||||
|
|
||||||
|
@ -308,7 +321,7 @@ TRACE;
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
Session.Section.BaseAddress = NULL;
|
Session.Section.BaseAddress = NULL;
|
||||||
Session.Section.ViewSize = 0;
|
Session.Section.ViewSize = SectionSize.u.LowPart;
|
||||||
Status = NtMapViewOfSection (
|
Status = NtMapViewOfSection (
|
||||||
Session.Section.Handle,
|
Session.Section.Handle,
|
||||||
NtCurrentProcess(),
|
NtCurrentProcess(),
|
||||||
|
@ -421,15 +434,16 @@ TRACE;
|
||||||
*/
|
*/
|
||||||
PRIVATE NTSTATUS STDCALL PsxCreateLeaderProcess (char * Command)
|
PRIVATE NTSTATUS STDCALL PsxCreateLeaderProcess (char * Command)
|
||||||
{
|
{
|
||||||
|
NTSTATUS Status;
|
||||||
TRACE;
|
TRACE;
|
||||||
|
|
||||||
if (NULL == Command)
|
if (NULL == Command)
|
||||||
{
|
{
|
||||||
Command = "/bin/sh";
|
Command = "sh";
|
||||||
}
|
}
|
||||||
/* TODO: request PSXSS to init the process slot */
|
/* TODO: request PSXSS to init the process slot */
|
||||||
return STATUS_NOT_IMPLEMENTED;
|
vtprintf ("%s: %s: calling CSRSS not implemented!", MyName, __FUNCTION__);
|
||||||
|
return STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
/**********************************************************************
|
/**********************************************************************
|
||||||
* PrintInformationProcess/0
|
* PrintInformationProcess/0
|
||||||
|
|
Loading…
Reference in a new issue