Module Name:    src
Committed By:   dholland
Date:           Sun Jan 29 06:49:44 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_quota1.c ufs_quota2.c

Log Message:
Rename QUOTACTL_SET to QUOTACTL_PUT, to match future intended API.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/sys/kern/vfs_quotactl.c
cvs rdiff -u -r1.12 -r1.13 src/sys/sys/quotactl.h
cvs rdiff -u -r1.84 -r1.85 src/sys/ufs/ufs/ufs_quota.c
cvs rdiff -u -r1.9 -r1.10 src/sys/ufs/ufs/ufs_quota.h
cvs rdiff -u -r1.14 -r1.15 src/sys/ufs/ufs/ufs_quota1.c
cvs rdiff -u -r1.10 -r1.11 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.14 src/sys/kern/vfs_quotactl.c:1.15
--- src/sys/kern/vfs_quotactl.c:1.14	Sun Jan 29 06:48:50 2012
+++ src/sys/kern/vfs_quotactl.c	Sun Jan 29 06:49:43 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: vfs_quotactl.c,v 1.14 2012/01/29 06:48:50 dholland Exp $	*/
+/*	$NetBSD: vfs_quotactl.c,v 1.15 2012/01/29 06:49:43 dholland Exp $	*/
 
 /*
  * Copyright (c) 1991, 1993, 1994
@@ -80,7 +80,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vfs_quotactl.c,v 1.14 2012/01/29 06:48:50 dholland Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vfs_quotactl.c,v 1.15 2012/01/29 06:49:43 dholland Exp $");
 
 #include <sys/mount.h>
 #include <sys/quota.h>
@@ -299,7 +299,7 @@ vfs_quotactl_get(struct mount *mp,
 }
 
 static int
-vfs_quotactl_set_extractinfo(prop_dictionary_t data,
+vfs_quotactl_put_extractinfo(prop_dictionary_t data,
 			struct quotaval *blocks, struct quotaval *files)
 {
 	/*
@@ -351,7 +351,7 @@ vfs_quotactl_set_extractinfo(prop_dictio
 }
 
 static int
-vfs_quotactl_set(struct mount *mp,
+vfs_quotactl_put(struct mount *mp,
 			prop_dictionary_t cmddict, int q2type,
 			prop_array_t datas)
 {
@@ -395,7 +395,7 @@ vfs_quotactl_set(struct mount *mp,
 			defaultq = 0;
 		}
 
-		error = vfs_quotactl_set_extractinfo(data, &blocks, &files);
+		error = vfs_quotactl_put_extractinfo(data, &blocks, &files);
 		if (error) {
 			goto err;
 		}
@@ -404,10 +404,10 @@ vfs_quotactl_set(struct mount *mp,
 		qk.qk_id = defaultq ? QUOTA_DEFAULTID : id;
 		qk.qk_objtype = QUOTA_OBJTYPE_BLOCKS;
 
-		args.qc_type = QCT_SET;
-		args.u.set.qc_key = &qk;
-		args.u.set.qc_val = &blocks;
-		error = VFS_QUOTACTL(mp, QUOTACTL_SET, &args);
+		args.qc_type = QCT_PUT;
+		args.u.put.qc_key = &qk;
+		args.u.put.qc_val = &blocks;
+		error = VFS_QUOTACTL(mp, QUOTACTL_PUT, &args);
 		if (error) {
 			goto err;
 		}
@@ -416,10 +416,10 @@ vfs_quotactl_set(struct mount *mp,
 		qk.qk_id = defaultq ? QUOTA_DEFAULTID : id;
 		qk.qk_objtype = QUOTA_OBJTYPE_FILES;
 
-		args.qc_type = QCT_SET;
-		args.u.set.qc_key = &qk;
-		args.u.set.qc_val = &files;
-		error = VFS_QUOTACTL(mp, QUOTACTL_SET, &args);
+		args.qc_type = QCT_PUT;
+		args.u.put.qc_key = &qk;
+		args.u.put.qc_val = &files;
+		error = VFS_QUOTACTL(mp, QUOTACTL_PUT, &args);
 		if (error) {
 			goto err;
 		}
@@ -503,7 +503,7 @@ vfs_quotactl_cmd(struct mount *mp, prop_
 	} else if (strcmp(cmd, "get") == 0) {
 		error = vfs_quotactl_get(mp, cmddict, q2type, datas);
 	} else if (strcmp(cmd, "set") == 0) {
-		error = vfs_quotactl_set(mp, cmddict, q2type, datas);
+		error = vfs_quotactl_put(mp, cmddict, q2type, datas);
 	} else if (strcmp(cmd, "getall") == 0) {
 		error = vfs_quotactl_getall(mp, cmddict, q2type, datas);
 	} else if (strcmp(cmd, "clear") == 0) {

Index: src/sys/sys/quotactl.h
diff -u src/sys/sys/quotactl.h:1.12 src/sys/sys/quotactl.h:1.13
--- src/sys/sys/quotactl.h:1.12	Sun Jan 29 06:48:50 2012
+++ src/sys/sys/quotactl.h	Sun Jan 29 06:49:43 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: quotactl.h,v 1.12 2012/01/29 06:48:50 dholland Exp $	*/
+/*	$NetBSD: quotactl.h,v 1.13 2012/01/29 06:49:43 dholland Exp $	*/
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -42,7 +42,7 @@
 #define QUOTACTL_QUOTAON	1
 #define QUOTACTL_QUOTAOFF	2
 #define QUOTACTL_GET		3
