Module Name: src
Committed By: dholland
Date: Sun Jan 29 06:54:34 UTC 2012
Modified Files:
src/sys/kern: vfs_quotactl.c
src/sys/sys: quotactl.h
src/sys/ufs/ufs: ufs_quota.c ufs_quota.h ufs_quota2.c
Log Message:
QUOTACTL_CLEAR -> QUOTACTL_DELETE to match intended API and user API.
To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/sys/kern/vfs_quotactl.c
cvs rdiff -u -r1.16 -r1.17 src/sys/sys/quotactl.h
cvs rdiff -u -r1.90 -r1.91 src/sys/ufs/ufs/ufs_quota.c
cvs rdiff -u -r1.12 -r1.13 src/sys/ufs/ufs/ufs_quota.h
cvs rdiff -u -r1.13 -r1.14 src/sys/ufs/ufs/ufs_quota2.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/kern/vfs_quotactl.c
diff -u src/sys/kern/vfs_quotactl.c:1.18 src/sys/kern/vfs_quotactl.c:1.19
--- src/sys/kern/vfs_quotactl.c:1.18 Sun Jan 29 06:53:35 2012
+++ src/sys/kern/vfs_quotactl.c Sun Jan 29 06:54:34 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: vfs_quotactl.c,v 1.18 2012/01/29 06:53:35 dholland Exp $ */
+/* $NetBSD: vfs_quotactl.c,v 1.19 2012/01/29 06:54:34 dholland Exp $ */
/*
* Copyright (c) 1991, 1993, 1994
@@ -80,7 +80,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vfs_quotactl.c,v 1.18 2012/01/29 06:53:35 dholland Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vfs_quotactl.c,v 1.19 2012/01/29 06:54:34 dholland Exp $");
#include <sys/mount.h>
#include <sys/quota.h>
@@ -491,22 +491,22 @@ vfs_quotactl_clear(struct mount *mp,
defaultq = 0;
}
- args.qc_type = QCT_CLEAR;
- args.u.clear.qc_idtype = q2type;
- args.u.clear.qc_id = id;
- args.u.clear.qc_defaultq = defaultq;
- args.u.clear.qc_objtype = QUOTA_OBJTYPE_BLOCKS;
- error = VFS_QUOTACTL(mp, QUOTACTL_CLEAR, &args);
+ args.qc_type = QCT_DELETE;
+ args.u.delete.qc_idtype = q2type;
+ args.u.delete.qc_id = id;
+ args.u.delete.qc_defaultq = defaultq;
+ args.u.delete.qc_objtype = QUOTA_OBJTYPE_BLOCKS;
+ error = VFS_QUOTACTL(mp, QUOTACTL_DELETE, &args);
if (error) {
goto err;
}
- args.qc_type = QCT_CLEAR;
- args.u.clear.qc_idtype = q2type;
- args.u.clear.qc_id = id;
- args.u.clear.qc_defaultq = defaultq;
- args.u.clear.qc_objtype = QUOTA_OBJTYPE_FILES;
- error = VFS_QUOTACTL(mp, QUOTACTL_CLEAR, &args);
+ args.qc_type = QCT_DELETE;
+ args.u.delete.qc_idtype = q2type;
+ args.u.delete.qc_id = id;
+ args.u.delete.qc_defaultq = defaultq;
+ args.u.delete.qc_objtype = QUOTA_OBJTYPE_FILES;
+ error = VFS_QUOTACTL(mp, QUOTACTL_DELETE, &args);
if (error) {
goto err;
}
Index: src/sys/sys/quotactl.h
diff -u src/sys/sys/quotactl.h:1.16 src/sys/sys/quotactl.h:1.17
--- src/sys/sys/quotactl.h:1.16 Sun Jan 29 06:53:35 2012
+++ src/sys/sys/quotactl.h Sun Jan 29 06:54:34 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: quotactl.h,v 1.16 2012/01/29 06:53:35 dholland Exp $ */
+/* $NetBSD: quotactl.h,v 1.17 2012/01/29 06:54:34 dholland Exp $ */
/*-
* Copyright (c) 2011 The NetBSD Foundation, Inc.
* All rights reserved.
@@ -44,15 +44,15 @@
#define QUOTACTL_GET 3
#define QUOTACTL_PUT 4
#define QUOTACTL_GETALL 5
-#define QUOTACTL_CLEAR 6
+#define QUOTACTL_DELETE 6
/* Argument encoding. */
enum vfs_quotactl_argtypes {
- QCT_PROPLIB, /* quotaon/off, get, set, getall, clear */
+ QCT_PROPLIB, /* quotaon/off, getall */
QCT_GETVERSION, /* getversion */
QCT_GET, /* get */
QCT_PUT, /* put */
- QCT_CLEAR, /* clear */
+ QCT_DELETE, /* delete */
};
struct vfs_quotactl_args {
enum vfs_quotactl_argtypes qc_type;
@@ -78,7 +78,7 @@ struct vfs_quotactl_args {
id_t qc_id;
int qc_defaultq;
int qc_objtype;
- } clear;
+ } delete;
} u;
};
Index: src/sys/ufs/ufs/ufs_quota.c
diff -u src/sys/ufs/ufs/ufs_quota.c:1.90 src/sys/ufs/ufs/ufs_quota.c:1.91
--- src/sys/ufs/ufs/ufs_quota.c:1.90 Sun Jan 29 06:53:35 2012
+++ src/sys/ufs/ufs/ufs_quota.c Sun Jan 29 06:54:34 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: ufs_quota.c,v 1.90 2012/01/29 06:53:35 dholland Exp $ */
+/* $NetBSD: ufs_quota.c,v 1.91 2012/01/29 06:54:34 dholland 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.90 2012/01/29 06:53:35 dholland Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ufs_quota.c,v 1.91 2012/01/29 06:54:34 dholland Exp $");
#if defined(_KERNEL_OPT)
#include "opt_quota.h"
@@ -79,7 +79,7 @@ static int quota_handle_cmd_put(struct m
struct vfs_quotactl_args *args);
static int quota_handle_cmd_getall(struct mount *, struct lwp *,
struct vfs_quotactl_args *args);
-static int quota_handle_cmd_clear(struct mount *, struct lwp *,
+static int quota_handle_cmd_delete(struct mount *, struct lwp *,
struct vfs_quotactl_args *args);
static int quota_handle_cmd_quotaon(struct mount *, struct lwp *,
struct vfs_quotactl_args *args);
@@ -178,8 +178,8 @@ quota_handle_cmd(struct mount *mp, struc
case QUOTACTL_GETALL:
error = quota_handle_cmd_getall(mp, l, args);
break;
- case QUOTACTL_CLEAR:
- error = quota_handle_cmd_clear(mp, l, args);
+ case QUOTACTL_DELETE:
+ error = quota_handle_cmd_delete(mp, l, args);
break;
default:
panic("Invalid quotactl operation %d\n", op);
@@ -312,7 +312,7 @@ quota_handle_cmd_put(struct mount *mp, s
}
static int
-quota_handle_cmd_clear(struct mount *mp, struct lwp *l,
+quota_handle_cmd_delete(struct mount *mp, struct lwp *l,
struct vfs_quotactl_args *args)
{
struct ufsmount *ump = VFSTOUFS(mp);
@@ -322,11 +322,11 @@ quota_handle_cmd_clear(struct mount *mp,
int objtype;
int error;
- KASSERT(args->qc_type == QCT_CLEAR);
- idtype = args->u.clear.qc_idtype;
- id = args->u.clear.qc_id;
- defaultq = args->u.clear.qc_defaultq;
- objtype = args->u.clear.qc_objtype;
+ KASSERT(args->qc_type == QCT_DELETE);
+ idtype = args->u.delete.qc_idtype;
+ id = args->u.delete.qc_id;
+ defaultq = args->u.delete.qc_defaultq;
+ objtype = args->u.delete.qc_objtype;
if ((ump->um_flags & UFS_QUOTA2) == 0)
return EOPNOTSUPP;
@@ -339,7 +339,7 @@ quota_handle_cmd_clear(struct mount *mp,
goto err;
#ifdef QUOTA2
if (ump->um_flags & UFS_QUOTA2) {
- error = quota2_handle_cmd_clear(ump, idtype, id,
+ error = quota2_handle_cmd_delete(ump, idtype, id,
defaultq, objtype);
} else
#endif
Index: src/sys/ufs/ufs/ufs_quota.h
diff -u src/sys/ufs/ufs/ufs_quota.h:1.12 src/sys/ufs/ufs/ufs_quota.h:1.13
--- src/sys/ufs/ufs/ufs_quota.h:1.12 Sun Jan 29 06:53:35 2012
+++ src/sys/ufs/ufs/ufs_quota.h Sun Jan 29 06:54:34 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: ufs_quota.h,v 1.12 2012/01/29 06:53:35 dholland Exp $ */
+/* $NetBSD: ufs_quota.h,v 1.13 2012/01/29 06:54:34 dholland Exp $ */
/*
* Copyright (c) 1982, 1986, 1990, 1993, 1995
@@ -127,7 +127,7 @@ int quota2_handle_cmd_get(struct ufsmoun
struct quotaval *);
int quota2_handle_cmd_put(struct ufsmount *, const struct quotakey *,
const struct quotaval *);
-int quota2_handle_cmd_clear(struct ufsmount *, int, int, int, int);
+int quota2_handle_cmd_delete(struct ufsmount *, int, int, int, int);
int quota2_handle_cmd_getall(struct ufsmount *, int, prop_array_t);
int q2sync(struct mount *);
int dq2get(struct vnode *, u_long, struct ufsmount *, int, struct dquot *);
Index: src/sys/ufs/ufs/ufs_quota2.c
diff -u src/sys/ufs/ufs/ufs_quota2.c:1.13 src/sys/ufs/ufs/ufs_quota2.c:1.14
--- src/sys/ufs/ufs/ufs_quota2.c:1.13 Sun Jan 29 06:53:36 2012
+++ src/sys/ufs/ufs/ufs_quota2.c Sun Jan 29 06:54:34 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: ufs_quota2.c,v 1.13 2012/01/29 06:53:36 dholland Exp $ */
+/* $NetBSD: ufs_quota2.c,v 1.14 2012/01/29 06:54:34 dholland Exp $ */
/*-
* Copyright (c) 2010 Manuel Bouyer
* All rights reserved.
@@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ufs_quota2.c,v 1.13 2012/01/29 06:53:36 dholland Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ufs_quota2.c,v 1.14 2012/01/29 06:54:34 dholland Exp $");
#include <sys/buf.h>
#include <sys/param.h>
@@ -708,7 +708,7 @@ dq2clear_callback(struct ufsmount *ump,
return 0;
}
int
-quota2_handle_cmd_clear(struct ufsmount *ump, int idtype, int id,
+quota2_handle_cmd_delete(struct ufsmount *ump, int idtype, int id,
int defaultq, int objtype)
{
int error, i, canfree;