Mercurial > hg > toybox
view toys/readlink.c @ 198:3227c5316260
Update links and add some more spec comments.
author | Rob Landley <rob@landley.net> |
---|---|
date | Tue, 11 Dec 2007 15:41:31 -0600 |
parents | 30a6db5a95c2 |
children | 52a0c06b2dad |
line wrap: on
line source
/* vi: set sw=4 ts=4: */ /* * readlink.c - Return string representation of a symbolic link. * * Not in SUSv3. */ #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; }