Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
att
GitHub Repository: att/ast
Path: blob/master/src/cmd/3d/fstatvfs3d.c
1808 views
1
/***********************************************************************
2
* *
3
* This software is part of the ast package *
4
* Copyright (c) 1989-2011 AT&T Intellectual Property *
5
* and is licensed under the *
6
* Eclipse Public License, Version 1.0 *
7
* by AT&T Intellectual Property *
8
* *
9
* A copy of the License is available at *
10
* http://www.eclipse.org/org/documents/epl-v10.html *
11
* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
12
* *
13
* Information and Software Systems Research *
14
* AT&T Research *
15
* Florham Park NJ *
16
* *
17
* Glenn Fowler <[email protected]> *
18
* David Korn <[email protected]> *
19
* Eduardo Krell <[email protected]> *
20
* *
21
***********************************************************************/
22
#pragma prototyped
23
24
#include "3d.h"
25
26
#if defined(fstatvfs3d) && defined(_sys_statvfs)
27
28
#include <sys/statvfs.h>
29
30
int
31
fstatvfs3d(int fd, struct statvfs* fs)
32
{
33
#if FS
34
Mount_t* mp;
35
36
if (!fscall(NiL, MSG_fstatfs, 0, fd, fs))
37
return(state.ret);
38
mp = monitored();
39
#endif
40
if (FSTATVFS(fd, fs))
41
return(-1);
42
#if FS
43
if (mp)
44
fscall(mp, MSG_fstatfs, 0, fd, fs);
45
for (mp = state.global; mp; mp = mp->global)
46
if (fssys(mp, MSG_fstatfs))
47
fscall(mp, MSG_fstatfs, 0, fd, fs);
48
#endif
49
return(0);
50
}
51
52
#else
53
54
NoN(fstatvfs)
55
56
#endif
57
58