Replace structure assignments with explicity memcpy calls. This allows
Clang to compile this file: it was using the builtin memcpy and we want to use the memcpy defined in gptboot.c. (Clang can't compile boot2 yet). Submitted by: Dimitry Andric <dimitry at andric.com> Reviewed by: jhb
This commit is contained in:
parent
4873b1ac4d
commit
f5a5c5653a
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=211747
@ -223,14 +223,19 @@ fsread(ino_t inode, void *buf, size_t nbyte)
|
||||
return -1;
|
||||
n = INO_TO_VBO(n, inode);
|
||||
#if defined(UFS1_ONLY)
|
||||
dp1 = ((struct ufs1_dinode *)blkbuf)[n];
|
||||
memcpy(&dp1, (struct ufs1_dinode *)blkbuf + n,
|
||||
sizeof(struct ufs1_dinode));
|
||||
#elif defined(UFS2_ONLY)
|
||||
dp2 = ((struct ufs2_dinode *)blkbuf)[n];
|
||||
memcpy(&dp2, (struct ufs2_dinode *)blkbuf + n,
|
||||
sizeof(struct ufs2_dinode));
|
||||
#else
|
||||
if (fs->fs_magic == FS_UFS1_MAGIC)
|
||||
dp1 = ((struct ufs1_dinode *)blkbuf)[n];
|
||||
memcpy(&dp1, (struct ufs1_dinode *)blkbuf + n,
|
||||
sizeof(struct ufs1_dinode));
|
||||
else
|
||||
dp2 = ((struct ufs2_dinode *)blkbuf)[n];
|
||||
memcpy(&dp2, (struct ufs2_dinode *)blkbuf + n,
|
||||
sizeof(struct ufs2_dinode));
|
||||
|
||||
#endif
|
||||
inomap = inode;
|
||||
fs_off = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user