Source-Changes-HG archive

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

[src/trunk]: src Revert the following changes:



details:   https://anonhg.NetBSD.org/src/rev/ea1d4a405964
branches:  trunk
changeset: 330197:ea1d4a405964
user:      dholland <dholland%NetBSD.org@localhost>
date:      Sat Jun 28 22:27:50 2014 +0000

description:
Revert the following changes:

   src/sys/sys/quotactl.h 1.37
   src/sys/compat/netbsd32/netbsd32.h 1.101
   src/sys/compat/netbsd32/netbsd32_netbsd.c 1.188, 1.189
   src/sys/kern/vfs_quotactl.c 1.39
   src/sys/kern/vfs_syscalls.c 1.483
   src/sys/ufs/lfs/ulfs_quota.c 1.11
   src/sys/ufs/ufs/ufs_quota.c 1.116
   src/lib/libquota/quota_kernel.c 1.5

and do them correctly.

If you're going to change the name of something, you need to change
the name of *all* the things with the same name, not just a handful,
and you should change it to something similar so it still matches the
rest of the system rather than just picking an arbitrarily different
name.

Hi, Joerg.

To wit, rename the quotactl "delete" operation to "del", because
"delete" is a reserved word in C++ and for some reason Joerg wants to
run internal interfaces used only by C code through his C++ compiler.
Do not rename it to "remove" instead, because this doesn't match
libquota or the rest of the usage throughout the system; and rename
all the related identifiers, not just the ones that blew the mind of
Joerg's C++ compiler.

Because this is not a user-facing API (the only userland consumer
sys/quotactl.h is libquota) it is sort of ok to make arbitrary
source-incompatible changes; however, by the same token it's completely
unnecessary. If it *were* a user-facing API that someone might have a
semi-rational reason to want to run a C++ compiler on, it would be
incorrect to change it at this point.

diffstat:

 lib/libquota/quota_kernel.c           |   8 ++++----
 sys/compat/netbsd32/netbsd32.h        |   4 ++--
 sys/compat/netbsd32/netbsd32_netbsd.c |   8 ++++----
 sys/kern/vfs_quotactl.c               |  10 +++++-----
 sys/kern/vfs_syscalls.c               |  12 ++++++------
 sys/sys/mount.h                       |   4 ++--
 sys/sys/quotactl.h                    |   6 +++---
 sys/ufs/lfs/ulfs_quota.c              |  18 +++++++++---------
 sys/ufs/lfs/ulfs_quota.h              |   4 ++--
 sys/ufs/lfs/ulfs_quota2.c             |   6 +++---
 sys/ufs/ufs/ufs_quota.c               |  18 +++++++++---------
 sys/ufs/ufs/ufs_quota.h               |   4 ++--
 sys/ufs/ufs/ufs_quota2.c              |   6 +++---
 13 files changed, 54 insertions(+), 54 deletions(-)

diffs (truncated from 426 to 300 lines):

diff -r a5acc8f44191 -r ea1d4a405964 lib/libquota/quota_kernel.c
--- a/lib/libquota/quota_kernel.c       Sat Jun 28 21:13:12 2014 +0000
+++ b/lib/libquota/quota_kernel.c       Sat Jun 28 22:27:50 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: quota_kernel.c,v 1.5 2014/06/12 21:39:45 joerg Exp $   */
+/*     $NetBSD: quota_kernel.c,v 1.6 2014/06/28 22:27:50 dholland Exp $        */
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -29,7 +29,7 @@
  */
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: quota_kernel.c,v 1.5 2014/06/12 21:39:45 joerg Exp $");
+__RCSID("$NetBSD: quota_kernel.c,v 1.6 2014/06/28 22:27:50 dholland Exp $");
 
 #include <stdlib.h>
 #include <err.h>
@@ -220,8 +220,8 @@
 {
        struct quotactl_args args;
 
-       args.qc_op = QUOTACTL_DELETE;
-       args.u.remove.qc_key = qk;
+       args.qc_op = QUOTACTL_DEL;
+       args.u.del.qc_key = qk;
        return __quotactl(qh->qh_mountpoint, &args);
 }
 
