summaryrefslogtreecommitdiffhomepage
path: root/src/internal/ptycon_ioctl_impl.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/internal/ptycon_ioctl_impl.h')
-rw-r--r--src/internal/ptycon_ioctl_impl.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/internal/ptycon_ioctl_impl.h b/src/internal/ptycon_ioctl_impl.h
new file mode 100644
index 0000000..dacd689
--- /dev/null
+++ b/src/internal/ptycon_ioctl_impl.h
@@ -0,0 +1,22 @@
+#ifndef PTYCON_IOCTL_IMPL_H
+#define PTYCON_IOCTL_IMPL_H
+
+#include <ntapi/ntapi.h>
+
+static int32_t ptyc_grant(nt_pty * hptm)
+{
+ nt_tty_sigctl_info ctlinfo;
+ nt_iosb iosb;
+
+ ntapi->tt_aligned_block_memset(
+ &ctlinfo,0,sizeof(ctlinfo));
+
+ return ntapi->pty_ioctl(
+ hptm,
+ 0,0,0,
+ &iosb,TTY_TIOCSPTLCK,
+ &ctlinfo,sizeof(ctlinfo),
+ &ctlinfo,sizeof(ctlinfo));
+}
+
+#endif