summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Worth <cworth@cworth.org>2009-04-13 14:06:00 -0700
committerCarl Worth <cworth@cworth.org>2009-04-13 14:06:00 -0700
commit0a820610ee733f348f9331c677f74cc88bc46486 (patch)
tree1eba60d7725b0819916eea43526afc07fdcd6f47
parent660a20f611adb0a176cecce1b2abfe9ec5accd05 (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.
-rw-r--r--tools/intel_gpu_dump.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/tools/intel_gpu_dump.c b/tools/intel_gpu_dump.c
index 8ddfbd302..947617e1e 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)) {