summaryrefslogtreecommitdiffhomepage
path: root/src/pty/ntapi_pty_set.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/pty/ntapi_pty_set.c')
-rw-r--r--src/pty/ntapi_pty_set.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/pty/ntapi_pty_set.c b/src/pty/ntapi_pty_set.c
index 1b7074c..0793dc6 100644
--- a/src/pty/ntapi_pty_set.c
+++ b/src/pty/ntapi_pty_set.c
@@ -24,12 +24,16 @@ int32_t __stdcall __ntapi_pty_set(
if (pty_info_class>=NT_PTY_INFORMATION_CAP)
return NT_STATUS_INVALID_INFO_CLASS;
- else if (pty_info_class == NT_PTY_BASIC_INFORMATION)
+
+ if (pty_info_class == NT_PTY_BASIC_INFORMATION)
return NT_STATUS_NOT_IMPLEMENTED;
- else if (pty_info_class == NT_PTY_INHERIT_INFORMATION)
+
+ if (pty_info_class == NT_PTY_INHERIT_INFORMATION)
return NT_STATUS_INVALID_INFO_CLASS;
- else if ((pty_info_class == NT_PTY_CLIENT_INFORMATION) && (pty_info_length != sizeof(nt_pty_client_info)))
- return NT_STATUS_INVALID_PARAMETER;
+
+ if (pty_info_class == NT_PTY_CLIENT_INFORMATION)
+ if (pty_info_length != sizeof(nt_pty_client_info))
+ return NT_STATUS_INVALID_PARAMETER;
__ntapi->tt_aligned_block_memset(
&msg,0,sizeof(msg));
@@ -48,7 +52,7 @@ int32_t __stdcall __ntapi_pty_set(
&msg.data.ctlinfo.guid,
&pty->guid);
- info = (uintptr_t *)pty_info;
+ info = (uintptr_t *)pty_info;
msg.data.ctlinfo.ctxarg[0] = info[0];
msg.data.ctlinfo.ctxarg[1] = info[1];
msg.data.ctlinfo.ctxarg[2] = info[2];
@@ -56,6 +60,7 @@ int32_t __stdcall __ntapi_pty_set(
if ((status = __ntapi->zw_request_wait_reply_port(pty->hport,&msg,&msg)))
return status;
+
else if (msg.data.ttyinfo.status)
return msg.data.ttyinfo.status;