aboutsummaryrefslogtreecommitdiff
blob: a208fbcf9968dba103074225abc86d9f91bdcebb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/*
 * Copyright 2010-2019 Gentoo Foundation
 * Distributed under the terms of the GNU General Public License v2
 *
 * Copyright 2010-2016 Mike Frysinger  - <vapier@gentoo.org>
 */

#include "main.h"

#include <unistd.h>
#include <stdlib.h>

#include "xchdir.h"

void
xchdir(const char *path)
{
	if (unlikely(chdir(path) != 0))
		errp("chdir(%s) failed", path);
}