Lines Matching refs:retval

26 	errcode_t	retval = 0;  in rw_setup()  local
36 retval = profile_lock_global(); in rw_setup()
37 if (retval) in rw_setup()
38 return retval; in rw_setup()
50 retval = ENOMEM; in rw_setup()
52 retval = k5_mutex_init(&new_data->lock); in rw_setup()
53 if (retval == 0) { in rw_setup()
61 if (retval != 0) { in rw_setup()
64 return retval; in rw_setup()
71 retval = profile_update_file(file); in rw_setup()
73 return retval; in rw_setup()
86 errcode_t retval; in profile_update_relation() local
91 retval = rw_setup(profile); in profile_update_relation()
92 if (retval) in profile_update_relation()
93 return retval; in profile_update_relation()
101 retval = k5_mutex_lock(&profile->first_file->data->lock); in profile_update_relation()
102 if (retval) in profile_update_relation()
103 return retval; in profile_update_relation()
107 retval = profile_find_node(section, *cpp, 0, 1, in profile_update_relation()
109 if (retval) { in profile_update_relation()
111 return retval; in profile_update_relation()
116 retval = profile_find_node(section, *cpp, old_value, 0, &state, &node); in profile_update_relation()
117 if (retval == 0) { in profile_update_relation()
119 retval = profile_set_relation_value(node, new_value); in profile_update_relation()
121 retval = profile_remove_node(node); in profile_update_relation()
123 if (retval == 0) in profile_update_relation()
127 return retval; in profile_update_relation()
138 errcode_t retval; in profile_clear_relation() local
143 retval = rw_setup(profile); in profile_clear_relation()
144 if (retval) in profile_clear_relation()
145 return retval; in profile_clear_relation()
153 retval = profile_find_node(section, *cpp, 0, 1, in profile_clear_relation()
155 if (retval) in profile_clear_relation()
156 return retval; in profile_clear_relation()
161 retval = profile_find_node(section, *cpp, 0, 0, &state, &node); in profile_clear_relation()
162 if (retval) in profile_clear_relation()
163 return retval; in profile_clear_relation()
164 retval = profile_remove_node(node); in profile_clear_relation()
165 if (retval) in profile_clear_relation()
166 return retval; in profile_clear_relation()
184 errcode_t retval; in profile_rename_section() local
189 retval = rw_setup(profile); in profile_rename_section()
190 if (retval) in profile_rename_section()
191 return retval; in profile_rename_section()
196 retval = k5_mutex_lock(&profile->first_file->data->lock); in profile_rename_section()
197 if (retval) in profile_rename_section()
198 return retval; in profile_rename_section()
202 retval = profile_find_node(section, *cpp, 0, 1, in profile_rename_section()
204 if (retval) { in profile_rename_section()
206 return retval; in profile_rename_section()
211 retval = profile_find_node(section, *cpp, 0, 1, &state, &node); in profile_rename_section()
212 if (retval == 0) { in profile_rename_section()
214 retval = profile_rename_node(node, new_name); in profile_rename_section()
216 retval = profile_remove_node(node); in profile_rename_section()
218 if (retval == 0) in profile_rename_section()
221 return retval; in profile_rename_section()
237 errcode_t retval; in profile_add_relation() local
242 retval = rw_setup(profile); in profile_add_relation()
243 if (retval) in profile_add_relation()
244 return retval; in profile_add_relation()
249 retval = k5_mutex_lock(&profile->first_file->data->lock); in profile_add_relation()
250 if (retval) in profile_add_relation()
251 return retval; in profile_add_relation()
255 retval = profile_find_node(section, *cpp, 0, 1, in profile_add_relation()
257 if (retval == PROF_NO_SECTION) in profile_add_relation()
258 retval = profile_add_node(section, *cpp, 0, &section); in profile_add_relation()
259 if (retval) { in profile_add_relation()
261 return retval; in profile_add_relation()
266 retval = profile_find_node(section, *cpp, 0, 1, &state, 0); in profile_add_relation()
267 if (retval == 0) { in profile_add_relation()
270 } else if (retval != PROF_NO_SECTION) { in profile_add_relation()
272 return retval; in profile_add_relation()
276 retval = profile_add_node(section, *cpp, new_value, 0); in profile_add_relation()
277 if (retval) { in profile_add_relation()
279 return retval; in profile_add_relation()