Print a warning message and return EOPNOTSUPP if the user tries to enable
quotas on a file system that is using logging.
This commit is contained in:
parent
83f7350f6d
commit
c63481baaa
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: ufs_quota.c,v 1.60 2008/05/05 17:11:17 ad Exp $ */
|
||||
/* $NetBSD: ufs_quota.c,v 1.61 2008/12/21 10:48:10 ad Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1982, 1986, 1990, 1993, 1995
|
||||
|
@ -35,7 +35,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: ufs_quota.c,v 1.60 2008/05/05 17:11:17 ad Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: ufs_quota.c,v 1.61 2008/12/21 10:48:10 ad Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/kernel.h>
|
||||
|
@ -416,6 +416,13 @@ quotaon(struct lwp *l, struct mount *mp, int type, void *fname)
|
|||
int error;
|
||||
struct nameidata nd;
|
||||
|
||||
/* XXX XXX XXX */
|
||||
if (mp->mnt_wapbl != NULL) {
|
||||
printf("%s: quotas cannot yet be used with -o log\n",
|
||||
mp->mnt_stat.f_mntonname);
|
||||
return (EOPNOTSUPP);
|
||||
}
|
||||
|
||||
vpp = &ump->um_quotas[type];
|
||||
NDINIT(&nd, LOOKUP, FOLLOW, UIO_USERSPACE, fname);
|
||||
if ((error = vn_open(&nd, FREAD|FWRITE, 0)) != 0)
|
||||
|
|
Loading…
Reference in New Issue