diff options
author | Neal H. Walfield <neal@gnu.org> | 2002-03-26 14:59:52 +0000 |
---|---|---|
committer | Neal H. Walfield <neal@gnu.org> | 2002-03-26 14:59:52 +0000 |
commit | 22702db6dab56e36c86d91fbf5f2f469fad99f2c (patch) | |
tree | 2e887617a1cac327c98cf9329bcf10e0ba1d2b9e /libdiskfs/boot-start.c | |
parent | 5c086e129802f8a5705a7b866b877c37cb88d29b (diff) |
2002-03-25 Neal H Walfield <neal@cs.uml.edu>
* 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.
Diffstat (limited to 'libdiskfs/boot-start.c')
-rw-r--r-- | libdiskfs/boot-start.c | 31 |
1 files changed, 20 insertions, 11 deletions
diff --git a/libdiskfs/boot-start.c b/libdiskfs/boot-start.c index 7a41bf81..ad3cf1a4 100644 --- a/libdiskfs/boot-start.c +++ b/libdiskfs/boot-start.c @@ -102,12 +102,15 @@ diskfs_start_bootstrap () size_t exec_argvlen, exec_envlen; struct port_info *bootinfo; struct protid *rootpi; + struct peropen *rootpo; mach_port_t diskfs_exec; /* Create the port for current and root directory. */ - err = diskfs_create_protid (diskfs_make_peropen (diskfs_root_node, - O_READ | O_EXEC, 0), - 0, &rootpi); + err = diskfs_make_peropen (diskfs_root_node, O_READ | O_EXEC, 0, + &rootpo); + assert_perror (err); + + err = diskfs_create_protid (rootpo, 0, &rootpi); assert_perror (err); /* Get us a send right to copy around. */ @@ -307,6 +310,7 @@ diskfs_S_exec_startup_get_info (mach_port_t port, mach_port_t rootport; struct ufsport *upt; struct protid *rootpi; + struct peropen *rootpo; if (!(upt = ports_lookup_port (diskfs_port_bucket, port, diskfs_execboot_class))) @@ -337,10 +341,12 @@ diskfs_S_exec_startup_get_info (mach_port_t port, *intarrayP = NULL; *intarraylen = 0; - err = diskfs_create_protid (diskfs_make_peropen (diskfs_root_node, - O_READ | O_EXEC, 0), - 0, &rootpi); + err = diskfs_make_peropen (diskfs_root_node, O_READ | O_EXEC, 0, &rootpo); + assert_perror (err); + + err = diskfs_create_protid (rootpo, 0, &rootpi); assert_perror (err); + rootport = ports_get_right (rootpi); ports_port_deref (rootpi); portarray[INIT_PORT_CWDIR] = rootport; @@ -371,14 +377,16 @@ diskfs_execboot_fsys_startup (mach_port_t port, int flags, enum retry_type retry; struct port_info *pt; struct protid *rootpi; + struct peropen *rootpo; mach_port_t rootport; if (!(pt = ports_lookup_port (diskfs_port_bucket, port, diskfs_execboot_class))) return EOPNOTSUPP; - err = diskfs_create_protid (diskfs_make_peropen (diskfs_root_node, flags, 0), - 0, &rootpi); + err = diskfs_make_peropen (diskfs_root_node, flags, 0, &rootpo); + assert_perror (err); + err = diskfs_create_protid (rootpo, 0, &rootpi); assert_perror (err); rootport = ports_get_send_right (rootpi); ports_port_deref (rootpi); @@ -444,6 +452,7 @@ diskfs_S_fsys_init (mach_port_t port, error_t err; mach_port_t root_pt; struct protid *rootpi; + struct peropen *rootpo; pt = ports_lookup_port (diskfs_port_bucket, port, diskfs_initboot_class); if (!pt) @@ -534,9 +543,9 @@ diskfs_S_fsys_init (mach_port_t port, /* Get a port to the root directory to put in the library's data structures. */ - err = diskfs_create_protid (diskfs_make_peropen (diskfs_root_node, - O_READ|O_EXEC, 0), - 0, &rootpi); + err = diskfs_make_peropen (diskfs_root_node, O_READ|O_EXEC, 0, &rootpo); + assert_perror (err); + err = diskfs_create_protid (rootpo, 0, &rootpi); assert_perror (err); root_pt = ports_get_send_right (rootpi); ports_port_deref (rootpi); |