summaryrefslogtreecommitdiff
path: root/nandwrite.c
diff options
context:
space:
mode:
authorGrant Erickson <gerickson@nuovations.com>2008-09-07 18:28:56 +0000
committerJosh Boyer <jwboyer@gmail.com>2008-09-08 10:27:14 -0400
commitada3a5a5c96b434cd9b9a58928c792466527fc74 (patch)
tree0aa8f7ab61ba728d08ef50dbe500543487c7d66a /nandwrite.c
parent1f3124f8f62fd455fb290ef87c60cec9093a47cb (diff)
nandwrite: Pass Real Names as Arguments to perror
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>
Diffstat (limited to 'nandwrite.c')
-rw-r--r--nandwrite.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/nandwrite.c b/nandwrite.c
index b1a4307..e5de140 100644
--- a/nandwrite.c
+++ b/nandwrite.c
@@ -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;
}