Lines Matching +full:master +full:- +full:side
1 // SPDX-License-Identifier: GPL-2.0
3 * Copyright (C) 2001 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com)
34 *data = ((struct pty_chan) { .announce = opts->announce, in pty_chan_init()
36 .raw = opts->raw }); in pty_chan_init()
49 err = -errno; in pts_open()
54 if (data->raw) { in pts_open()
55 CATCH_EINTR(err = tcgetattr(fd, &data->tt)); in pts_open()
65 sprintf(data->dev_name, "%s", dev); in pts_open()
66 *dev_out = data->dev_name; in pts_open()
68 if (data->announce) in pts_open()
69 (*data->announce)(dev, data->dev); in pts_open()
82 int master, err; in getmaster() local
94 master = open(line, O_RDWR); in getmaster()
95 if (master >= 0) { in getmaster()
98 /* verify slave side is usable */ in getmaster()
103 return master; in getmaster()
104 close(master); in getmaster()
109 printk(UM_KERN_ERR "getmaster - no usable host pty devices\n"); in getmaster()
110 return -ENOENT; in getmaster()
124 if (data->raw) { in pty_open()
132 if (data->announce) in pty_open()
133 (*data->announce)(dev, data->dev); in pty_open()
135 sprintf(data->dev_name, "%s", dev); in pty_open()
136 *dev_out = data->dev_name; in pty_open()