rscmore512caf820 years agoHistory
42 lines · 605 B · C
RawDownload
/* Copyright (C) 2003 Russ Cox, Massachusetts Institute of Technology *//* See COPYRIGHT */ #include <u.h>#include <libc.h>#include <fcall.h>#include <9pclient.h>#include "fsimpl.h" static voidfidclunk(CFid *fid){	Fcall tx, rx; 	tx.type = Tclunk;	tx.fid = fid->fid;	_fsrpc(fid->fs, &tx, &rx, 0);	_fsputfid(fid);} voidfsclose(CFid *fid){	if(fid == nil)		return; 	/* maybe someday there will be a ref count */	fidclunk(fid);} intfsfremove(CFid *fid){	int n;	Fcall tx, rx;		tx.type = Tremove;	tx.fid = fid->fid;	n = _fsrpc(fid->fs, &tx, &rx, 0);	_fsputfid(fid);	return n;}