From 2600337aa704efbeba8201e88147a764b4fd2b90 Mon Sep 17 00:00:00 2001 From: rsc Date: Sun, 2 Jan 2005 19:46:12 +0000 Subject: remove libfs. now lib9pclient --- src/libfs/stat.c | 54 ------------------------------------------------------ 1 file changed, 54 deletions(-) delete mode 100644 src/libfs/stat.c (limited to 'src/libfs/stat.c') diff --git a/src/libfs/stat.c b/src/libfs/stat.c deleted file mode 100644 index e55e0b12..00000000 --- a/src/libfs/stat.c +++ /dev/null @@ -1,54 +0,0 @@ -/* Copyright (C) 2003 Russ Cox, Massachusetts Institute of Technology */ -/* See COPYRIGHT */ - -#include -#include -#include -#include -#include "fsimpl.h" - -Dir* -fsdirstat(Fsys *fs, char *name) -{ - Dir *d; - Fid *fid; - - if((fid = fswalk(fs->root, name)) == nil) - return nil; - - d = fsdirfstat(fid); - fsclose(fid); - return d; -} - -Dir* -fsdirfstat(Fid *fid) -{ - Dir *d; - Fsys *fs; - Fcall tx, rx; - void *freep; - int n; - - fs = fid->fs; - tx.type = Tstat; - tx.fid = fid->fid; - - if(fsrpc(fs, &tx, &rx, &freep) < 0) - return nil; - - d = malloc(sizeof(Dir)+rx.nstat); - if(d == nil){ - free(freep); - return nil; - } - n = convM2D(rx.stat, rx.nstat, d, (char*)&d[1]); - free(freep); - if(n != rx.nstat){ - free(d); - werrstr("rx.nstat and convM2D disagree about dir length"); - return nil; - } - return d; -} - -- cgit v1.2.3