Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libquota Add stub entry points of the entire new quota i...
details: https://anonhg.NetBSD.org/src/rev/84038bcfc9ef
branches: trunk
changeset: 772594:84038bcfc9ef
user: dholland <dholland%NetBSD.org@localhost>
date: Mon Jan 09 15:22:38 2012 +0000
description:
Add stub entry points of the entire new quota interface. These fail or
do nothing for the time being; however, putting them all in up front
avoids the need to do multiple bumps of the libquota.so version.
diffstat:
lib/libquota/Makefile | 7 ++-
lib/libquota/quota_cursor.c | 93 +++++++++++++++++++++++++++++++++++++++++++++
lib/libquota/quota_delete.c | 44 +++++++++++++++++++++
lib/libquota/quota_get.c | 50 ++++++++++++++++++++++++
lib/libquota/quota_open.c | 65 +++++++++++++++++++++++++++++++
lib/libquota/quota_put.c | 45 +++++++++++++++++++++
lib/libquota/quota_schema.c | 82 +++++++++++++++++++++++++++++++++++++++
7 files changed, 385 insertions(+), 1 deletions(-)
diffs (truncated from 422 to 300 lines):
diff -r 814ad78b05dc -r 84038bcfc9ef lib/libquota/Makefile
--- a/lib/libquota/Makefile Mon Jan 09 15:19:44 2012 +0000
+++ b/lib/libquota/Makefile Mon Jan 09 15:22:38 2012 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.1 2011/03/24 17:05:43 bouyer Exp $
+# $NetBSD: Makefile,v 1.2 2012/01/09 15:22:38 dholland Exp $
# @(#)Makefile 8.1 (Berkeley) 6/4/93
.include <bsd.own.mk>
@@ -14,4 +14,9 @@
SRCS+= getfsquota.c getnfsquota.c getufsquota.c
MAN=
+SRCS+= quota_open.c
+SRCS+= quota_schema.c
+SRCS+= quota_get.c quota_put.c quota_delete.c
+SRCS+= quota_cursor.c
+
.include <bsd.lib.mk>
diff -r 814ad78b05dc -r 84038bcfc9ef lib/libquota/quota_cursor.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/lib/libquota/quota_cursor.c Mon Jan 09 15:22:38 2012 +0000
@@ -0,0 +1,93 @@
+/* $NetBSD: quota_cursor.c,v 1.1 2012/01/09 15:22:38 dholland Exp $ */
+/*-
+ * Copyright (c) 2011 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by David A. Holland.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include <sys/cdefs.h>
+__RCSID("$NetBSD: quota_cursor.c,v 1.1 2012/01/09 15:22:38 dholland Exp $");
+
+#include <stdlib.h>
+#include <errno.h>
+
+#include <quota.h>
+
+/* ARGSUSED */
+struct quotacursor *
+quota_opencursor(struct quotahandle *qh)
+{
+ errno = ENOSYS;
+ return NULL;
+}
+
+/* ARGSUSED */
+void
+quotacursor_close(struct quotacursor *qc)
+{
+}
+
+/* ARGSUSED */
+int
+quotacursor_skipidtype(struct quotacursor *qc, unsigned idtype)
+{
+ errno = ENOSYS;
+ return -1;
+}
+
+/* ARGSUSED */
+int
+quotacursor_get(struct quotacursor *qc,
+ struct quotakey *qk_ret, struct quotaval *qv_ret)
+{
+ errno = ENOSYS;
+ return -1;
+}
+
+/* ARGSUSED */
+int
+quotacursor_getn(struct quotacursor *qc,
+ struct quotakey *keys, struct quotaval *vals,
+ unsigned maxnum)
+{
+ errno = ENOSYS;
+ return -1;
+}
+
+/* ARGSUSED */
+int
+quotacursor_atend(struct quotacursor *qc)
+{
+ return 0;
+}
+
+/* ARGSUSED */
+int
+quotacursor_rewind(struct quotacursor *qc)
+{
+ errno = ENOSYS;
+ return -1;
+}
diff -r 814ad78b05dc -r 84038bcfc9ef lib/libquota/quota_delete.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/lib/libquota/quota_delete.c Mon Jan 09 15:22:38 2012 +0000
@@ -0,0 +1,44 @@
+/* $NetBSD: quota_delete.c,v 1.1 2012/01/09 15:22:38 dholland Exp $ */
+/*-
+ * Copyright (c) 2011 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by David A. Holland.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include <sys/cdefs.h>
+__RCSID("$NetBSD: quota_delete.c,v 1.1 2012/01/09 15:22:38 dholland Exp $");
+
+#include <errno.h>
+
+#include <quota.h>
+
+/* ARGSUSED */
+int
+quota_delete(struct quotahandle *qh, const struct quotakey *qk)
+{
+ errno = ENOSYS;
+ return -1;
+}
diff -r 814ad78b05dc -r 84038bcfc9ef lib/libquota/quota_get.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/lib/libquota/quota_get.c Mon Jan 09 15:22:38 2012 +0000
@@ -0,0 +1,50 @@
+/* $NetBSD: quota_get.c,v 1.1 2012/01/09 15:22:38 dholland Exp $ */
+/*-
+ * Copyright (c) 2011 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by David A. Holland.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include <sys/cdefs.h>
+__RCSID("$NetBSD: quota_get.c,v 1.1 2012/01/09 15:22:38 dholland Exp $");
+
+#include <errno.h>
+
+#include <quota.h>
+
+/* ARGSUSED */
+void
+quotaval_clear(struct quotaval *qv)
+{
+}
+
+/* ARGSUSED */
+int
+quota_get(struct quotahandle *qh, const struct quotakey *qk, struct quotaval *qv)
+{
+ errno = ENOSYS;
+ return -1;
+}
diff -r 814ad78b05dc -r 84038bcfc9ef lib/libquota/quota_open.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/lib/libquota/quota_open.c Mon Jan 09 15:22:38 2012 +0000
@@ -0,0 +1,65 @@
+/* $NetBSD: quota_open.c,v 1.1 2012/01/09 15:22:38 dholland Exp $ */
+/*-
+ * Copyright (c) 2011 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by David A. Holland.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include <sys/cdefs.h>
+__RCSID("$NetBSD: quota_open.c,v 1.1 2012/01/09 15:22:38 dholland Exp $");
+
+#include <string.h>
+#include <errno.h>
+
+#include <quota.h>
+
+/* ARGSUSED */
+struct quotahandle *
+quota_open(const char *path)
+{
+ errno = ENOSYS;
+ return NULL;
+}
+
+const char *
+quota_getmountpoint(struct quotahandle *qh)
+{
+ errno = ENOSYS;
+ return NULL;
+}
+
+const char *
+quota_getmountdevice(struct quotahandle *qh)
+{
+ errno = ENOSYS;
+ return NULL;
+}
+
+/* ARGSUSED */
+void
+quota_close(struct quotahandle *qh)
+{
+}
diff -r 814ad78b05dc -r 84038bcfc9ef lib/libquota/quota_put.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/lib/libquota/quota_put.c Mon Jan 09 15:22:38 2012 +0000
@@ -0,0 +1,45 @@
+/* $NetBSD: quota_put.c,v 1.1 2012/01/09 15:22:38 dholland Exp $ */
+/*-
+ * Copyright (c) 2011 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by David A. Holland.
+ *
+ * Redistribution and use in source and binary forms, with or without
Home |
Main Index |
Thread Index |
Old Index