diff -r a5acc8f44191 -r ea1d4a405964 sys/compat/netbsd32/netbsd32.h
--- a/sys/compat/netbsd32/netbsd32.h    Sat Jun 28 21:13:12 2014 +0000
+++ b/sys/compat/netbsd32/netbsd32.h    Sat Jun 28 22:27:50 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: netbsd32.h,v 1.101 2014/06/13 10:37:02 joerg Exp $     */
+/*     $NetBSD: netbsd32.h,v 1.102 2014/06/28 22:27:50 dholland Exp $  */
 
 /*
  * Copyright (c) 1998, 2001, 2008 Matthew R. Green
@@ -300,7 +300,7 @@
                } put;
                struct {
                        netbsd32_pointer_t qc_key;
-               } remove;
+               } del;
                struct {
                        netbsd32_pointer_t qc_cursor;
                } cursoropen;
diff -r a5acc8f44191 -r ea1d4a405964 sys/compat/netbsd32/netbsd32_netbsd.c
--- a/sys/compat/netbsd32/netbsd32_netbsd.c     Sat Jun 28 21:13:12 2014 +0000
+++ b/sys/compat/netbsd32/netbsd32_netbsd.c     Sat Jun 28 22:27:50 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: netbsd32_netbsd.c,v 1.191 2014/06/28 11:39:15 maxv Exp $       */
+/*     $NetBSD: netbsd32_netbsd.c,v 1.192 2014/06/28 22:27:50 dholland Exp $   */
 
 /*
  * Copyright (c) 1998, 2001, 2008 Matthew R. Green
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_netbsd.c,v 1.191 2014/06/28 11:39:15 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_netbsd.c,v 1.192 2014/06/28 22:27:50 dholland Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_ddb.h"
@@ -1235,8 +1235,8 @@
                args.u.put.qc_key = NETBSD32PTR64(args32.u.put.qc_key);
                args.u.put.qc_val = NETBSD32PTR64(args32.u.put.qc_val);
                break;
-           case QUOTACTL_DELETE:
-               args.u.remove.qc_key = NETBSD32PTR64(args32.u.remove.qc_key);
+           case QUOTACTL_DEL:
+               args.u.del.qc_key = NETBSD32PTR64(args32.u.del.qc_key);
                break;
            case QUOTACTL_CURSOROPEN:
                args.u.cursoropen.qc_cursor =
diff -r a5acc8f44191 -r ea1d4a405964 sys/kern/vfs_quotactl.c
--- a/sys/kern/vfs_quotactl.c   Sat Jun 28 21:13:12 2014 +0000
+++ b/sys/kern/vfs_quotactl.c   Sat Jun 28 22:27:50 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: vfs_quotactl.c,v 1.39 2014/06/12 21:39:45 joerg Exp $  */
+/*     $NetBSD: vfs_quotactl.c,v 1.40 2014/06/28 22:27:50 dholland Exp $       */
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -29,7 +29,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vfs_quotactl.c,v 1.39 2014/06/12 21:39:45 joerg Exp $$");
+__KERNEL_RCSID(0, "$NetBSD: vfs_quotactl.c,v 1.40 2014/06/28 22:27:50 dholland Exp $$");
 
 #include <sys/mount.h>
 #include <sys/quotactl.h>
@@ -93,12 +93,12 @@
 }
 
 int
-vfs_quotactl_delete(struct mount *mp, const struct quotakey *key)
+vfs_quotactl_del(struct mount *mp, const struct quotakey *key)
 {
        struct quotactl_args args;
 
-       args.qc_op = QUOTACTL_DELETE;
-       args.u.remove.qc_key = key;
+       args.qc_op = QUOTACTL_DEL;
+       args.u.del.qc_key = key;
        return VFS_QUOTACTL(mp, &args);
 }
 
