From d3df308747ee4d1fcc063a348dcf1146b390bda7 Mon Sep 17 00:00:00 2001 From: rsc Date: Sat, 6 Dec 2003 18:08:52 +0000 Subject: File system stuff. --- src/libfs/close.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 src/libfs/close.c (limited to 'src/libfs/close.c') diff --git a/src/libfs/close.c b/src/libfs/close.c new file mode 100644 index 00000000..23388ae3 --- /dev/null +++ b/src/libfs/close.c @@ -0,0 +1,26 @@ +/* Copyright (C) 2003 Russ Cox, Massachusetts Institute of Technology */ +/* See COPYRIGHT */ + +#include +#include +#include +#include +#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); +} -- cgit v1.2.3