2016-11-25 17:18:40 +01:00
|
|
|
#include <u.h>
|
2017-04-19 23:33:14 +02:00
|
|
|
#include <lib9.h>
|
2016-11-25 17:18:40 +01:00
|
|
|
#include <auth.h>
|
2016-12-01 00:09:42 +01:00
|
|
|
#include <9P2000.h>
|
2016-11-25 17:18:40 +01:00
|
|
|
#include "9p.h"
|
|
|
|
|
|
|
|
void
|
|
|
|
main(void)
|
|
|
|
{
|
|
|
|
Tree *t;
|
|
|
|
File *hello, *goodbye, *world;
|
|
|
|
|
|
|
|
t = mktree();
|
|
|
|
|
|
|
|
hello = fcreate(t->root, "hello", CHDIR|0777);
|
|
|
|
assert(hello != nil);
|
|
|
|
|
|
|
|
goodbye = fcreate(t->root, "goodbye", CHDIR|0777);
|
|
|
|
assert(goodbye != nil);
|
|
|
|
|
|
|
|
world = fcreate(hello, "world", 0666);
|
|
|
|
assert(world != nil);
|
|
|
|
world = fcreate(goodbye, "world", 0666);
|
|
|
|
assert(world != nil);
|
|
|
|
fdump(t->root, 0);
|
|
|
|
|
|
|
|
fremove(world);
|
|
|
|
fdump(t->root, 0);
|
|
|
|
}
|