From 6200113fb94fb2782c220defc301712439543904 Mon Sep 17 00:00:00 2001 From: Grant Erickson Date: Sun, 7 Sep 2008 20:45:36 +0000 Subject: 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 Acked-by: Artem Bityutskiy Signed-off-by: Josh Boyer --- nanddump.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'nanddump.c') 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); } -- cgit v1.2.3