aboutsummaryrefslogtreecommitdiff
path: root/debianutils
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2010-09-14 12:47:25 +1000
committerNguyễn Thái Ngọc Duy <pclouds@gmail.com>2010-09-14 12:47:25 +1000
commit9df56f96fd9a213189ca94c1fccfc3c42bd9c16a (patch)
treedb1db005b59e2b78d5daf9527fa8fc604e07e8c4 /debianutils
parent30c62e541a1484fedc3d689d62f96d246a28b147 (diff)
parent5f3303712ef483d270097cae4ba0a559b1056121 (diff)
downloadbusybox-w32-9df56f96fd9a213189ca94c1fccfc3c42bd9c16a.tar.gz
busybox-w32-9df56f96fd9a213189ca94c1fccfc3c42bd9c16a.tar.bz2
busybox-w32-9df56f96fd9a213189ca94c1fccfc3c42bd9c16a.zip
Merge branch 'origin/master' (early part)
Diffstat (limited to 'debianutils')
-rw-r--r--debianutils/Config.src (renamed from debianutils/Config.in)18
-rw-r--r--debianutils/Kbuild.src (renamed from debianutils/Kbuild)0
-rw-r--r--debianutils/pipe_progress.c12
3 files changed, 13 insertions, 17 deletions
diff --git a/debianutils/Config.in b/debianutils/Config.src
index 9146f3ef4..9bce0498c 100644
--- a/debianutils/Config.in
+++ b/debianutils/Config.src
@@ -7,19 +7,19 @@ menu "Debian Utilities"
7 7
8config MKTEMP 8config MKTEMP
9 bool "mktemp" 9 bool "mktemp"
10 default n 10 default y
11 help 11 help
12 mktemp is used to create unique temporary files 12 mktemp is used to create unique temporary files
13 13
14config PIPE_PROGRESS 14config PIPE_PROGRESS
15 bool "pipe_progress" 15 bool "pipe_progress"
16 default n 16 default y
17 help 17 help
18 Display a dot to indicate pipe activity. 18 Display a dot to indicate pipe activity.
19 19
20config RUN_PARTS 20config RUN_PARTS
21 bool "run-parts" 21 bool "run-parts"
22 default n 22 default y
23 help 23 help
24 run-parts is a utility designed to run all the scripts in a directory. 24 run-parts is a utility designed to run all the scripts in a directory.
25 25
@@ -34,14 +34,14 @@ config RUN_PARTS
34 34
35config FEATURE_RUN_PARTS_LONG_OPTIONS 35config FEATURE_RUN_PARTS_LONG_OPTIONS
36 bool "Enable long options" 36 bool "Enable long options"
37 default n 37 default y
38 depends on RUN_PARTS && LONG_OPTS 38 depends on RUN_PARTS && LONG_OPTS
39 help 39 help
40 Support long options for the run-parts applet. 40 Support long options for the run-parts applet.
41 41
42config FEATURE_RUN_PARTS_FANCY 42config FEATURE_RUN_PARTS_FANCY
43 bool "Support additional arguments" 43 bool "Support additional arguments"
44 default n 44 default y
45 depends on RUN_PARTS 45 depends on RUN_PARTS
46 help 46 help
47 Support additional options: 47 Support additional options:
@@ -50,7 +50,7 @@ config FEATURE_RUN_PARTS_FANCY
50 50
51config START_STOP_DAEMON 51config START_STOP_DAEMON
52 bool "start-stop-daemon" 52 bool "start-stop-daemon"
53 default n 53 default y
54 help 54 help
55 start-stop-daemon is used to control the creation and 55 start-stop-daemon is used to control the creation and
56 termination of system-level processes, usually the ones 56 termination of system-level processes, usually the ones
@@ -58,7 +58,7 @@ config START_STOP_DAEMON
58 58
59config FEATURE_START_STOP_DAEMON_FANCY 59config FEATURE_START_STOP_DAEMON_FANCY
60 bool "Support additional arguments" 60 bool "Support additional arguments"
61 default n 61 default y
62 depends on START_STOP_DAEMON 62 depends on START_STOP_DAEMON
63 help 63 help
64 Support additional arguments. 64 Support additional arguments.
@@ -68,14 +68,14 @@ config FEATURE_START_STOP_DAEMON_FANCY
68 68
69config FEATURE_START_STOP_DAEMON_LONG_OPTIONS 69config FEATURE_START_STOP_DAEMON_LONG_OPTIONS
70 bool "Enable long options" 70 bool "Enable long options"
71 default n 71 default y
72 depends on START_STOP_DAEMON && LONG_OPTS 72 depends on START_STOP_DAEMON && LONG_OPTS
73 help 73 help
74 Support long options for the start-stop-daemon applet. 74 Support long options for the start-stop-daemon applet.
75 75
76config WHICH 76config WHICH
77 bool "which" 77 bool "which"
78 default n 78 default y
79 help 79 help
80 which is used to find programs in your PATH and 80 which is used to find programs in your PATH and
81 print out their pathnames. 81 print out their pathnames.
diff --git a/debianutils/Kbuild b/debianutils/Kbuild.src
index bcf6126ad..bcf6126ad 100644
--- a/debianutils/Kbuild
+++ b/debianutils/Kbuild.src
diff --git a/debianutils/pipe_progress.c b/debianutils/pipe_progress.c
index fa98e8b38..ced5fb307 100644
--- a/debianutils/pipe_progress.c
+++ b/debianutils/pipe_progress.c
@@ -6,7 +6,6 @@
6 * 6 *
7 * Licensed under GPLv2 or later, see file LICENSE in this tarball for details. 7 * Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
8 */ 8 */
9
10#include "libbb.h" 9#include "libbb.h"
11 10
12#define PIPE_PROGRESS_SIZE 4096 11#define PIPE_PROGRESS_SIZE 4096
@@ -17,23 +16,20 @@
17int pipe_progress_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; 16int pipe_progress_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
18int pipe_progress_main(int argc UNUSED_PARAM, char **argv UNUSED_PARAM) 17int pipe_progress_main(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
19{ 18{
20 RESERVE_CONFIG_BUFFER(buf, PIPE_PROGRESS_SIZE); 19 char buf[PIPE_PROGRESS_SIZE];
21 time_t t = time(NULL); 20 time_t t = time(NULL);
22 size_t len; 21 int len;
23 22
24 while ((len = fread(buf, 1, PIPE_PROGRESS_SIZE, stdin)) > 0) { 23 while ((len = safe_read(STDIN_FILENO, buf, PIPE_PROGRESS_SIZE)) > 0) {
25 time_t new_time = time(NULL); 24 time_t new_time = time(NULL);
26 if (new_time != t) { 25 if (new_time != t) {
27 t = new_time; 26 t = new_time;
28 fputc('.', stderr); 27 fputc('.', stderr);
29 } 28 }
30 fwrite(buf, len, 1, stdout); 29 full_write(STDOUT_FILENO, buf, len);
31 } 30 }
32 31
33 fputc('\n', stderr); 32 fputc('\n', stderr);
34 33
35 if (ENABLE_FEATURE_CLEAN_UP)
36 RELEASE_CONFIG_BUFFER(buf);
37
38 return 0; 34 return 0;
39} 35}