<feed xmlns='http://www.w3.org/2005/Atom'>
<title>busybox-w32/coreutils/stat.c, branch join2</title>
<subtitle>A mirror of https://github.com/rmyorston/busybox-w32.git
</subtitle>
<id>https://git.lua4.win/busybox-w32/atom?h=join2</id>
<link rel='self' href='https://git.lua4.win/busybox-w32/atom?h=join2'/>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/'/>
<updated>2026-06-22T10:36:43+00:00</updated>
<entry>
<title>Fix the flags for stat (again) (#601)</title>
<updated>2026-06-22T10:36:43+00:00</updated>
<author>
<name>mbartlett21</name>
<email>29034492+mbartlett21@users.noreply.github.com</email>
</author>
<published>2026-06-22T10:36:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=b37062304275debaadf71c9f3e5f4e9076f5eda6'/>
<id>urn:sha1:b37062304275debaadf71c9f3e5f4e9076f5eda6</id>
<content type='text'>
* Revert "find: reset stat(2) flags before terminating"

This reverts commit 228ee18fbe8cf408440e7bbe91db4ef201312983.

* test: fix flags for stat with NOFORK

test is a NOFORK applet, so the flags under mingw_stat may not have been
reset before calling it. We have it so it also restores the flags after,
since it could be called in the middle of another applet.

This also needed a way to retrieve the flags, so they are just done
through the return value.

* Add comments about not having to restore flags

Just for future reference

* lineedit: use new flag restoring

* win32: simplify mingw_access calling

Since we now have a way to get the previous flags, mingw_access can be
changed to ignore any stat flags

* stat: comments from PR

Adds 32 bytes.</content>
</entry>
<entry>
<title>win32: allow stat(2) to skip costly check for execute</title>
<updated>2026-05-18T06:55:54+00:00</updated>
<author>
<name>Ron Yorston</name>
<email>rmy@pobox.com</email>
</author>
<published>2026-05-18T06:55:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=1fb1a65064748a54fba4bf4b5e8700f8e61f003f'/>
<id>urn:sha1:1fb1a65064748a54fba4bf4b5e8700f8e61f003f</id>
<content type='text'>
If 'ls' is invoked without the '-l' option (or something that's
equivalent) and colour output isn't required, there's no need to
perform the expensive check for execute permission.

Allow 'ls' to inform stat(2) not to call has_exec_format().  This
has been combined with the existing mechanism to enable counting
subdirectories.

With this change the command 'ls | wc -l' used in issue #589
doesn't perform the test which upset Windows' anti-malware thing.

Adds 32-48 bytes.

(GitHub issue #589)
</content>
</entry>
<entry>
<title>win32: only count subdirectories if necessary</title>
<updated>2023-01-23T10:40:57+00:00</updated>
<author>
<name>Ron Yorston</name>
<email>rmy@pobox.com</email>
</author>
<published>2023-01-23T10:40:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=1a88782fd33db4ad3531b63c9fb744c64282fee2'/>
<id>urn:sha1:1a88782fd33db4ad3531b63c9fb744c64282fee2</id>
<content type='text'>
Commit 7fb95a2a5 (win32: try to get link count for directories)
allowed stat(2) to report accurate values of st_nlink for
directories.

There are only a couple of places in busybox-w32 where these values
are required.  Disable counting of subdirectories by default and
only enable it when necessary.

Microsoft kindly provide directories to test edge cases like this:

   C:/Windows/WinSxS           (contains many subdirectories)
   C:/Windows/WinSxS/Manifests (contains many files)

Adds 84-112 bytes.
</content>
</entry>
<entry>
<title>Merge branch 'busybox' into merge</title>
<updated>2021-09-21T14:19:18+00:00</updated>
<author>
<name>Ron Yorston</name>
<email>rmy@pobox.com</email>
</author>
<published>2021-09-21T14:19:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=90b3ba992ecb39e32e5a66b2e37579becc56d286'/>
<id>urn:sha1:90b3ba992ecb39e32e5a66b2e37579becc56d286</id>
<content type='text'>
</content>
</entry>
<entry>
<title>libbb: eliminate a static data array in bb_mode_string()</title>
<updated>2021-09-16T23:18:31+00:00</updated>
<author>
<name>Denys Vlasenko</name>
<email>vda.linux@googlemail.com</email>
</author>
<published>2021-09-16T23:13:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=59ac467dc6429a48522ef7fbe40fcd819563e49a'/>
<id>urn:sha1:59ac467dc6429a48522ef7fbe40fcd819563e49a</id>
<content type='text'>
function                                             old     new   delta
print_stat                                           861     869      +8
header_verbose_list_ar                                73      77      +4
display_single                                       975     979      +4
header_verbose_list                                  237     239      +2
bb_mode_string                                       124     115      -9
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 4/1 up/down: 18/-9)               Total: 9 bytes
   text	   data	    bss	    dec	    hex	filename
1043136	    559	   5052	1048747	 1000ab	busybox_old
1043153	    559	   5020	1048732	 10009c	busybox_unstripped

Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
<entry>
<title>win32: make readlink(2) implementation unconditional</title>
<updated>2021-02-12T14:02:28+00:00</updated>
<author>
<name>Ron Yorston</name>
<email>rmy@pobox.com</email>
</author>
<published>2021-02-12T14:02:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=e86a3ddd8b60eb0720874f5b9679446d12a1ac41'/>
<id>urn:sha1:e86a3ddd8b60eb0720874f5b9679446d12a1ac41</id>
<content type='text'>
There doesn't seem to be much advantage in having readlink(2) as a
configuration option.  Making it unconditional reduces divergence from
upstream and allows the removal of a check for ENOSYS that's been in
busybox-w32 since the start.
</content>
</entry>
<entry>
<title>Merge branch 'busybox' into merge</title>
<updated>2021-02-05T11:24:06+00:00</updated>
<author>
<name>Ron Yorston</name>
<email>rmy@pobox.com</email>
</author>
<published>2021-02-05T11:24:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=32e19e7ae8b0d76d69871ba234e8f0af31baff4e'/>
<id>urn:sha1:32e19e7ae8b0d76d69871ba234e8f0af31baff4e</id>
<content type='text'>
</content>
</entry>
<entry>
<title>libbb: introduce and use fputs_stdout</title>
<updated>2021-02-03T19:52:40+00:00</updated>
<author>
<name>Ron Yorston</name>
<email>rmy@pobox.com</email>
</author>
<published>2021-02-03T19:47:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=cad3fc743aa7c7744e4fcf044371f0fda50fa51f'/>
<id>urn:sha1:cad3fc743aa7c7744e4fcf044371f0fda50fa51f</id>
<content type='text'>
function                                             old     new   delta
fputs_stdout                                           -      12     +12
zxc_vm_process                                      7237    7230      -7
yes_main                                              85      78      -7
write_block                                          380     373      -7
wrapf                                                305     298      -7
strings_main                                         437     430      -7
show_bridge                                          353     346      -7
rev_main                                             384     377      -7
put_prompt_custom                                     58      51      -7
put_cur_glyph_and_inc_cursor                         168     161      -7
print_numbered_lines                                 152     145      -7
print_named_ascii                                    130     123      -7
print_name                                           135     128      -7
print_login_issue                                    386     379      -7
print_ascii                                          208     201      -7
powertop_main                                       1249    1242      -7
od_main                                             1789    1782      -7
logread_main                                         518     511      -7
head_main                                            804     797      -7
display_process_list                                1319    1312      -7
cut_main                                            1002     995      -7
bb_dump_dump                                        1550    1543      -7
bb_ask_noecho                                        393     386      -7
baseNUM_main                                         702     695      -7
expand_main                                          755     745     -10
dumpleases_main                                      497     487     -10
write1                                                12       -     -12
putcsi                                                37      23     -14
print_login_prompt                                    55      41     -14
paste_main                                           525     511     -14
cat_main                                             440     426     -14
print_it                                             245     230     -15
print_addrinfo                                      1188    1171     -17
print_rule                                           770     750     -20
print_linkinfo                                       842     822     -20
httpd_main                                           791     771     -20
------------------------------------------------------------------------------
(add/remove: 1/1 grow/shrink: 0/34 up/down: 12/-341)         Total: -329 bytes

Signed-off-by: Ron Yorston &lt;rmy@pobox.com&gt;
Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
<entry>
<title>stat: improve conditional compilation</title>
<updated>2021-01-26T14:50:34+00:00</updated>
<author>
<name>Ron Yorston</name>
<email>rmy@pobox.com</email>
</author>
<published>2021-01-26T14:12:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=7e1c2cb3b2c917f799d406e186fa84dcac19e992'/>
<id>urn:sha1:7e1c2cb3b2c917f799d406e186fa84dcac19e992</id>
<content type='text'>
If FEATURE_READLINK2 isn't enabled:

- in print_stat() combine the code for 'n' and 'N' format;

- in do_stat() let the compiler figure out that it doesn't need to
  emit code to print the symbolic link.
</content>
</entry>
<entry>
<title>Merge branch 'busybox' into merge</title>
<updated>2021-01-14T13:28:49+00:00</updated>
<author>
<name>Ron Yorston</name>
<email>rmy@pobox.com</email>
</author>
<published>2021-01-14T13:28:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=89963b524d211e1aec12b72b3725be05ee95c8cf'/>
<id>urn:sha1:89963b524d211e1aec12b72b3725be05ee95c8cf</id>
<content type='text'>
</content>
</entry>
</feed>
