<feed xmlns='http://www.w3.org/2005/Atom'>
<title>forks/toybox/lib, branch 0.5.0</title>
<subtitle>Toybox with POSIX patches from E5ten
</subtitle>
<id>https://git.carbslinux.org/forks/toybox/atom?h=0.5.0</id>
<link rel='self' href='https://git.carbslinux.org/forks/toybox/atom?h=0.5.0'/>
<link rel='alternate' type='text/html' href='https://git.carbslinux.org/forks/toybox/'/>
<updated>2014-10-02T12:24:38+00:00</updated>
<entry>
<title>Workaround for musl's faccessat bug (the rm -r "error: is a directory" thing).</title>
<updated>2014-10-02T12:24:38+00:00</updated>
<author>
<name>Rob Landley</name>
<email>rob@landley.net</email>
</author>
<published>2014-10-02T12:24:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.carbslinux.org/forks/toybox/commit/?id=2ccab0260f6812f78cc0bafdf2bb2a92942ee6f3'/>
<id>urn:sha1:2ccab0260f6812f78cc0bafdf2bb2a92942ee6f3</id>
<content type='text'>
The Linux man page says I can use AT_SYMLINK_NOFOLLOW. It works in glibc,
uclibc, and klibc, but musl returns -EINVAL any time you pass in that flag
and the maintainer says that's not a bug and insists the man page and those
other libraries all change to match musl's behavior.

