]> www.infradead.org Git - mtd-utils.git/commitdiff
nandwrite: Pass Real Names as Arguments to perror
authorGrant Erickson <gerickson@nuovations.com>
Sun, 7 Sep 2008 18:28:56 +0000 (18:28 +0000)
committerJosh Boyer <jwboyer@gmail.com>
Mon, 8 Sep 2008 14:27:14 +0000 (10:27 -0400)
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>
nandwrite.c

index b1a4307e222529c11d1cafc4cb33ed871ccb9de8..e5de140e5e583f5637f4df50d974f5ba45c01773 100644 (file)
@@ -230,7 +230,7 @@ int main(int argc, char * const argv[])
 
        /* Open the device */
        if ((fd = open(mtd_device, O_RDWR)) == -1) {
-               perror("open flash");
+               perror(mtd_device);
                exit (EXIT_FAILURE);
        }
 
@@ -337,7 +337,7 @@ int main(int argc, char * const argv[])
 
        /* Open the input file */
        if ((ifd = open(img, O_RDONLY)) == -1) {
-               perror("open input file");
+               perror(img);
                goto restoreoob;
        }