From 22702db6dab56e36c86d91fbf5f2f469fad99f2c Mon Sep 17 00:00:00 2001 From: "Neal H. Walfield" Date: Tue, 26 Mar 2002 14:59:52 +0000 Subject: 2002-03-25 Neal H Walfield * peropen-make.c (diskfs_make_peropen): Instead of returning the peropen, return as error_t and return the peropen in the new parameter *PPO. * diskfs.h (diskfs_make_peropen): Change declaration to reflect new semantics. * boot-start.c (diskfs_start_bootstrap): Check the return value of diskfs_make_peropen using the new semantics. (diskfs_S_exec_startup_get_info): Likewise. (diskfs_execboot_fsys_startup): Likewise. (diskfs_S_fsys_init): Likewise. * dir-lookup.c (diskfs_S_dir_lookup): Likewise. * dir-mkfile.c (diskfs_S_dir_mkfile): Likewise. * file-exec.c (diskfs_S_file_exec): Likewise. * file-reparent.c (diskfs_S_file_reparent): Likewise. * fsys-getfile.c (diskfs_S_fsys_getfile): Likewise. * fsys-getroot.c (diskfs_S_fsys_getroot): Likewise. * trans-callback.c (_diskfs_translator_callback2_fn): Likewise. * init-startup.c (diskfs_startup_diskfs): Likewise. --- libdiskfs/fsys-getroot.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'libdiskfs/fsys-getroot.c') diff --git a/libdiskfs/fsys-getroot.c b/libdiskfs/fsys-getroot.c index 08eca284..5a5b902a 100644 --- a/libdiskfs/fsys-getroot.c +++ b/libdiskfs/fsys-getroot.c @@ -1,5 +1,5 @@ /* - Copyright (C) 1993,94,95,96,97,98, 2002 Free Software Foundation + Copyright (C) 1993,94,95,96,97,98,2002 Free Software Foundation This file is part of the GNU Hurd. @@ -45,6 +45,7 @@ diskfs_S_fsys_getroot (fsys_t controlport, error_t error = 0; mode_t type; struct protid *newpi; + struct peropen *newpo; struct iouser user; struct peropen peropen_context = { @@ -176,10 +177,14 @@ diskfs_S_fsys_getroot (fsys_t controlport, flags &= ~OPENONLY_STATE_MODES; - error = - diskfs_create_protid (diskfs_make_peropen (diskfs_root_node, flags, - &peropen_context), - &user, &newpi); + error = diskfs_make_peropen (diskfs_root_node, flags, + &peropen_context, &newpo); + if (! error) + { + error = diskfs_create_protid (newpo, &user, &newpi); + if (error) + diskfs_release_peropen (newpo); + } mach_port_deallocate (mach_task_self (), dotdot); -- cgit v1.2.3