diff options
-rw-r--r-- | linux_mtd.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/linux_mtd.c b/linux_mtd.c index d2df95ef..22702e90 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; |