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;