summaryrefslogtreecommitdiff
path: root/fstests/fstests.c
diff options
context:
space:
mode:
authorMichael I. Bushnell <mib@gnu.org>1993-12-16 07:52:02 +0000
committerMichael I. Bushnell <mib@gnu.org>1993-12-16 07:52:02 +0000
commit923c1331a86d402dbe5b8f9d892bc01f9878a509 (patch)
treee26232287b75a3c6491e015aec184c2d232f0a11 /fstests/fstests.c
parenta6d6d5a2db8d10db548e14f5d37803bb4c8db617 (diff)
Formerly fstests.c.~8~
Diffstat (limited to 'fstests/fstests.c')
-rw-r--r--fstests/fstests.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/fstests/fstests.c b/fstests/fstests.c
index f24a67a0..869a20c0 100644
--- a/fstests/fstests.c
+++ b/fstests/fstests.c
@@ -26,6 +26,7 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#include <hurd/io.h>
#include <hurd.h>
#include <fcntl.h>
+#include <errno.h>
void
main ()
@@ -42,9 +43,9 @@ main ()
root = _hurd_ports[INIT_PORT_CRDIR].port;
stdout = mach_open_devstream (_hurd_init_dtable[1], "w");
-/* if (err = dir_unlink (root, "CREATED"))
+ if ((err = dir_unlink (root, "CREATED")) && err != ENOENT)
printf ("Error on unlink: %d\n", err);
- else */ if (err = dir_pathtrans (root, "CREATED", O_WRITE | O_CREAT, 0666,
+ else if (err = dir_pathtrans (root, "CREATED", O_WRITE | O_CREAT, 0666,
&retry, pathbuf, &filetowrite))
printf ("Error on pathtrans: %d\n", err);
else if (err = io_write (filetowrite, string, strlen (string), -1, &written))