diff options
author | Sami Kerola | 2016-05-14 20:50:41 +0200 |
---|---|---|
committer | Sami Kerola | 2016-07-04 00:35:10 +0200 |
commit | 285c1f3a3eda762897d45f698e94c461d68e8d68 (patch) | |
tree | e2b99cdb523a2f4341e68da397310925df91f402 /include/ttyutils.h | |
parent | write: stop removing and adding /dev/ in front of tty string (diff) | |
download | kernel-qcow2-util-linux-285c1f3a3eda762897d45f698e94c461d68e8d68.tar.gz kernel-qcow2-util-linux-285c1f3a3eda762897d45f698e94c461d68e8d68.tar.xz kernel-qcow2-util-linux-285c1f3a3eda762897d45f698e94c461d68e8d68.zip |
lib: try to find tty in get_terminal_name()
Try all standard terminal input/output file descriptors when finding tty
name in get_germinal_name(). This should make all invocations of the
function as robust as they can get.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Diffstat (limited to 'include/ttyutils.h')
-rw-r--r-- | include/ttyutils.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/ttyutils.h b/include/ttyutils.h index 200e9a565..7278d3615 100644 --- a/include/ttyutils.h +++ b/include/ttyutils.h @@ -51,7 +51,7 @@ struct chardata { } while (0) extern int get_terminal_width(int default_width); -extern int get_terminal_name(int fd, const char **path, const char **name, +extern int get_terminal_name(const char **path, const char **name, const char **number); #define UL_TTY_KEEPCFLAGS (1 << 1) |