Commit Graph

56 Commits

Author SHA1 Message Date
wiz
06b206851a Bump date for previous. 2012-05-12 21:42:38 +00:00
dholland
faaf15b7e2 Remove traces of -D flag, which no longer does anything. 2012-05-12 19:47:26 +00:00
wiz
1c18e63ac7 Bump date for previous. 2012-02-13 13:37:45 +00:00
dholland
aa498c6e1e Add quotadump(8), which is a link to repquota, and quotarestore(8),
which is new. Includes man page updates. Approved by releng for
freeze.
2012-02-13 01:35:06 +00:00
dholland
430a952206 Remove unneeded #include. 2012-02-05 14:14:44 +00:00
dholland
a577f74f5b libquota no longer requires libprop. Also remove some other no-longer-used
.PATH'd-in bits from repquota.
2012-02-01 17:53:01 +00:00
dholland
fb3f26c0cf Simplify elaborate calls to quota_check_limit(). 2012-02-01 17:48:10 +00:00
wiz
243adb95c2 Bump date for previous. 2012-02-01 09:30:01 +00:00
dholland
f9735fd481 Reimplement repquota -x to print in tabular form instead of XML. 2012-02-01 05:12:45 +00:00
dholland
60d82a4ef2 Fix unsightly botch in repquota's heading output. 2012-01-29 07:23:52 +00:00
dholland
b483fd9867 More cleanup of repquota. For now we're going to compile in the number
of possible ID and object types, as making those numbers non-constant
requires a major rework.

This removes all dependence on quotaprop.h except for the code for
dumping the quota information as a blob of quota RPC XML packets. That
needs to go too and be replaced with a tabular dump format, but one
thing at a time.
2012-01-25 01:24:53 +00:00
dholland
914924d7f5 Remove the explicit fallback direct file access code from repquota and
rely on libquota.
2012-01-09 15:42:37 +00:00
dholland
ded45e2c70 Make repquota use the libquota cursor interface. 2012-01-09 15:40:47 +00:00
dholland
b5dd1f89ec More work on repquota.
- open quotahandles, pass them around, use them for metadata
   - split up some of the proplib code
2012-01-09 15:38:59 +00:00
dholland
62c8373cdf Begin cleaning up repquota. 2012-01-09 15:38:20 +00:00
dholland
51d1d7e7c4 Rename struct ufs_quota_entry -> struct quotaval. 2011-11-25 16:55:05 +00:00
jym
afca4e3b49 Fix an implementation inconsistency with the prop_*_send_syscall() and
prop_*_recv_syscall() functions from proplib(3). They now share the
same logic as the one from prop_*_send_ioctl() functions:
- returns an int
- 0 indicates "no error", otherwise returns the error number (and
set errno)

Many consumers of the prop_*_{ioctl, syscall} expect errno to be set
on error and use err() to display the error message. As such, ensures that
errno gets set before returning from these functions.

prop_*_send_syscall() functions returned a boolean, and now return an int.
Fix all call sites to use the new paradigm (only quota2 is affected in src).

As the prop_*_{send,recv}_syscall() API appeared in -current and is only
used by the recent quota2 code, I am not bumping the lib. The API change
only affects the prop_*_send_syscall() function (recv_syscall()s were
already used correctly), so ensure you are not mixing "old" -current
quota binaries with a new proplib(3) (or the other way around). This
change will be announced via a HEADS-UP and UPDATING.

Does not affect the kernel part of proplib.

Document the correct API in prop_array(3) and prop_dictionary(3).

Thanks to Francois Tigeot for noticing the API inconsistency and
reporting it on tech-kern@.

ok bouyer@.
2011-09-30 22:08:18 +00:00
bouyer
e5fa3d981b Make sure to not report quotas for a class if we didn't get valid datas
from kernel.
2011-03-27 17:15:17 +00:00
bouyer
d9210c2405 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 ...)
2011-03-24 17:05:39 +00:00
bouyer
5fd63a9777 Don't use the same char b0[] for BLOCK and FILE timeprt(), they would
override each others.
2011-03-07 11:56:31 +00:00
christos
6a453cd117 more code deduplication 2011-03-06 23:25:42 +00:00
christos
3f339fb13b - KNF
- merge code
- fix error printing
- don't use static buffers
2011-03-06 22:33:55 +00:00
wiz
54f3ceb271 Sort options, split "file system". 2011-03-06 17:36:32 +00:00
bouyer
063f96f3c2 merge the bouyer-quota2 branch. This adds a new on-disk format
to store disk quota usage and limits, integrated with ffs
metadata. Usage is checked by fsck_ffs (no more quotacheck)
and is covered by the WAPBL journal. Enabled with kernel
option QUOTA2 (added where QUOTA was enabled in kernel config files),
turned on with tunefs(8) on a per-filesystem
basis. mount_mfs(8) can also turn quotas on.

