projects
/
profile
/
extras
/
intel-gpu-tools.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
660a20f
)
intel_gpu_dump: Mention filename in error message
author
Carl Worth
<cworth@cworth.org>
Mon, 13 Apr 2009 21:06:00 +0000
(14:06 -0700)
committer
Carl Worth
<cworth@cworth.org>
Mon, 13 Apr 2009 21:06:00 +0000
(14:06 -0700)
This helps for when the user makes a typo trying to pass a file
or directory name to intel_gpu_dump.
tools/intel_gpu_dump.c
patch
|
blob
|
history
diff --git
a/tools/intel_gpu_dump.c
b/tools/intel_gpu_dump.c
index
8ddfbd3
..
947617e
100644
(file)
--- 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)) {