test case: int main(void) { struct stat buf; int ret; stat("test1.t", &buf); printf("test1.t st.mode:%x\n", buf.st_mode); stat("test.t", &buf); printf("test.t st.mode:%x\n", buf.st_mode); ret = chmod("test1.t", buf.st_mode); if (ret == 0) { stat("test1.t", &buf); printf("test1.t st.mode:%x\n", buf.st_mode); } return 0; } >> test1.t st.mode:81b4 test.t st.mode:81fd test1.t st.mode:81fd Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
Signed-off-by: Shoukui Zhang <zhangshoukui@xiaomi.com>
support API: open close read write unlink mkdir rename fchstat rmdir symlink Signed-off-by: guohao15 <guohao15@xiaomi.com>
The full mask for st_mode is 0177777 Now modify any file permissions in hostfs and all will fail
and implement all status related change function. the individual file system change will provide in other upcoming patchset. Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com> Change-Id: I8fde9db8eba9586e9c8da078b67e020c26623cf4