commit | 1a92c58a1ca05a62c45d7e217da14f60667cb6f7 | [log] [tgz] |
---|---|---|
author | Iris Chang <iris.chang@mediatek.com> | Tue Mar 27 18:40:24 2018 +0800 |
committer | Steven Moreland <smoreland@google.com> | Wed Mar 28 22:37:43 2018 +0000 |
tree | b373ed2562710724031e55ef0ff5acf0abd3c052 | |
parent | d90e2fe04785a3dea67826ae5a6c636972ee969d [diff] |
Add DT_UNKNOWN handling Problem: With particular file system, d_type is not supported and the value will be DT_UNKNOWN. As readdir(3) states: Currently, only some filesystems (among them: Btrfs, ext2, ext3, and ext4) have full support for returning the file type in d_type. All applications must properly handle a return of DT_UNKNOWN. Reference: http://man7.org/linux/man-pages/man3/readdir.3.html Solution: If d_type is DT_UNKNOWN, use lstat(2) to check file mode. Bug: 76443731 Test: With Linux kernel 4.16-rc5, overlayfs exported with NFSv3, d_type is not supported. We verified the solution with above environment, and build is passed with the patch. On the contrary, we get build errors if without the solution. Test: ./test/run_all_host_tests.sh (on ext4) Change-Id: Ide175a301f7c4b8dc1106072fee1ff809e8fd5c4
croot make hidl-gen
hidl-gen -o output-path -L language (-r interface-root) fqname output-path: directory to store the output files. language: output file for given language. e.g.c++, vts.. fqname: fully qualified name of the input files. For singe file input, follow the format: package@version::fileName For directory input, follow the format: package@version interface-root(optional): prefix and root path for fqname. If not set, use the default prefix: android.hardware and default root path defined in $TOP. examples: croot hidl-gen -o output -L c++ -r android.hardware:hardware/interfaces -r android.hidl:system/libhidl/transport android.hardware.nfc@1.0::INfc.hal hidl-gen -o output -L vts -r android.hardware:hardware/interfaces -r android.hidl:system/libhidl/transport android.hardware.nfc@1.0 hidl-gen -o test -L c++ -r android.hardware:hardware/interfaces -r android.hidl:system/libhidl/transport android.hardware.nfc@1.0 hidl-gen -L hash -r android.hardware:hardware/interfaces -r android.hidl:system/libhidl/transport android.hardware.nfc@1.0