Pass the MTD device node and input file name as arguments to perror
rather than more ambigous, static messages on open failures.
Signed-off-by: Grant Erickson <gerickson@nuovations.com>
Acked-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: Josh Boyer <jwboyer@gmail.com>
/* Open the device */
if ((fd = open(mtd_device, O_RDWR)) == -1) {
- perror("open flash");
+ perror(mtd_device);
exit (EXIT_FAILURE);
}
/* Open the input file */
if ((ifd = open(img, O_RDONLY)) == -1) {
- perror("open input file");
+ perror(img);
goto restoreoob;
}