See http://mail-index.netbsd.org/tech-kern/2011/02/19/msg010025.html
for details.
2011-03-06 17:08:10 +00:00
bouyer
1d8e4d24e4 Make block fields one char wider; allows to sanely display quotas up to
99.9GB while still fitting 80 columns.
Something else needs to be found for the long term ...
2010-02-17 18:55:14 +00:00
lukem
aad74fbea3 Fix -Wcast-qual issues 2009-04-18 09:20:40 +00:00
lukem
9c1945664c Remove the \n and tabs from the __COPYRIGHT() strings.
Tweak to use a consistent format.
2008-07-21 13:36:57 +00:00
jdolecek
a24b12baa6 make sure there is space between the username and next field when
username is longer than 9 characters
2005-03-05 14:46:29 +00:00
jmmv
b635f565e7 Homogenize usage messages: make the 'usage' word all lowercase, as this seems
to be the most common practice in our tree.
2004-01-05 23:23:32 +00:00
agc
326b2259b7 Move UCB-licensed code from 4-clause to 3-clause licence.
Patches provided by Joel Baker in PR 22366, verified by myself.
2003-08-07 11:25:11 +00:00
wiz
990562bfef .Nm does not need a dummy argument ("") before punctuation or
for correct formatting of the SYNOPSIS any longer.
2003-02-25 10:34:36 +00:00
wiz
0cedb12b9c Sort sections. 2002-02-02 01:41:22 +00:00
bouyer
0023d0f38f Enlarge inode fields (for quotas with more than 99999 inodes). 2001-03-20 13:38:26 +00:00
bouyer
154b1d1121 Fix int overflow for large quota, PR bin/12383 from mori@tri.asanuma.co.jp 2001-03-14 19:34:37 +00:00
simonb
fd4ede242b Don't declare 'extern opt*' getopt variables. 2000-04-14 06:26:52 +00:00
mycroft
f5d7100e26 Nuke `extern int errno;' in code we compile with -Wstrict-prototypes. We get
the correct definition from errno.h.
2000-01-21 17:08:33 +00:00
ad
29836f5681 When reporting on group quotas, don't label the first column with "User". 1999-10-06 12:17:31 +00:00
garbled
d1407362ba More and more .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages.  Many more to
come.
1999-03-22 18:43:46 +00:00
mycroft
1f86e5830d const poisoning. 1998-07-27 00:52:00 +00:00
fair
461f420e35 initialize "cp" in hasquota() to avoid gcc/sparc compiler error:
repquota.c:287: warning: `cp' might be used uninitialized in this function
1997-10-23 04:53:03 +00:00
lukem
64bd1fd0d2 use memmove instead of bcopy 1997-10-18 11:23:55 +00:00
lukem
149f1867d1 rcsid fascism 1997-10-18 04:36:50 +00:00
lukem
166448c2dc WARNSify 1997-10-17 13:02:01 +00:00
mrg
efba0505b4 merge lite-2 1997-10-17 07:35:05 +00:00
mark
a8f4abc7d9 Use an integer instead of a char to store the getopt() return value in
order to match the function prototype and to work with compilers that
default to unsigned chars.
Compare the getopt() return value with -1 instead of EOF.
1996-03-30 23:49:48 +00:00
jtc
21908ddbd5 merge in changes from 1.1 release branch 1995-11-28 19:43:04 +00:00
cgd
f24d9135d1 <sys/queue.h> is no longer needed. 1995-01-03 02:06:24 +00:00
cgd
ab628a707e add headers for prototypes. 1994-12-23 16:39:28 +00:00
cgd
d8806814a6 specify man pages the new way. 1994-12-22 11:32:57 +00:00
cgd
59530f6f9f compile against new include. 1994-12-20 11:48:01 +00:00