mirror of
https://git.suckless.org/9base
synced 2025-09-01 21:03:48 -07:00
initial import
This commit is contained in:
18
lib9/get9root.c
Normal file
18
lib9/get9root.c
Normal file
@@ -0,0 +1,18 @@
|
||||
#include <u.h>
|
||||
#include <libc.h>
|
||||
|
||||
char*
|
||||
get9root(void)
|
||||
{
|
||||
static char *s;
|
||||
|
||||
if(s)
|
||||
return s;
|
||||
|
||||
if((s = getenv("PLAN9")) != 0)
|
||||
return s;
|
||||
/* could do better - search $PATH */
|
||||
s = "/usr/local/plan9";
|
||||
return s;
|
||||
}
|
||||
|
Reference in New Issue
Block a user