diff options
author | johan <johan@FreeBSD.org> | 2002-12-18 11:50:28 +0000 |
---|---|---|
committer | johan <johan@FreeBSD.org> | 2002-12-18 11:50:28 +0000 |
commit | 8b908a309f8e4ba1498bf6972dc36199ffcc1505 (patch) | |
tree | 324453cf4384169c22b8a522a526f61d38e4b1ff /bin | |
parent | c3153934cb24d911042c92eedf9e5dd6d7be07e1 (diff) | |
download | FreeBSD-src-8b908a309f8e4ba1498bf6972dc36199ffcc1505.zip FreeBSD-src-8b908a309f8e4ba1498bf6972dc36199ffcc1505.tar.gz |
Remove undocumented behavior (return current work dir if no path
is given as argument) that is not present in 4-Stable.
It was introduced when realpath(1) was split out of pwd(1).
The removed behavior is provided by pwd(1).
Reviewed by: mike
Diffstat (limited to 'bin')
-rw-r--r-- | bin/realpath/realpath.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/bin/realpath/realpath.c b/bin/realpath/realpath.c index c526733..8b7177f 100644 --- a/bin/realpath/realpath.c +++ b/bin/realpath/realpath.c @@ -49,10 +49,7 @@ main(int argc, char *argv[]) char buf[MAXPATHLEN]; char *p; - if (argc == 1) { - if ((p = getcwd(NULL, 0)) == NULL) - err(1, "getcwd()"); - } else if (argc == 2) { + if (argc == 2) { if ((p = realpath(argv[1], buf)) == NULL) err(1, "%s", buf); } else @@ -65,6 +62,6 @@ static void usage(void) { - (void)fprintf(stderr, "usage: realpath [path]\n"); + (void)fprintf(stderr, "usage: realpath path\n"); exit(1); } |