David Hendricks has posted comments on this change. ( https://review.coreboot.org/25706 )
Change subject: linux_mtd: Import driver from ChromiumOS ......................................................................
Patch Set 10:
(1 comment)
https://review.coreboot.org/#/c/25706/10/linux_mtd.c File linux_mtd.c:
https://review.coreboot.org/#/c/25706/10/linux_mtd.c@56 PS10, Line 56: msg_perr("Cannot open %s\n", path);
Hmmp, this is on the default path for `-p internal` now... […]
Darn. The easy workaround just buries the issue. I also think we should avoid heuristics in try_mtd() since that part of the code should not assume to know which MTD device to test.
I think the best place to check this is in linux_mtd_init(). For now we can do a simple check with the assumption that we should not print errors unless the user intentionally specifies a bad sysfs node. Patch here: https://review.coreboot.org/c/flashrom/+/26500