aboutsummaryrefslogtreecommitdiff
path: root/miscutils
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2006-10-05 10:17:08 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2006-10-05 10:17:08 +0000
commit7d219aab70e6951ab82c27c202cac05016696723 (patch)
tree4c0679bfa391f71aee9b51505a5d3dc8f60a0cf7 /miscutils
parent8f8f268cfdecb4cabeb2e649a73afc7a485aeff5 (diff)
downloadbusybox-w32-7d219aab70e6951ab82c27c202cac05016696723.tar.gz
busybox-w32-7d219aab70e6951ab82c27c202cac05016696723.tar.bz2
busybox-w32-7d219aab70e6951ab82c27c202cac05016696723.zip
build system overhaul
Diffstat (limited to 'miscutils')
-rw-r--r--miscutils/Config.in128
-rw-r--r--miscutils/Kbuild27
-rw-r--r--miscutils/Makefile23
-rw-r--r--miscutils/Makefile.in55
-rw-r--r--miscutils/rx.c5
5 files changed, 93 insertions, 145 deletions
diff --git a/miscutils/Config.in b/miscutils/Config.in
index 50ed4df99..311c7135c 100644
--- a/miscutils/Config.in
+++ b/miscutils/Config.in
@@ -5,25 +5,25 @@
5 5
6menu "Miscellaneous Utilities" 6menu "Miscellaneous Utilities"
7 7
8config CONFIG_ADJTIMEX 8config ADJTIMEX
9 bool "adjtimex" 9 bool "adjtimex"
10 default n 10 default n
11 help 11 help
12 Adjtimex reads and optionally sets adjustment parameters for 12 Adjtimex reads and optionally sets adjustment parameters for
13 the Linux clock adjustment algorithm. 13 the Linux clock adjustment algorithm.
14 14
15config CONFIG_BBCONFIG 15config BBCONFIG
16 bool "bbconfig" 16 bool "bbconfig"
17 default n 17 default n
18 help 18 help
19 The bbconfig applet will print the config file with which 19 The bbconfig applet will print the config file with which
20 busybox was built. 20 busybox was built.
21 21
22config CONFIG_CROND 22config CROND
23 bool "crond" 23 bool "crond"
24 default n 24 default n
25 select CONFIG_FEATURE_SUID 25 select FEATURE_SUID
26 select CONFIG_FEATURE_SYSLOG 26 select FEATURE_SYSLOG
27 help 27 help
28 Crond is a background daemon that parses individual crontab 28 Crond is a background daemon that parses individual crontab
29 files and executes commands on behalf of the users in question. 29 files and executes commands on behalf of the users in question.
@@ -35,39 +35,39 @@ config CONFIG_CROND
35 Note that Busybox binary must be setuid root for this applet to 35 Note that Busybox binary must be setuid root for this applet to
36 work properly. 36 work properly.
37 37
38config CONFIG_DEBUG_CROND_OPTION 38config DEBUG_CROND_OPTION
39 bool "Support debug option -d" 39 bool "Support debug option -d"
40 depends on CONFIG_CROND 40 depends on CROND
41 default n 41 default n
42 help 42 help
43 Support option -d to enter debug mode. 43 Support option -d to enter debug mode.
44 44
45config CONFIG_FEATURE_CROND_CALL_SENDMAIL 45config FEATURE_CROND_CALL_SENDMAIL
46 bool "Using /usr/sbin/sendmail?" 46 bool "Using /usr/sbin/sendmail?"
47 default n 47 default n
48 depends on CONFIG_CROND 48 depends on CROND
49 help 49 help
50 Support calling /usr/sbin/sendmail for send cmd outputs. 50 Support calling /usr/sbin/sendmail for send cmd outputs.
51 51
52config CONFIG_CRONTAB 52config CRONTAB
53 bool "crontab" 53 bool "crontab"
54 default n 54 default n
55 select CONFIG_FEATURE_SUID 55 select FEATURE_SUID
56 help 56 help
57 Crontab manipulates the crontab for a particular user. Only 57 Crontab manipulates the crontab for a particular user. Only
58 the superuser may specify a different user and/or crontab directory. 58 the superuser may specify a different user and/or crontab directory.
59 59
60config CONFIG_DC 60config DC
61 bool "dc" 61 bool "dc"
62 default n 62 default n
63 help 63 help
64 Dc is a reverse-polish desk calculator which supports unlimited 64 Dc is a reverse-polish desk calculator which supports unlimited
65 precision arithmetic. 65 precision arithmetic.
66 66
67config CONFIG_DEVFSD 67config DEVFSD
68 bool "devfsd (obsolete)" 68 bool "devfsd (obsolete)"
69 default n 69 default n
70 select CONFIG_FEATURE_SYSLOG 70 select FEATURE_SYSLOG
71 help 71 help
72 This is deprecated, and will be removed at the end of 2008. 72 This is deprecated, and will be removed at the end of 2008.
73 73
@@ -80,30 +80,30 @@ config CONFIG_DEVFSD
80 80
81 But only if they are written UPPERCASE!!!!!!!! 81 But only if they are written UPPERCASE!!!!!!!!
82 82
83config CONFIG_DEVFSD_MODLOAD 83config DEVFSD_MODLOAD
84 bool "Adds support for MODLOAD keyword in devsfd.conf" 84 bool "Adds support for MODLOAD keyword in devsfd.conf"
85 default n 85 default n
86 depends on CONFIG_DEVFSD 86 depends on DEVFSD
87 help 87 help
88 This actually doesn't work with busybox modutils but needs 88 This actually doesn't work with busybox modutils but needs
89 the external modutils. 89 the external modutils.
90 90
91config CONFIG_DEVFSD_FG_NP 91config DEVFSD_FG_NP
92 bool "Enables the -fg and -np options" 92 bool "Enables the -fg and -np options"
93 default n 93 default n
94 depends on CONFIG_DEVFSD 94 depends on DEVFSD
95 help 95 help
96 -fg Run the daemon in the foreground. 96 -fg Run the daemon in the foreground.
97 -np Exit after parsing the configuration file. Do not poll for events. 97 -np Exit after parsing the configuration file. Do not poll for events.
98 98
99config CONFIG_DEVFSD_VERBOSE 99config DEVFSD_VERBOSE
100 bool "Increases logging (and size)" 100 bool "Increases logging (and size)"
101 default n 101 default n
102 depends on CONFIG_DEVFSD 102 depends on DEVFSD
103 help 103 help
104 Increases logging to stderr or syslog. 104 Increases logging to stderr or syslog.
105 105
106config CONFIG_FEATURE_DEVFS 106config FEATURE_DEVFS
107 bool " Use devfs names for all devices (obsolete)" 107 bool " Use devfs names for all devices (obsolete)"
108 default n 108 default n
109 help 109 help
@@ -113,126 +113,126 @@ config CONFIG_FEATURE_DEVFS
113 /dev/loop0. If your /dev directory has normal names instead of 113 /dev/loop0. If your /dev directory has normal names instead of
114 devfs names, you don't want this. 114 devfs names, you don't want this.
115 115
116config CONFIG_EJECT 116config EJECT
117 bool "eject" 117 bool "eject"
118 default n 118 default n
119 help 119 help
120 Used to eject cdroms. (defaults to /dev/cdrom) 120 Used to eject cdroms. (defaults to /dev/cdrom)
121 121
122config CONFIG_LAST 122config LAST
123 bool "last" 123 bool "last"
124 default n 124 default n
125 select CONFIG_FEATURE_WTMP 125 select FEATURE_WTMP
126 help 126 help
127 'last' displays a list of the last users that logged into the system. 127 'last' displays a list of the last users that logged into the system.
128 128
129config CONFIG_LESS 129config LESS
130 bool "less" 130 bool "less"
131 default n 131 default n
132 help 132 help
133 'less' is a pager, meaning that it displays text files. It possesses 133 'less' is a pager, meaning that it displays text files. It possesses
134 a wide array of features, and is an improvement over 'more'. 134 a wide array of features, and is an improvement over 'more'.
135 135
136config CONFIG_FEATURE_LESS_BRACKETS 136config FEATURE_LESS_BRACKETS
137 bool "Enable bracket searching" 137 bool "Enable bracket searching"
138 default y 138 default y
139 depends on CONFIG_LESS 139 depends on LESS
140 help 140 help
141 This option adds the capability to search for matching left and right 141 This option adds the capability to search for matching left and right
142 brackets, facilitating programming. 142 brackets, facilitating programming.
143 143
144config CONFIG_FEATURE_LESS_FLAGS 144config FEATURE_LESS_FLAGS
145 bool "Enable extra flags" 145 bool "Enable extra flags"
146 default y 146 default y
147 depends on CONFIG_LESS 147 depends on LESS
148 help 148 help
149 The extra flags provided do the following: 149 The extra flags provided do the following:
150 150
151 The -M flag enables a more sophisticated status line. 151 The -M flag enables a more sophisticated status line.
152 The -m flag enables a simpler status line with a percentage. 152 The -m flag enables a simpler status line with a percentage.
153 153
154config CONFIG_FEATURE_LESS_FLAGCS 154config FEATURE_LESS_FLAGCS
155 bool "Enable flag changes" 155 bool "Enable flag changes"
156 default n 156 default n
157 depends on CONFIG_LESS 157 depends on LESS
158 help 158 help
159 This enables the ability to change command-line flags within 159 This enables the ability to change command-line flags within
160 less itself. 160 less itself.
161 161
162config CONFIG_FEATURE_LESS_MARKS 162config FEATURE_LESS_MARKS
163 bool "Enable marks" 163 bool "Enable marks"
164 default n 164 default n
165 depends on CONFIG_LESS 165 depends on LESS
166 help 166 help
167 Marks enable positions in a file to be stored for easy reference. 167 Marks enable positions in a file to be stored for easy reference.
168 168
169config CONFIG_FEATURE_LESS_REGEXP 169config FEATURE_LESS_REGEXP
170 bool "Enable regular expressions" 170 bool "Enable regular expressions"
171 default n 171 default n
172 depends on CONFIG_LESS 172 depends on LESS
173 help 173 help
174 Enable regular expressions, allowing complex file searches. 174 Enable regular expressions, allowing complex file searches.
175 175
176config CONFIG_HDPARM 176config HDPARM
177 bool "hdparm" 177 bool "hdparm"
178 default n 178 default n
179 help 179 help
180 Get/Set hard drive parameters. Primarily intended for ATA 180 Get/Set hard drive parameters. Primarily intended for ATA
181 drives. Adds about 13k (or around 30k if you enable the 181 drives. Adds about 13k (or around 30k if you enable the
182 CONFIG_FEATURE_HDPARM_GET_IDENTITY option).... 182 FEATURE_HDPARM_GET_IDENTITY option)....
183 183
184config CONFIG_FEATURE_HDPARM_GET_IDENTITY 184config FEATURE_HDPARM_GET_IDENTITY
185 bool "Support obtaining detailed information directly from drives" 185 bool "Support obtaining detailed information directly from drives"
186 default y 186 default y
187 depends on CONFIG_HDPARM 187 depends on HDPARM
188 help 188 help
189 Enables the -I and -i options to obtain detailed information 189 Enables the -I and -i options to obtain detailed information
190 directly from drives about their capabilities and supported ATA 190 directly from drives about their capabilities and supported ATA
191 feature set. If no device name is specified, hdparm will read 191 feature set. If no device name is specified, hdparm will read
192 identify data from stdin. Enabling this option will add about 16k... 192 identify data from stdin. Enabling this option will add about 16k...
193 193
194config CONFIG_FEATURE_HDPARM_HDIO_SCAN_HWIF 194config FEATURE_HDPARM_HDIO_SCAN_HWIF
195 bool "Register an IDE interface (DANGEROUS)" 195 bool "Register an IDE interface (DANGEROUS)"
196 default n 196 default n
197 depends on CONFIG_HDPARM 197 depends on HDPARM
198 help 198 help
199 Enables the 'hdparm -R' option to register an IDE interface. 199 Enables the 'hdparm -R' option to register an IDE interface.
200 This is dangerous stuff, so you should probably say N. 200 This is dangerous stuff, so you should probably say N.
201 201
202config CONFIG_FEATURE_HDPARM_HDIO_UNREGISTER_HWIF 202config FEATURE_HDPARM_HDIO_UNREGISTER_HWIF
203 bool "Un-register an IDE interface (DANGEROUS)" 203 bool "Un-register an IDE interface (DANGEROUS)"
204 default n 204 default n
205 depends on CONFIG_HDPARM 205 depends on HDPARM
206 help 206 help
207 Enables the 'hdparm -U' option to un-register an IDE interface. 207 Enables the 'hdparm -U' option to un-register an IDE interface.
208 This is dangerous stuff, so you should probably say N. 208 This is dangerous stuff, so you should probably say N.
209 209
210config CONFIG_FEATURE_HDPARM_HDIO_DRIVE_RESET 210config FEATURE_HDPARM_HDIO_DRIVE_RESET
211 bool "perform device reset (DANGEROUS)" 211 bool "perform device reset (DANGEROUS)"
212 default n 212 default n
213 depends on CONFIG_HDPARM 213 depends on HDPARM
214 help 214 help
215 Enables the 'hdparm -w' option to perform a device reset. 215 Enables the 'hdparm -w' option to perform a device reset.
216 This is dangerous stuff, so you should probably say N. 216 This is dangerous stuff, so you should probably say N.
217 217
218config CONFIG_FEATURE_HDPARM_HDIO_TRISTATE_HWIF 218config FEATURE_HDPARM_HDIO_TRISTATE_HWIF
219 bool "tristate device for hotswap (DANGEROUS)" 219 bool "tristate device for hotswap (DANGEROUS)"
220 default n 220 default n
221 depends on CONFIG_HDPARM 221 depends on HDPARM
222 help 222 help
223 Enables the 'hdparm -x' option to tristate device for hotswap, 223 Enables the 'hdparm -x' option to tristate device for hotswap,
224 and the '-b' option to get/set bus state. This is dangerous 224 and the '-b' option to get/set bus state. This is dangerous
225 stuff, so you should probably say N. 225 stuff, so you should probably say N.
226 226
227config CONFIG_FEATURE_HDPARM_HDIO_GETSET_DMA 227config FEATURE_HDPARM_HDIO_GETSET_DMA
228 bool "get/set using_dma flag (DANGEROUS)" 228 bool "get/set using_dma flag (DANGEROUS)"
229 default n 229 default n
230 depends on CONFIG_HDPARM 230 depends on HDPARM
231 help 231 help
232 Enables the 'hdparm -d' option to get/set using_dma flag. 232 Enables the 'hdparm -d' option to get/set using_dma flag.
233 This is dangerous stuff, so you should probably say N. 233 This is dangerous stuff, so you should probably say N.
234 234
235config CONFIG_MAKEDEVS 235config MAKEDEVS
236 bool "makedevs" 236 bool "makedevs"
237 default n 237 default n
238 help 238 help
@@ -253,24 +253,24 @@ config CONFIG_MAKEDEVS
253 253
254choice 254choice
255 prompt "Choose makedevs behaviour" 255 prompt "Choose makedevs behaviour"
256 depends CONFIG_MAKEDEVS 256 depends MAKEDEVS
257 default CONFIG_FEATURE_MAKEDEVS_TABLE 257 default FEATURE_MAKEDEVS_TABLE
258 258
259config CONFIG_FEATURE_MAKEDEVS_LEAF 259config FEATURE_MAKEDEVS_LEAF
260 bool "leaf" 260 bool "leaf"
261 261
262config CONFIG_FEATURE_MAKEDEVS_TABLE 262config FEATURE_MAKEDEVS_TABLE
263 bool "table" 263 bool "table"
264 264
265endchoice 265endchoice
266 266
267config CONFIG_MOUNTPOINT 267config MOUNTPOINT
268 bool "mountpoint" 268 bool "mountpoint"
269 default n 269 default n
270 help 270 help
271 mountpoint checks if the directory is a mountpoint. 271 mountpoint checks if the directory is a mountpoint.
272 272
273config CONFIG_MT 273config MT
274 bool "mt" 274 bool "mt"
275 default n 275 default n
276 help 276 help
@@ -278,7 +278,7 @@ config CONFIG_MT
278 to advance or rewind a tape past a specified number of archive 278 to advance or rewind a tape past a specified number of archive
279 files on the tape. 279 files on the tape.
280 280
281config CONFIG_READAHEAD 281config READAHEAD
282 bool "readahead" 282 bool "readahead"
283 default n 283 default n
284 help 284 help
@@ -294,7 +294,7 @@ config CONFIG_READAHEAD
294 As readahead(2) blocks until each file has been read, it is best to 294 As readahead(2) blocks until each file has been read, it is best to
295 run this applet as a background job. 295 run this applet as a background job.
296 296
297config CONFIG_RUNLEVEL 297config RUNLEVEL
298 bool "runlevel" 298 bool "runlevel"
299 default n 299 default n
300 help 300 help
@@ -303,32 +303,32 @@ config CONFIG_RUNLEVEL
303 This applet uses utmp but does not rely on busybox supporing 303 This applet uses utmp but does not rely on busybox supporing
304 utmp on purpose. It is used by e.g. emdebian via /etc/init.d/rc. 304 utmp on purpose. It is used by e.g. emdebian via /etc/init.d/rc.
305 305
306config CONFIG_RX 306config RX
307 bool "rx" 307 bool "rx"
308 default n 308 default n
309 help 309 help
310 Receive files using the Xmodem protocol. 310 Receive files using the Xmodem protocol.
311 311
312config CONFIG_STRINGS 312config STRINGS
313 bool "strings" 313 bool "strings"
314 default n 314 default n
315 help 315 help
316 strings prints the printable character sequences for each file 316 strings prints the printable character sequences for each file
317 specified. 317 specified.
318 318
319config CONFIG_SETSID 319config SETSID
320 bool "setsid" 320 bool "setsid"
321 default n 321 default n
322 help 322 help
323 setsid runs a program in a new session 323 setsid runs a program in a new session
324 324
325config CONFIG_TASKSET 325config TASKSET
326 bool "taskset" 326 bool "taskset"
327 default n 327 default n
328 help 328 help
329 Retrieve or set a processes's CPU affinity. 329 Retrieve or set a processes's CPU affinity.
330 330
331config CONFIG_TIME 331config TIME
332 bool "time" 332 bool "time"
333 default n 333 default n
334 help 334 help
@@ -336,7 +336,7 @@ config CONFIG_TIME
336 When the command finishes, time writes a message to standard output 336 When the command finishes, time writes a message to standard output
337 giving timing statistics about this program run. 337 giving timing statistics about this program run.
338 338
339config CONFIG_WATCHDOG 339config WATCHDOG
340 bool "watchdog" 340 bool "watchdog"
341 default n 341 default n
342 help 342 help
diff --git a/miscutils/Kbuild b/miscutils/Kbuild
new file mode 100644
index 000000000..1c9e9fded
--- /dev/null
+++ b/miscutils/Kbuild
@@ -0,0 +1,27 @@
1# Makefile for busybox
2#
3# Copyright (C) 1999-2005 by Erik Andersen <andersen@codepoet.org>
4#
5# Licensed under the GPL v2, see the file LICENSE in this tarball.
6
7lib-y:=
8lib-$(CONFIG_ADJTIMEX) += adjtimex.o
9lib-$(CONFIG_CROND) += crond.o
10lib-$(CONFIG_CRONTAB) += crontab.o
11lib-$(CONFIG_BBCONFIG) += bbconfig.o
12lib-$(CONFIG_DC) += dc.o
13lib-$(CONFIG_DEVFSD) += devfsd.o
14lib-$(CONFIG_EJECT) += eject.o
15lib-$(CONFIG_HDPARM) += hdparm.o
16lib-$(CONFIG_LAST) += last.o
17lib-$(CONFIG_LESS) += less.o
18lib-$(CONFIG_MAKEDEVS) += makedevs.o
19lib-$(CONFIG_MOUNTPOINT) += mountpoint.o
20lib-$(CONFIG_MT) += mt.o
21lib-$(CONFIG_READAHEAD) += readahead.o
22lib-$(CONFIG_RUNLEVEL) += runlevel.o
23lib-$(CONFIG_RX) += rx.o
24lib-$(CONFIG_SETSID) += setsid.o
25lib-$(CONFIG_STRINGS) += strings.o
26lib-$(CONFIG_TIME) += time.o
27lib-$(CONFIG_WATCHDOG) += watchdog.o
diff --git a/miscutils/Makefile b/miscutils/Makefile
deleted file mode 100644
index 91b31ec9e..000000000
--- a/miscutils/Makefile
+++ /dev/null
@@ -1,23 +0,0 @@
1# Makefile for busybox
2#
3# Copyright (C) 1999-2005 by Erik Andersen <andersen@codepoet.org>
4#
5# Licensed under the GPL v2, see the file LICENSE in this tarball.
6
7ifndef top_srcdir
8top_srcdir=..
9endif
10ifndef top_builddir
11top_builddir=..
12endif
13srcdir=$(top_srcdir)/miscutils
14MISCUTILS_DIR:=./
15include $(top_srcdir)/Rules.mak
16include $(top_builddir)/.config
17include Makefile.in
18all: $(libraries-y)
19-include $(top_builddir)/.depend
20
21clean:
22 rm -f *.o *.a $(AR_TARGET)
23
diff --git a/miscutils/Makefile.in b/miscutils/Makefile.in
deleted file mode 100644
index d32d7714e..000000000
--- a/miscutils/Makefile.in
+++ /dev/null
@@ -1,55 +0,0 @@
1# Makefile for busybox
2#
3# Copyright (C) 1999-2005 by Erik Andersen <andersen@codepoet.org>
4#
5# Licensed under the GPL v2, see the file LICENSE in this tarball.
6
7MISCUTILS_AR:=miscutils.a
8ifndef $(MISCUTILS_DIR)
9MISCUTILS_DIR:=$(top_builddir)/miscutils/
10endif
11srcdir=$(top_srcdir)/miscutils
12
13MISCUTILS-y:=
14MISCUTILS-$(CONFIG_ADJTIMEX) += adjtimex.o
15MISCUTILS-$(CONFIG_CROND) += crond.o
16MISCUTILS-$(CONFIG_CRONTAB) += crontab.o
17MISCUTILS-$(CONFIG_BBCONFIG) += bbconfig.o
18MISCUTILS-$(CONFIG_DC) += dc.o
19MISCUTILS-$(CONFIG_DEVFSD) += devfsd.o
20MISCUTILS-$(CONFIG_EJECT) += eject.o
21MISCUTILS-$(CONFIG_HDPARM) += hdparm.o
22MISCUTILS-$(CONFIG_LAST) += last.o
23MISCUTILS-$(CONFIG_LESS) += less.o
24MISCUTILS-$(CONFIG_MAKEDEVS) += makedevs.o
25MISCUTILS-$(CONFIG_MOUNTPOINT) += mountpoint.o
26MISCUTILS-$(CONFIG_MT) += mt.o
27MISCUTILS-$(CONFIG_READAHEAD) += readahead.o
28MISCUTILS-$(CONFIG_RUNLEVEL) += runlevel.o
29MISCUTILS-$(CONFIG_RX) += rx.o
30MISCUTILS-$(CONFIG_SETSID) += setsid.o
31MISCUTILS-$(CONFIG_STRINGS) += strings.o
32MISCUTILS-$(CONFIG_TIME) += time.o
33MISCUTILS-$(CONFIG_WATCHDOG) += watchdog.o
34
35ifneq ($(strip $(MISCUTILS-y)),)
36libraries-y+=$(MISCUTILS_DIR)$(MISCUTILS_AR)
37endif
38
39MISCUTILS_SRC-y:=$(patsubst %.o,$(srcdir)/%.c,$(MISCUTILS-y))
40MISCUTILS_SRC-a:=$(wildcard $(srcdir)/*.c)
41APPLET_SRC-y+=$(MISCUTILS_SRC-y)
42APPLET_SRC-a+=$(MISCUTILS_SRC-a)
43
44needlibm-y:=
45needlibm-$(CONFIG_DC) := y
46
47ifeq ($(needlibm-y),y)
48 LIBRARIES := -lm $(filter-out -lm,$(LIBRARIES))
49endif
50
51$(MISCUTILS_DIR)$(MISCUTILS_AR): $(patsubst %,$(MISCUTILS_DIR)%, $(MISCUTILS-y))
52 $(do_ar)
53
54$(MISCUTILS_DIR)%.o: $(srcdir)/%.c
55 $(compile.c)
diff --git a/miscutils/rx.c b/miscutils/rx.c
index 52a76bfd9..00951b711 100644
--- a/miscutils/rx.c
+++ b/miscutils/rx.c
@@ -266,7 +266,7 @@ int rx_main(int argc, char **argv)
266 filefd = xopen3(fn, O_RDWR|O_CREAT|O_TRUNC, 0666); 266 filefd = xopen3(fn, O_RDWR|O_CREAT|O_TRUNC, 0666);
267 267
268 if (tcgetattr(ttyfd, &tty) < 0) 268 if (tcgetattr(ttyfd, &tty) < 0)
269 bb_perror_msg_and_die("%s: tcgetattr failed", argv[0]); 269 bb_perror_msg_and_die("tcgetattr");
270 270
271 orig_tty = tty; 271 orig_tty = tty;
272 272
@@ -284,8 +284,7 @@ int rx_main(int argc, char **argv)
284 tcsetattr(ttyfd, TCSAFLUSH, &orig_tty); 284 tcsetattr(ttyfd, TCSAFLUSH, &orig_tty);
285 285
286 if (n < 0) 286 if (n < 0)
287 bb_error_msg_and_die("\n%s: receive failed:\n %s", 287 bb_error_msg_and_die("\nreceive failed:\n %s", error_buf);
288 argv[0], error_buf);
289 288
290 bb_fflush_stdout_and_exit(EXIT_SUCCESS); 289 bb_fflush_stdout_and_exit(EXIT_SUCCESS);
291} 290}