diff options
author | Roland McGrath <roland@gnu.org> | 1994-04-06 01:42:38 +0000 |
---|---|---|
committer | Roland McGrath <roland@gnu.org> | 1994-04-06 01:42:38 +0000 |
commit | 931721762209f574ad14fe22fe16e4da2cf0fa7b (patch) | |
tree | 88226cbbf59b9bb21d58971a1ab1cf22ad6a9bbd /fstests/fdtests.c | |
parent | 452516a5400b458b9cd83779dec0598aeeb0a8fd (diff) |
Formerly fdtests.c.~3~
Diffstat (limited to 'fstests/fdtests.c')
-rw-r--r-- | fstests/fdtests.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/fstests/fdtests.c b/fstests/fdtests.c index 00cb5f13..d02ef3a2 100644 --- a/fstests/fdtests.c +++ b/fstests/fdtests.c @@ -24,6 +24,7 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ #include <errno.h> #include <unistd.h> #include <stdio.h> +#include <stdlib.h> int main () @@ -35,7 +36,7 @@ main () stderr = stdout = mach_open_devstream (getdport (1), "w"); - if (unlink (root, "CREATED") < 0 && errno != ENOENT) + if (unlink ("CREATED") < 0 && errno != ENOENT) printf ("Error on unlink: %d\n", errno); fd = open ("CREATED", O_WRITE | O_CREAT, 0666); @@ -61,7 +62,7 @@ main () if (n < 0) perror ("getline"); else - printf ("Read %d bytes: %.*s", n, line); + printf ("Read %d bytes: %.*s", n, n, line); free (line); } |