Date: Tue, 31 Jul 2018 12:36:47 +0000 (UTC) From: Ed Maste <emaste@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336965 - head/sys/fs/cd9660 Message-ID: <201807311236.w6VCalrB070184@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: emaste Date: Tue Jul 31 12:36:46 2018 New Revision: 336965 URL: https://svnweb.freebsd.org/changeset/base/336965 Log: cd9660: replace bcopy/bzero with C standard equivalents To reduce diffs against NetBSD. Modified: head/sys/fs/cd9660/cd9660_lookup.c head/sys/fs/cd9660/cd9660_rrip.c head/sys/fs/cd9660/cd9660_vfsops.c head/sys/fs/cd9660/cd9660_vnops.c Modified: head/sys/fs/cd9660/cd9660_lookup.c ============================================================================== --- head/sys/fs/cd9660/cd9660_lookup.c Tue Jul 31 11:23:44 2018 (r336964) +++ head/sys/fs/cd9660/cd9660_lookup.c Tue Jul 31 12:36:46 2018 (r336965) @@ -377,7 +377,7 @@ found: */ if (dp->i_number != i_ino) { ep2 = malloc(reclen, M_TEMP, M_WAITOK); - bcopy(ep, ep2, reclen); + memcpy(ep2, ep, reclen); ep = ep2; } brelse(bp); Modified: head/sys/fs/cd9660/cd9660_rrip.c ============================================================================== --- head/sys/fs/cd9660/cd9660_rrip.c Tue Jul 31 11:23:44 2018 (r336964) +++ head/sys/fs/cd9660/cd9660_rrip.c Tue Jul 31 12:36:46 2018 (r336965) @@ -204,7 +204,7 @@ cd9660_rrip_slink(p,ana) return 0; } - bcopy(inbuf,outbuf,wlen); + memcpy(outbuf, inbuf, wlen); outbuf += wlen; len += wlen; @@ -278,7 +278,7 @@ cd9660_rrip_altname(p,ana) return 0; } - bcopy(inbuf,ana->outbuf,wlen); + memcpy(ana->outbuf, inbuf, wlen); ana->outbuf += wlen; if (!cont) { @@ -356,7 +356,7 @@ cd9660_rrip_tstamp(p,ana) ISO_FTYPE_RRIP); ptime += 7; } else - bzero(&ana->inop->inode.iso_mtime,sizeof(struct timespec)); + memset(&ana->inop->inode.iso_mtime, 0, sizeof(struct timespec)); if (*p->flags&ISO_SUSP_TSTAMP_ACCESS) { cd9660_tstamp_conv7(ptime,&ana->inop->inode.iso_atime, @@ -379,7 +379,7 @@ cd9660_rrip_tstamp(p,ana) cd9660_tstamp_conv17(ptime,&ana->inop->inode.iso_mtime); ptime += 17; } else - bzero(&ana->inop->inode.iso_mtime,sizeof(struct timespec)); + memset(&ana->inop->inode.iso_mtime, 0, sizeof(struct timespec)); if (*p->flags&ISO_SUSP_TSTAMP_ACCESS) { cd9660_tstamp_conv17(ptime,&ana->inop->inode.iso_atime); Modified: head/sys/fs/cd9660/cd9660_vfsops.c ============================================================================== --- head/sys/fs/cd9660/cd9660_vfsops.c Tue Jul 31 11:23:44 2018 (r336964) +++ head/sys/fs/cd9660/cd9660_vfsops.c Tue Jul 31 12:36:46 2018 (r336965) @@ -363,7 +363,7 @@ iso_mountfs(devvp, mp) * filehandle validation. */ isomp->volume_space_size += ssector; - bcopy (rootp, isomp->root, sizeof isomp->root); + memcpy(isomp->root, rootp, sizeof isomp->root); isomp->root_extent = isonum_733 (rootp->extent); isomp->root_size = isonum_733 (rootp->size); @@ -465,7 +465,7 @@ iso_mountfs(devvp, mp) joliet_level); rootp = (struct iso_directory_record *) sup->root_directory_record; - bcopy (rootp, isomp->root, sizeof isomp->root); + memcpy(isomp->root, rootp, sizeof isomp->root); isomp->root_extent = isonum_733 (rootp->extent); isomp->root_size = isonum_733 (rootp->size); isomp->joliet_level = joliet_level; Modified: head/sys/fs/cd9660/cd9660_vnops.c ============================================================================== --- head/sys/fs/cd9660/cd9660_vnops.c Tue Jul 31 11:23:44 2018 (r336964) +++ head/sys/fs/cd9660/cd9660_vnops.c Tue Jul 31 12:36:46 2018 (r336965) @@ -446,10 +446,10 @@ iso_shipdir(idp) idp->current.d_reclen = GENERIC_DIRSIZ(&idp->current); if (assoc) { idp->assocoff = idp->curroff; - bcopy(&idp->current,&idp->assocent,idp->current.d_reclen); + memcpy(&idp->assocent, &idp->current, idp->current.d_reclen); } else { idp->saveoff = idp->curroff; - bcopy(&idp->current,&idp->saveent,idp->current.d_reclen); + memcpy(&idp->saveent, &idp->current, idp->current.d_reclen); } return (0); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201807311236.w6VCalrB070184>