Mercurial > hg > toybox
view toys/readlink.c @ 191:7f55c59f5122
Add chroot.
author | Rob Landley <rob@landley.net> |
---|---|
date | Mon, 03 Dec 2007 19:28:51 -0600 |
parents | 25447caf1b4b |
children | 30a6db5a95c2 |
line wrap: on
line source
/* vi: set sw=4 ts=4: */ /* * readlink.c - Return string representation of a symbolic link. */ // Note: Hardware in LINK_MAX as 127 since it was removed from glibc. #include "toys.h" void readlink_main(void) { char *s = xreadlink(*toys.optargs); if (s) { xputs(s); if (CFG_TOYBOX_FREE) free(s); } else toys.exitval = 1; }