summaryrefslogtreecommitdiffstats
path: root/sdcard
diff options
context:
space:
mode:
authorKen Sumrall <ksumrall@android.com>2013-08-14 20:02:13 -0700
committerKen Sumrall <ksumrall@android.com>2013-08-14 20:02:13 -0700
commit3a8768804ce4b4797359d5df03ec8897fe43de90 (patch)
treeb6dc3e2919b086aa4869568af6398c15c89a2ae1 /sdcard
parent9face5cad5b4ffb883b23e1c45aafac73c712fd6 (diff)
downloadsystem_core-3a8768804ce4b4797359d5df03ec8897fe43de90.zip
system_core-3a8768804ce4b4797359d5df03ec8897fe43de90.tar.gz
system_core-3a8768804ce4b4797359d5df03ec8897fe43de90.tar.bz2
Fix handle_opendir() in the sdcard daemon
The fuse_open_out structure returned to the kernel by handle_opendir() was not properly initializing all the fields. The symptom was recursive ls (ls -R) failing on the emulated sdcard filesystem, because rewinddir(3) was failing with ESPIPE. Bug: 7168594 Change-Id: I56ddfd3453e6aac34fe6e001e88c4c46fb2eb271
Diffstat (limited to 'sdcard')
-rw-r--r--sdcard/sdcard.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sdcard/sdcard.c b/sdcard/sdcard.c
index bff6e67..7e65a68 100644
--- a/sdcard/sdcard.c
+++ b/sdcard/sdcard.c
@@ -972,6 +972,8 @@ static int handle_opendir(struct fuse* fuse, struct fuse_handler* handler,
return -errno;
}
out.fh = ptr_to_id(h);
+ out.open_flags = 0;
+ out.padding = 0;
fuse_reply(fuse, hdr->unique, &out, sizeof(out));
return NO_STATUS;
}