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
This commit is contained in:
Ken Sumrall 2013-08-14 20:02:13 -07:00
parent 9face5cad5
commit 3a8768804c
1 changed files with 2 additions and 0 deletions

View File

@ -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;
}