Small tweaks
Lots of new code imported.
This commit is contained in:
parent
a770daa795
commit
2277c5d7bb
86 changed files with 12444 additions and 91 deletions
29
src/lib9p/ftest.c
Normal file
29
src/lib9p/ftest.c
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
#include <u.h>
|
||||
#include <libc.h>
|
||||
#include <auth.h>
|
||||
#include <fcall.h>
|
||||
#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);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue