Esempio n. 1
0
int
_fstatfs(int fd, struct statfs *buf)
{
	struct freebsd11_statfs statfs11;
	int rv;

	if (__getosreldate() >= INO64_FIRST)
		return (__sys_fstatfs(fd, buf));
	rv = syscall(SYS_freebsd11_fstatfs, fd, &statfs11);
	if (rv == 0)
		__statfs11_to_statfs(&statfs11, buf);
	return (rv);
}
Esempio n. 2
0
int
_fstatfs(int fd, struct statfs * buf)
{
	int             ret;

	/* Lock the file descriptor for read: */
	if ((ret = _FD_LOCK(fd, FD_READ, NULL)) == 0) {
		/* Get the file system status: */
		ret = __sys_fstatfs(fd, buf);
		/* Unlock the file descriptor: */
		_FD_UNLOCK(fd, FD_READ);
	}
	return (ret);
}