fs/hostfs: fix bug about getting error file size by fstat

Change-Id: I10a0d52da649e4c3138e5a2301bcb6525e2e3350
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
This commit is contained in:
Jiuzhu Dong 2021-04-23 17:44:03 +08:00 committed by Brennan Ashton
parent 99a9d75cdd
commit 9980a1c27d
1 changed files with 12 additions and 15 deletions

View File

@ -116,9 +116,17 @@ begin_packed_struct struct hostfs_rpmsg_ioctl_s
begin_packed_struct struct hostfs_rpmsg_fstat_s
{
struct hostfs_rpmsg_header_s header;
int32_t fd;
uint32_t reserved;
struct stat buf;
union
{
struct stat buf;
uint32_t reserved[16];
};
union
{
int32_t fd;
char pathname[0];
};
} end_packed_struct;
begin_packed_struct struct hostfs_rpmsg_ftruncate_s
@ -169,17 +177,6 @@ begin_packed_struct struct hostfs_rpmsg_mkdir_s
#define hostfs_rpmsg_rmdir_s hostfs_rpmsg_opendir_s
#define hostfs_rpmsg_rename_s hostfs_rpmsg_opendir_s
begin_packed_struct struct hostfs_rpmsg_stat_s
{
struct hostfs_rpmsg_header_s header;
union
{
struct stat buf;
uint32_t reserved[16];
};
char pathname[0];
} end_packed_struct;
#define hostfs_rpmsg_stat_s hostfs_rpmsg_fstat_s
#endif /* __FS_HOSTFS_HOSTFS_RPMSG_H */