aboutsummaryrefslogtreecommitdiffstats
path: root/ports/unix/guts/chdir.c
blob: d796c2e4ec5b27fed0fe09206bb21b66bf18c20e (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
/* 
 * Copyright (c) 2008-2010 Wind River Systems; see
 * guts/COPYRIGHT for information.
 *
 * SPDX-License-Identifier: LGPL-2.1-only
 *
 * static int
 * wrap_chdir(const char *path) {
 *	int rc = -1;
 */
	pseudo_debug(PDBGF_CLIENT, "chdir: '%s'\n",
		path ? path : "<nil>");

	if (!path) {
		errno = EFAULT;
		return -1;
	}
	rc = real_chdir(path);

	if (rc != -1) {
		pseudo_client_op(OP_CHDIR, 0, -1, -1, path, 0);
	}

/*	return rc;
 * }
 */