diff options
author | Rob Landley <rob@landley.net> | 2008-01-05 15:20:26 -0600 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2008-01-05 15:20:26 -0600 |
commit | 6c437186c0f30d18d739648146399990501a823d (patch) | |
tree | 18eff6a2070f386a589340dac567bf6a5e4fc931 /toys | |
parent | 3e19db76440b81b3894a636309d01732e64e0d10 (diff) | |
download | toybox-6c437186c0f30d18d739648146399990501a823d.tar.gz |
Teach readlink to actually do -f.
Diffstat (limited to 'toys')
-rw-r--r-- | toys/readlink.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/toys/readlink.c b/toys/readlink.c index c602f78e..79fdea52 100644 --- a/toys/readlink.c +++ b/toys/readlink.c @@ -9,7 +9,12 @@ void readlink_main(void) { - char *s = xreadlink(*toys.optargs); + char *s; + + // Calculating full cannonical path? + + if (CFG_READLINK_F && toys.optflags) s = realpath(*toys.optargs, NULL); + else s = xreadlink(*toys.optargs); if (s) { xputs(s); |