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/peropen-make.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'libdiskfs/peropen-make.c') diff --git a/libdiskfs/peropen-make.c b/libdiskfs/peropen-make.c index a49feaf9..d37516c1 100644 --- a/libdiskfs/peropen-make.c +++ b/libdiskfs/peropen-make.c @@ -1,5 +1,5 @@ /* - Copyright (C) 1994, 1997, 1999, 2001 Free Software Foundation + Copyright (C) 1994,97,99,2001,02 Free Software Foundation This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as @@ -20,13 +20,14 @@ /* Create and return a new peropen structure on node NP with open flags FLAGS. */ -struct peropen * -diskfs_make_peropen (struct node *np, int flags, struct peropen *context) +error_t +diskfs_make_peropen (struct node *np, int flags, struct peropen *context, + struct peropen **ppo) { - struct peropen *po = malloc (sizeof (struct peropen)); + struct peropen *po = *ppo = malloc (sizeof (struct peropen)); if (! po) - return NULL; + return ENOMEM; po->filepointer = 0; po->lock_status = LOCK_UN; @@ -59,5 +60,5 @@ diskfs_make_peropen (struct node *np, int flags, struct peropen *context) diskfs_nref (np); - return po; + return 0; } -- cgit v1.2.3