[PATCH] dosfs: Check error status
Sebastian Huber
sebastian.huber at embedded-brains.de
Thu Sep 11 11:06:17 UTC 2014
---
cpukit/libfs/src/dosfs/msdos_misc.c | 30 ++++++++++++++++--------------
1 file changed, 16 insertions(+), 14 deletions(-)
diff --git a/cpukit/libfs/src/dosfs/msdos_misc.c b/cpukit/libfs/src/dosfs/msdos_misc.c
index c09aa19..03ec38f 100644
--- a/cpukit/libfs/src/dosfs/msdos_misc.c
+++ b/cpukit/libfs/src/dosfs/msdos_misc.c
@@ -2001,20 +2001,22 @@ msdos_find_name_in_fat_file (
retval = -1;
break;
}
- retval = msdos_add_file (
- buffer,
- name_type,
- fs_info,
- fat_fd,
- bts2rd,
- fat_entries,
- name_dir_entry,
- dir_pos,
- dir_offset,
- empty_space_offset,
- empty_space_entry,
- empty_space_count
- );
+
+ if (retval == RC_OK)
+ retval = msdos_add_file (
+ buffer,
+ name_type,
+ fs_info,
+ fat_fd,
+ bts2rd,
+ fat_entries,
+ name_dir_entry,
+ dir_pos,
+ dir_offset,
+ empty_space_offset,
+ empty_space_entry,
+ empty_space_count
+ );
}
return retval;
--
1.8.4.5
More information about the devel
mailing list