Remove unncessary memcpy(3) and fix file system ID handling.

I removed a bzero() call to reduce compiler warnings in the previous commit
(r544829).  It turned out the next memcpy() call was also wrong.  Just use
natural assignments here not to obfuscate the code.

Reported by:	Martin Simmons (martin at lispworks dot com) (some time ago)
This commit is contained in:
Jung-uk Kim 2020-08-13 21:54:59 +00:00
parent e595faf628
commit 0c7dc882a4
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=544846
2 changed files with 3 additions and 2 deletions

View File

@ -3,6 +3,7 @@
PORTNAME= virtualbox-ose
PORTVERSION= 5.2.44
PORTREVISION= 1
CATEGORIES= emulators
MASTER_SITES= https://download.oracle.com/virtualbox/${PORTVERSION}/
PKGNAMESUFFIX?= -additions

View File

@ -451,8 +451,8 @@
+
+ MNT_ILOCK(mp);
+ mp->mnt_data = vboxfsmp;
+ /* f_fsid is int32_t but serial is uint32_t, convert */
+ memcpy(&mp->mnt_stat.f_fsid, &fsinfo.serial, sizeof(mp->mnt_stat.f_fsid));
+ mp->mnt_stat.f_fsid.val[0] = fsinfo.serial;
+ mp->mnt_stat.f_fsid.val[1] = 0;
+ mp->mnt_flag |= MNT_LOCAL;
+ if (readonly != 0)
+ mp->mnt_flag |= MNT_RDONLY;