diff options
author | Szymon Janc <szymon.janc@tieto.com> | 2013-11-05 14:22:53 +0100 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@intel.com> | 2013-11-06 10:03:05 +0200 |
commit | 231cf864f1b06ccd92f53aa6a6b70dfec91bd0f5 (patch) | |
tree | aa56a26dc97225786da234bfb57af48f6861aa22 /monitor/display.h | |
parent | c17cf38ecfe85a8b681d183c6e87b9155cfea096 (diff) | |
download | bluez-231cf864f1b06ccd92f53aa6a6b70dfec91bd0f5.tar.gz |
monitor: Fallback to 80 columns terminal if not able to get real size
This makes num_columns always return valid number of columns, which is
expected by print_packets function.
This also fix garbage prints while using btmon via adb shell.
Diffstat (limited to 'monitor/display.h')
-rw-r--r-- | monitor/display.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/monitor/display.h b/monitor/display.h index 6139cc2eb..885eb3412 100644 --- a/monitor/display.h +++ b/monitor/display.h @@ -40,6 +40,8 @@ bool use_color(void); #define COLOR_ERROR "\x1B[1;31m" +#define FALLBACK_TERMINAL_WIDTH 80 + #define print_indent(indent, color1, prefix, title, color2, fmt, args...) \ do { \ printf("%*c%s%s%s%s" fmt "%s\n", (indent), ' ', \ |