Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys Rename QUOTACTL_SET to QUOTACTL_PUT, to match future int...



details:   https://anonhg.NetBSD.org/src/rev/95c9713f4159
branches:  trunk
changeset: 773181:95c9713f4159
user:      dholland <dholland%NetBSD.org@localhost>
date:      Sun Jan 29 06:49:43 2012 +0000

description:
Rename QUOTACTL_SET to QUOTACTL_PUT, to match future intended API.

diffstat:

 sys/kern/vfs_quotactl.c  |  28 ++++++++++++++--------------
 sys/sys/quotactl.h       |   8 ++++----
 sys/ufs/ufs/ufs_quota.c  |  22 +++++++++++-----------
 sys/ufs/ufs/ufs_quota.h  |   6 +++---
 sys/ufs/ufs/ufs_quota1.c |   6 +++---
 sys/ufs/ufs/ufs_quota2.c |   6 +++---
 6 files changed, 38 insertions(+), 38 deletions(-)

diffs (276 lines):

diff -r 5540f8ad9009 -r 95c9713f4159 sys/kern/vfs_quotactl.c
--- a/sys/kern/vfs_quotactl.c   Sun Jan 29 06:48:50 2012 +0000
+++ b/sys/kern/vfs_quotactl.c   Sun Jan 29 06:49:43 2012 +0000
@@ -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 @@
 }
 
 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 @@
 }
 
 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 @@
                        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 @@
                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 @@
                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 @@
        } 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) {
diff -r 5540f8ad9009 -r 95c9713f4159 sys/sys/quotactl.h
--- a/sys/sys/quotactl.h        Sun Jan 29 06:48:50 2012 +0000
+++ b/sys/sys/quotactl.h        Sun Jan 29 06:49:43 2012 +0000
@@ -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 @@
        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 {
                        const struct quotakey *qc_key;
                        const struct quotaval *qc_val;
-               } set;
+               } put;
        } u;
 };
 
diff -r 5540f8ad9009 -r 95c9713f4159 sys/ufs/ufs/ufs_quota.c
--- a/sys/ufs/ufs/ufs_quota.c   Sun Jan 29 06:48:50 2012 +0000
+++ b/sys/ufs/ufs/ufs_quota.c   Sun Jan 29 06:49:43 2012 +0000
@@ -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 @@
     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 @@
            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 @@
 }
 
 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 @@
        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 @@
                        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 ?");
diff -r 5540f8ad9009 -r 95c9713f4159 sys/ufs/ufs/ufs_quota.h
--- a/sys/ufs/ufs/ufs_quota.h   Sun Jan 29 06:48:50 2012 +0000
+++ b/sys/ufs/ufs/ufs_quota.h   Sun Jan 29 06:49:43 2012 +0000
@@ -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 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 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);
diff -r 5540f8ad9009 -r 95c9713f4159 sys/ufs/ufs/ufs_quota1.c
--- a/sys/ufs/ufs/ufs_quota1.c  Sun Jan 29 06:48:50 2012 +0000
+++ b/sys/ufs/ufs/ufs_quota1.c  Sun Jan 29 06:49:43 2012 +0000
@@ -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 @@
 }
 
 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;
diff -r 5540f8ad9009 -r 95c9713f4159 sys/ufs/ufs/ufs_quota2.c
--- a/sys/ufs/ufs/ufs_quota2.c  Sun Jan 29 06:48:50 2012 +0000
+++ b/sys/ufs/ufs/ufs_quota2.c  Sun Jan 29 06:49:43 2012 +0000
@@ -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 @@
 }
 
 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;



Home | Main Index | Thread Index | Old Index