aboutsummaryrefslogtreecommitdiffstats
path: root/ports/unix/guts/chroot.c
blob: 62d5e889e59fe23bfafe37e9397c0bc21298746e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/* 
 * Copyright (c) 2010 Wind River Systems; see
 * guts/COPYRIGHT for information.
 *
 * SPDX-License-Identifier: LGPL-2.1-only
 *
 * static int
 * wrap_chroot(const char *path) {
 *	int rc = -1;
 */
	pseudo_debug(PDBGF_CLIENT | PDBGF_CHROOT, "chroot: %s\n", path);
	if (!pseudo_client_op(OP_CHROOT, 0, -1, -1, path, 0)) {
		pseudo_debug(PDBGF_OP | PDBGF_CHROOT, "chroot failed: %s\n", strerror(errno));
		rc = -1;
	} else {
		rc = 0;
	}

/*	return rc;
 * }
 */