summaryrefslogtreecommitdiff
path: root/fs_test/lwext4_generic.c
diff options
context:
space:
mode:
authorgkostka <kostka.grzegorz@gmail.com>2015-12-31 00:38:12 +0100
committergkostka <kostka.grzegorz@gmail.com>2015-12-31 00:38:12 +0100
commitba407e042e22ed6ed567aa8dd4365da84bff0449 (patch)
tree491721f5ff1f2074c50daabad4c49bc3b2575257 /fs_test/lwext4_generic.c
parent45764c06a8ed8b23c5e0961976d7deefd57fcd73 (diff)
fs_test: simplify open_filedev implementation
Diffstat (limited to 'fs_test/lwext4_generic.c')
-rw-r--r--fs_test/lwext4_generic.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/fs_test/lwext4_generic.c b/fs_test/lwext4_generic.c
index 21a4526..dc6023a 100644
--- a/fs_test/lwext4_generic.c
+++ b/fs_test/lwext4_generic.c
@@ -148,6 +148,10 @@ static bool open_windows(void)
#endif
}
+static bool open_filedev(void)
+{
+ return winpart ? open_windows() : open_linux();
+}
static bool parse_opt(int argc, char **argv)
{
@@ -216,12 +220,9 @@ int main(int argc, char **argv)
printf("\trw count: %d\n", rw_count);
printf("\tcache mode: %s\n", cache_mode ? "dynamic" : "static");
- if (winpart) {
- if (!open_windows())
- return EXIT_FAILURE;
- } else {
- if (!open_linux())
- return EXIT_FAILURE;
+ if (!open_filedev()) {
+ printf("open_filedev error\n");
+ return EXIT_FAILURE;
}