diff -r a5acc8f44191 -r ea1d4a405964 sys/kern/vfs_syscalls.c
--- a/sys/kern/vfs_syscalls.c   Sat Jun 28 21:13:12 2014 +0000
+++ b/sys/kern/vfs_syscalls.c   Sat Jun 28 22:27:50 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: vfs_syscalls.c,v 1.485 2014/06/26 01:46:03 christos Exp $      */
+/*     $NetBSD: vfs_syscalls.c,v 1.486 2014/06/28 22:27:50 dholland Exp $      */
 
 /*-
  * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@@ -70,7 +70,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vfs_syscalls.c,v 1.485 2014/06/26 01:46:03 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vfs_syscalls.c,v 1.486 2014/06/28 22:27:50 dholland Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_fileassoc.h"
@@ -764,7 +764,7 @@
 }
 
 static int
-do_sys_quotactl_delete(struct mount *mp, const struct quotakey *key_u)
+do_sys_quotactl_del(struct mount *mp, const struct quotakey *key_u)
 {
        struct quotakey key_k;
        int error;
@@ -774,7 +774,7 @@
                return error;
        }
 
-       return vfs_quotactl_delete(mp, &key_k);
+       return vfs_quotactl_del(mp, &key_k);
 }
 
 static int
@@ -1003,8 +1003,8 @@
                                args->u.put.qc_key,
                                args->u.put.qc_val);
                break;
-           case QUOTACTL_DELETE:
-               error = do_sys_quotactl_delete(mp, args->u.remove.qc_key);
+           case QUOTACTL_DEL:
+               error = do_sys_quotactl_del(mp, args->u.del.qc_key);
                break;
            case QUOTACTL_CURSOROPEN:
                error = do_sys_quotactl_cursoropen(mp,
diff -r a5acc8f44191 -r ea1d4a405964 sys/sys/mount.h
--- a/sys/sys/mount.h   Sat Jun 28 21:13:12 2014 +0000
+++ b/sys/sys/mount.h   Sat Jun 28 22:27:50 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mount.h,v 1.214 2014/05/24 16:34:03 christos Exp $     */
+/*     $NetBSD: mount.h,v 1.215 2014/06/28 22:27:50 dholland Exp $     */
 
 /*
  * Copyright (c) 1989, 1991, 1993
@@ -427,7 +427,7 @@
            struct quotaval *);
 int    vfs_quotactl_put(struct mount *, const struct quotakey *,
            const struct quotaval *);
-int    vfs_quotactl_delete(struct mount *, const struct quotakey *);
+int    vfs_quotactl_del(struct mount *, const struct quotakey *);
 int    vfs_quotactl_cursoropen(struct mount *, struct quotakcursor *);
 int    vfs_quotactl_cursorclose(struct mount *, struct quotakcursor *);
 int    vfs_quotactl_cursorskipidtype(struct mount *, struct quotakcursor *,
diff -r a5acc8f44191 -r ea1d4a405964 sys/sys/quotactl.h
--- a/sys/sys/quotactl.h        Sat Jun 28 21:13:12 2014 +0000
+++ b/sys/sys/quotactl.h        Sat Jun 28 22:27:50 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: quotactl.h,v 1.37 2014/06/12 21:39:45 joerg Exp $      */
+/*     $NetBSD: quotactl.h,v 1.38 2014/06/28 22:27:50 dholland Exp $   */
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -83,7 +83,7 @@
 #define QUOTACTL_OBJTYPESTAT   2
 #define QUOTACTL_GET           3
 #define QUOTACTL_PUT           4
-#define QUOTACTL_DELETE                5
+#define QUOTACTL_DEL           5
 #define QUOTACTL_CURSOROPEN    6
 #define QUOTACTL_CURSORCLOSE   7
 #define QUOTACTL_CURSORSKIPIDTYPE 8
@@ -118,7 +118,7 @@
                } put;
                struct {
                        const struct quotakey *qc_key;
-               } remove;
+               } del;
                struct {
                        struct quotakcursor *qc_cursor;
                } cursoropen;
