Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src Quota-related docs fixes:
details: https://anonhg.NetBSD.org/src/rev/c7b44e8a92cb
branches: trunk
changeset: 773679:c7b44e8a92cb
user: dholland <dholland%NetBSD.org@localhost>
date: Mon Feb 13 01:24:00 2012 +0000
description:
Quota-related docs fixes:
- Remove old quotactl(2); replace with new __quotactl(2).
- Document quota_getrestrictions(3), the semantic restriction codes,
and quota_quotaon/off(3).
- Update VFS_QUOTACTL(9), which was still describing the pre-proplib API.
Approved by releng for the freeze.
diffstat:
distrib/sets/lists/comp/mi | 20 ++-
lib/libc/sys/Makefile.inc | 4 +-
lib/libc/sys/__quotactl.2 | 357 +++++++++++++++++++++++++++++++++++++++++++++
lib/libc/sys/quotactl.2 | 223 ----------------------------
lib/libquota/Makefile | 5 +-
lib/libquota/libquota.3 | 75 +++++++++-
share/man/man9/vfsops.9 | 25 +-
7 files changed, 465 insertions(+), 244 deletions(-)
diffs (truncated from 920 to 300 lines):
diff -r d48cd20d9a1e -r c7b44e8a92cb distrib/sets/lists/comp/mi
--- a/distrib/sets/lists/comp/mi Mon Feb 13 01:07:37 2012 +0000
+++ b/distrib/sets/lists/comp/mi Mon Feb 13 01:24:00 2012 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.1733 2012/02/11 23:31:22 martin Exp $
+# $NetBSD: mi,v 1.1734 2012/02/13 01:24:01 dholland Exp $
#
# Note: don't delete entries from here - mark them as "obsolete" instead.
#
@@ -4655,6 +4655,7 @@
./usr/share/man/cat1/yacc.0 comp-c-catman .cat
./usr/share/man/cat2/_Exit.0 comp-c-catman .cat
./usr/share/man/cat2/__clone.0 comp-c-catman .cat
+./usr/share/man/cat2/__quotactl.0 comp-c-catman .cat
./usr/share/man/cat2/__syscall.0 comp-c-catman .cat
./usr/share/man/cat2/_exit.0 comp-c-catman .cat
./usr/share/man/cat2/_lwp_continue.0 comp-c-catman .cat
@@ -4838,7 +4839,7 @@
./usr/share/man/cat2/ptrace.0 comp-c-catman .cat
./usr/share/man/cat2/pwrite.0 comp-c-catman .cat
./usr/share/man/cat2/pwritev.0 comp-c-catman .cat
-./usr/share/man/cat2/quotactl.0 comp-c-catman .cat
+./usr/share/man/cat2/quotactl.0 comp-obsolete obsolete
./usr/share/man/cat2/rasctl.0 comp-c-catman .cat
./usr/share/man/cat2/read.0 comp-c-catman .cat
./usr/share/man/cat2/readlink.0 comp-c-catman .cat
@@ -8549,12 +8550,15 @@
./usr/share/man/cat3/quota_getmountpoint.0 comp-c-catman .cat
./usr/share/man/cat3/quota_getnumidtypes.0 comp-c-catman .cat
./usr/share/man/cat3/quota_getnumobjtypes.0 comp-c-catman .cat
+./usr/share/man/cat3/quota_getrestrictions.0 comp-c-catman .cat
./usr/share/man/cat3/quota_idtype_getname.0 comp-c-catman .cat
./usr/share/man/cat3/quota_objtype_getname.0 comp-c-catman .cat
./usr/share/man/cat3/quota_objtype_isbytes.0 comp-c-catman .cat
./usr/share/man/cat3/quota_open.0 comp-c-catman .cat
./usr/share/man/cat3/quota_opencursor.0 comp-c-catman .cat
./usr/share/man/cat3/quota_put.0 comp-c-catman .cat
+./usr/share/man/cat3/quota_quotaoff.0 comp-c-catman .cat
+./usr/share/man/cat3/quota_quotaon.0 comp-c-catman .cat
./usr/share/man/cat3/quotacursor_atend.0 comp-c-catman .cat
./usr/share/man/cat3/quotacursor_close.0 comp-c-catman .cat
./usr/share/man/cat3/quotacursor_get.0 comp-c-catman .cat
@@ -11024,6 +11028,7 @@
./usr/share/man/html1/yacc.html comp-c-htmlman html
./usr/share/man/html2/_Exit.html comp-c-htmlman html
./usr/share/man/html2/__clone.html comp-c-htmlman html
+./usr/share/man/html2/__quotactl.html comp-c-htmlman html
./usr/share/man/html2/__syscall.html comp-c-htmlman html
./usr/share/man/html2/_exit.html comp-c-htmlman html
./usr/share/man/html2/_lwp_continue.html comp-c-htmlman html
@@ -11199,7 +11204,7 @@
./usr/share/man/html2/ptrace.html comp-c-htmlman html
./usr/share/man/html2/pwrite.html comp-c-htmlman html
./usr/share/man/html2/pwritev.html comp-c-htmlman html
-./usr/share/man/html2/quotactl.html comp-c-htmlman html
+./usr/share/man/html2/quotactl.html comp-obsolete obsolete
./usr/share/man/html2/rasctl.html comp-c-htmlman html
./usr/share/man/html2/read.html comp-c-htmlman html
./usr/share/man/html2/readlink.html comp-c-htmlman html
@@ -14801,12 +14806,15 @@
./usr/share/man/html3/quota_getmountpoint.html comp-c-htmlman html
./usr/share/man/html3/quota_getnumidtypes.html comp-c-htmlman html
./usr/share/man/html3/quota_getnumobjtypes.html comp-c-htmlman html
+./usr/share/man/html3/quota_getrestrictions.html comp-c-htmlman html
./usr/share/man/html3/quota_idtype_getname.html comp-c-htmlman html
./usr/share/man/html3/quota_objtype_getname.html comp-c-htmlman html
./usr/share/man/html3/quota_objtype_isbytes.html comp-c-htmlman html
./usr/share/man/html3/quota_open.html comp-c-htmlman html
./usr/share/man/html3/quota_opencursor.html comp-c-htmlman html
./usr/share/man/html3/quota_put.html comp-c-htmlman html
+./usr/share/man/html3/quota_quotaoff.html comp-c-htmlman html
+./usr/share/man/html3/quota_quotaon.html comp-c-htmlman html
./usr/share/man/html3/quotacursor_atend.html comp-c-htmlman html
./usr/share/man/html3/quotacursor_close.html comp-c-htmlman html
./usr/share/man/html3/quotacursor_get.html comp-c-htmlman html
@@ -17159,6 +17167,7 @@
./usr/share/man/man1/yacc.1 comp-c-man .man
./usr/share/man/man2/_Exit.2 comp-c-man .man
./usr/share/man/man2/__clone.2 comp-c-man .man
+./usr/share/man/man2/__quotactl.2 comp-c-man .man
./usr/share/man/man2/__syscall.2 comp-c-man .man
./usr/share/man/man2/_exit.2 comp-c-man .man
./usr/share/man/man2/_lwp_continue.2 comp-c-man .man
@@ -17341,7 +17350,7 @@
./usr/share/man/man2/ptrace.2 comp-c-man .man
./usr/share/man/man2/pwrite.2 comp-c-man .man
./usr/share/man/man2/pwritev.2 comp-c-man .man
-./usr/share/man/man2/quotactl.2 comp-c-man .man
+./usr/share/man/man2/quotactl.2 comp-obsolete obsolete
./usr/share/man/man2/rasctl.2 comp-c-man .man
./usr/share/man/man2/read.2 comp-c-man .man
./usr/share/man/man2/readlink.2 comp-c-man .man
@@ -21051,12 +21060,15 @@
./usr/share/man/man3/quota_getmountpoint.3 comp-c-man .man
./usr/share/man/man3/quota_getnumidtypes.3 comp-c-man .man
./usr/share/man/man3/quota_getnumobjtypes.3 comp-c-man .man
+./usr/share/man/man3/quota_getrestrictions.3 comp-c-man .man
./usr/share/man/man3/quota_idtype_getname.3 comp-c-man .man
./usr/share/man/man3/quota_objtype_getname.3 comp-c-man .man
./usr/share/man/man3/quota_objtype_isbytes.3 comp-c-man .man
./usr/share/man/man3/quota_open.3 comp-c-man .man
./usr/share/man/man3/quota_opencursor.3 comp-c-man .man
./usr/share/man/man3/quota_put.3 comp-c-man .man
+./usr/share/man/man3/quota_quotaoff.3 comp-c-man .man
+./usr/share/man/man3/quota_quotaon.3 comp-c-man .man
./usr/share/man/man3/quotacursor_atend.3 comp-c-man .man
./usr/share/man/man3/quotacursor_close.3 comp-c-man .man
./usr/share/man/man3/quotacursor_get.3 comp-c-man .man
diff -r d48cd20d9a1e -r c7b44e8a92cb lib/libc/sys/Makefile.inc
--- a/lib/libc/sys/Makefile.inc Mon Feb 13 01:07:37 2012 +0000
+++ b/lib/libc/sys/Makefile.inc Mon Feb 13 01:24:00 2012 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.inc,v 1.211 2012/02/11 23:31:24 martin Exp $
+# $NetBSD: Makefile.inc,v 1.212 2012/02/13 01:24:03 dholland Exp $
# @(#)Makefile.inc 8.3 (Berkeley) 10/24/94
# sys sources
@@ -231,7 +231,7 @@
mount.2 \
mprotect.2 mremap.2 msgctl.2 msgget.2 msgrcv.2 msgsnd.2 msync.2 \
munmap.2 nanosleep.2 nfssvc.2 ntp_adjtime.2 open.2 pathconf.2 pipe.2 \
- pmc_control.2 poll.2 posix_fadvise.2 profil.2 ptrace.2 quotactl.2 \
+ pmc_control.2 poll.2 posix_fadvise.2 profil.2 ptrace.2 __quotactl.2 \
rasctl.2 read.2 readlink.2 \
reboot.2 recv.2 rename.2 revoke.2 rmdir.2 \
select.2 semctl.2 \
diff -r d48cd20d9a1e -r c7b44e8a92cb lib/libc/sys/__quotactl.2
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/lib/libc/sys/__quotactl.2 Mon Feb 13 01:24:00 2012 +0000
@@ -0,0 +1,357 @@
+.\" $NetBSD: __quotactl.2,v 1.1 2012/02/13 01:24:03 dholland Exp $
+.\"
+.\" Copyright (c) 1983, 1990, 1991, 1993
+.\" The Regents of the University of California. All rights reserved.
+.\"
+.\" This code is derived from software contributed to Berkeley by
+.\" Robert Elz at The University of Melbourne.
+.\"
+.\" 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.
+.\" 3. Neither the name of the University nor the names of its contributors
+.\" may be used to endorse or promote products derived from this software
+.\" without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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.
+.\"
+.\" @(#)quotactl.2 8.2 (Berkeley) 3/10/95
+.\"
+.Dd February 11, 2012
+.Dt __QUOTACTL 2
+.Os
+.Sh NAME
+.Nm __quotactl
+.Nd manipulate file system quotas
+.Sh LIBRARY
+.Lb libc
+.Sh SYNOPSIS
+.In sys/quota.h
+.In sys/quotactl.h
+.Ft int
+.Fn __quotactl "const char *path" "struct quotactl_args *args"
+.Sh DESCRIPTION
+The
+.Fn __quotactl
+call manipulates file system quotas.
+This is an internal interface and is documented for reference purposes
+only.
+All application and utility code should use the
+.Xr libquota 3
+interface.
+.Pp
+The
+.Fn __quotactl
+function performs one of several quota-related operations on the file
+system named by
+.Fa path .
+The operation and arguments to that operation are passed in the
+.Fa args
+argument.
+The operation is stored in the
+.Fa qc_op
+member of
+.Fa args .
+The arguments are placed in a union such that the first and second
+arguments of the operation
+.Dv QUOTACTL_EXAMPLE
+are found as the members
+.Fa u.example.qc_arg1
+and
+.Fa u.example.qc_arg2 .
+The descriptions below will refer to the operations as functions of
+the form
+.Fn QUOTACTL_EXAMPLE "int arg1" "int arg2"
+and elide the encoding of these arguments into the
+.Fa args
+structure.
+Explicit mention of the
+.Fa path
+argument is also omitted.
+.Pp
+There are fourteen quota control operations.
+These are:
+.Bl -tag -width abcdef
+.\" ************************************************************
+.It Fn QUOTACTL_STAT "struct quotastat *info"
+Information about the quota implementation on the selected volume is
+returned in
+.Fa info .
+The
+.Dv quotastat
+structure contains the following members:
+.Bl -tag -width qs_restrictions
+.It qs_implname
+A human-readable string describing the underlying implementation of
+quotas.
+This is suitable for display to users
+.Pq and system administrators
+but should not be interpreted by software.
+See
+.Xr quota_getimplname 3 .
+.It qs_numidtypes
+The number of ID types supported by this implementation.
+See
+.Xr quota_getnumidtypes 3 .
+.It qs_numobjtypes
+The number of object types supported by this implementation.
+See
+.Xr quota_getnumobjtypes 3 .
+.It qs_restrictions
+Flags identifying specific semantic limitations of the implementation.
+See
+.Xr quota_getrestrictions 3 .
+.El
+.\" ************************************************************
+.It Fn QUOTACTL_IDTYPESTAT "int idtype" "struct quotaidtypestat *info"
+Information about a particular ID type on the selected volume is
+returned in
+.Fa info .
+The
+.Dv quotaidtypestat
+structure contains the following members:
+.Bl -tag -width qs_restrictions
+.It qis_name
+The name of the ID type.
+See
+.Xr quota_idtype_getname 3 .
+.El
+.\" ************************************************************
+.It Fn QUOTACTL_OBJYPESTAT "int objtype" "struct quotaobjtypestat *info"
+Information about a particular object type on the selected volume is
+returned in
+.Fa info .
+The
+.Dv quotaobjtypestat
+structure contains the following members:
+.Bl -tag -width qs_restrictions
+.It qos_name
+The name of the object type.
+See
+.Xr quota_objtype_getname 3 .
+.It qos_isbytes
+A flag that is nonzero if the object type is something measured in
+bytes.
+See
+.Xr quota_objtype_isbytes 3 .
+.El
+.\" ************************************************************
+.It Fn QUOTACTL_GET "const struct quotakey *key" "struct quotaval *val"
+Return in
+.Fa val
+the quota information selected by
+.Fa key .
+See
+.Xr quota_get 3 .
+.\" ************************************************************
+.It Fn QUOTACTL_PUT "const struct quotakey *key" "const struct quotaval *val"
+The quota information selected by
+.Fa key
+is updated to the values provided in
+.Fa val .
+Note that the current usage information, which is file system
+meta-data, cannot be updated via this interface.
+If the usage information is incorrect a tool such as
+.Xr fsck 8
Home |
Main Index |
Thread Index |
Old Index