Added pwd to the Jamfiles, changed the returns to use B error codes rather
than exit()'s. Andrew McCall git-svn-id: file:///srv/svn/repos/haiku/trunk/current@825 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -16,3 +16,4 @@ SubInclude OBOS_TOP src kernel apps envtest ;
|
||||
SubInclude OBOS_TOP src kernel apps testapp ;
|
||||
SubInclude OBOS_TOP src kernel apps tests ;
|
||||
SubInclude OBOS_TOP src kernel apps uname ;
|
||||
SubInclude OBOS_TOP src kernel apps pwd ;
|
||||
|
||||
@@ -45,7 +45,8 @@
|
||||
#include <unistd.h>
|
||||
|
||||
static char *getcwd_logical(void);
|
||||
void usage(void);
|
||||
//void usage(void);
|
||||
int usage(void);
|
||||
|
||||
int
|
||||
main(int argc, char *argv[])
|
||||
@@ -80,20 +81,25 @@ main(int argc, char *argv[])
|
||||
if ((!physical && (p = getcwd_logical()) != NULL) ||
|
||||
(p = getcwd(NULL, 0)) != NULL)
|
||||
printf("%s\n", p);
|
||||
else
|
||||
//err(1, "."); Taken a quick look at this
|
||||
// perhaps it could be replaced with
|
||||
// just an exit(1) ? Andrew McCall
|
||||
//else
|
||||
// err(1, "."); Taken a quick look at this
|
||||
// perhaps it could be replaced with
|
||||
// just an exit(1) ? Andrew McCall
|
||||
|
||||
|
||||
exit(0);
|
||||
//exit(0);
|
||||
return B_NO_ERROR;
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
//void
|
||||
int
|
||||
usage(void)
|
||||
{
|
||||
|
||||
(void)fprintf(stderr, "usage: pwd [-LP]\n");
|
||||
exit(1);
|
||||
//exit(1);
|
||||
return B_ERROR;
|
||||
}
|
||||
|
||||
static char *
|
||||
|
||||
Reference in New Issue
Block a user