[PATCH 2/2] bloat-o-meter: add -p argument with arch prefix

2024-03-19 Thread Jones Syue
This patch add '-p' argument with the arch prefix, in order to call target-specific readelf for bloat-o-meter report. It is useful when cross compiling busybox with specific toolchain, in case host's native readelf does not work. '-p' help msg is leveraging linux kernel's bloat-o-meter. For

[PATCH 1/2] bloat-o-meter: switch arguments parsing to argparse

2024-03-19 Thread Jones Syue
This patch switches arguments parsing to argparse module, which makes it easy to extend further arguments into this script. Note that one thing is changed: how additional parameters is pass-through to readelf, now it needs an assignment char '=' followed by a pair of single/double quotes to wrap

Re: [PATCH v2] bloat-o-meter: line wrapped at 75 columns instead of 80

2024-03-18 Thread Jones Syue
is missing in our variant is support for -p "ARCH-PREFIX-" for > readelf. Should probably switch to argparse too. argparse and prefix sounds cool! Thanks Bernhard, i will add this to my todo list. -- Regards, Jones Syue | 薛懷宗 QNAP Systems, Inc. _

Re: [PATCH v3] bloat-o-meter: line wrapped at max 75 columns to silence patch checkers

2024-03-14 Thread Jones Syue
4 +4 75 --- 75 (add/remove: 3/0 grow/shrink: 2/0 up/down: 328/0) Total bytes: 328 [1] ~/git/busybox/scripts/bloat-o-meter ~/busybox_unstripped_{orig,fix} \ | awk '{ print length, $0 }' -- Regards, Jones Syu

[PATCH v3] bloat-o-meter: line wrapped at max 75 columns to silence patch checkers

2024-03-14 Thread Jones Syue
Change the outout of bloat-o-meter, line wrapped at maximum 75 columns; including 'function/old/new/delta' title and numbers, seperation line with '-', and the last line 'Total'. Also put 'Total' numbers to the last column in order to keep it aligned with previous 'delta' numbers. Consider this

Re: [PATCH v2] bloat-o-meter: line wrapped at 75 columns instead of 80

2024-03-13 Thread Jones Syue
4 +4 75 --- 75 (add/remove: 3/0 grow/shrink: 2/0 up/down: 328/0) Total: 328 bytes 72 (add/remove: 3/0 grow/shrink: 2/0 up/down: 328/0) Total bytes: 328 -- Regards, Jones Syue | 薛懷宗 QNAP Systems, Inc. ___ busybox ma

Re: [PATCH v2] bloat-o-meter: line wrapped at 75 columns instead of 80

2024-03-13 Thread Jones Syue
way, loop is not required in my previous length counting script :) simply pipe to awk is fine: ~/busybox/scripts/bloat-o-meter ~/busybox_unstripped_{orig,fix} \ | awk '{ print length, $0 }' -- Regards, Jones Syue | 薛懷宗 QNAP Systems, Inc. ___ bus

Re: [PATCH v2] bloat-o-meter: line wrapped at 75 columns instead of 80

2024-03-12 Thread Jones Syue
- 4 +4 75 --- 75 (add/remove: 3/0 grow/shrink: 2/0 up/down: 328/0) Total: 328 bytes [1] while read -r line; \ do \ awk '{ print length, $line }'; \ done < <(~/busybox/scripts/bloat-o-meter ~/busybo

Re: [PATCH v2] bloat-o-meter: line wrapped at 75 columns instead of 80

2024-03-12 Thread Jones Syue
section through 'readelf' so it could find the size diff. -- Regards, Jones Syue | 薛懷宗 QNAP Systems, Inc. ___ busybox mailing list busybox@busybox.net http://lists.busybox.net/mailman/listinfo/busybox

Re: [PATCH v2] bloat-o-meter: line wrapped at 75 columns instead of 80

2024-03-12 Thread Jones Syue
+4 Total: Before=13500, After=13508, chg +0.06% add/remove: 0/0 grow/shrink: 0/0 up/down: 0/0 (0) RO Data old new delta Total: Before=35929, After=35929, chg +0.00% -- Regards, Jones Syue | 薛懷宗 QNAP Systems, Inc. _

[PATCH v2] bloat-o-meter: line wrapped at 75 columns instead of 80

2024-03-11 Thread Jones Syue
This patch replaces the 78 "-" prints with 75 "-". And replace the 80 columns summary line with 77 columns. ("%s" is considered as two chars and should be filled with whitespace " ", so 77 = 75 + 2) Consider this scenario: a patch contains the output of "bloat-o-meter" to clarify about the size

Re: [PATCH] bloat-o-meter: line wrapped at 75 columns instead of 80

2024-03-11 Thread Jones Syue
quot;bloat-o-meter" to ^^^ total: 0 errors, 1 warnings, 12 lines checked -- Regards, Jones Syue | 薛懷宗 QNAP Systems, Inc. ___ busybox mailing list busybox@busybox.net http://lists.busybox.net/mailman/listinfo/busybox

[PATCH] bloat-o-meter: line wrapped at 75 columns instead of 80

2024-03-11 Thread Jones Syue
This patch replaces the 78 "-" prints with 75 "-". And replace the 80 columns summary line with 77 columns. ("%s" is considered as two chars and should be filled with whitespace " ", so 77 = 75 + 2) Consider this senario: a patch contains the output of "bloat-o-meter" to clarify about the size

Re: [V2 PATCH] crond: log5 fix typo, replace log level '4' with '5'

2024-01-31 Thread Jones Syue
Found previous patch accidentally adds 'x' permission to file 'crond.c', attached v2 patch would not change permissions of file 'crond.c', thank you :) -- Regards, Jones Syue | 薛懷宗 QNAP Systems, Inc. From c47cc51d53d1781d615eb27bb57e242ef9842474 Mon Sep 17 00:00:00 2001 From: Jones Syue Date

