KallistiOS git master
Independent SDK for the Sega Dreamcast
Loading...
Searching...
No Matches

VFS driver for accessing pseudo-TTY terminals More...

Files

file  fs_pty.h
 Pseudo-terminal virtual file system.
 

Functions

int fs_pty_create (char *buffer, int maxbuflen, file_t *master_out, file_t *slave_out)
 Create a new pseudo-terminal.
 

Detailed Description

VFS driver for accessing pseudo-TTY terminals

Function Documentation

◆ fs_pty_create()

int fs_pty_create ( char * buffer,
int maxbuflen,
file_t * master_out,
file_t * slave_out )

Create a new pseudo-terminal.

This function creates a new pseudo-terminal, opening up two files in the /pty portion of the VFS.

Parameters
bufferStorage for the name of the PTY, apparently not actually used (but potentially will be fixed at some point). If it was implemented, the name of the PTY would be here on successful return (if not NULL)
maxbuflenThe length of buffer
master_outA pointer to store the file descriptor for the master end in (must not be NULL)
slave_outA pointer to store the file descriptor for the slave end in (must not be NULL)
Return values
0On success
-1On error
Error Conditions:
ENOMEM - out of memory