• R/O
  • HTTP
  • SSH
  • HTTPS

List of commits

Tags
No Tags

Frequently used words (click to add to your profile)

javaandroidc++linuxc#objective-c誰得cocoaqtpythonrubywindowsphpgameguibathyscaphec翻訳omegat計画中(planning stage)frameworktwitterdombtronvb.nettestarduinodirectxpreviewerゲームエンジン

external/busybox


RSS
Rev. Time Author
b1908e4 q-x86 2020-04-14 08:42:51 Denys Vlasenko

top: do unsigned rather than signed division in do_stats()

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>

ad1fb24 2020-04-14 08:42:51 Denys Vlasenko

top: handle much larger VSZ values

function old new delta
display_process_list 1018 999 -19

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>

537fcc7 2020-04-14 08:42:51 Denys Vlasenko

top: switch to malloced "globals".

This seems to be more efficient:

function old new delta
clearmems - 28 +28
display_process_list 1001 1018 +17
read_cpu_jiffy 171 177 +6
do_stats 194 198 +4
reset_term 20 23 +3
topmem_sort 63 65 +2
mult_lvl_cmp 44 45 +1
get_jiffy_counts 247 248 +1
display_topmem_process_list 549 546 -3
top_main 912 879 -33
handle_input 630 549 -81
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 7/3 up/down: 62/-117) Total: -55 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>

6e3fb0a 2020-04-14 08:42:51 Denys Vlasenko

top: move free(prev_hist) out of signal path

It was seen being called recursively on repeated signals,
leading to double free

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>

0aeca07 2020-04-14 08:42:45 Mauro Rossi

top: add the required setup_common_bufsiz() call

Based on 47cfbf32 ("*: add most of the required setup_common_bufsiz() calls")
with changes applied only to top.c

32f5c2d 2020-04-14 08:42:38 Mauro Rossi

top: more BUILD_BUG_ON conversions

Based on commit 7b85ec30 ("*: more BUILD_BUG_ON conversions")
with changes applied only to top.c

163828b 2020-04-14 08:42:13 Mauro Rossi

libbb,procps: introduce kernel-style BUILD_BUG_ON()

Based on ab3964db ("libbb: introduce kernel-style BUILD_BUG_ON()")
with changes applied only to libbb/procps.c and include/libbb.h

e332553 2020-04-14 08:07:10 Denys Vlasenko

top: fix memset length (sizeof(ptr) vs sizeof(array) problem)

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>

cdeb153 2020-04-14 08:07:10 Timo Teräs

top: fix and merge code to parse /proc/meminfo

display_header() code to parse meminfo as is was buggy:
- uninitialized variables were used if meminfo was not as expected
- meminfo parsing failed on new kernels (3.14+) as new field 'MemAvailable'
was introduced between MemFree and Buffers
- shared memory was handled only for ancient kernels (2.4.x and earlier)

as result Buffers and shared memory fields were shown with bogus values
on current kernels.

The new code does not try to parse the old style summary header, as the
separated fields are always present (it saves code size). Additionally,
both Shmem (2.6+) and MemShared (2.4 and earlier) fields are now parsed
and summed for shared memory usage; as only one of them exists depending
on kernel version.

display_topmem_header() parses also meminfo so this makes it use the
same code for code shrink.

function old new delta
display_header - 681 +681
display_topmem_process_list 465 684 +219
parse_meminfo - 189 +189
static.fields - 106 +106
static.match 132 - -132
.rodata 120254 120117 -137
display_topmem_header 513 - -513
display_process_list 1705 667 -1038
------------------------------------------------------------------------------
(add/remove: 3/2 grow/shrink: 1/2 up/down: 1195/-1820) Total: -625 bytes

Signed-off-by: Timo Teräs <timo.teras@iki.fi>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>

047f360 2020-04-14 08:07:10 Bartosz Golaszewski

top.c: fix compilation warnings

pfd[1] is unused

Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>

2617e88 2020-03-20 22:06:05 Mauro Rossi

Android: fix building errors of q-x86

Additional CFLAGS to avoid following building errors:

external/busybox/android/regex/bb_regex.c:2931:12: error: unused variable 'num_regs' [-Werror,-Wunused-variable]
unsigned num_regs = 0;
^
external/busybox/android/regex/bb_regex.c:5476:20: error: unused parameter 'preg' [-Werror,-Wunused-parameter]
const regex_t *preg;
^
2 errors generated.
__________________

