diff options
author | Carl Worth <cworth@cworth.org> | 2009-04-13 14:06:00 -0700 |
---|---|---|
committer | Carl Worth <cworth@cworth.org> | 2009-04-13 14:06:00 -0700 |
commit | 0a820610ee733f348f9331c677f74cc88bc46486 (patch) | |
tree | 1eba60d7725b0819916eea43526afc07fdcd6f47 /tools/intel_gpu_dump.c | |
parent | 660a20f611adb0a176cecce1b2abfe9ec5accd05 (diff) |
intel_gpu_dump: Mention filename in error message
This helps for when the user makes a typo trying to pass a file
or directory name to intel_gpu_dump.
Diffstat (limited to 'tools/intel_gpu_dump.c')
-rw-r--r-- | tools/intel_gpu_dump.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/tools/intel_gpu_dump.c b/tools/intel_gpu_dump.c index 8ddfbd30..947617e1 100644 --- a/tools/intel_gpu_dump.c +++ b/tools/intel_gpu_dump.c @@ -1962,8 +1962,11 @@ main (int argc, char *argv[]) } else { path = argv[1]; err = stat(path, &st); - if (err != 0) - errx(1, "Couldn't stat the file or directory\n"); + if (err != 0) { + fprintf (stderr, "Error opening %s: %s\n", + path, strerror (errno)); + exit (1); + } } if (S_ISDIR(st.st_mode)) { |