summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorKarel Zak2019-05-27 12:49:12 +0200
committerKarel Zak2019-05-27 12:49:12 +0200
commita6d9d23b5f9e3c1d421c1f32a3f1dffe8452cb74 (patch)
treedfcba7aa547a7adeb25cce9ce4ab85a0e28458b6 /include
parentlibblkid: remove unneeded fields from struct bcache_super_block (diff)
downloadkernel-qcow2-util-linux-a6d9d23b5f9e3c1d421c1f32a3f1dffe8452cb74.tar.gz
kernel-qcow2-util-linux-a6d9d23b5f9e3c1d421c1f32a3f1dffe8452cb74.tar.xz
kernel-qcow2-util-linux-a6d9d23b5f9e3c1d421c1f32a3f1dffe8452cb74.zip
lib/ttyutils: introduce get_terminal_stdfd()
Let's use separate function to detect what is the current terminal. Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'include')
-rw-r--r--include/pathnames.h2
-rw-r--r--include/ttyutils.h1
2 files changed, 3 insertions, 0 deletions
diff --git a/include/pathnames.h b/include/pathnames.h
index bd29b640a..ee470ee4b 100644
--- a/include/pathnames.h
+++ b/include/pathnames.h
@@ -95,6 +95,8 @@
#define _PATH_PROC_GIDMAP "/proc/self/gid_map"
#define _PATH_PROC_SETGROUPS "/proc/self/setgroups"
+#define _PATH_PROC_FDDIR "/proc/self/fd"
+
#define _PATH_PROC_ATTR_CURRENT "/proc/self/attr/current"
#define _PATH_PROC_ATTR_EXEC "/proc/self/attr/exec"
#define _PATH_PROC_CAPLASTCAP "/proc/sys/kernel/cap_last_cap"
diff --git a/include/ttyutils.h b/include/ttyutils.h
index af979159a..f164a580f 100644
--- a/include/ttyutils.h
+++ b/include/ttyutils.h
@@ -81,6 +81,7 @@ struct chardata {
extern int get_terminal_dimension(int *cols, int *lines);
extern int get_terminal_width(int default_width);
extern int get_terminal_type(const char **type);
+extern int get_terminal_stdfd(void);
extern int get_terminal_name(const char **path, const char **name,
const char **number);