Per some comments from Lars Kellogg-Stedman <lars@larsshack.org>,

make xreadlink() return NULL on failure, and make sure everyone
uses the interface correctly.
 -Erik
This commit is contained in:
Eric Andersen
2001-05-07 17:48:28 +00:00
parent 822c3837f9
commit 28355a36da
7 changed files with 16 additions and 11 deletions

View File

@ -37,10 +37,7 @@ typedef int (*__link_f)(const char *, const char *);
*/
static char *busybox_fullpath()
{
char proc[256];
sprintf(proc, "/proc/%d/exe", getpid());
return xreadlink(proc);
return xreadlink("/proc/self/exe");
}
/* create (sym)links for each applet */