fix typo in chmod funcs
[deb_libnfs.git] / rquota / rquota.x
... / ...
CommitLineData
1/*
2Copyright (c) 2014, Ronnie Sahlberg
3All rights reserved.
4
5Redistribution and use in source and binary forms, with or without
6modification, are permitted provided that the following conditions are met:
7
81. Redistributions of source code must retain the above copyright notice, this
9 list of conditions and the following disclaimer.
102. Redistributions in binary form must reproduce the above copyright notice,
11 this list of conditions and the following disclaimer in the documentation
12 and/or other materials provided with the distribution.
13
14THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
15ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
16WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
17DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
18ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
19(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
20LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
21ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
23SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24
25The views and conclusions contained in the software and documentation are those
26of the authors and should not be interpreted as representing official policies,
27either expressed or implied, of the FreeBSD Project.
28*/
29
30const RQUOTAPATHLEN = 1024; /* Guess this is max. It is max for mount so probably rquota too */
31
32enum rquotastat {
33 RQUOTA_OK = 1,
34 RQUOTA_NOQUOTA = 2,
35 RQUOTA_EPERM = 3
36};
37
38typedef string exportpath<RQUOTAPATHLEN>;
39
40struct GETQUOTA1args {
41 exportpath export;
42 int uid;
43};
44
45enum quotatype {
46 RQUOTA_TYPE_UID = 0,
47 RQUOTA_TYPE_GID = 1
48};
49
50struct GETQUOTA2args {
51 exportpath export;
52 quotatype type;
53 int uid;
54};
55
56struct GETQUOTA1res_ok {
57 int bsize;
58 int active;
59 int bhardlimit;
60 int bsoftlimit;
61 int curblocks;
62 int fhardlimit;
63 int fsoftlimit;
64 int curfiles;
65 int btimeleft;
66 int ftimeleft;
67};
68
69union GETQUOTA1res switch (rquotastat status) {
70 case RQUOTA_OK:
71 GETQUOTA1res_ok quota;
72 default:
73 void;
74};
75
76program RQUOTA_PROGRAM {
77 version RQUOTA_V1 {
78 void
79 RQUOTA1_NULL(void) = 0;
80
81 GETQUOTA1res
82 RQUOTA1_GETQUOTA(GETQUOTA1args) = 1;
83
84 GETQUOTA1res
85 RQUOTA1_GETACTIVEQUOTA(GETQUOTA1args) = 2;
86 } = 1;
87
88 version RQUOTA_V2 {
89 void
90 RQUOTA2_NULL(void) = 0;
91
92 GETQUOTA1res
93 RQUOTA2_GETQUOTA(GETQUOTA2args) = 1;
94
95 GETQUOTA1res
96 RQUOTA2_GETACTIVEQUOTA(GETQUOTA2args) = 2;
97 } = 2;
98} = 100011;
99