external/busybox/archival/bbunzip.c:311:30: error: adding 'int' to a string does not append to the string [-Werror,-Wstring-plus-int]
if (strcmp(extension, "tgz" + 1) == 0
~~~~~~^~~
external/busybox/archival/bbunzip.c:311:30: note: use array indexing to silence this warning
if (strcmp(extension, "tgz" + 1) == 0
^
& [ ]
1 error generated.
__________________

In file included from external/busybox/archival/bzip2.c:35:
In file included from external/busybox/include/libbb.h:93:
external/busybox/android/selinux/android_selinux.h:136:20: error: unused function 'selinux_file_contexts_path' [-Werror,-Wunused-function]
static const char *selinux_file_contexts_path()
^
1 error generated.
___________________

external/busybox/networking/netstat.c:660:2: error: implicit conversion from 'int' to 'smallint' (aka 'signed char') changes value from 241 to -15 [-Werror,-Wconstant-conversion]
INIT_G();
^~~~~~~~
external/busybox/networking/netstat.c:172:28: note: expanded from macro 'INIT_G'
flags = NETSTAT_CONNECTED | NETSTAT_ALLPROTO; \
~ ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
1 error generated.
__________________

external/busybox/coreutils/catv.c:32:15: error: unused typedef 'BUG_const_mismatch' [-Werror,-Wunused-local-typedef]
typedef char BUG_const_mismatch[
^
1 error generated.
__________________

external/busybox/networking/netstat.c:660:2: error: implicit conversion from 'int' to 'smallint' (aka 'signed char') changes value from 241 to -15 [-Werror,-Wconstant-conversion]
INIT_G();
^~~~~~~~
external/busybox/networking/netstat.c:172:28: note: expanded from macro 'INIT_G'
flags = NETSTAT_CONNECTED | NETSTAT_ALLPROTO; \
~ ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
1 error generated.
__________________

external/busybox/shell/ash.c:8438:7: error: logical not is only applied to the left hand side of this comparison [-Werror,-Wlogical-not-parentheses]
if (!exitstatus == is_or)
^ ~~
external/busybox/shell/ash.c:8438:7: note: add parentheses after the '!' to evaluate the comparison first
if (!exitstatus == is_or)
^
( )
external/busybox/shell/ash.c:8438:7: note: add parentheses around left hand side expression to silence this warning
if (!exitstatus == is_or)
^
( )
external/busybox/shell/ash.c:13024:9: error: expression which evaluates to zero treated as a null pointer constant of type 'const char *' [-Werror,-Wnon-literal-null-conversion]
p = '\0';
^~~~
2 errors generated.
___________________

In file included from external/busybox/archival/bzip2.c:35:
external/busybox/include/libbb.h:682:81: error: stdcall calling convention ignored on variadic function [-Werror,-Wignored-attributes]
char *xasprintf(const char *format, ...) __attribute__ ((format(printf, 1, 2))) FAST_FUNC RETURNS_MALLOC;
^
external/busybox/include/platform.h:111:46: note: expanded from macro 'FAST_FUNC'
^
...
In file included from external/busybox/archival/bzip2.c:35:
external/busybox/include/libbb.h:1380:128: error: stdcall calling convention ignored on variadic function [-Werror,-Wignored-attributes]
int ioctl_or_perror_and_die(int fd, unsigned request, void *argp, const char *fmt,...) __attribute__ ((format (printf, 4, 5))) FAST_FUNC;
^
external/busybox/include/platform.h:111:46: note: expanded from macro 'FAST_FUNC'
^
11 errors generated.

61c5706 2020-03-20 22:05:41 Mauro Rossi

Adapt Android.mk and Makefile to Q constraints

With Android Q, Google has restricted the usage of tools in $PATH,
GCC 4.9 is deprecated and fails at compiling the host scripts,
and 'LOCAL_CLANG := false' and 'LOCAL_MODULE_TAGS := eng debug'
are not allowed anymore

The following changes were applied:
- MAKE_PATH is used to replace 'make' tool in the $PATH
- MAKE_PATH also appends binutils 'as' and 'ld' location to $PATH
- busybox specific compilers BB_CC and BB_HOSTCC are defined
- BB_PREPARE_FLAGS are used to pass CC, HOSTCC and PKG_CONFIG to Makefile
- Remove 'LOCAL_CLANG := false' and use 'LOCAL_MODULE_TAGS := optional'
- HOSTCC used in Makefile needs to be 'clang'

Based on info provided in the following website:
https://sx.ix5.org/info/post/android-q-compiling-kernels-in-tree

683fa73 pie-x86 android-x86-9.0-r1 android-x86-9.0-r2 2019-02-27 20:03:07 Chih-Wei Huang

Android: fix building errors of pie-x86

2eaee0e oreo-x86 android-x86-8.1-r2 android-x86-8.1-r3 android-x86-8.1-r4 android-x86-8.1-r5 android-x86-8.1-r6 2019-02-27 20:02:52 Chih-Wei Huang

Android: don't define functions already in BIONIC_O

38f3ea8 android-x86-8.1-r1 2018-05-04 19:25:08 Chih-Wei Huang

Android: fix building issues of oreo-x86

To build with gcc, we have to add external/busybox to the variable
INTERNAL_LOCAL_CLANG_EXCEPTION_PROJECTS.

Add -fno-stack-protector to avoid missing __stack_chk_fail_local
issue.

9ee7d34 nougat-x86 android-x86-7.1-r2 android-x86-7.1-r3 android-x86-7.1-r4 android-x86-7.1-r5 2018-05-01 13:44:14 Chih-Wei Huang

Android: add fbset

This is a tool to show and modify frame buffer device settings.

94993db 2018-05-01 09:56:08 Chih-Wei Huang

Android: don't use clang to build busybox

The clang is buggy to build busybox. Use gcc instead.
This avoids top crashing.

c931bcd android-x86-7.1-r1 2018-01-10 17:48:02 Chih-Wei Huang

Remove lspci

f0fc0a2 2017-12-25 17:01:47 Chih-Wei Huang

Android: fix improper usage of $(local-intermediates-dir)

The macro $(local-intermediates-dir) should not be used in the recipes
since it depends on LOCAL_MODULE and LOCAL_MODULE_CLASS which are not
well-defined in the recipes. Use $(intermediates-dir-for) instead.

Besides, we should not remove the whole intermediates dir. Otherwise
the import_includes in that dir may be removed. It causes other errors.

2dbc3be multiwindow-oreo 2017-09-19 13:25:59 Chih-Wei Huang

Android: quiet some warnings

To avoid tons of such warnings:

In file included from external/busybox/shell/ash.c:45:
In file included from external/busybox/include/busybox.h:8:
external/busybox/include/libbb.h:1379:120: warning: stdcall calling convention ignored on variadic function [-Wignored-attributes]
int ioctl_or_perror(int fd, unsigned request, void *argp, const char *fmt,...) __attribute__ ((format (printf, 4, 5))) FAST_FUNC;
^

945092b 2017-09-08 20:30:00 Chih-Wei Huang

Fix building issues on Android 8.0

0e44191 2017-09-08 20:18:30 Chih-Wei Huang

Android: refine bionic branch switches

1a5125f 2017-09-08 20:18:15 Chih-Wei Huang

Android: change the generated path

Move all generated files to $(local-generated-sources-dir).

af8dfdb 2017-09-08 20:17:48 Chih-Wei Huang

Android: minor cleanup

Remove unnecessary lines.

27c08d0 2016-08-17 23:21:38 Chih-Wei Huang

Fix building issues on Android 7.0

501aa62 marshmallow-x86 android-x86-6.0-r1 android-x86-6.0-r2 android-x86-6.0-r3 2015-10-16 01:57:28 Chih-Wei Huang

Android: add the headers for string functions prototypes

Fix the building errors on Android 6.0 64-bit targets.

Signed-off-by: Chih-Wei Huang <cwhuang@linux.org.tw>

603a0d1 2015-10-11 01:26:34 Chih-Wei Huang

lsusb: add -v option to show bDeviceClass and DEVNAME

68541ab 2015-10-11 01:26:32 Chih-Wei Huang

xlseek: large file support

This fixes the issue that mke2fs can't format large disks.

200e565 2015-10-08 21:12:54 Iftekhar Rifat

Fix busybox building

Change-Id: Icba1e069deb0f86ecc2cef3d6e008dc22660c788

8be0c96 lollipop-x86 2015-10-02 14:18:33 Chih-Wei Huang

Merge remote-tracking branch 'cm/cm-12.1' into lollipop-x86