KallistiOS
git master
Independent SDK for the Sega Dreamcast
Loading...
Searching...
No Matches
fs_pty.h
Go to the documentation of this file.
1
/* KallistiOS ##version##
2
3
kos/fs_pty.h
4
Copyright (C)2003 Megan Potter
5
6
*/
7
8
/** \file kos/fs_pty.h
9
\brief Pseudo-terminal virtual file system.
10
\ingroup vfs_pty
11
12
This file system implements a pseudo-terminal like concept (similar to
13
/dev/pty in Linux). A call to fs_pty_create() will create two file entries in
14
the VFS, /pty/maXX and /pty/slXX (XX being some hexadecimal number). From
15
there, anybody can open up either end and send data to the other side. Think
16
of it as a simple message passing interface.
17
18
This file system mounts on /pty.
19
20
\author Megan Potter
21
*/
22
23
#ifndef __KOS_FS_PTY_H
24
#define __KOS_FS_PTY_H
25
26
#include <sys/cdefs.h>
27
__BEGIN_DECLS
28
29
#include <
arch/types.h
>
30
#include <
kos/fs.h
>
31
32
/** \defgroup vfs_pty PTY
33
\brief VFS driver for accessing pseudo-TTY terminals
34
\ingroup vfs
35
36
@{
37
*/
38
39
/** \brief Create a new pseudo-terminal.
40
41
This function creates a new pseudo-terminal, opening up two files in the
42
/pty portion of the VFS.
43
44
\param buffer Storage for the name of the PTY, apparently not
45
actually used (but potentially will be fixed at some
46
point). If it was implemented, the name of the PTY
47
would be here on successful return (if not NULL)
48
\param maxbuflen The length of buffer
49
\param master_out A pointer to store the file descriptor for the
50
master end in (must not be NULL)
51
\param slave_out A pointer to store the file descriptor for the slave
52
end in (must not be NULL)
53
\retval 0 On success
54
\retval -1 On error
55
56
\par Error Conditions:
57
\em ENOMEM - out of memory
58
*/
59
int
fs_pty_create
(
char
* buffer,
int
maxbuflen,
file_t
* master_out,
file_t
* slave_out);
60
61
/** \cond */
62
int
fs_pty_init(
void
);
63
int
fs_pty_shutdown(
void
);
64
/** \endcond */
65
66
/** @} */
67
68
__END_DECLS
69
70
#endif
/* __KOS_FS_PTY_H */
71
fs.h
Virtual filesystem support.
file_t
int file_t
File descriptor type.
Definition
fs.h:94
fs_pty_create
int fs_pty_create(char *buffer, int maxbuflen, file_t *master_out, file_t *slave_out)
Create a new pseudo-terminal.
types.h
Common integer types.
include
kos
fs_pty.h
Generated by
1.12.0