From e89355fe893f89a307d1f38cc13419fafd9c6b91 Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Sat, 27 Jan 1996 16:38:00 +0000 Subject: (diskfs_S_dir_mkfile): Use diskfs_create_protid instead of diskfs_make_protid, and deal with an error return. --- libdiskfs/dir-mkfile.c | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) (limited to 'libdiskfs/dir-mkfile.c') 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; } -- cgit v1.2.3