plan9port/src/cmd/namespace.c

34 lines
341 B
C
Raw Normal View History

2004-03-21 14:07:19 +00:00
#include <u.h>
#include <libc.h>
void
usage(void)
{
fprint(2, "usage: namespace\n");
exits("usage");
}
void
main(int argc, char **argv)
{
char *ns;
ARGBEGIN{
default:
usage();
}ARGEND
if(argc)
usage();
ns = getns();
if(ns == nil){
fprint(2, "namespace: %r\n");
exits("namespace");
}
print("%s\n", ns);
exits(0);
}