| Submitter | Grant Erickson |
|---|---|
| Date | Sept. 8, 2008, 4:28 a.m. |
| Message ID | <1220848136-22314-1-git-send-email-gerickson@nuovations.com> |
| Download | mbox | patch |
| Permalink | /patch/197/ |
| State | Accepted |
| Headers | show |
Comments
Patch
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; }
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>