diff options
author | Nikolaus Rath <Nikolaus@rath.org> | 2017-05-25 12:26:52 -0700 |
---|---|---|
committer | Nikolaus Rath <Nikolaus@rath.org> | 2017-05-25 12:26:52 -0700 |
commit | 179fa13b40387645e722089873079488f9dbe3d8 (patch) | |
tree | 0671dd053619b933316814e56ca9a9673fa1e814 /example | |
parent | db8c33e07eed8c805623d83849150d3d1c592105 (diff) |
example/passthrough.c: add debugging code for issue #157.
Diffstat (limited to 'example')
-rw-r--r-- | example/passthrough.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/example/passthrough.c b/example/passthrough.c index 0c635ca..e7dbb52 100644 --- 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; } |