Last change
on this file since 3711 was 2725, checked in by Bruno Cornec, 14 years ago |
- Update mindi-busybox to 1.18.3 to avoid problems with the tar command which is now failing on recent versions with busybox 1.7.3
|
File size:
972 bytes
|
Line | |
---|
1 | /* vi: set sw=4 ts=4: */
|
---|
2 | /* This file was released into the public domain by Paul Fox.
|
---|
3 | */
|
---|
4 | #include "libbb.h"
|
---|
5 | #include "bbconfigopts.h"
|
---|
6 | #if ENABLE_FEATURE_COMPRESS_BBCONFIG
|
---|
7 | # include "archive.h"
|
---|
8 | # include "bbconfigopts_bz2.h"
|
---|
9 | #endif
|
---|
10 |
|
---|
11 | int bbconfig_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
|
---|
12 | int bbconfig_main(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
|
---|
13 | {
|
---|
14 | #if ENABLE_FEATURE_COMPRESS_BBCONFIG
|
---|
15 | bunzip_data *bd;
|
---|
16 | int i = start_bunzip(&bd,
|
---|
17 | /* src_fd: */ -1,
|
---|
18 | /* inbuf: */ bbconfig_config_bz2,
|
---|
19 | /* len: */ sizeof(bbconfig_config_bz2));
|
---|
20 | /* read_bunzip can longjmp to start_bunzip, and ultimately
|
---|
21 | * end up here with i != 0 on read data errors! Not trivial */
|
---|
22 | if (!i) {
|
---|
23 | /* Cannot use xmalloc: will leak bd in NOFORK case! */
|
---|
24 | char *outbuf = malloc_or_warn(sizeof(bbconfig_config));
|
---|
25 | if (outbuf) {
|
---|
26 | read_bunzip(bd, outbuf, sizeof(bbconfig_config));
|
---|
27 | full_write1_str(outbuf);
|
---|
28 | }
|
---|
29 | }
|
---|
30 | #else
|
---|
31 | full_write1_str(bbconfig_config);
|
---|
32 | #endif
|
---|
33 | return 0;
|
---|
34 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.