aboutsummaryrefslogtreecommitdiffstats
path: root/ports/linux/guts/__fxstat64.c
blob: 92c8219c45c01908f26dec9293494a47fcbd595e (plain)
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
/* 
 * Copyright (c) 2008-2010 Wind River Systems; see
 * guts/COPYRIGHT for information.
 *
 * int
 * wrap___fxstat64(int ver, int fd, struct stat64 *buf) {
 *	int rc = -1;
 */
	pseudo_msg_t *msg;
	int save_errno;

	rc = real___fxstat64(ver, fd, buf);
	save_errno = errno;
	if (rc == -1) {
		return rc;
	}
	if (ver != _STAT_VER) {
		pseudo_debug(1, "version mismatch: got stat version %d, only supporting %d\n", ver, _STAT_VER);
		errno = save_errno;
		return rc;
	}
	msg = pseudo_client_op(OP_FSTAT, 0, fd, -1, 0, buf);
	if (msg && msg->result == RESULT_SUCCEED) {
		pseudo_stat_msg(buf, msg);
	}

	errno = save_errno;
/*	return rc;
 * }
 */