diff options
author | vda <vda@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2007-03-28 21:57:12 +0000 |
---|---|---|
committer | vda <vda@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2007-03-28 21:57:12 +0000 |
commit | 42c8aa81be2d5a7e4e8e533d8af63456909f5f68 (patch) | |
tree | e4a76e61f40840b4dcf2015d55f9ecfa93a8ee23 /procps | |
parent | a854a75a5ba2ee6461ccdf776e402e4581e2cc1d (diff) | |
download | busybox-w32-42c8aa81be2d5a7e4e8e533d8af63456909f5f68.tar.gz busybox-w32-42c8aa81be2d5a7e4e8e533d8af63456909f5f68.tar.bz2 busybox-w32-42c8aa81be2d5a7e4e8e533d8af63456909f5f68.zip |
ps: work around libc bug: printf("%.*s\n", MAX_INT, buffer)
git-svn-id: svn://busybox.net/trunk/busybox@18266 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'procps')
-rw-r--r-- | procps/ps.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/procps/ps.c b/procps/ps.c index c1cb64397..2be0b3605 100644 --- a/procps/ps.c +++ b/procps/ps.c | |||
@@ -262,7 +262,9 @@ int ps_main(int argc, char **argv) | |||
262 | parse_o(default_o); | 262 | parse_o(default_o); |
263 | post_process(); | 263 | post_process(); |
264 | 264 | ||
265 | terminal_width = INT_MAX; | 265 | /* Was INT_MAX, but some libc's go belly up with printf("%.*s") |
266 | * and such large widths */ | ||
267 | terminal_width = 30000; | ||
266 | if (isatty(1)) { | 268 | if (isatty(1)) { |
267 | get_terminal_width_height(1, &terminal_width, NULL); | 269 | get_terminal_width_height(1, &terminal_width, NULL); |
268 | terminal_width--; | 270 | terminal_width--; |