projects
/
qemu-gpiodev
/
libfuse.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
db8c33e
)
example/passthrough.c: add debugging code for issue #157.
author
Nikolaus Rath
<Nikolaus@rath.org>
Thu, 25 May 2017 19:26:52 +0000
(12:26 -0700)
committer
Nikolaus Rath
<Nikolaus@rath.org>
Thu, 25 May 2017 19:26:52 +0000
(12:26 -0700)
example/passthrough.c
patch
|
blob
|
history
diff --git
a/example/passthrough.c
b/example/passthrough.c
index 0c635ca62d2363fda0b9df4a555764ea983c3a03..e7dbb521aa90dcbb1a6b26a7df2e45bd700fbfc3 100644
(file)
--- a/
example/passthrough.c
+++ b/
example/passthrough.c
@@
-74,9
+74,16
@@
static int xmp_getattr(const char *path, struct stat *stbuf,
int res;
res = lstat(path, stbuf);
- if (res == -1)
- return -errno;
+ if (res == -1) {
+ /* Temporary debugging aid for issue #157 */
+ res = errno;
+ printf("xmp_getattr(%s) --> %s\n", path,
+ strerror(res));
+ return -res;
+ }
+ printf("xmp_getattr(%s) --> ino %d, nlink %d\n", path,
+ (int) stbuf->st_ino, (int) stbuf->st_nlink);
return 0;
}