Toybox uses it to avoid scheduling unnecessary metadata writes for things we're
about to delete (have to chmod unreadable directories so we can descend into
them to delete their contents, the chmod happens before we descend so the
disk I/O has plenty of time to be scheduled) because the extra writes wear out
SSD faster. It's just an optimization and I don't really care if it works
_well_ (the fchmodat call _also_ takes AT_SYMLINK_NOFOLLOW so that's covered),
but musl's behavior uniquely makes the check always error and thus breaks normal
"rm -r".

Yes this workaround is checking #ifdef __MUSL__ which the library does not
supply (because its code is perfect and will thus never need to be worked
around). You can CFLAGS=-D__MUSL__ if you don't echo "#define __MUSL__" &gt;&gt;
include/features.h when installing the library.
</content>
</entry>
<entry>
<title>Brown paper bag time: comma_scan() didn't work for anything but the last entry.</title>
<updated>2014-09-28T18:11:20+00:00</updated>
<author>
<name>Rob Landley</name>
<email>rob@landley.net</email>
</author>
<published>2014-09-28T18:11:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.carbslinux.org/forks/toybox/commit/?id=562af2c0f2f4bd8420a26560f1816b6a81ac417e'/>
<id>urn:sha1:562af2c0f2f4bd8420a26560f1816b6a81ac417e</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Don't segfault for --help of single.sh build of OLDTOY commands that use another command's help.</title>
<updated>2014-09-28T00:58:18+00:00</updated>
<author>
<name>Rob Landley</name>
<email>rob@landley.net</email>
</author>
<published>2014-09-28T00:58:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.carbslinux.org/forks/toybox/commit/?id=dc1af185e73410c5cad997c600678c212262a13c'/>
<id>urn:sha1:dc1af185e73410c5cad997c600678c212262a13c</id>
<content type='text'>
</content>
</entry>
<entry>
<title>The only illegal characters in a username are ":" (field separator), "\n" (line separator), and "/" (filename separator).</title>
<updated>2014-09-26T23:49:44+00:00</updated>
<author>
<name>Rob Landley</name>
<email>rob@landley.net</email>
</author>
<published>2014-09-26T23:49:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.carbslinux.org/forks/toybox/commit/?id=e0d8009d76b3a2451cb6c6ed2b241c7eff06ed60'/>
<id>urn:sha1:e0d8009d76b3a2451cb6c6ed2b241c7eff06ed60</id>
<content type='text'>
Restricting usernames to the legacy posix character allowed set (for filenames,
so the $HOME directory is creatable on VFAT and similar) means you can't have
UTF-8 usernames. Linux allows any character but / and NUL in filenames.
Since root is creating these entries, we assume root knows what it's doing.
</content>
</entry>
<entry>
<title>Respond to two static analysis issues in dirtree_path() reported by Ashwini Sharma.</title>
<updated>2014-09-22T12:52:15+00:00</updated>
<author>
<name>Rob Landley</name>
<email>rob@landley.net</email>
</author>
<published>2014-09-22T12:52:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.carbslinux.org/forks/toybox/commit/?id=29d30be31123129deac142c6208faa7a1a98b2d0'/>
<id>urn:sha1:29d30be31123129deac142c6208faa7a1a98b2d0</id>
<content type='text'>
dirtree-&gt;name is an array, not a pointer, so can't be zero. Remove the test.

We dereference plen without checking it for null but calling dirtree_path(0, 0)
is pilot error: only the _first_ call can have plen = 0. Add a comment.
</content>
</entry>
<entry>
<title>Tweak portability.h for uClibc version in buildroot defconfig.</title>
<updated>2014-09-20T23:46:47+00:00</updated>
<author>
<name>Rob Landley</name>
<email>rob@landley.net</email>
</author>
<published>2014-09-20T23:46:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.carbslinux.org/forks/toybox/commit/?id=a1a83e671fdd91dcb763651ac86295c217574e6e'/>
<id>urn:sha1:a1a83e671fdd91dcb763651ac86295c217574e6e</id>
<content type='text'>
I've been locally patching uClibc to not violate posix-2008 (you don't need
to define a GNU macro to get a posix function), but uClibc is obsolete and
moribund (development peaked in 2006, last bugfix release was over 2 years
ago), and the largest remaining user (buildroot) doesn't bother to apply such
a patch. Since even buildroot is slowly migrating to musl-libc, just do the
portability tweak for what the last release of the old thing actually did.
</content>
</entry>
<entry>
<title>Second attempt at one way xpopen().</title>
<updated>2014-09-15T00:54:19+00:00</updated>
<author>
<name>Rob Landley</name>
<email>rob@landley.net</email>
</author>
<published>2014-09-15T00:54:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.carbslinux.org/forks/toybox/commit/?id=8a9907119bf22f2279470be40cf40027dc37018c'/>
<id>urn:sha1:8a9907119bf22f2279470be40cf40027dc37018c</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Split xpopen() into xpopen_both(), xpopen(), and xrun() depending on whether we want to redirect both, one, or neither of stdin/stdout.</title>
<updated>2014-09-14T17:29:44+00:00</updated>
<author>
<name>Rob Landley</name>
<email>rob@landley.net</email>
</author>
<published>2014-09-14T17:29:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.carbslinux.org/forks/toybox/commit/?id=360d57f843f5435a75270e54583430dcb8f62546'/>
<id>urn:sha1:360d57f843f5435a75270e54583430dcb8f62546</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Debugging pass on mount. Not quite done yet, but the basics seem to work now.</title>
<updated>2014-09-07T19:42:51+00:00</updated>
<author>
<name>Rob Landley</name>
<email>rob@landley.net</email>
</author>
<published>2014-09-07T19:42:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.carbslinux.org/forks/toybox/commit/?id=25fe0e0bea85f1d851ce03a90c0f1bf41ab431f2'/>
<id>urn:sha1:25fe0e0bea85f1d851ce03a90c0f1bf41ab431f2</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Work around uClibc brain-damage.</title>
<updated>2014-09-06T18:24:58+00:00</updated>
<author>
<name>Rob Landley</name>
<email>rob@landley.net</email>
</author>
<published>2014-09-06T18:24:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.carbslinux.org/forks/toybox/commit/?id=980458f62748d273a006da3ddcd2b619d44598ce'/>
<id>urn:sha1:980458f62748d273a006da3ddcd2b619d44598ce</id>
<content type='text'>
</content>
</entry>
</feed>
