mirror of
https://github.com/9fans/plan9port.git
synced 2025-01-15 11:20:03 +00:00
34 lines
341 B
C
34 lines
341 B
C
|
#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);
|
||
|
}
|
||
|
|