From: Nikolaus Rath Date: Thu, 25 May 2017 19:26:52 +0000 (-0700) Subject: example/passthrough.c: add debugging code for issue #157. X-Git-Tag: fuse-3.1.0~27 X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=179fa13b40387645e722089873079488f9dbe3d8;p=qemu-gpiodev%2Flibfuse.git example/passthrough.c: add debugging code for issue #157. --- 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; }