Lines Matching refs:retval
76 errcode_t retval; in add_link() local
78 retval = ext2fs_read_inode(fs, ino, &inode); in add_link()
79 if (retval) { in add_link()
80 com_err(__func__, retval, _("while reading inode %u"), ino); in add_link()
81 return retval; in add_link()
84 retval = ext2fs_link(fs, parent_ino, name, ino, in add_link()
86 if (retval == EXT2_ET_DIR_NO_SPACE) { in add_link()
87 retval = ext2fs_expand_dir(fs, parent_ino); in add_link()
88 if (retval) { in add_link()
89 com_err(__func__, retval, in add_link()
91 return retval; in add_link()
93 retval = ext2fs_link(fs, parent_ino, name, ino, in add_link()
96 if (retval) { in add_link()
97 com_err(__func__, retval, _("while linking \"%s\""), name); in add_link()
98 return retval; in add_link()
103 retval = ext2fs_write_inode(fs, ino, &inode); in add_link()
104 if (retval) in add_link()
105 com_err(__func__, retval, _("while writing inode %u"), ino); in add_link()
107 return retval; in add_link()
114 errcode_t retval; in set_inode_extra() local
117 retval = ext2fs_read_inode(fs, ino, &inode); in set_inode_extra()
118 if (retval) { in set_inode_extra()
119 com_err(__func__, retval, _("while reading inode %u"), ino); in set_inode_extra()
120 return retval; in set_inode_extra()
132 retval = ext2fs_write_inode(fs, ino, &inode); in set_inode_extra()
133 if (retval) in set_inode_extra()
134 com_err(__func__, retval, _("while writing inode %u"), ino); in set_inode_extra()
135 return retval; in set_inode_extra()
142 errcode_t retval, close_retval; in set_inode_xattr() local
153 retval = errno; in set_inode_xattr()
154 com_err(__func__, retval, _("while listing attributes of \"%s\""), in set_inode_xattr()
156 return retval; in set_inode_xattr()
161 retval = ext2fs_xattrs_open(fs, ino, &handle); in set_inode_xattr()
162 if (retval) { in set_inode_xattr()
163 if (retval == EXT2_ET_MISSING_EA_FEATURE) in set_inode_xattr()
165 com_err(__func__, retval, _("while opening inode %u"), ino); in set_inode_xattr()
166 return retval; in set_inode_xattr()
169 retval = ext2fs_xattrs_read(handle); in set_inode_xattr()
170 if (retval) { in set_inode_xattr()
171 com_err(__func__, retval, in set_inode_xattr()
176 retval = ext2fs_get_mem(size, &list); in set_inode_xattr()
177 if (retval) { in set_inode_xattr()
178 com_err(__func__, retval, _("while allocating memory")); in set_inode_xattr()
184 retval = errno; in set_inode_xattr()
185 com_err(__func__, retval, _("while listing attributes of \"%s\""), in set_inode_xattr()
196 retval = errno; in set_inode_xattr()
197 com_err(__func__, retval, in set_inode_xattr()
203 retval = ext2fs_get_mem(value_size, &value); in set_inode_xattr()
204 if (retval) { in set_inode_xattr()
205 com_err(__func__, retval, _("while allocating memory")); in set_inode_xattr()
212 retval = errno; in set_inode_xattr()
213 com_err(__func__, retval, in set_inode_xattr()
219 retval = ext2fs_xattr_set(handle, name, value, value_size); in set_inode_xattr()
221 if (retval) { in set_inode_xattr()
222 com_err(__func__, retval, in set_inode_xattr()
233 com_err(__func__, retval, _("while closing inode %u"), ino); in set_inode_xattr()
234 retval = retval ? retval : close_retval; in set_inode_xattr()
236 return retval; in set_inode_xattr()
253 errcode_t retval; in do_mknod_internal() local
281 retval = ext2fs_new_inode(fs, cwd, 010755, 0, &ino); in do_mknod_internal()
282 if (retval) { in do_mknod_internal()
283 com_err(__func__, retval, _("while allocating inode \"%s\""), in do_mknod_internal()
285 return retval; in do_mknod_internal()
291 retval = ext2fs_link(fs, cwd, name, ino, filetype); in do_mknod_internal()
292 if (retval == EXT2_ET_DIR_NO_SPACE) { in do_mknod_internal()
293 retval = ext2fs_expand_dir(fs, cwd); in do_mknod_internal()
294 if (retval) { in do_mknod_internal()
295 com_err(__func__, retval, in do_mknod_internal()
297 return retval; in do_mknod_internal()
299 retval = ext2fs_link(fs, cwd, name, ino, filetype); in do_mknod_internal()
301 if (retval) { in do_mknod_internal()
302 com_err(name, retval, _("while creating inode \"%s\""), name); in do_mknod_internal()
303 return retval; in do_mknod_internal()
328 retval = ext2fs_write_new_inode(fs, ino, &inode); in do_mknod_internal()
329 if (retval) in do_mknod_internal()
330 com_err(__func__, retval, _("while writing inode %u"), ino); in do_mknod_internal()
332 return retval; in do_mknod_internal()
342 errcode_t retval; in do_symlink_internal() local
347 retval = ext2fs_namei(fs, root, cwd, name, &parent_ino); in do_symlink_internal()
348 if (retval) { in do_symlink_internal()
349 com_err(name, retval, 0); in do_symlink_internal()
350 return retval; in do_symlink_internal()
356 retval = ext2fs_symlink(fs, parent_ino, 0, name, target); in do_symlink_internal()
357 if (retval == EXT2_ET_DIR_NO_SPACE) { in do_symlink_internal()
358 retval = ext2fs_expand_dir(fs, parent_ino); in do_symlink_internal()
359 if (retval) { in do_symlink_internal()
360 com_err("do_symlink_internal", retval, in do_symlink_internal()
362 return retval; in do_symlink_internal()
364 retval = ext2fs_symlink(fs, parent_ino, 0, name, target); in do_symlink_internal()
366 if (retval) in do_symlink_internal()
367 com_err("ext2fs_symlink", retval, in do_symlink_internal()
369 return retval; in do_symlink_internal()
378 errcode_t retval; in do_mkdir_internal() local
384 retval = ext2fs_namei(fs, root, cwd, name, &parent_ino); in do_mkdir_internal()
385 if (retval) { in do_mkdir_internal()
386 com_err(name, retval, _("while looking up \"%s\""), in do_mkdir_internal()
388 return retval; in do_mkdir_internal()
394 retval = ext2fs_mkdir(fs, parent_ino, 0, name); in do_mkdir_internal()
395 if (retval == EXT2_ET_DIR_NO_SPACE) { in do_mkdir_internal()
396 retval = ext2fs_expand_dir(fs, parent_ino); in do_mkdir_internal()
397 if (retval) { in do_mkdir_internal()
398 com_err(__func__, retval, in do_mkdir_internal()
400 return retval; in do_mkdir_internal()
402 retval = ext2fs_mkdir(fs, parent_ino, 0, name); in do_mkdir_internal()
404 if (retval) in do_mkdir_internal()
405 com_err("ext2fs_mkdir", retval, in do_mkdir_internal()
407 return retval; in do_mkdir_internal()
629 errcode_t retval; in do_write_internal() local
635 retval = errno; in do_write_internal()
636 com_err(__func__, retval, _("while opening \"%s\" to copy"), in do_write_internal()
638 return retval; in do_write_internal()
641 retval = errno; in do_write_internal()
648 retval = ext2fs_namei(fs, root, cwd, dest, &parent_ino); in do_write_internal()
649 if (retval) { in do_write_internal()
650 com_err(dest, retval, _("while looking up \"%s\""), in do_write_internal()
658 retval = ext2fs_namei(fs, root, parent_ino, dest, &newfile); in do_write_internal()
659 if (retval == 0) { in do_write_internal()
660 retval = EXT2_ET_FILE_EXISTS; in do_write_internal()
664 retval = ext2fs_new_inode(fs, parent_ino, 010755, 0, &newfile); in do_write_internal()
665 if (retval) in do_write_internal()
670 retval = ext2fs_link(fs, parent_ino, dest, newfile, EXT2_FT_REG_FILE); in do_write_internal()
671 if (retval == EXT2_ET_DIR_NO_SPACE) { in do_write_internal()
672 retval = ext2fs_expand_dir(fs, parent_ino); in do_write_internal()
673 if (retval) in do_write_internal()
675 retval = ext2fs_link(fs, parent_ino, dest, newfile, in do_write_internal()
678 if (retval) in do_write_internal()
688 retval = ext2fs_inode_size_set(fs, &inode, statbuf.st_size); in do_write_internal()
689 if (retval) in do_write_internal()
697 retval = ext2fs_extent_open2(fs, newfile, &inode, &handle); in do_write_internal()
698 if (retval) in do_write_internal()
703 retval = ext2fs_write_new_inode(fs, newfile, &inode); in do_write_internal()
704 if (retval) in do_write_internal()
707 retval = ext2fs_inline_data_init(fs, newfile); in do_write_internal()
708 if (retval) in do_write_internal()
712 retval = copy_file(fs, fd, &statbuf, newfile); in do_write_internal()
713 if (retval) in do_write_internal()
718 return retval; in do_write_internal()
819 errcode_t retval = 0; in __populate_fs() local
826 retval = errno; in __populate_fs()
827 com_err(__func__, retval, in __populate_fs()
830 return retval; in __populate_fs()
836 retval = errno; in __populate_fs()
837 com_err(__func__, retval, in __populate_fs()
839 return retval; in __populate_fs()
847 retval = errno; in __populate_fs()
848 com_err(__func__, retval, _("while lstat \"%s\""), in __populate_fs()
859 retval = add_link(fs, parent_ino, in __populate_fs()
862 if (retval) { in __populate_fs()
863 com_err(__func__, retval, in __populate_fs()
873 retval = path_append(target, name); in __populate_fs()
874 if (retval) { in __populate_fs()
875 com_err(__func__, retval, in __populate_fs()
881 retval = fs_callbacks->create_new_inode(fs, in __populate_fs()
884 if (retval) in __populate_fs()
894 retval = do_mknod_internal(fs, parent_ino, name, in __populate_fs()
896 if (retval) { in __populate_fs()
897 com_err(__func__, retval, in __populate_fs()
906 com_err(__func__, retval, in __populate_fs()
913 retval = errno; in __populate_fs()
914 com_err(__func__, retval, in __populate_fs()
921 com_err(__func__, retval, in __populate_fs()
928 retval = do_symlink_internal(fs, parent_ino, name, in __populate_fs()
931 if (retval) { in __populate_fs()
932 com_err(__func__, retval, in __populate_fs()
940 retval = do_write_internal(fs, parent_ino, name, name, in __populate_fs()
942 if (retval) { in __populate_fs()
943 com_err(__func__, retval, in __populate_fs()
953 retval = do_mkdir_internal(fs, parent_ino, name, in __populate_fs()
955 if (retval) { in __populate_fs()
956 com_err(__func__, retval, in __populate_fs()
961 retval = ext2fs_namei(fs, root, parent_ino, in __populate_fs()
963 if (retval) { in __populate_fs()
964 com_err(name, retval, 0); in __populate_fs()
968 retval = __populate_fs(fs, ino, name, root, hdlinks, in __populate_fs()
970 if (retval) in __populate_fs()
973 retval = errno; in __populate_fs()
974 com_err(__func__, retval, in __populate_fs()
984 retval = ext2fs_namei(fs, root, parent_ino, name, &ino); in __populate_fs()
985 if (retval) { in __populate_fs()
986 com_err(name, retval, _("while looking up \"%s\""), in __populate_fs()
991 retval = set_inode_extra(fs, ino, &st); in __populate_fs()
992 if (retval) { in __populate_fs()
993 com_err(__func__, retval, in __populate_fs()
998 retval = set_inode_xattr(fs, ino, name); in __populate_fs()
999 if (retval) { in __populate_fs()
1000 com_err(__func__, retval, in __populate_fs()
1006 retval = fs_callbacks->end_create_new_inode(fs, in __populate_fs()
1009 if (retval) in __populate_fs()
1025 retval = EXT2_ET_NO_MEMORY; in __populate_fs()
1026 com_err(name, retval, in __populate_fs()
1045 return retval; in __populate_fs()
1054 errcode_t retval; in populate_fs2() local
1065 retval = errno; in populate_fs2()
1066 com_err(__func__, retval, _("while allocating memory")); in populate_fs2()
1067 return retval; in populate_fs2()
1074 retval = set_inode_xattr(fs, root, source_dir); in populate_fs2()
1075 if (retval) { in populate_fs2()
1076 com_err(__func__, retval, in populate_fs2()
1081 retval = __populate_fs(fs, parent_ino, source_dir, root, &hdlinks, in populate_fs2()
1087 return retval; in populate_fs2()