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.
This commit is contained in:
Carl Worth 2009-04-13 14:06:00 -07:00
parent 660a20f611
commit 0a820610ee

View File

@ -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)) {