File system stuff.
This commit is contained in:
parent
e97ceade5e
commit
d3df308747
29 changed files with 3316 additions and 0 deletions
26
src/libfs/close.c
Normal file
26
src/libfs/close.c
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
/* Copyright (C) 2003 Russ Cox, Massachusetts Institute of Technology */
|
||||
/* See COPYRIGHT */
|
||||
|
||||
#include <u.h>
|
||||
#include <libc.h>
|
||||
#include <fcall.h>
|
||||
#include <fs.h>
|
||||
#include "fsimpl.h"
|
||||
|
||||
static void
|
||||
fidclunk(Fid *fid)
|
||||
{
|
||||
Fcall tx, rx;
|
||||
|
||||
tx.type = Tclunk;
|
||||
tx.fid = fid->fid;
|
||||
fsrpc(fid->fs, &tx, &rx, 0);
|
||||
_fsputfid(fid);
|
||||
}
|
||||
|
||||
void
|
||||
fsclose(Fid *fid)
|
||||
{
|
||||
/* maybe someday there will be a ref count */
|
||||
fidclunk(fid);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue