Etienne Champetier | 30 Jun 22:08 2016
Picon

Patchwork ?

Hi,

Is there a patchwork for this ML / busybox ?

Regards
Etienne

_______________________________________________
busybox mailing list
busybox <at> busybox.net
http://lists.busybox.net/mailman/listinfo/busybox
James Hanley | 30 Jun 20:54 2016
Gravatar

Feature Request: "diff -I regex" to ignore matching lines

It would be helpful to include the -I option in the diff app.

It looks like it could use xregcomp() similar to sed in the static implementation of diff(fp,file) just after the determination of FLAG(B) but I'm unsure how to shoe this in as the comments mention that any flag that takes a parameter is handled by getopt32.

Thanks much,
-Jim
_______________________________________________
busybox mailing list
busybox <at> busybox.net
http://lists.busybox.net/mailman/listinfo/busybox
Robert Schiele | 30 Jun 13:24 2016
Picon
Gravatar

[PATCH] devmem: support more than 4GB of physical memory on 32 bit systems

Signed-off-by: Robert Schiele <rschiele <at> gmail.com>
---
 miscutils/devmem.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/miscutils/devmem.c b/miscutils/devmem.c
index 786a21b..5515da5 100644
--- a/miscutils/devmem.c
+++ b/miscutils/devmem.c
 <at>  <at>  -20,7 +20,7  <at>  <at>  int devmem_main(int argc UNUSED_PARAM, char **argv)
 	void *map_base, *virt_addr;
 	uint64_t read_result;
 	uint64_t writeval = writeval; /* for compiler */
-	off_t target;
+	off64_t target;
 	unsigned page_size, mapped_size, offset_in_page;
 	int fd;
 	unsigned width = 8 * sizeof(int);
 <at>  <at>  -72,12 +72,12  <at>  <at>  int devmem_main(int argc UNUSED_PARAM, char **argv)
 		 * Must map two pages to make it possible: */
 		mapped_size *= 2;
 	}
-	map_base = mmap(NULL,
+	map_base = mmap64(NULL,
 			mapped_size,
 			argv[3] ? (PROT_READ | PROT_WRITE) : PROT_READ,
 			MAP_SHARED,
 			fd,
-			target & ~(off_t)(page_size - 1));
+			target & ~(off64_t)(page_size - 1));
 	if (map_base == MAP_FAILED)
 		bb_perror_msg_and_die("mmap");

--

-- 
2.8.4
Vered Zvi | 29 Jun 17:44 2016
Picon

Error in creating user root

Hello,

I'm using busybox 1.20.2

In order to create a new user I ran:

addgroup root
adduser -h /home/root -G root root

I'm getting a message:
passwd: unknown uid 0

Can you please help ?

Thank you,
Z.V
The information contained in this communication is proprietary to Israel Aerospace Industries Ltd.
and/or third parties, may contain confidential or privileged information, and is intended only for the
use of the intended addressee thereof. If you are not the intended addressee, please be aware that any use,
disclosure, distribution and/or copying of this communication is strictly prohibited. If you receive
this communication in error, please notify the sender immediately and delete it from your computer.
Etienne CHAMPETIER | 29 Jun 17:32 2016
Picon

[PATCH v3] getrandom: new applet

first user of this applet will be LEDE (OpenWrt) to save an urandom seed
using getrandom() (so we are sure /dev/urandom pool is initialized)

function                                             old     new   delta
getrandom_main                                         -     162    +162
.rodata                                           156181  156208     +27
applet_names                                        2536    2546     +10
applet_main                                         2936    2944      +8
------------------------------------------------------------------------------
(add/remove: 2/0 grow/shrink: 3/0 up/down: 207/0)             Total: 207 bytes

v2: reduce size by 40 bytes thanks to Tito <farmatito <at> tiscali.it>
v3: release under GPLv2 or later, thanks Bernhard Reutner-Fischer <rep.dot.nop <at> gmail.com>

Signed-off-by: Etienne CHAMPETIER <champetier.etienne <at> gmail.com>
---
 include/applets.src.h  |  1 +
 util-linux/Config.src  |  8 ++++++++
 util-linux/Kbuild.src  |  1 +
 util-linux/getrandom.c | 43 +++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 53 insertions(+)
 create mode 100644 util-linux/getrandom.c

