summaryrefslogtreecommitdiff
path: root/nanddump.c
diff options
context:
space:
mode:
authorGrant Erickson <gerickson@nuovations.com>2008-09-07 20:45:36 +0000
committerJosh Boyer <jwboyer@gmail.com>2008-09-08 10:28:27 -0400
commit6200113fb94fb2782c220defc301712439543904 (patch)
treedefad95a87bd74c0df69c647d6a47ad2f849c3eb /nanddump.c
parentf4f8263572574f682098011d8dced98787aa7c27 (diff)
nanddump: Pass Real Names as Arguments to perror
Pass the MTD device node and dump 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 'nanddump.c')
-rw-r--r--nanddump.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/nanddump.c b/nanddump.c
index 8c7175c..168fbbb 100644
--- a/nanddump.c
+++ b/nanddump.c
@@ -182,7 +182,7 @@ int main(int argc, char * const argv[])
/* Open MTD device */
if ((fd = open(mtddev, O_RDONLY)) == -1) {
- perror("open flash");
+ perror(mtddev);
exit (EXIT_FAILURE);
}
@@ -249,7 +249,7 @@ int main(int argc, char * const argv[])
if (!dumpfile) {
ofd = STDOUT_FILENO;
} else if ((ofd = open(dumpfile, O_WRONLY | O_TRUNC | O_CREAT, 0644))== -1) {
- perror ("open outfile");
+ perror (dumpfile);
close(fd);
exit(EXIT_FAILURE);
}