readlink/realpath -m in busybox

Eli Schwartz eschwartz at archlinux.org
Sun Mar 22 13:58:05 UTC 2020


On 3/22/20 3:11 AM, Johannes Schauer wrote:
> I am surprised that this is an option. I thought busybox was meant to be very
> minimal. Looking at the GNU implementation of the code behind "readlink -m"
> there is quite a lot of code:
> 
> http://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=blob;f=lib/canonicalize.c

GNU code is most likely a lot more verbose than it strictly needs to be
if optimizing for size.

And support for readlink -f is already guarded by a compile-time feature
flag. So I wouldn't rule out adding -m either.

https://git.busybox.net/busybox/tree/coreutils/readlink.c#n16

> Unfortunately, I also need this feature with older versions of busybox and I
> also wouldn't trust myself with writing that much C without severe bugs. XD
> 
> Thanks!
> 
> cheers, josch
> 


-- 
Eli Schwartz
Arch Linux Bug Wrangler and Trusted User

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 1601 bytes
Desc: OpenPGP digital signature
URL: <http://lists.busybox.net/pipermail/busybox/attachments/20200322/5244b6b3/attachment.asc>


More information about the busybox mailing list