summaryrefslogtreecommitdiffstats
path: root/src/libfs/close.c
diff options
context:
space:
mode:
authorrsc <devnull@localhost>2003-12-06 18:08:52 +0000
committerrsc <devnull@localhost>2003-12-06 18:08:52 +0000
commitd3df308747ee4d1fcc063a348dcf1146b390bda7 (patch)
treea204b027256ec29b110caaa86100cbd701808b5b /src/libfs/close.c
parente97ceade5e1bba5787e39429384336fa37797906 (diff)
downloadplan9port-d3df308747ee4d1fcc063a348dcf1146b390bda7.tar.gz
plan9port-d3df308747ee4d1fcc063a348dcf1146b390bda7.zip
File system stuff.
Diffstat (limited to 'src/libfs/close.c')
-rw-r--r--src/libfs/close.c26
1 files changed, 26 insertions, 0 deletions
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 <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);
+}