diff options
author | Franck Bui <fbui@suse.com> | 2019-06-07 10:17:11 +0200 |
---|---|---|
committer | Franck Bui <fbui@suse.com> | 2019-06-18 09:26:31 +0200 |
commit | ae1d13db056ee139f89fbb7cbc893dc5d89ffde3 (patch) | |
tree | 5602b7aac5270cb767e4c0f41f8035f9c33a11a0 /src/machine/machine.h | |
parent | nspawn: allocate the pty used for /dev/console within the container (diff) | |
download | systemd-ae1d13db056ee139f89fbb7cbc893dc5d89ffde3.tar.xz systemd-ae1d13db056ee139f89fbb7cbc893dc5d89ffde3.zip |
terminal-util: introduce openpt_allocate()
Allocating a pty is done in a couple of places so let's introduce a new helper
which does the job.
Also the new function, as well as openpt_in_namespace(), returns both pty
master and slave so the callers don't need to know about the pty slave
allocation details.
For the same reasons machine_openpt() prototype has also been changed to return
both pty master and slave so callers don't need to allocate a pty slave which
might be in a different namespace.
Finally openpt_in_namespace() has been renamed into
openpt_allocate_in_namespace().
Diffstat (limited to '')
-rw-r--r-- | src/machine/machine.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/machine/machine.h b/src/machine/machine.h index 9ff9a65671..f7471be8f5 100644 --- a/src/machine/machine.h +++ b/src/machine/machine.h @@ -89,7 +89,7 @@ MachineState machine_state_from_string(const char *s) _pure_; const char *kill_who_to_string(KillWho k) _const_; KillWho kill_who_from_string(const char *s) _pure_; -int machine_openpt(Machine *m, int flags); +int machine_openpt(Machine *m, int flags, char **ret_slave); int machine_open_terminal(Machine *m, const char *path, int mode); int machine_get_uid_shift(Machine *m, uid_t *ret); |