#endif
}
+static bool open_filedev(void)
+{
+ return winpart ? open_windows() : open_linux();
+}
static bool parse_opt(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;
}
static bool open_filedev(void)
{
- if (winpart) {
- if (!open_windows())
- return false;
- } else {
- if (!open_linux())
- return false;
- }
-
- return true;
+ return winpart ? open_windows() : open_linux();
}
static bool parse_opt(int argc, char **argv)
static bool open_filedev(void)
{
- if (winpart) {
- if (!open_windows())
- return false;
- } else {
- if (!open_linux())
- return false;
- }
-
- return true;
+ return winpart ? open_windows() : open_linux();
}
static bool parse_opt(int argc, char **argv)