diff -r a5acc8f44191 -r ea1d4a405964 sys/ufs/lfs/ulfs_quota.c
--- a/sys/ufs/lfs/ulfs_quota.c  Sat Jun 28 21:13:12 2014 +0000
+++ b/sys/ufs/lfs/ulfs_quota.c  Sat Jun 28 22:27:50 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ulfs_quota.c,v 1.11 2014/06/12 21:39:45 joerg Exp $    */
+/*     $NetBSD: ulfs_quota.c,v 1.12 2014/06/28 22:27:51 dholland Exp $ */
 /*  from NetBSD: ufs_quota.c,v 1.115 2013/11/16 17:04:53 dholland Exp  */
 
 /*
@@ -36,7 +36,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ulfs_quota.c,v 1.11 2014/06/12 21:39:45 joerg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ulfs_quota.c,v 1.12 2014/06/28 22:27:51 dholland Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_quota.h"
@@ -84,7 +84,7 @@
     struct quotactl_args *args);
 static int quota_handle_cmd_cursorget(struct mount *, struct lwp *,
     struct quotactl_args *args);
-static int quota_handle_cmd_delete(struct mount *, struct lwp *,
+static int quota_handle_cmd_del(struct mount *, struct lwp *,
     struct quotactl_args *args);
 static int quota_handle_cmd_quotaon(struct mount *, struct lwp *, 
     struct quotactl_args *args);
@@ -199,8 +199,8 @@
            case QUOTACTL_CURSORGET:
                error = quota_handle_cmd_cursorget(mp, l, args);
                break;
-           case QUOTACTL_DELETE:
-               error = quota_handle_cmd_delete(mp, l, args);
+           case QUOTACTL_DEL:
+               error = quota_handle_cmd_del(mp, l, args);
                break;
            case QUOTACTL_CURSOROPEN:
                error = quota_handle_cmd_cursoropen(mp, l, args);
@@ -433,7 +433,7 @@
 }
 
 static int 
-quota_handle_cmd_delete(struct mount *mp, struct lwp *l, 
+quota_handle_cmd_del(struct mount *mp, struct lwp *l, 
     struct quotactl_args *args)
 {
        struct ulfsmount *ump = VFSTOULFS(mp);
@@ -442,8 +442,8 @@
        id_t kauth_id;
        int error;
 
-       KASSERT(args->qc_op == QUOTACTL_DELETE);
-       qk = args->u.remove.qc_key;
+       KASSERT(args->qc_op == QUOTACTL_DEL);
+       qk = args->u.del.qc_key;
 
        kauth_id = qk->qk_id;
        if (kauth_id == QUOTA_DEFAULTID) {
@@ -462,7 +462,7 @@
                        goto err;
 #ifdef LFS_QUOTA2
                if (fs->um_flags & ULFS_QUOTA2) {
-                       error = lfsquota2_handle_cmd_delete(ump, qk);
+                       error = lfsquota2_handle_cmd_del(ump, qk);
                } else
 #endif
                        panic("quota_handle_cmd_get: no support ?");
diff -r a5acc8f44191 -r ea1d4a405964 sys/ufs/lfs/ulfs_quota.h
--- a/sys/ufs/lfs/ulfs_quota.h  Sat Jun 28 21:13:12 2014 +0000
+++ b/sys/ufs/lfs/ulfs_quota.h  Sat Jun 28 22:27:50 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ulfs_quota.h,v 1.4 2013/06/06 00:49:28 dholland Exp $  */
+/*     $NetBSD: ulfs_quota.h,v 1.5 2014/06/28 22:27:51 dholland Exp $  */
 /*  from NetBSD: ufs_quota.h,v 1.21 2012/02/18 06:13:23 matt Exp  */
 
 /*
@@ -131,7 +131,7 @@
     struct quotaval *);
 int lfsquota2_handle_cmd_put(struct ulfsmount *, const struct quotakey *,
     const struct quotaval *);
-int lfsquota2_handle_cmd_delete(struct ulfsmount *, const struct quotakey *);
+int lfsquota2_handle_cmd_del(struct ulfsmount *, const struct quotakey *);
 int lfsquota2_handle_cmd_cursorget(struct ulfsmount *, struct quotakcursor *,
     struct quotakey *, struct quotaval *, unsigned, unsigned *);
 int lfsquota2_handle_cmd_cursoropen(struct ulfsmount *, struct quotakcursor *);
diff -r a5acc8f44191 -r ea1d4a405964 sys/ufs/lfs/ulfs_quota2.c
--- a/sys/ufs/lfs/ulfs_quota2.c Sat Jun 28 21:13:12 2014 +0000
+++ b/sys/ufs/lfs/ulfs_quota2.c Sat Jun 28 22:27:50 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ulfs_quota2.c,v 1.15 2013/10/18 19:45:40 christos Exp $        */
+/*     $NetBSD: ulfs_quota2.c,v 1.16 2014/06/28 22:27:51 dholland Exp $        */
 /*  from NetBSD: ufs_quota2.c,v 1.35 2012/09/27 07:47:56 bouyer Exp  */
 /*  from NetBSD: ffs_quota2.c,v 1.4 2011/06/12 03:36:00 rmind Exp  */
 
@@ -29,7 +29,7 @@
   */
 
 #include <sys/cdefs.h>



Home | Main Index | Thread Index | Old Index