From: Andreas J. <aj...@su...> - 2002-04-05 15:09:24
|
I'm appending some fixes to chdir03 to compile it with less warnings. The missing prototype for strerror and mkdir caused problems. Andreas ============================================================ Index: testcases/kernel/syscalls/chdir/chdir03.c --- testcases/kernel/syscalls/chdir/chdir03.c 31 Aug 2001 15:00:38 -0000 1.2 +++ testcases/kernel/syscalls/chdir/chdir03.c 5 Apr 2002 15:07:03 -0000 @@ -55,6 +55,10 @@ #include <sys/wait.h> #include <test.h> #include <usctest.h> +#include <stdlib.h> +#include <string.h> +#include <sys/stat.h> +#include <sys/types.h> char *TCID = "chdir03"; int TST_TOTAL = 1; @@ -74,13 +78,14 @@ struct passwd *ltpuser1, *ltpuser2; extern struct passwd *my_getpwnam(char *); +int main(int ac, char **av) { int lc; /* loop counter */ char *msg; /* message returned from parse_opts */ pid_t pid, pid1; - int retval, status; + int status; /* parse standard options */ if ((msg = parse_opts(ac, av, (option_t *)NULL, NULL)) != (char *)NULL){ @@ -193,7 +198,7 @@ setup() tst_brkm(TBROK, cleanup, "Couldn't get current directory name"); } - sprintf(good_dir, "%s.%d\0", cur_dir, getpid()); + sprintf(good_dir, "%s.%d\n", cur_dir, getpid()); ltpuser1 = my_getpwnam(user1name); ltpuser2 = my_getpwnam(user2name); -- Andreas Jaeger SuSE Labs aj...@su... private aj...@ar... http://www.suse.de/~aj |