This commit is contained in:
K. Lange 2018-08-02 14:10:46 +09:00
parent ae6532607a
commit e98b017e0d

18
apps/pwd.c Normal file
View File

@ -0,0 +1,18 @@
/* This file is part of ToaruOS and is released under the terms
* of the NCSA / University of Illinois License - see LICENSE.md
* Copyright (C) 2018 K. Lange
*
* pwd
*/
#include <unistd.h>
#include <stdio.h>
int main(int argc, char * argv[]) {
char tmp[1024];
if (getcwd(tmp, 1023)) {
puts(tmp);
return 0;
} else {
return 1;
}
}