--- u-boot-tools-2016.01/tools/env/fw_env.c.orig 2016-01-12 15:06:54.000000000 +0100 +++ u-boot-tools-2016.01/tools/env/fw_env.c 2016-03-22 09:47:07.014381827 +0100 @@ -1453,6 +1453,7 @@ int rc; char dump[128]; char *devname; + int fd_test; fp = fopen (fname, "r"); if (fp == NULL) @@ -1473,6 +1474,12 @@ if (rc < 3) continue; + fd_test = open (devname, O_RDWR); + if (fd_test < 0) + continue; + if (close (fd_test)) + continue; + DEVNAME(i) = devname; if (rc < 4)