예제 #1
0
파일: ld_iscsi.c 프로젝트: agrare/libiscsi
int __lxstat(int ver, const char *path, struct stat *buf)
{
	if (!strncmp(path, "iscsi:", 6)) {
		int fd, ret;

		fd = open(path, 0, 0);
		if (fd == -1) {
			return fd;
		}

		ret = __fxstat(ver, fd, buf);
		close(fd);
		return ret;
	}

	return real_lxstat(ver, path, buf);
}
예제 #2
0
int __lxstat(int ver, const char *path, struct stat *buf)
{
	if (!strncmp(path, "nfs:", 4)) {
		int fd, ret;

		LD_NFS_DPRINTF(9, "__lxstat(%s)", path);
		fd = open(path, 0, 0);
		if (fd == -1) {
			return fd;
		}

		ret = __fxstat(ver, fd, buf);
		close(fd);
		return ret;
	}

	return real_lxstat(ver, path, buf);
}