summaryrefslogtreecommitdiffstats
path: root/include/ttyutils.h
diff options
context:
space:
mode:
authorBoris Egorov2016-01-05 17:17:58 +0100
committerKarel Zak2016-01-06 12:22:07 +0100
commit43b4f7ea5f96f861787c30fdd6933daf472fcc02 (patch)
treeae4b3fab8219c501b5216fbfcca394cf74b1c406 /include/ttyutils.h
parentmount.8: Add documentation of overlay mount options (diff)
downloadkernel-qcow2-util-linux-43b4f7ea5f96f861787c30fdd6933daf472fcc02.tar.gz
kernel-qcow2-util-linux-43b4f7ea5f96f861787c30fdd6933daf472fcc02.tar.xz
kernel-qcow2-util-linux-43b4f7ea5f96f861787c30fdd6933daf472fcc02.zip
lib/tty: Pass default width to get_terminal_width()
Almost any code calling get_terminal_width() checks returned width for non-positive values and sets it to some default value (say, 80). So, let's pass this default value directly to the function. [kzak@redhat.com: - get_terminal_width() refactoring] Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'include/ttyutils.h')
-rw-r--r--include/ttyutils.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/ttyutils.h b/include/ttyutils.h
index e842f9f0d..200e9a565 100644
--- a/include/ttyutils.h
+++ b/include/ttyutils.h
@@ -50,7 +50,7 @@ struct chardata {
(ptr)->capslock = 0; \
} while (0)
-extern int get_terminal_width(void);
+extern int get_terminal_width(int default_width);
extern int get_terminal_name(int fd, const char **path, const char **name,
const char **number);