summaryrefslogtreecommitdiffstats
path: root/linux_mtd.c
diff options
context:
space:
mode:
Diffstat (limited to 'linux_mtd.c')
-rw-r--r--linux_mtd.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/linux_mtd.c b/linux_mtd.c
index d2df95ef2..22702e904 100644
--- a/linux_mtd.c
+++ b/linux_mtd.c
@@ -340,6 +340,10 @@ static int linux_mtd_setup(int dev_num)
msg_perr("Cannot open file stream for %s\n", dev_path);
goto linux_mtd_setup_exit;
}
+ ret = setvbuf(dev_fp, NULL, _IONBF, 0);
+ if (ret)
+ msg_pwarn("Failed to set MTD device to unbuffered: %d\n", ret);
+
msg_pinfo("Opened %s successfully\n", dev_path);
ret = 0;