Import ncpfs 0.3
This commit is contained in:
24
inode.c
24
inode.c
@@ -34,6 +34,7 @@ extern int close_fp(struct file *filp);
|
||||
static void ncp_put_inode(struct inode *);
|
||||
static void ncp_read_inode(struct inode *);
|
||||
static void ncp_put_super(struct super_block *);
|
||||
static void ncp_statfs(struct super_block *sb, struct statfs *buf, int bufsiz);
|
||||
static int ncp_notify_change(struct inode *inode, struct iattr *attr);
|
||||
|
||||
static struct super_operations ncp_sops = {
|
||||
@@ -43,7 +44,7 @@ static struct super_operations ncp_sops = {
|
||||
ncp_put_inode, /* put inode */
|
||||
ncp_put_super, /* put superblock */
|
||||
NULL, /* write superblock */
|
||||
NULL, /* stat filesystem */
|
||||
ncp_statfs, /* stat filesystem */
|
||||
NULL
|
||||
};
|
||||
|
||||
@@ -329,6 +330,27 @@ ncp_put_super(struct super_block *sb)
|
||||
MOD_DEC_USE_COUNT;
|
||||
}
|
||||
|
||||
static void
|
||||
ncp_statfs(struct super_block *sb, struct statfs *buf, int bufsiz)
|
||||
{
|
||||
struct statfs tmp;
|
||||
|
||||
/* We cannot say how much disk space is left on a mounted
|
||||
NetWare Server, because free space is distributed over
|
||||
volumes, and the current user might have disk quotas. So
|
||||
free space is not that simple to determine. Our decision
|
||||
here is to err conservatively. */
|
||||
|
||||
tmp.f_type = NCP_SUPER_MAGIC;
|
||||
tmp.f_bsize = 512;
|
||||
tmp.f_blocks = 0;
|
||||
tmp.f_bfree = 0;
|
||||
tmp.f_bavail = 0;
|
||||
tmp.f_files = -1;
|
||||
tmp.f_ffree = -1;
|
||||
tmp.f_namelen = 12;
|
||||
memcpy_tofs(buf, &tmp, bufsiz);
|
||||
}
|
||||
|
||||
/* DO MORE */
|
||||
static int
|
||||
|
||||
Reference in New Issue
Block a user