Discussion:
[PATCH] dosfs: Check error status
Sebastian Huber
2014-09-11 11:06:17 UTC
Permalink
---
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
Joel Sherrill
2014-09-11 11:11:20 UTC
Permalink
Assuming this fixes a warning, commit it.

I will review the logs and answer your other question when I get to the workshop this morning. That requires a computer.

I will also revert my change to rfs and start another build sweep so please commit this.
Post by Sebastian Huber
---
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;
Loading...