summaryrefslogtreecommitdiff
path: root/common/lib/libprop/prop_array_util.3
diff options
context:
space:
mode:
authorbouyer <bouyer@NetBSD.org>2011-03-24 17:05:39 +0000
committerbouyer <bouyer@NetBSD.org>2011-03-24 17:05:39 +0000
commitbec3b862a24f728dcc352d5bee219d2a9a74842a (patch)
treeec601514d3c4a243a9f9b40ab34ee88c29fdffe9 /common/lib/libprop/prop_array_util.3
parent5894611889544f3131b247250e431f8664144416 (diff)
Add a new libquota library, which contains some blocks to build and/or
parse quota plists; as well as a getfsquota() function to retrieve quotas for a single id from a single filesystem (whatever filesystem this is: a local quota-enabled fs or NFS). This is build on functions getufsquota() (for local filesystems with UFS-like quotas) and getnfsquota(); which are also available to userland programs. move functions from quota2_subr.c to libquota or libprop as appropriate, and ajust in-tree quota tools. move some declarations from kernel headers to either sys/quota.h or quota/quota.h as appropriate. ufs/ufs/quota.h still installed because it's needed by other installed ufs headers. ufs/ufs/quota1.h still installed as a quick&dirty way to get a code using the old quotactl() to compile (just include ufs/ufs/quota1.h instead of ufs/ufs/quota.h - old code won't compile without this change and this is on purpose). Discussed on tech-kern@ and tech-net@ (long thread, but not much about libquota itself ...)
Diffstat (limited to 'common/lib/libprop/prop_array_util.3')
-rw-r--r--common/lib/libprop/prop_array_util.315
1 files changed, 12 insertions, 3 deletions
diff --git a/common/lib/libprop/prop_array_util.3 b/common/lib/libprop/prop_array_util.3
index 480489e67fc..61e4c56f2b9 100644
--- a/common/lib/libprop/prop_array_util.3
+++ b/common/lib/libprop/prop_array_util.3
@@ -1,4 +1,4 @@
-.\" $NetBSD: prop_array_util.3,v 1.4 2011/01/20 10:42:19 wiz Exp $
+.\" $NetBSD: prop_array_util.3,v 1.5 2011/03/24 17:05:39 bouyer Exp $
.\"
.\" Copyright (c) 2006 The NetBSD Foundation, Inc.
.\" All rights reserved.
@@ -27,7 +27,7 @@
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
.\" POSSIBILITY OF SUCH DAMAGE.
.\"
-.Dd June 2, 2008
+.Dd March 12, 2011
.Dt PROP_ARRAY_UTIL 3
.Os
.Sh NAME
@@ -61,7 +61,8 @@
.Nm prop_array_get_cstring ,
.Nm prop_array_set_cstring ,
.Nm prop_array_get_cstring_nocopy ,
-.Nm prop_array_set_cstring_nocopy
+.Nm prop_array_set_cstring_nocopy,
+.Nm prop_array_add_and_rel
.Sh LIBRARY
.Lb libprop
.Sh SYNOPSIS
@@ -163,6 +164,9 @@
.Ft bool
.Fn prop_array_set_cstring_nocopy "prop_array_t dict" \
"unsigned int indx" "const char *strp"
+.Ft bool
+.Fn prop_array_add_and_rel "prop_array_t dict" \
+ "prop_object_t obj"
.Sh DESCRIPTION
The
.Nm prop_array_util
@@ -190,6 +194,11 @@ functions do not copy the string that is set or returned.
See
.Xr prop_string 3
for more information.
+.Pp
+The
+.Fn prop_array_add_and_rel
+function adds the object to the end of the array and release it.
+The object is also released on failure.
.Sh RETURN VALUES
The
.Nm prop_array_util