opnsense-src/lib/libc/gen/setprogname.c

20 lines
273 B
C
Raw Normal View History

2002-01-31 19:57:29 -05:00
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
2001-08-21 13:28:39 -04:00
#include <stdlib.h>
#include <string.h>
#include "libc_private.h"
void
setprogname(const char *progname)
{
2001-08-21 13:28:39 -04:00
const char *p;
p = strrchr(progname, '/');
if (p != NULL)
__progname = p + 1;
else
__progname = progname;
}