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
This commit is contained in:
parent
19fc74fb60
commit
894fd2da78
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=108034
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user