This repository was archived by the owner on Jan 16, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 65
/
Copy pathnfs3_ext.x
109 lines (105 loc) · 2.95 KB
/
nfs3_ext.x
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
/* $Id$ */
/*
*
* Copyright (C) 1999 David Mazieres ([email protected])
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2, or (at
* your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA
*
*/
%struct fattr3exp {
% ftype3 type;
% u_int32_t mode;
% u_int32_t nlink;
% u_int32_t uid;
% u_int32_t gid;
% u_int64_t size;
% u_int64_t used;
% specdata3 rdev;
% u_int64_t fsid;
% u_int64_t fileid;
% nfstime3 atime;
% nfstime3 mtime;
% nfstime3 ctime;
% u_int32_t expire;
%
% fattr3exp () : expire (0) {}
% operator fattr3 &() { return *reinterpret_cast<fattr3 *> (this); }
% operator const fattr3 &() const
% { return *reinterpret_cast<const fattr3 *> (this); }
% fattr3exp &operator= (const fattr3 &f)
% { implicit_cast<fattr3 &> (*this) = f; return *this; }
%};
%template<class T> bool
%rpc_traverse (T &t, fattr3exp &obj)
%{
% return rpc_traverse (t, implicit_cast<fattr3 &> (obj));
%}
%#ifdef MAINTAINER
%inline const strbuf &
%rpc_print (const strbuf &sb, const fattr3exp &obj, int recdepth,
% const char *name, const char *prefix)
%{
% if (name) {
% if (prefix)
% sb << prefix;
% sb << "fattr3exp " << name << " = ";
% }
% const char *sep;
% str npref;
% if (prefix) {
% npref = strbuf ("%s ", prefix);
% sep = "";
% sb << "{\n";
% }
% else {
% sep = ", ";
% sb << "{ ";
% }
% rpc_print (sb, obj.type, recdepth, "type", npref);
% sb << sep;
% rpc_print (sb, obj.mode, recdepth, "mode", npref);
% sb << sep;
% rpc_print (sb, obj.nlink, recdepth, "nlink", npref);
% sb << sep;
% rpc_print (sb, obj.uid, recdepth, "uid", npref);
% sb << sep;
% rpc_print (sb, obj.gid, recdepth, "gid", npref);
% sb << sep;
% rpc_print (sb, obj.size, recdepth, "size", npref);
% sb << sep;
% rpc_print (sb, obj.used, recdepth, "used", npref);
% sb << sep;
% rpc_print (sb, obj.rdev, recdepth, "rdev", npref);
% sb << sep;
% rpc_print (sb, obj.fsid, recdepth, "fsid", npref);
% sb << sep;
% rpc_print (sb, obj.fileid, recdepth, "fileid", npref);
% sb << sep;
% rpc_print (sb, obj.atime, recdepth, "atime", npref);
% sb << sep;
% rpc_print (sb, obj.mtime, recdepth, "mtime", npref);
% sb << sep;
% rpc_print (sb, obj.ctime, recdepth, "ctime", npref);
% sb << sep;
% rpc_print (sb, obj.expire, recdepth, "expire", npref);
% if (prefix)
% sb << prefix << "};\n";
% else
% sb << " }";
% return sb;
%}
%#endif /* MAINTAINER */
#define fattr3 fattr3exp