aboutsummaryrefslogtreecommitdiff
path: root/toys/pwd.c
blob: 59d7223dbcd9f899eb7c46865251fe681cee906c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/* vi: set sw=4 ts=4: */
/*
 * pwd.c - Print working directory.
 */

#include "toys.h"

int pwd_main(void)
{
	char *pwd = xgetcwd();

	xprintf("%s\n", pwd);
	if (CFG_TOYS_FREE) free(pwd);

	return 0;
}