[PATCH] crond: log5 fix typo, replace log level '4' with '5'

2024-01-28 Thread Jones Syue
Hello list, Attached is a patch to fix a typo in crond.c log5(), please take a look and review, thank you :) -- Regards, Jones Syue | 薛懷宗 QNAP Systems, Inc.From 86c8516a255657497a9caa5673c08191c90c0397 Mon Sep 17 00:00:00 2001 From: Jones Syue Date: Mon, 29 Jan 2024 10:58:41 +0800 Subject

Re: BusyBox crond format help

2024-01-25 Thread Jones Syue
Found a link has alternative examples might help, prepend a sleep with random intervals before starting a job: https://stackoverflow.com/questions/9049460/cron-jobs-and-random-times-within-given-hours -- Regards, Jones Syue | 薛懷宗 QNAP Systems, Inc

Re: BusyBox crond format help

2024-01-25 Thread Jones Syue
x/man-pages/man5/crontab.5.html cronie: https://linux.die.net/man/5/crontab GNU mcron: https://www.gnu.org/software/mcron/manual/mcron.html -- Regards, Jones Syue | 薛懷宗 QNAP Systems, Inc. ___ busybox mailing list busybox@busybox.net http://lists.busybox.net/

Re: [PATCH] crond: add LOG_NDELAY to openlog

2024-01-05 Thread Jones Syue
egards, Jones Syue | 薛懷宗 QNAP Systems, Inc. From 42f5f7d85bd968c1bd92a11237fc8f4cb78129a4 Mon Sep 17 00:00:00 2001 From: Jones Syue Date: Fri, 5 Jan 2024 18:03:58 +0800 Subject: [PATCH] crond: add LOG_NDELAY to openlog crond_main()'s openlog() does not has the option LOG_NDELAY, so the DGRAM socket fd t

Re: [PATCH] crond: add LOG_NDELAY to openlog

2024-01-04 Thread Jones Syue
= 0 sendto(4, "<75>Dec 13 14:10:02 crond[25661]: can't change directory to '/share/homes/admin'\n", 81, MSG_NOSIGNAL, NULL, 0) = 81 -- Regards, Jones Syue | 薛懷宗 QNAP Systems, Inc. ___ busybox mailing list busybox@busybox.net http://lists.busybox.net/mailman/listinfo/busybox

Re: [PATCH] crond: add LOG_NDELAY to openlog

2023-12-11 Thread Jones Syue
ng list found an old thread: inetd fd leak? http://lists.busybox.net/pipermail/busybox/2009-September/070195.html https://git.busybox.net/busybox/commit/?id=cfc216345e18081cba9ac3ed0464abf5d7f40cea It looks like inetd has a similar case in old days, and the solution is add LO

Re: [PATCH] crond: add LOG_NDELAY to openlog

2023-12-10 Thread Jones Syue
2) [0xe36b2] > /lib/libc-2.21.so(__vsyslog_chk+0x4aa) [0xe3cfa] > /lib/libc-2.21.so(syslog+0x8f) [0xe3e2f] > /bin/busybox(bb_verror_msg+0x27c) [0x8711] sendto(4, "<75>Dec 11 10:01:00 crond[21156]: user admin: parse error at <\n", 63, MSG_NOSIGNAL, NULL, 0) = 63 > /lib/

[PATCH] crond: add LOG_NDELAY to openlog

2023-12-08 Thread Jones Syue
x69740] > /bin/busybox(get_line_with_continuation+0x2e) [0xa55f9] close(5)= 0 > /lib/libc-2.21.so(__close_nocancel+0x7) [0xdbb90] > /lib/libc-2.21.so(_IO_file_close_it+0x120) [0x73440] > /lib/libc-2.21.so(fclose+0x1a2) [0x680f2] > /bin/busybox(