implement unmount, sync and statvfs as dummies for file system which
couldn't care less about implementing them
This commit is contained in:
parent
af1a9920a0
commit
2d9b770ec5
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: puffs.h,v 1.5 2006/11/09 13:11:01 pooka Exp $ */
|
||||
/* $NetBSD: puffs.h,v 1.6 2006/11/14 11:23:44 pooka Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2005, 2006 Antti Kantee. All Rights Reserved.
|
||||
|
@ -195,6 +195,12 @@ struct puffs_node * puffs_newpnode(struct puffs_usermount *, void *,
|
|||
void puffs_putpnode(struct puffs_node *);
|
||||
void puffs_setvattr(struct vattr *, const struct vattr *);
|
||||
|
||||
int puffs_unmount(struct puffs_usermount *, int, pid_t);
|
||||
int puffs_statvfs(struct puffs_usermount *, struct statvfs *, pid_t);
|
||||
int puffs_sync(struct puffs_usermount *, int waitfor,
|
||||
const struct puffs_cred *, pid_t);
|
||||
|
||||
|
||||
#define DENT_DOT 0
|
||||
#define DENT_DOTDOT 1
|
||||
#define DENT_ADJ(a) ((a)-2) /* nth request means dir's n-2th */
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: subr.c,v 1.6 2006/10/23 03:18:30 mrg Exp $ */
|
||||
/* $NetBSD: subr.c,v 1.7 2006/11/14 11:23:44 pooka Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2006 Antti Kantee. All Rights Reserved.
|
||||
|
@ -30,7 +30,7 @@
|
|||
|
||||
#include <sys/cdefs.h>
|
||||
#if !defined(lint)
|
||||
__RCSID("$NetBSD: subr.c,v 1.6 2006/10/23 03:18:30 mrg Exp $");
|
||||
__RCSID("$NetBSD: subr.c,v 1.7 2006/11/14 11:23:44 pooka Exp $");
|
||||
#endif /* !lint */
|
||||
|
||||
#include <sys/types.h>
|
||||
|
@ -116,6 +116,37 @@ puffs_nextdent(struct dirent **dent, const char *name, ino_t id, uint8_t dtype,
|
|||
return 1;
|
||||
}
|
||||
|
||||
/*ARGSUSED*/
|
||||
int
|
||||
puffs_unmount(struct puffs_usermount *pu, int flags, pid_t pid)
|
||||
{
|
||||
|
||||
/* would you like to see puffs rule again, my friend? */
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*ARGSUSED*/
|
||||
int
|
||||
puffs_sync(struct puffs_usermount *pu, int waitfor,
|
||||
const struct puffs_cred *cred, pid_t pid)
|
||||
{
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*ARGSUSED*/
|
||||
int
|
||||
puffs_statvfs(struct puffs_usermount *pu, struct statvfs *sbp, pid_t pid)
|
||||
{
|
||||
|
||||
sbp->f_bsize = sbp->f_frsize = sbp->f_iosize = 512;
|
||||
|
||||
sbp->f_bfree=sbp->f_bavail=sbp->f_bresvd=sbp->f_blocks = (fsblkcnt_t)0;
|
||||
sbp->f_ffree=sbp->f_favail=sbp->f_fresvd=sbp->f_files = (fsfilcnt_t)0;
|
||||
sbp->f_fsidx = pu->pu_fsidx;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Set vattr values for those applicable (i.e. not PUFFS_VNOVAL).
|
||||
|
|
Loading…
Reference in New Issue