summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>1996-01-27 16:38:00 +0000
committerMiles Bader <miles@gnu.org>1996-01-27 16:38:00 +0000
commite89355fe893f89a307d1f38cc13419fafd9c6b91 (patch)
treef8be97e6912d3acecfbace0c8347dffdc342a73e
parent29b85dbc71757996e79bf14904aab21da595f1d9 (diff)
(diskfs_S_dir_mkfile): Use diskfs_create_protid instead of
diskfs_make_protid, and deal with an error return.
-rw-r--r--libdiskfs/dir-mkfile.c19
1 files changed, 12 insertions, 7 deletions
diff --git a/libdiskfs/dir-mkfile.c b/libdiskfs/dir-mkfile.c
index ef8b58d8..9d1644de 100644
--- a/libdiskfs/dir-mkfile.c
+++ b/libdiskfs/dir-mkfile.c
@@ -1,5 +1,5 @@
/*
- Copyright (C) 1994, 1995 Free Software Foundation
+ Copyright (C) 1994, 1995, 1996 Free Software Foundation
This file is part of the GNU Hurd.
@@ -68,16 +68,21 @@ diskfs_S_dir_mkfile (struct protid *cred,
return err;
flags &= (O_READ | O_WRITE | O_EXEC);
- newpi = diskfs_make_protid (diskfs_make_peropen (np, flags,
+ err = diskfs_create_protid (diskfs_make_peropen (np, flags,
cred->po->dotdotport),
cred->uids, cred->nuids,
- cred->gids, cred->ngids);
+ cred->gids, cred->ngids,
+ &newpi);
+ if (! err)
+ {
+ *newnode = ports_get_right (newpi);
+ *newnodetype = MACH_MSG_TYPE_MAKE_SEND;
+ ports_port_deref (newpi);
+ }
- *newnode = ports_get_right (newpi);
- *newnodetype = MACH_MSG_TYPE_MAKE_SEND;
- ports_port_deref (newpi);
diskfs_nput (np);
- return 0;
+
+ return err;
}