On 19 June 2021 17:42:35 CEST, Denys Vlasenko <vda.li...@googlemail.com> wrote: >commit: >https://git.busybox.net/busybox/commit/?id=25128176c46b169cdec2c18b5730c36a940f6eb0 >branch: https://git.busybox.net/busybox/commit/?id=refs/heads/master > >function old new >delta >process_pid_str - 854 >+854 >.rodata 103363 103378 >+15 >packed_usage 33654 33658 >+4 >taskset_main 936 190 >-746 >------------------------------------------------------------------------------ >(add/remove: 1/0 grow/shrink: 2/1 up/down: 873/-746) Total: >127 bytes
>+ if (opts & OPT_a) { >+ char dn[sizeof("/proc/%s/task") + 3 * sizeof(int)]; >+ DIR *dir; >+ struct dirent *ent; >+ >+ sprintf(dn, "/proc/%s/task", pid_str); >+ dir = opendir(dn); >+ if (!dir) { >+ goto no_threads; >+ } >+ while ((ent = readdir(dir)) != NULL) { >+ if (isdigit(ent->d_name[0])) >+ process_pid_str(ent->d_name, opts, aff); >+ } >+ IF_FEATURE_CLEAN_UP(closedir(dir);) Is this opencoded hunk smaller than a variant with recursive_action? thanks, >+ } else { >+ no_threads: >+ process_pid_str(pid_str, opts, aff); >+ } >+ return EXIT_SUCCESS; > } _______________________________________________ busybox mailing list busybox@busybox.net http://lists.busybox.net/mailman/listinfo/busybox