summaryrefslogtreecommitdiff
path: root/procps
diff options
context:
space:
mode:
authorBernhard Reutner-Fischer2006-04-12 18:39:58 +0000
committerBernhard Reutner-Fischer2006-04-12 18:39:58 +0000
commitd9cf7ac781c1274d6d23fa5674b6b90baaf4cf61 (patch)
treec7e395cfe1eafcd601bc16e0231fc30f8789e4d9 /procps
parent67f641e75b685abe1588b634b409c1ee2ff68c22 (diff)
downloadbusybox-d9cf7ac781c1274d6d23fa5674b6b90baaf4cf61.zip
busybox-d9cf7ac781c1274d6d23fa5674b6b90baaf4cf61.tar.gz
- patch from Denis Vlasenko to add and use bb_xchdir()
Diffstat (limited to 'procps')
-rw-r--r--procps/top.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/procps/top.c b/procps/top.c
index afd419b..d140924 100644
--- a/procps/top.c
+++ b/procps/top.c
@@ -1,3 +1,4 @@
+/* vi: set sw=4 ts=4: */
/*
* A tiny 'top' utility.
*
@@ -468,9 +469,7 @@ int top_main(int argc, char **argv)
col = 35;
#endif
/* change to /proc */
- if (chdir("/proc") < 0) {
- bb_perror_msg_and_die("chdir('/proc')");
- }
+ bb_xchdir("/proc");
#ifdef CONFIG_FEATURE_USE_TERMIOS
tcgetattr(0, (void *) &initial_settings);
memcpy(&new_settings, &initial_settings, sizeof(struct termios));