~ubuntu-branches/ubuntu/vivid/libuser/vivid-proposed

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
<!-- ##### SECTION Title ##### -->
quota

<!-- ##### SECTION Short_Description ##### -->
Functions for manipulating disk quotas.

<!-- ##### SECTION Long_Description ##### -->
<para>
quota.h declares functions which are useful for querying and manipulating
user and group disk quotas under Linux.  These routines are not portable
to other operating systems.
</para>

<!-- ##### SECTION See_Also ##### -->
<para>

</para>

<!-- ##### SECTION Stability_Level ##### -->


<!-- ##### FUNCTION quota_on ##### -->
<para>
Enables enforcing quotas on filesystems where quotas are configured.
</para>

@Returns: 0 on success, -1 on error


<!-- ##### FUNCTION quota_off ##### -->
<para>
Disables enforcing quotas on filesystems where quotas are configured.
</para>

@Returns: 0 on success, -1 on error


<!-- ##### FUNCTION quota_get_specials_user ##### -->
<para>
Gets a list of currently mounted filesystems which have user quotas enabled.
</para>

@Returns: If sucessful, a %NULL-terminated array of device names that should
be freed by quota_free_specials().  On error returns %NULL.


<!-- ##### FUNCTION quota_get_specials_group ##### -->
<para>
Gets a list of currently mounted filesystems which have group quotas enabled.
</para>

@Returns: If sucessful, a %NULL-terminated array of device names that should
be freed by quota_free_specials().  On error returns %NULL.


<!-- ##### FUNCTION quota_free_specials ##### -->
<para>
Frees the array returned by quota_get_specials_user() or
quota_get_specials_group()
</para>

@specials: array to be freed


<!-- ##### FUNCTION quota_get_user ##### -->
<para>
Gets information about user quota on a device.
</para>

@uid: UID to get information about
@special: block device name
@inode_usage: number of used inodes
@inode_soft: soft inode limit
@inode_hard: hard inode limit
@inode_grace: inode grace time in seconds
@block_usage: number of used blocks (each block is 1 kB)
@block_soft: soft block limit
@block_hard: hard block limit
@block_grace: block grace time in seconds
@Returns: 0 on success, -1 on failure


<!-- ##### FUNCTION quota_set_user ##### -->
<para>
Sets user quota on a device.
</para>

@uid: UID to get information about
@special: block device name
@inode_soft: soft inode limit
@inode_hard: hard inode limit
@inode_grace: inode grace time in seconds
@block_soft: soft block limit
@block_hard: hard block limit
@block_grace: block grace time in seconds
@Returns: 0 on success, -1 on failure


<!-- ##### FUNCTION quota_get_group ##### -->
<para>
Gets information about group quota on a device.
</para>

@gid: GID to get information about
@special: block device name
@inode_usage: number of used inodes
@inode_soft: soft inode limit
@inode_hard: hard inode limit
@inode_grace: inode grace time in seconds
@block_usage: number of used blocks (each block is 1 kB)
@block_soft: soft block limit
@block_hard: hard block limit
@block_grace: block grace time in seconds
@Returns: 0 on success, -1 on failure


<!-- ##### FUNCTION quota_set_group ##### -->
<para>
Sets group quota on a device.
</para>

@gid: GID to get information about
@special: block device name
@inode_soft: soft inode limit
@inode_hard: hard inode limit
@inode_grace: inode grace time in seconds
@block_soft: soft block limit
@block_hard: hard block limit
@block_grace: block grace time in seconds
@Returns: 0 on success, -1 on failure