diff options
author | midipix <writeonce@midipix.org> | 2016-07-05 17:00:06 -0400 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2016-07-21 03:47:25 -0400 |
commit | 538c8a5109b56d1d0a26631fa93913341214501d (patch) | |
tree | 72933385600f4524afc6e7a96e9f62a9d3dd069f /src/internal | |
parent | 4695532805c24af1965ef1407720c8db086e14b3 (diff) | |
download | ptycon-538c8a5109b56d1d0a26631fa93913341214501d.tar.bz2 ptycon-538c8a5109b56d1d0a26631fa93913341214501d.tar.xz |
pty layer: added ptyc_alloc_pty(), ptyc_free_pty().
Diffstat (limited to 'src/internal')
-rw-r--r-- | src/internal/ptycon_ioctl_impl.h | 22 |
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 |