-#define QUOTACTL_SET		4
+#define QUOTACTL_PUT		4
 #define QUOTACTL_GETALL		5
 #define QUOTACTL_CLEAR		6
 
@@ -51,7 +51,7 @@ enum vfs_quotactl_argtypes {
 	QCT_PROPLIB,	/* quotaon/off, get, set, getall, clear */
 	QCT_GETVERSION,	/* getversion */
 	QCT_GET,	/* get */
-	QCT_SET,	/* set */
+	QCT_PUT,	/* put */
 };
 struct vfs_quotactl_args {
 	enum vfs_quotactl_argtypes qc_type;
@@ -71,7 +71,7 @@ struct vfs_quotactl_args {
 		struct {
 			const struct quotakey *qc_key;
 			const struct quotaval *qc_val;
-		} set;
+		} put;
 	} u;
 };
 

Index: src/sys/ufs/ufs/ufs_quota.c
diff -u src/sys/ufs/ufs/ufs_quota.c:1.84 src/sys/ufs/ufs/ufs_quota.c:1.85
--- src/sys/ufs/ufs/ufs_quota.c:1.84	Sun Jan 29 06:48:50 2012
+++ src/sys/ufs/ufs/ufs_quota.c	Sun Jan 29 06:49:43 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: ufs_quota.c,v 1.84 2012/01/29 06:48:50 dholland Exp $	*/
+/*	$NetBSD: ufs_quota.c,v 1.85 2012/01/29 06:49:43 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.84 2012/01/29 06:48:50 dholland Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ufs_quota.c,v 1.85 2012/01/29 06:49:43 dholland Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_quota.h"
@@ -75,7 +75,7 @@ static int quota_handle_cmd_get_version(
     struct vfs_quotactl_args *args);
 static int quota_handle_cmd_get(struct mount *, struct lwp *,
     struct vfs_quotactl_args *args);
-static int quota_handle_cmd_set(struct mount *, struct lwp *,
+static int quota_handle_cmd_put(struct mount *, struct lwp *,
     struct vfs_quotactl_args *args);
 static int quota_handle_cmd_getall(struct mount *, struct lwp *,
     struct vfs_quotactl_args *args);
@@ -172,8 +172,8 @@ quota_handle_cmd(struct mount *mp, struc
 	    case QUOTACTL_GET:
 		error = quota_handle_cmd_get(mp, l, args);
 		break;
-	    case QUOTACTL_SET:
-		error = quota_handle_cmd_set(mp, l, args);
+	    case QUOTACTL_PUT:
+		error = quota_handle_cmd_put(mp, l, args);
 		break;
 	    case QUOTACTL_GETALL:
 		error = quota_handle_cmd_getall(mp, l, args);
@@ -264,7 +264,7 @@ quota_handle_cmd_get(struct mount *mp, s
 }
 
 static int 
-quota_handle_cmd_set(struct mount *mp, struct lwp *l, 
+quota_handle_cmd_put(struct mount *mp, struct lwp *l, 
     struct vfs_quotactl_args *args)
 {
 	struct ufsmount *ump = VFSTOUFS(mp);
@@ -273,9 +273,9 @@ quota_handle_cmd_set(struct mount *mp, s
 	id_t kauth_id;
 	int error;
 
-	KASSERT(args->qc_type == QCT_SET);
-	qk = args->u.set.qc_key;
-	qv = args->u.set.qc_val;
+	KASSERT(args->qc_type == QCT_PUT);
+	qk = args->u.put.qc_key;
+	qv = args->u.put.qc_val;
 
 	if ((ump->um_flags & (UFS_QUOTA|UFS_QUOTA2)) == 0)
 		return EOPNOTSUPP;
@@ -294,12 +294,12 @@ quota_handle_cmd_set(struct mount *mp, s
 			goto err;
 #ifdef QUOTA
 		if (ump->um_flags & UFS_QUOTA)
-			error = quota1_handle_cmd_set(ump, qk, qv);
+			error = quota1_handle_cmd_put(ump, qk, qv);
 		else
 #endif
 #ifdef QUOTA2
 		if (ump->um_flags & UFS_QUOTA2) {
-			error = quota2_handle_cmd_set(ump, qk, qv);
+			error = quota2_handle_cmd_put(ump, qk, qv);
 		} else
 #endif
 			panic("quota_handle_cmd_get: no support ?");

Index: src/sys/ufs/ufs/ufs_quota.h
diff -u src/sys/ufs/ufs/ufs_quota.h:1.9 src/sys/ufs/ufs/ufs_quota.h:1.10
--- src/sys/ufs/ufs/ufs_quota.h:1.9	Sun Jan 29 06:48:50 2012
+++ src/sys/ufs/ufs/ufs_quota.h	Sun Jan 29 06:49:44 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: ufs_quota.h,v 1.9 2012/01/29 06:48:50 dholland Exp $	*/
+/*	$NetBSD: ufs_quota.h,v 1.10 2012/01/29 06:49:44 dholland Exp $	*/
 
 /*
  * Copyright (c) 1982, 1986, 1990, 1993, 1995
@@ -115,7 +115,7 @@ int dq1get(struct vnode *, u_long, struc
 int dq1sync(struct vnode *, struct dquot *);
 int quota1_handle_cmd_get(struct ufsmount *, const struct quotakey *,
     struct quotaval *);
-int quota1_handle_cmd_set(struct ufsmount *, const struct quotakey *,
+int quota1_handle_cmd_put(struct ufsmount *, const struct quotakey *,
     const struct quotaval *);
 int quota1_handle_cmd_quotaon(struct lwp *, struct ufsmount *, int,
     const char *);
@@ -125,7 +125,7 @@ int chkdq2(struct inode *, int64_t, kaut
 int chkiq2(struct inode *, int32_t, kauth_cred_t, int);
 int quota2_handle_cmd_get(struct ufsmount *, const struct quotakey *,
     struct quotaval *);
-int quota2_handle_cmd_set(struct ufsmount *, const struct quotakey *,
+int quota2_handle_cmd_put(struct ufsmount *, const struct quotakey *,
     const struct quotaval *);
 int quota2_handle_cmd_clear(struct ufsmount *, int, int, int, prop_dictionary_t);
 int quota2_handle_cmd_getall(struct ufsmount *, int, prop_array_t);

Index: src/sys/ufs/ufs/ufs_quota1.c
diff -u src/sys/ufs/ufs/ufs_quota1.c:1.14 src/sys/ufs/ufs/ufs_quota1.c:1.15
--- src/sys/ufs/ufs/ufs_quota1.c:1.14	Sun Jan 29 06:48:51 2012
+++ src/sys/ufs/ufs/ufs_quota1.c	Sun Jan 29 06:49:44 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: ufs_quota1.c,v 1.14 2012/01/29 06:48:51 dholland Exp $	*/
+/*	$NetBSD: ufs_quota1.c,v 1.15 2012/01/29 06:49:44 dholland Exp $	*/
 
 /*
  * Copyright (c) 1982, 1986, 1990, 1993, 1995
@@ -35,7 +35,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ufs_quota1.c,v 1.14 2012/01/29 06:48:51 dholland Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ufs_quota1.c,v 1.15 2012/01/29 06:49:44 dholland Exp $");
 
 #include <sys/param.h>
 #include <sys/kernel.h>
@@ -553,7 +553,7 @@ quota1_encode_limit(uint64_t lim)
 }
 
 int
-quota1_handle_cmd_set(struct ufsmount *ump, const struct quotakey *key,
+quota1_handle_cmd_put(struct ufsmount *ump, const struct quotakey *key,
     const struct quotaval *val)
 {
 	struct dquot *dq;

Index: src/sys/ufs/ufs/ufs_quota2.c
diff -u src/sys/ufs/ufs/ufs_quota2.c:1.10 src/sys/ufs/ufs/ufs_quota2.c:1.11
--- src/sys/ufs/ufs/ufs_quota2.c:1.10	Sun Jan 29 06:48:51 2012
+++ src/sys/ufs/ufs/ufs_quota2.c	Sun Jan 29 06:49:44 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: ufs_quota2.c,v 1.10 2012/01/29 06:48:51 dholland Exp $ */
+/* $NetBSD: ufs_quota2.c,v 1.11 2012/01/29 06:49:44 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.10 2012/01/29 06:48:51 dholland Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ufs_quota2.c,v 1.11 2012/01/29 06:49:44 dholland Exp $");
 
 #include <sys/buf.h>
 #include <sys/param.h>
@@ -611,7 +611,7 @@ chkiq2(struct inode *ip, int32_t change,
 }
 
 int
-quota2_handle_cmd_set(struct ufsmount *ump, const struct quotakey *key,
+quota2_handle_cmd_put(struct ufsmount *ump, const struct quotakey *key,
     const struct quotaval *val)
 {
 	int error;

Reply via email to