diff --git a/include/applets.src.h b/include/applets.src.h
index 6e1b02f..b617d14 100644
--- a/include/applets.src.h
+++ b/include/applets.src.h
 <at>  <at>  -153,6 +153,7  <at>  <at>  IF_FTPPUT(APPLET_ODDNAME(ftpput, ftpgetput, BB_DIR_USR_BIN, BB_SUID_DROP, ftpput
 IF_FUSER(APPLET(fuser, BB_DIR_USR_BIN, BB_SUID_DROP))
 IF_GETENFORCE(APPLET(getenforce, BB_DIR_USR_SBIN, BB_SUID_DROP))
 IF_GETOPT(APPLET(getopt, BB_DIR_BIN, BB_SUID_DROP))
+IF_GETRANDOM(APPLET(getrandom, BB_DIR_USR_BIN, BB_SUID_DROP))
 IF_GETSEBOOL(APPLET(getsebool, BB_DIR_USR_SBIN, BB_SUID_DROP))
 IF_HD(APPLET_NOEXEC(hd, hexdump, BB_DIR_USR_BIN, BB_SUID_DROP, hd))
 IF_HDPARM(APPLET(hdparm, BB_DIR_SBIN, BB_SUID_DROP))
diff --git a/util-linux/Config.src b/util-linux/Config.src
index 922cabd..9f47db7 100644
--- a/util-linux/Config.src
+++ b/util-linux/Config.src
 <at>  <at>  -304,6 +304,14  <at>  <at>  config FEATURE_GETOPT_LONG
 	help
 	  Enable support for long options (option -l).

+config GETRANDOM
+	bool "getrandom"
+	default y
+	select PLATFORM_LINUX
+	help
+	  The getrandom utility get NBYTES random bytes using getrandom()
+	  syscall (available since Linux 3.17)
+
 config HEXDUMP
 	bool "hexdump"
 	default y
diff --git a/util-linux/Kbuild.src b/util-linux/Kbuild.src
index 0b87c52..b164fb7 100644
--- a/util-linux/Kbuild.src
+++ b/util-linux/Kbuild.src
 <at>  <at>  -19,6 +19,7  <at>  <at>  lib-$(CONFIG_FLOCK)             += flock.o
 lib-$(CONFIG_FREERAMDISK)       += freeramdisk.o
 lib-$(CONFIG_FSCK_MINIX)        += fsck_minix.o
 lib-$(CONFIG_GETOPT)            += getopt.o
+lib-$(CONFIG_GETRANDOM)         += getrandom.o
 lib-$(CONFIG_HEXDUMP)           += hexdump.o
 lib-$(CONFIG_HWCLOCK)           += hwclock.o
 lib-$(CONFIG_IPCRM)             += ipcrm.o
diff --git a/util-linux/getrandom.c b/util-linux/getrandom.c
new file mode 100644
index 0000000..d61b53a
--- /dev/null
+++ b/util-linux/getrandom.c
 <at>  <at>  -0,0 +1,43  <at>  <at> 
+/* vi: set sw=4 ts=4: */
+/*
+ * getrandom.c - read random bytes using getrandom() syscall
+ *
+ * Copyright (C) 2016 Etienne Champetier <champetier.etienne <at> gmail.com>
+ *
+ * Licensed under GPLv2 or later, see file LICENSE in this source tree.
+ */
+
+//usage:#define getrandom_trivial_usage
+//usage:       "N"
+//usage:#define getrandom_full_usage "\n\n"
+//usage:       "Read N random bytes using getrandom()"
+
+#include <sys/syscall.h>
+#include "libbb.h"
+
+int getrandom_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
+int getrandom_main(int argc, char **argv)
+{
+	int nbytes, len;
+	char buf[256]; /* getrandom(2) calls up to 256 bytes always succeed */
+
+	if (argc != 2)
+		bb_show_usage();
+
+	if (isatty(STDOUT_FILENO))
+		bb_error_msg_and_die("isatty");
+
+	nbytes = xatoi_range(argv[1], 1, INT_MAX);
+
+	for (len = sizeof(buf); nbytes > 0; nbytes -= sizeof(buf)) {
+		if (nbytes < sizeof(buf)) {
+			len = nbytes;
+		}
+		if (syscall(SYS_getrandom, buf, len, 0) != len) {
+			bb_perror_msg_and_die("getrandom");
+		}
+		xwrite(STDOUT_FILENO, buf, len);
+	}
+
+	return EXIT_SUCCESS;
+}
--

-- 
2.5.5
Etienne Champetier | 29 Jun 09:30 2016
Picon

Re: [PATCH v2] getrandom: new applet

2016-06-29 9:05 GMT+02:00 Bernhard Reutner-Fischer <rep.dot.nop <at> gmail.com>:
> On June 29, 2016 12:10:31 AM GMT+02:00, Etienne CHAMPETIER <champetier.etienne <at> gmail.com> wrote:
>>first user of this applet will be LEDE (OpenWrt) to save an urandom
>>seed
>>using getrandom() (so we are sure /dev/urandom pool is initialized)
>>
>>function                                             old     new
>>delta
>>getrandom_main                                         -     162
>>+162
>>.rodata                                           156181  156208
>>+27
>>applet_names                                        2536    2546
>>+10
>>applet_main                                         2936    2944
>>+8
>>------------------------------------------------------------------------------
>>(add/remove: 2/0 grow/shrink: 3/0 up/down: 207/0)             Total:
>>207 bytes
>>
>>v2: reduce size by 40 bytes thanks to Tito <farmatito <at> tiscali.it>
>>
>>Signed-off-by: Etienne CHAMPETIER <champetier.etienne <at> gmail.com>
>
>>diff --git a/util-linux/getrandom.c b/util-linux/getrandom.c
>>new file mode 100644
>>index 0000000..ac1fe63
>>--- /dev/null
>>+++ b/util-linux/getrandom.c
>> <at>  <at>  -0,0 +1,43  <at>  <at> 
>>+/* vi: set sw=4 ts=4: */
>>+/*
>>+ * getrandom.c - read random bytes using getrandom() syscall
>>+ *
>>+ * Copyright (C) 2016 Etienne Champetier
>><champetier.etienne <at> gmail.com>
>>+ *
>>+ * Licensed under GPLv2, see file LICENSE in this source tree.
>
>
> It would be great if you could make that "GPLv2+" resp. GPLv2 or later.

will resend today (this is a copy paste from pivot_root.c)

>
> TIA,
>
Etienne CHAMPETIER | 29 Jun 00:10 2016
Picon

[PATCH v2] getrandom: new applet

first user of this applet will be LEDE (OpenWrt) to save an urandom seed
using getrandom() (so we are sure /dev/urandom pool is initialized)

function                                             old     new   delta
getrandom_main                                         -     162    +162
.rodata                                           156181  156208     +27
applet_names                                        2536    2546     +10
applet_main                                         2936    2944      +8
------------------------------------------------------------------------------
(add/remove: 2/0 grow/shrink: 3/0 up/down: 207/0)             Total: 207 bytes

v2: reduce size by 40 bytes thanks to Tito <farmatito <at> tiscali.it>

Signed-off-by: Etienne CHAMPETIER <champetier.etienne <at> gmail.com>
---
 include/applets.src.h  |  1 +
 util-linux/Config.src  |  8 ++++++++
 util-linux/Kbuild.src  |  1 +
 util-linux/getrandom.c | 43 +++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 53 insertions(+)
 create mode 100644 util-linux/getrandom.c

diff --git a/include/applets.src.h b/include/applets.src.h
index 6e1b02f..b617d14 100644
--- a/include/applets.src.h
+++ b/include/applets.src.h
 <at>  <at>  -153,6 +153,7  <at>  <at>  IF_FTPPUT(APPLET_ODDNAME(ftpput, ftpgetput, BB_DIR_USR_BIN, BB_SUID_DROP, ftpput
 IF_FUSER(APPLET(fuser, BB_DIR_USR_BIN, BB_SUID_DROP))
 IF_GETENFORCE(APPLET(getenforce, BB_DIR_USR_SBIN, BB_SUID_DROP))
 IF_GETOPT(APPLET(getopt, BB_DIR_BIN, BB_SUID_DROP))
+IF_GETRANDOM(APPLET(getrandom, BB_DIR_USR_BIN, BB_SUID_DROP))
 IF_GETSEBOOL(APPLET(getsebool, BB_DIR_USR_SBIN, BB_SUID_DROP))
 IF_HD(APPLET_NOEXEC(hd, hexdump, BB_DIR_USR_BIN, BB_SUID_DROP, hd))
 IF_HDPARM(APPLET(hdparm, BB_DIR_SBIN, BB_SUID_DROP))
diff --git a/util-linux/Config.src b/util-linux/Config.src
index 922cabd..9f47db7 100644
--- a/util-linux/Config.src
+++ b/util-linux/Config.src
 <at>  <at>  -304,6 +304,14  <at>  <at>  config FEATURE_GETOPT_LONG
 	help
 	  Enable support for long options (option -l).

+config GETRANDOM
+	bool "getrandom"
+	default y
+	select PLATFORM_LINUX
+	help
+	  The getrandom utility get NBYTES random bytes using getrandom()
+	  syscall (available since Linux 3.17)
+
 config HEXDUMP
 	bool "hexdump"
 	default y
diff --git a/util-linux/Kbuild.src b/util-linux/Kbuild.src
index 0b87c52..b164fb7 100644
--- a/util-linux/Kbuild.src
+++ b/util-linux/Kbuild.src
 <at>  <at>  -19,6 +19,7  <at>  <at>  lib-$(CONFIG_FLOCK)             += flock.o
 lib-$(CONFIG_FREERAMDISK)       += freeramdisk.o
 lib-$(CONFIG_FSCK_MINIX)        += fsck_minix.o
 lib-$(CONFIG_GETOPT)            += getopt.o
+lib-$(CONFIG_GETRANDOM)         += getrandom.o
 lib-$(CONFIG_HEXDUMP)           += hexdump.o
 lib-$(CONFIG_HWCLOCK)           += hwclock.o
 lib-$(CONFIG_IPCRM)             += ipcrm.o
diff --git a/util-linux/getrandom.c b/util-linux/getrandom.c
new file mode 100644
index 0000000..ac1fe63
--- /dev/null
+++ b/util-linux/getrandom.c
 <at>  <at>  -0,0 +1,43  <at>  <at> 
+/* vi: set sw=4 ts=4: */
+/*
+ * getrandom.c - read random bytes using getrandom() syscall
+ *
+ * Copyright (C) 2016 Etienne Champetier <champetier.etienne <at> gmail.com>
+ *
+ * Licensed under GPLv2, see file LICENSE in this source tree.
+ */
+
+//usage:#define getrandom_trivial_usage
+//usage:       "N"
+//usage:#define getrandom_full_usage "\n\n"
+//usage:       "Read N random bytes using getrandom()"
+
+#include <sys/syscall.h>
+#include "libbb.h"
+
+int getrandom_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
+int getrandom_main(int argc, char **argv)
+{
+	int nbytes, len;
+	char buf[256]; /* getrandom(2) calls up to 256 bytes always succeed */
+
+	if (argc != 2)
+		bb_show_usage();
+
+	if (isatty(STDOUT_FILENO))
+		bb_error_msg_and_die("isatty");
+
+	nbytes = xatoi_range(argv[1], 1, INT_MAX);
+
+	for (len = sizeof(buf); nbytes > 0; nbytes -= sizeof(buf)) {
+		if (nbytes < sizeof(buf)) {
+			len = nbytes;
+		}
+		if (syscall(SYS_getrandom, buf, len, 0) != len) {
+			bb_perror_msg_and_die("getrandom");
+		}
+		xwrite(STDOUT_FILENO, buf, len);
+	}
+
+	return EXIT_SUCCESS;
+}
--

-- 
2.5.5
KP.Kirchdoerfer | 28 Jun 20:19 2016
Picon

busybox 1.25 ntpd retry initial DNS resolution (forever, no timeout for now).

Hi;

I'm testing busybox 1.25 and wonder how to deal with the commit 

https://git.busybox.net/busybox/commit/networking?id=e4caf1dd9ce8569371a0eeb77ccf02a572dc0f11

At the first look it seems to be an obvious improvement, but then I'm afraid it 
may generate a hard to resolve problem.

I start ntpd by default from /etc/init.d

There might be no working network connection (not configured properly for 
whatever reason, hardware problems, whatelse).

With busybox 1.24 ntpd fails to start and the boot process continues up to a 
shell login  - allowing me to configure, start diagnostics and resolve errors.

With busybox 1.25 ntpd seems to loop forever if now NTP servers are found, 
blocking the boot process  and I never get a login to solve a possible pb or 
to do a first time configuration.

Any hints how this can be solved?

kp
Etienne CHAMPETIER | 28 Jun 18:56 2016
Picon

[PATCH] getrandom: new applet

first user of this applet will be LEDE (OpenWrt) to save an urandom seed
using getrandom() (so we are sure /dev/urandom pool is initialized)

function                                             old     new   delta
getrandom_main                                         -     178    +178
.rodata                                           156181  156232     +51
applet_names                                        2536    2546     +10
applet_main                                         2936    2944      +8
------------------------------------------------------------------------------
(add/remove: 2/0 grow/shrink: 3/0 up/down: 247/0)             Total: 247 bytes

Signed-off-by: Etienne CHAMPETIER <champetier.etienne <at> gmail.com>
---
 include/applets.src.h  |  1 +
 util-linux/Config.src  |  8 ++++++++
 util-linux/Kbuild.src  |  1 +
 util-linux/getrandom.c | 47 +++++++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 57 insertions(+)
 create mode 100644 util-linux/getrandom.c

diff --git a/include/applets.src.h b/include/applets.src.h
index 6e1b02f..b617d14 100644
--- a/include/applets.src.h
+++ b/include/applets.src.h
 <at>  <at>  -153,6 +153,7  <at>  <at>  IF_FTPPUT(APPLET_ODDNAME(ftpput, ftpgetput, BB_DIR_USR_BIN, BB_SUID_DROP, ftpput
 IF_FUSER(APPLET(fuser, BB_DIR_USR_BIN, BB_SUID_DROP))
 IF_GETENFORCE(APPLET(getenforce, BB_DIR_USR_SBIN, BB_SUID_DROP))
 IF_GETOPT(APPLET(getopt, BB_DIR_BIN, BB_SUID_DROP))
+IF_GETRANDOM(APPLET(getrandom, BB_DIR_USR_BIN, BB_SUID_DROP))
 IF_GETSEBOOL(APPLET(getsebool, BB_DIR_USR_SBIN, BB_SUID_DROP))
 IF_HD(APPLET_NOEXEC(hd, hexdump, BB_DIR_USR_BIN, BB_SUID_DROP, hd))
 IF_HDPARM(APPLET(hdparm, BB_DIR_SBIN, BB_SUID_DROP))
diff --git a/util-linux/Config.src b/util-linux/Config.src
index 922cabd..9f47db7 100644
--- a/util-linux/Config.src
+++ b/util-linux/Config.src
 <at>  <at>  -304,6 +304,14  <at>  <at>  config FEATURE_GETOPT_LONG
 	help
 	  Enable support for long options (option -l).

+config GETRANDOM
+	bool "getrandom"
+	default y
+	select PLATFORM_LINUX
+	help
+	  The getrandom utility get NBYTES random bytes using getrandom()
+	  syscall (available since Linux 3.17)
+
 config HEXDUMP
 	bool "hexdump"
 	default y
diff --git a/util-linux/Kbuild.src b/util-linux/Kbuild.src
index 0b87c52..b164fb7 100644
--- a/util-linux/Kbuild.src
+++ b/util-linux/Kbuild.src
 <at>  <at>  -19,6 +19,7  <at>  <at>  lib-$(CONFIG_FLOCK)             += flock.o
 lib-$(CONFIG_FREERAMDISK)       += freeramdisk.o
 lib-$(CONFIG_FSCK_MINIX)        += fsck_minix.o
 lib-$(CONFIG_GETOPT)            += getopt.o
+lib-$(CONFIG_GETRANDOM)         += getrandom.o
 lib-$(CONFIG_HEXDUMP)           += hexdump.o
 lib-$(CONFIG_HWCLOCK)           += hwclock.o
 lib-$(CONFIG_IPCRM)             += ipcrm.o
diff --git a/util-linux/getrandom.c b/util-linux/getrandom.c
new file mode 100644
index 0000000..165b492
--- /dev/null
+++ b/util-linux/getrandom.c
 <at>  <at>  -0,0 +1,47  <at>  <at> 
+/* vi: set sw=4 ts=4: */
+/*
+ * getrandom.c - read random bytes using getrandom() syscall
+ *
+ * Copyright (C) 2016 Etienne Champetier <champetier.etienne <at> gmail.com>
+ *
+ * Licensed under GPLv2, see file LICENSE in this source tree.
+ */
+
+//usage:#define getrandom_trivial_usage
+//usage:       "N"
+//usage:#define getrandom_full_usage "\n\n"
+//usage:       "Read N random bytes using getrandom()"
+
+#include <sys/syscall.h>
+#include "libbb.h"
+
+int getrandom_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
+int getrandom_main(int argc, char **argv)
+{
+	int nbytes, len;
+	char buf[256]; /* getrandom(2) calls up to 256 bytes always succeed */
+
+	if (argc != 2)
+		bb_show_usage();
+
+	if (isatty(STDOUT_FILENO))
+		bb_error_msg_and_die("Not outputting to a tty");
+
+	nbytes = atoi(argv[1]);
+	if (nbytes <= 0)
+		bb_error_msg_and_die("N <= 0");
+
+	for (len = sizeof(buf); nbytes > 0; nbytes -= sizeof(buf)) {
+		if (nbytes < sizeof(buf)) {
+			len = nbytes;
+		}
+		if (syscall(SYS_getrandom, buf, len, 0) != len) {
+			bb_perror_msg_and_die("getrandom");
+		}
+		if (write(STDOUT_FILENO, buf, len) != len) {
+			bb_perror_msg_and_die("write");
+		}
+	}
+
+	return EXIT_SUCCESS;
+}
--

-- 
2.5.5
Kang-Che Sung | 28 Jun 14:15 2016
Picon

[PATCH 2/2] doc: Update bb_common_bufsiz1 usage

The commit e6a2f4cc5a47d3022bdf5ca2cacbaa5a8c5baf7a ("libbb: make
bb_common_bufsiz1 1 kbyte, add capability to use bss tail for it")
changes the usage syntax for bb_common_bufsiz1.
Update doc/keep_data_small.txt to reflect the new usage. The change is
probably not perfect, though.

Signed-off-by: Kang-Che Sung <explorer09 <at> gmail.com>
---
 docs/keep_data_small.txt | 17 ++++++++++++++---
 1 file changed, 14 insertions(+), 3 deletions(-)

diff --git a/docs/keep_data_small.txt b/docs/keep_data_small.txt
index 218d4f2..32f57c3 100644
--- a/docs/keep_data_small.txt
+++ b/docs/keep_data_small.txt
 <at>  <at>  -124,11 +124,22  <at>  <at>  its needs. Library functions are prohibited from using it.

 'G.' trick can be done using bb_common_bufsiz1 instead of malloced buffer:

-#define G (*(struct globals*)&bb_common_bufsiz1)
+#include "common_bufsiz.h"
+#define G (*(struct globals*)bb_common_bufsiz1)
+
+This bb_common_bufsiz1 needs to be initialized before use, by calling
+setup_common_bufsiz(). It is recommended that you define the INIT_G()
+macro:
+
+#define INIT_G() do { setup_common_bufsiz(); } while (0)
+
+And call INIT_G() before you use it (e.g. in <applet>_main() function).

 Be careful, though, and use it only if globals fit into bb_common_bufsiz1.
-Since bb_common_bufsiz1 is BUFSIZ + 1 bytes long and BUFSIZ can change
-from one libc to another, you have to add compile-time check for it:
+bb_common_bufsiz1 is COMMON_BUFSIZE bytes long. (Currently
+COMMON_BUFSIZE=1024 but it may change in future releases. Read
+scripts/generate_BUFSIZ.sh code for definition.) You may need to add
+compile-time check for it:

 if (sizeof(struct globals) > sizeof(bb_common_bufsiz1))
  BUG_<applet>_globals_too_big();
--

-- 
2.9.0
Kang-Che Sung | 28 Jun 14:13 2016
Picon

[PATCH 1/2] doc: Update filenames in keep_data_small.txt

The filenames in docs/keep_data_small.txt are a little bit outdated.
It's better to change it to the current name.

decompress_unzip.c -> decompress_gunzip.c
(since commit 774bce8e8ba1e424c953e8f13aee8f0778c8a911)
libbb/messages.c -> libbb/ptr_to_globals.c
(since commit 574f2f43948bb21d6e4187936ba5a5afccba25f6)

Signed-off-by: Kang-Che Sung <explorer09 <at> gmail.com>
---
 docs/keep_data_small.txt | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/docs/keep_data_small.txt b/docs/keep_data_small.txt
index 3ced1a6..218d4f2 100644
--- a/docs/keep_data_small.txt
+++ b/docs/keep_data_small.txt
 <at>  <at>  -59,7 +59,7  <at>  <at>  wait
  Example 1

 One example how to reduce global data usage is in
-archival/libarchive/decompress_unzip.c:
+archival/libarchive/decompress_gunzip.c:

 /* This is somewhat complex-looking arrangement, but it allows
  * to place decompressor state either in bss or in
 <at>  <at>  -87,7 +87,7  <at>  <at>  take a look at archival/gzip.c. Here all global data
is replaced by
 single global pointer (ptr_to_globals) to allocated storage.

 In order to not duplicate ptr_to_globals in every applet, you can
-reuse single common one. It is defined in libbb/messages.c
+reuse single common one. It is defined in libbb/ptr_to_globals.c
 as struct globals *const ptr_to_globals, but the struct globals is
 NOT defined in libbb.h. You first define your own struct:

--

-- 
2.9.0

Gmane