File: statfs.c

package info (click to toggle)
fdclone 3.01b-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd, stretch
  • size: 4,772 kB
  • ctags: 8,674
  • sloc: ansic: 100,552; makefile: 4,497; sh: 1,480; sed: 224
file content (24 lines) | stat: -rw-r--r-- 319 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
/*
 *	statfs.c
 *
 *	file system information module
 */

#include "headers.h"
#include "fsinfo.h"


#ifdef	USEFSTATFS
int Xstatfs(path, buf)
CONST char *path;
statfs_t *buf;
{
	int n, fd;

	if ((fd = open(path, O_RDONLY, 0666)) < 0) return(-1);
	n = fstatfs(fd, buf);
	close(fd);

	return(n);
}
#endif	/* USEFSTATFS */