diff options
author | aldot <aldot@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2006-04-12 18:39:58 +0000 |
---|---|---|
committer | aldot <aldot@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2006-04-12 18:39:58 +0000 |
commit | 173133414753125e4a5ddf160cd22807a703bd38 (patch) | |
tree | c7e395cfe1eafcd601bc16e0231fc30f8789e4d9 /procps | |
parent | 04f8875fd522ea63205b3e223d56979117245d1f (diff) | |
download | busybox-w32-173133414753125e4a5ddf160cd22807a703bd38.tar.gz busybox-w32-173133414753125e4a5ddf160cd22807a703bd38.tar.bz2 busybox-w32-173133414753125e4a5ddf160cd22807a703bd38.zip |
- patch from Denis Vlasenko to add and use bb_xchdir()
git-svn-id: svn://busybox.net/trunk/busybox@14837 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'procps')
-rw-r--r-- | procps/top.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/procps/top.c b/procps/top.c index afd419ba5..d140924d8 100644 --- a/procps/top.c +++ b/procps/top.c | |||
@@ -1,3 +1,4 @@ | |||
1 | /* vi: set sw=4 ts=4: */ | ||
1 | /* | 2 | /* |
2 | * A tiny 'top' utility. | 3 | * A tiny 'top' utility. |
3 | * | 4 | * |
@@ -468,9 +469,7 @@ int top_main(int argc, char **argv) | |||
468 | col = 35; | 469 | col = 35; |
469 | #endif | 470 | #endif |
470 | /* change to /proc */ | 471 | /* change to /proc */ |
471 | if (chdir("/proc") < 0) { | 472 | bb_xchdir("/proc"); |
472 | bb_perror_msg_and_die("chdir('/proc')"); | ||
473 | } | ||
474 | #ifdef CONFIG_FEATURE_USE_TERMIOS | 473 | #ifdef CONFIG_FEATURE_USE_TERMIOS |
475 | tcgetattr(0, (void *) &initial_settings); | 474 | tcgetattr(0, (void *) &initial_settings); |
476 | memcpy(&new_settings, &initial_settings, sizeof(struct termios)); | 475 | memcpy(&new_settings, &initial_settings, sizeof(struct termios)); |