comparison libcommon/localcd.c @ 9:c9ef9e91dd8e

new libcommon, initial version
author Mychaela Falconia <falcon@freecalypso.org>
date Sun, 14 Mar 2021 06:55:38 +0000
parents
children
comparison
equal deleted inserted replaced
8:34bbb0585cab 9:c9ef9e91dd8e
1 /*
2 * This module implements the local cd command.
3 */
4
5 #include <stdio.h>
6 #include <stdlib.h>
7 #include <unistd.h>
8
9 cmd_cd(argc, argv)
10 char **argv;
11 {
12 int rc;
13
14 rc = chdir(argv[1]);
15 if (rc < 0)
16 perror(argv[1]);
17 return rc;
18 }