Fixed xfsprogs to build without needing bzero & bcopy. Patch by Nigel Kukard
authorJohn Voltz <john.voltz@gmail.com>
Fri, 21 Mar 2008 18:01:46 +0000 (18:01 -0000)
committerJohn Voltz <john.voltz@gmail.com>
Fri, 21 Mar 2008 18:01:46 +0000 (18:01 -0000)
package/xfsprogs/xfsprogs-2.7.11_susv3-legacy.patch [new file with mode: 0644]

diff --git a/package/xfsprogs/xfsprogs-2.7.11_susv3-legacy.patch b/package/xfsprogs/xfsprogs-2.7.11_susv3-legacy.patch
new file mode 100644 (file)
index 0000000..875770c
--- /dev/null
@@ -0,0 +1,1245 @@
+diff -ru xfsprogs-2.7.11_vanilla/copy/xfs_copy.c xfsprogs-2.7.11_sysv3-legacy/copy/xfs_copy.c\r
+--- xfsprogs-2.7.11_vanilla/copy/xfs_copy.c    2006-01-17 03:46:46.000000000 +0000\r
++++ xfsprogs-2.7.11_sysv3-legacy/copy/xfs_copy.c       2008-03-21 16:01:59.000000000 +0000\r
+@@ -903,7 +903,7 @@\r
\r
+               /* save what we need (agf) in the btree buffer */\r
\r
+-              bcopy(ag_hdr.xfs_agf, btree_buf.data, source_sectorsize);\r
++              memmove(btree_buf.data, ag_hdr.xfs_agf, source_sectorsize);\r
+               ag_hdr.xfs_agf = (xfs_agf_t *) btree_buf.data;\r
+               btree_buf.length = source_blocksize;\r
\r
+diff -ru xfsprogs-2.7.11_vanilla/growfs/xfs_growfs.c xfsprogs-2.7.11_sysv3-legacy/growfs/xfs_growfs.c\r
+--- xfsprogs-2.7.11_vanilla/growfs/xfs_growfs.c        2006-01-17 03:46:48.000000000 +0000\r
++++ xfsprogs-2.7.11_sysv3-legacy/growfs/xfs_growfs.c   2008-03-21 16:06:21.000000000 +0000\r
+@@ -250,7 +250,7 @@\r
+        * Need root access from here on (using raw devices)...\r
+        */\r
\r
+-      bzero(&xi, sizeof(xi));\r
++      memset(&xi, 0, sizeof(xi));\r
+       xi.dname = datadev;\r
+       xi.logname = logdev;\r
+       xi.rtname = rtdev;\r
+diff -ru xfsprogs-2.7.11_vanilla/io/bmap.c xfsprogs-2.7.11_sysv3-legacy/io/bmap.c\r
+--- xfsprogs-2.7.11_vanilla/io/bmap.c  2006-01-17 03:46:49.000000000 +0000\r
++++ xfsprogs-2.7.11_sysv3-legacy/io/bmap.c     2008-03-21 16:06:21.000000000 +0000\r
+@@ -175,7 +175,7 @@\r
\r
+       do {    /* loop a miximum of two times */\r
\r
+-              bzero(map, sizeof(*map));       /* zero header */\r
++              memset(map, 0, sizeof(*map));   /* zero header */\r
\r
+               map->bmv_length = -1;\r
+               map->bmv_count = map_size;\r
+diff -ru xfsprogs-2.7.11_vanilla/libhandle/jdm.c xfsprogs-2.7.11_sysv3-legacy/libhandle/jdm.c\r
+--- xfsprogs-2.7.11_vanilla/libhandle/jdm.c    2006-01-17 03:46:49.000000000 +0000\r
++++ xfsprogs-2.7.11_sysv3-legacy/libhandle/jdm.c       2008-03-21 16:06:21.000000000 +0000\r
+@@ -47,7 +47,7 @@\r
+ {\r
+       handlep->fh_fshandle = *fshandlep;\r
+       handlep->fh_sz_following = FILEHANDLE_SZ_FOLLOWING;\r
+-      bzero(handlep->fh_pad, FILEHANDLE_SZ_PAD);\r
++      memset(handlep->fh_pad, 0, FILEHANDLE_SZ_PAD);\r
+       handlep->fh_gen = statp->bs_gen;\r
+       handlep->fh_ino = statp->bs_ino;\r
+ }\r
+diff -ru xfsprogs-2.7.11_vanilla/logprint/log_misc.c xfsprogs-2.7.11_sysv3-legacy/logprint/log_misc.c\r
+--- xfsprogs-2.7.11_vanilla/logprint/log_misc.c        2006-01-17 03:46:51.000000000 +0000\r
++++ xfsprogs-2.7.11_sysv3-legacy/logprint/log_misc.c   2008-03-21 15:04:51.000000000 +0000\r
+@@ -120,10 +120,10 @@\r
+     xlog_op_header_t hbuf;\r
\r
+     /*\r
+-     * bcopy because on 64/n32, partial reads can cause the op_head\r
++     * memmove because on 64/n32, partial reads can cause the op_head\r
+      * pointer to come in pointing to an odd-numbered byte\r
+      */\r
+-    bcopy(op_head, &hbuf, sizeof(xlog_op_header_t));\r
++    memmove(&hbuf, op_head, sizeof(xlog_op_header_t));\r
+     op_head = &hbuf;\r
+     *ptr += sizeof(xlog_op_header_t);\r
+     printf("Oper (%d): tid: %x  len: %d  clientid: %s  ", i,\r
+@@ -253,10 +253,10 @@\r
+     long long          x, y;\r
\r
+     /*\r
+-     * bcopy to ensure 8-byte alignment for the long longs in\r
++     * memmove to ensure 8-byte alignment for the long longs in\r
+      * buf_log_format_t structure\r
+      */\r
+-    bcopy(*ptr, &lbuf, MIN(sizeof(xfs_buf_log_format_t), len));\r
++    memmove(&lbuf, *ptr, MIN(sizeof(xfs_buf_log_format_t), len));\r
+     f = &lbuf;\r
+     *ptr += len;\r
\r
+@@ -319,15 +319,15 @@\r
+               } else {\r
+                       printf("\n");\r
+                       /*\r
+-                       * bcopy because *ptr may not be 8-byte aligned\r
++                       * memmove because *ptr may not be 8-byte aligned\r
+                        */\r
+-                      bcopy(*ptr, &x, sizeof(long long));\r
+-                      bcopy(*ptr+8, &y, sizeof(long long));\r
++                      memmove(&x, *ptr, sizeof(long long));\r
++                      memmove(&y, *ptr+8, sizeof(long long));\r
+                       printf("icount: %lld  ifree: %lld  ",\r
+                               INT_GET(x, ARCH_CONVERT),\r
+                               INT_GET(y, ARCH_CONVERT));\r
+-                      bcopy(*ptr+16, &x, sizeof(long long));\r
+-                      bcopy(*ptr+24, &y, sizeof(long long));\r
++                      memmove(&x, *ptr+16, sizeof(long long));\r
++                      memmove(&y, *ptr+24, sizeof(long long));\r
+                       printf("fdblks: %lld  frext: %lld\n",\r
+                               INT_GET(x, ARCH_CONVERT),\r
+                               INT_GET(y, ARCH_CONVERT));\r
+@@ -475,10 +475,10 @@\r
+     xfs_efd_log_format_t lbuf;\r
\r
+     /*\r
+-     * bcopy to ensure 8-byte alignment for the long longs in\r
++     * memmove to ensure 8-byte alignment for the long longs in\r
+      * xfs_efd_log_format_t structure\r
+      */\r
+-    bcopy(*ptr, &lbuf, len);\r
++    memmove(&lbuf, *ptr, len);\r
+     f = &lbuf;\r
+     *ptr += len;\r
+     if (len >= sizeof(xfs_efd_log_format_t)) {\r
+@@ -511,10 +511,10 @@\r
+     xfs_efi_log_format_t lbuf;\r
\r
+     /*\r
+-     * bcopy to ensure 8-byte alignment for the long longs in\r
++     * memmove to ensure 8-byte alignment for the long longs in\r
+      * xfs_efi_log_format_t structure\r
+      */\r
+-    bcopy(*ptr, &lbuf, len);\r
++    memmove(&lbuf, *ptr, len);\r
+     f = &lbuf;\r
+     *ptr += len;\r
+     if (len >= sizeof(xfs_efi_log_format_t)) {\r
+@@ -544,7 +544,7 @@\r
+     xfs_qoff_logformat_t *f;\r
+     xfs_qoff_logformat_t lbuf;\r
\r
+-    bcopy(*ptr, &lbuf, MIN(sizeof(xfs_qoff_logformat_t), len));\r
++    memmove(&lbuf, *ptr, MIN(sizeof(xfs_qoff_logformat_t), len));\r
+     f = &lbuf;\r
+     *ptr += len;\r
+     if (len >= sizeof(xfs_qoff_logformat_t)) {\r
+@@ -598,14 +598,14 @@\r
\r
+       printf("SHORTFORM DIRECTORY size %d count %d\n",\r
+              size, sfp->hdr.count);\r
+-      bcopy(&(sfp->hdr.parent), &ino, sizeof(ino));\r
++      memmove(&ino, &(sfp->hdr.parent), sizeof(ino));\r
+       printf(".. ino 0x%llx\n", (unsigned long long)INT_GET(ino, ARCH_CONVERT));\r
\r
+       count = (uint)(sfp->hdr.count);\r
+       sfep = &(sfp->list[0]);\r
+       for (i = 0; i < count; i++) {\r
+-              bcopy(&(sfep->inumber), &ino, sizeof(ino));\r
+-              bcopy((sfep->name), namebuf, sfep->namelen);\r
++              memmove(&ino, &(sfep->inumber), sizeof(ino));\r
++              memmove(namebuf, (sfep->name), sfep->namelen);\r
+               namebuf[sfep->namelen] = '\0';\r
+               printf("%s ino 0x%llx namelen %d\n",\r
+                      namebuf, (unsigned long long)ino, sfep->namelen);\r
+@@ -628,12 +628,12 @@\r
+     /*\r
+      * print inode type header region\r
+      *\r
+-     * bcopy to ensure 8-byte alignment for the long longs in\r
++     * memmove to ensure 8-byte alignment for the long longs in\r
+      * xfs_inode_log_format_t structure\r
+      *\r
+      * len can be smaller than xfs_inode_log_format_t sometimes... (?)\r
+      */\r
+-    bcopy(*ptr, &lbuf, MIN(sizeof(xfs_inode_log_format_t), len));\r
++    memmove(&lbuf, *ptr, MIN(sizeof(xfs_inode_log_format_t), len));\r
+     version = lbuf.ilf_type;\r
+     f = &lbuf;\r
+     (*i)++;                                   /* bump index */\r
+@@ -679,7 +679,7 @@\r
+       return f->ilf_size-1;\r
+     }\r
\r
+-    bcopy(*ptr, &dino, sizeof(dino));\r
++    memmove(&dino, *ptr, sizeof(dino));\r
+     mode = dino.di_mode & S_IFMT;\r
+     size = (int)dino.di_size;\r
+     xlog_print_trans_inode_core(&dino);\r
+@@ -798,10 +798,10 @@\r
+     /*\r
+      * print dquot header region\r
+      *\r
+-     * bcopy to ensure 8-byte alignment for the long longs in\r
++     * memmove to ensure 8-byte alignment for the long longs in\r
+      * xfs_dq_logformat_t structure\r
+      */\r
+-    bcopy(*ptr, &lbuf, MIN(sizeof(xfs_dq_logformat_t), len));\r
++    memmove(&lbuf, *ptr, MIN(sizeof(xfs_dq_logformat_t), len));\r
+     f = &lbuf;\r
+     (*i)++;                                   /* bump index */\r
+     *ptr += len;\r
+@@ -830,7 +830,7 @@\r
+       head = (xlog_op_header_t *)*ptr;\r
+       xlog_print_op_header(head, *i, ptr);\r
+       ASSERT(INT_GET(head->oh_len, ARCH_CONVERT) == sizeof(xfs_disk_dquot_t));\r
+-      bcopy(*ptr, &ddq, sizeof(xfs_disk_dquot_t));\r
++      memmove(&ddq, *ptr, sizeof(xfs_disk_dquot_t));\r
+       printf("DQUOT: magic 0x%hx flags 0%ho\n",\r
+              INT_GET(ddq.d_magic, ARCH_CONVERT),\r
+              INT_GET(ddq.d_flags, ARCH_CONVERT));\r
+diff -ru xfsprogs-2.7.11_vanilla/mkfs/proto.c xfsprogs-2.7.11_sysv3-legacy/mkfs/proto.c\r
+--- xfsprogs-2.7.11_vanilla/mkfs/proto.c       2006-01-17 03:46:51.000000000 +0000\r
++++ xfsprogs-2.7.11_sysv3-legacy/mkfs/proto.c  2008-03-21 16:06:21.000000000 +0000\r
+@@ -234,7 +234,7 @@\r
+       if (dolocal && len <= XFS_IFORK_DSIZE(ip)) {\r
+               libxfs_idata_realloc(ip, len, XFS_DATA_FORK);\r
+               if (buf)\r
+-                      bcopy(buf, ip->i_df.if_u1.if_data, len);\r
++                      memmove(ip->i_df.if_u1.if_data, buf, len);\r
+               ip->i_d.di_size = len;\r
+               ip->i_df.if_flags &= ~XFS_IFEXTENTS;\r
+               ip->i_df.if_flags |= XFS_IFINLINE;\r
+@@ -257,9 +257,9 @@\r
+               d = XFS_FSB_TO_DADDR(mp, map.br_startblock);\r
+               bp = libxfs_trans_get_buf(logit ? tp : 0, mp->m_dev, d,\r
+                       nb << mp->m_blkbb_log, 0);\r
+-              bcopy(buf, XFS_BUF_PTR(bp), len);\r
++              memmove(XFS_BUF_PTR(bp), buf, len);\r
+               if (len < XFS_BUF_COUNT(bp))\r
+-                      bzero(XFS_BUF_PTR(bp) + len, XFS_BUF_COUNT(bp) - len);\r
++                      memset(XFS_BUF_PTR(bp) + len, 0, XFS_BUF_COUNT(bp) - len);\r
+               if (logit)\r
+                       libxfs_trans_log_buf(tp, bp, 0, XFS_BUF_COUNT(bp) - 1);\r
+               else\r
+@@ -376,7 +376,7 @@\r
+       cred_t          creds;\r
+       char            *value;\r
\r
+-      bzero(&creds, sizeof(creds));\r
++      memset(&creds, 0, sizeof(creds));\r
+       mstr = getstr(pp);\r
+       switch (mstr[0]) {\r
+       case '-':\r
+@@ -635,8 +635,8 @@\r
+       tp = libxfs_trans_alloc(mp, 0);\r
+       if ((i = libxfs_trans_reserve(tp, MKFS_BLOCKRES_INODE, 0, 0, 0, 0)))\r
+               res_failed(i);\r
+-      bzero(&creds, sizeof(creds));\r
+-      bzero(&fsxattrs, sizeof(fsxattrs));\r
++      memset(&creds, 0, sizeof(creds));\r
++      memset(&fsxattrs, 0, sizeof(fsxattrs));\r
+       error = libxfs_inode_alloc(&tp, NULL, S_IFREG, 1, 0,\r
+                                       &creds, &fsxattrs, &rbmip);\r
+       if (error) {\r
+diff -ru xfsprogs-2.7.11_vanilla/mkfs/xfs_mkfs.c xfsprogs-2.7.11_sysv3-legacy/mkfs/xfs_mkfs.c\r
+--- xfsprogs-2.7.11_vanilla/mkfs/xfs_mkfs.c    2006-01-17 03:46:51.000000000 +0000\r
++++ xfsprogs-2.7.11_sysv3-legacy/mkfs/xfs_mkfs.c       2008-03-21 16:06:21.000000000 +0000\r
+@@ -631,9 +631,9 @@\r
+       extent_flagging = 1;\r
+       force_overwrite = 0;\r
+       worst_freelist = 0;\r
+-      bzero(&fsx, sizeof(fsx));\r
++      memset(&fsx, 0, sizeof(fsx));\r
\r
+-      bzero(&xi, sizeof(xi));\r
++      memset(&xi, 0, sizeof(xi));\r
+       xi.notvolok = 1;\r
+       xi.setblksize = 1;\r
+       xi.isreadonly = LIBXFS_EXCLUSIVELY;\r
+@@ -1882,7 +1882,7 @@\r
+       bsize = 1 << (blocklog - BBSHIFT);\r
+       mp = &mbuf;\r
+       sbp = &mp->m_sb;\r
+-      bzero(mp, sizeof(xfs_mount_t));\r
++      memset(mp, 0, sizeof(xfs_mount_t));\r
+       sbp->sb_blocklog = (__uint8_t)blocklog;\r
+       sbp->sb_sectlog = (__uint8_t)sectorlog;\r
+       sbp->sb_agblklog = (__uint8_t)libxfs_log2_roundup((unsigned int)agsize);\r
+@@ -2028,12 +2028,12 @@\r
+        * ext[2,3] and reiserfs (64k) - and hopefully all else.\r
+        */\r
+       buf = libxfs_getbuf(xi.ddev, 0, BTOBB(WHACK_SIZE));\r
+-      bzero(XFS_BUF_PTR(buf), WHACK_SIZE);\r
++      memset(XFS_BUF_PTR(buf), 0, WHACK_SIZE);\r
+       libxfs_writebuf(buf, LIBXFS_EXIT_ON_FAILURE);\r
\r
+       /* OK, now write the superblock */\r
+       buf = libxfs_getbuf(xi.ddev, XFS_SB_DADDR, XFS_FSS_TO_BB(mp, 1));\r
+-      bzero(XFS_BUF_PTR(buf), sectorsize);\r
++      memset(XFS_BUF_PTR(buf), 0, sectorsize);\r
+       libxfs_xlate_sb(XFS_BUF_PTR(buf), sbp, -1, XFS_SB_ALL_BITS);\r
+       libxfs_writebuf(buf, LIBXFS_EXIT_ON_FAILURE);\r
\r
+@@ -2056,7 +2056,7 @@\r
+       if (!xi.disfile) {\r
+               buf = libxfs_getbuf(xi.ddev, (xi.dsize - BTOBB(WHACK_SIZE)), \r
+                                   BTOBB(WHACK_SIZE));\r
+-              bzero(XFS_BUF_PTR(buf), WHACK_SIZE);\r
++              memset(XFS_BUF_PTR(buf), 0, WHACK_SIZE);\r
+               libxfs_writebuf(buf, LIBXFS_EXIT_ON_FAILURE);\r
+       }\r
\r
+@@ -2084,7 +2084,7 @@\r
+               buf = libxfs_getbuf(xi.ddev,\r
+                               XFS_AG_DADDR(mp, agno, XFS_SB_DADDR),\r
+                               XFS_FSS_TO_BB(mp, 1));\r
+-              bzero(XFS_BUF_PTR(buf), sectorsize);\r
++              memset(XFS_BUF_PTR(buf), 0, sectorsize);\r
+               libxfs_xlate_sb(XFS_BUF_PTR(buf), sbp, -1, XFS_SB_ALL_BITS);\r
+               libxfs_writebuf(buf, LIBXFS_EXIT_ON_FAILURE);\r
\r
+@@ -2095,7 +2095,7 @@\r
+                               XFS_AG_DADDR(mp, agno, XFS_AGF_DADDR(mp)),\r
+                               XFS_FSS_TO_BB(mp, 1));\r
+               agf = XFS_BUF_TO_AGF(buf);\r
+-              bzero(agf, sectorsize);\r
++              memset(agf, 0, sectorsize);\r
+               if (agno == agcount - 1)\r
+                       agsize = dblocks - (xfs_drfsbno_t)(agno * agsize);\r
+               INT_SET(agf->agf_magicnum, ARCH_CONVERT, XFS_AGF_MAGIC);\r
+@@ -2130,7 +2130,7 @@\r
+                               XFS_AG_DADDR(mp, agno, XFS_AGI_DADDR(mp)),\r
+                               XFS_FSS_TO_BB(mp, 1));\r
+               agi = XFS_BUF_TO_AGI(buf);\r
+-              bzero(agi, sectorsize);\r
++              memset(agi, 0, sectorsize);\r
+               INT_SET(agi->agi_magicnum, ARCH_CONVERT, XFS_AGI_MAGIC);\r
+               INT_SET(agi->agi_versionnum, ARCH_CONVERT, XFS_AGI_VERSION);\r
+               INT_SET(agi->agi_seqno, ARCH_CONVERT, agno);\r
+@@ -2152,7 +2152,7 @@\r
+                               XFS_AGB_TO_DADDR(mp, agno, XFS_BNO_BLOCK(mp)),\r
+                               bsize);\r
+               block = XFS_BUF_TO_SBLOCK(buf);\r
+-              bzero(block, blocksize);\r
++              memset(block, 0, blocksize);\r
+               INT_SET(block->bb_magic, ARCH_CONVERT, XFS_ABTB_MAGIC);\r
+               INT_SET(block->bb_level, ARCH_CONVERT, 0);\r
+               INT_SET(block->bb_numrecs, ARCH_CONVERT, 1);\r
+@@ -2202,7 +2202,7 @@\r
+                               XFS_AGB_TO_DADDR(mp, agno, XFS_CNT_BLOCK(mp)),\r
+                               bsize);\r
+               block = XFS_BUF_TO_SBLOCK(buf);\r
+-              bzero(block, blocksize);\r
++              memset(block, 0, blocksize);\r
+               INT_SET(block->bb_magic, ARCH_CONVERT, XFS_ABTC_MAGIC);\r
+               INT_SET(block->bb_level, ARCH_CONVERT, 0);\r
+               INT_SET(block->bb_numrecs, ARCH_CONVERT, 1);\r
+@@ -2239,7 +2239,7 @@\r
+                               XFS_AGB_TO_DADDR(mp, agno, XFS_IBT_BLOCK(mp)),\r
+                               bsize);\r
+               block = XFS_BUF_TO_SBLOCK(buf);\r
+-              bzero(block, blocksize);\r
++              memset(block, 0, blocksize);\r
+               INT_SET(block->bb_magic, ARCH_CONVERT, XFS_IBT_MAGIC);\r
+               INT_SET(block->bb_level, ARCH_CONVERT, 0);\r
+               INT_SET(block->bb_numrecs, ARCH_CONVERT, 0);\r
+@@ -2253,7 +2253,7 @@\r
+        */\r
+       buf = libxfs_getbuf(mp->m_dev,\r
+               (xfs_daddr_t)XFS_FSB_TO_BB(mp, dblocks - 1LL), bsize);\r
+-      bzero(XFS_BUF_PTR(buf), blocksize);\r
++      memset(XFS_BUF_PTR(buf), 0, blocksize);\r
+       libxfs_writebuf(buf, LIBXFS_EXIT_ON_FAILURE);\r
\r
+       /*\r
+@@ -2262,7 +2262,7 @@\r
+       if (mp->m_rtdev && rtblocks > 0) {\r
+               buf = libxfs_getbuf(mp->m_rtdev,\r
+                               XFS_FSB_TO_BB(mp, rtblocks - 1LL), bsize);\r
+-              bzero(XFS_BUF_PTR(buf), blocksize);\r
++              memset(XFS_BUF_PTR(buf), 0, blocksize);\r
+               libxfs_writebuf(buf, LIBXFS_EXIT_ON_FAILURE);\r
+       }\r
\r
+@@ -2273,7 +2273,7 @@\r
+               xfs_alloc_arg_t args;\r
+               xfs_trans_t     *tp;\r
\r
+-              bzero(&args, sizeof(args));\r
++              memset(&args, 0, sizeof(args));\r
+               args.tp = tp = libxfs_trans_alloc(mp, 0);\r
+               args.mp = mp;\r
+               args.agno = agno;\r
+diff -ru xfsprogs-2.7.11_vanilla/repair/agheader.c xfsprogs-2.7.11_sysv3-legacy/repair/agheader.c\r
+--- xfsprogs-2.7.11_vanilla/repair/agheader.c  2006-01-17 03:46:52.000000000 +0000\r
++++ xfsprogs-2.7.11_sysv3-legacy/repair/agheader.c     2008-03-21 16:11:54.000000000 +0000\r
+@@ -184,7 +184,7 @@\r
\r
+  * the inprogress fields, version numbers, and counters\r
+  * are allowed to differ as well as all fields after the\r
+- * counters to cope with the pre-6.5 mkfs non-bzeroed\r
++ * counters to cope with the pre-6.5 mkfs non-zeroed\r
+  * secondary superblock sectors.\r
+  */\r
\r
+@@ -233,7 +233,7 @@\r
+        * (e.g. were pre-6.5 beta) could leave garbage in the secondary\r
+        * superblock sectors.  Anything stamping the shared fs bit or better\r
+        * into the secondaries is ok and should generate clean secondary\r
+-       * superblock sectors.  so only run the bzero check on the\r
++       * superblock sectors.  so only run the zero check on the\r
+        * potentially garbaged secondaries.\r
+        */\r
+       if (pre_65_beta ||\r
+@@ -275,7 +275,7 @@\r
+                               do_warn(\r
+               _("zeroing unused portion of %s superblock (AG #%u)\n"),\r
+                                       !i ? _("primary") : _("secondary"), i);\r
+-                              bzero((void *)((__psint_t)sb + size),\r
++                              memset((void *)((__psint_t)sb + size), 0,\r
+                                       mp->m_sb.sb_sectsize - size);\r
+                       } else\r
+                               do_warn(\r
+@@ -286,7 +286,7 @@\r
\r
+       /*\r
+        * now look for the fields we can manipulate directly.\r
+-       * if we did a bzero and that bzero could have included\r
++       * if we did a zero and that zero could have included\r
+        * the field in question, just silently reset it.  otherwise,\r
+        * complain.\r
+        *\r
+diff -ru xfsprogs-2.7.11_vanilla/repair/attr_repair.c xfsprogs-2.7.11_sysv3-legacy/repair/attr_repair.c\r
+--- xfsprogs-2.7.11_vanilla/repair/attr_repair.c       2006-01-17 03:46:52.000000000 +0000\r
++++ xfsprogs-2.7.11_sysv3-legacy/repair/attr_repair.c  2008-03-21 16:06:21.000000000 +0000\r
+@@ -83,7 +83,7 @@\r
+ int\r
+ valuecheck(char *namevalue, char *value, int namelen, int valuelen)\r
+ {\r
+-      /* for proper alignment issues, get the structs and bcopy the values */\r
++      /* for proper alignment issues, get the structs and memmove the values */\r
+       xfs_mac_label_t macl;\r
+       xfs_acl_t thisacl;\r
+       void *valuep;\r
+@@ -93,8 +93,8 @@\r
+                       (strncmp(namevalue, SGI_ACL_DEFAULT,\r
+                               SGI_ACL_DEFAULT_SIZE) == 0)) {\r
+               if (value == NULL) {\r
+-                      bzero(&thisacl, sizeof(xfs_acl_t));\r
+-                      bcopy(namevalue+namelen, &thisacl, valuelen);\r
++                      memset(&thisacl, 0, sizeof(xfs_acl_t));\r
++                      memmove(&thisacl, namevalue+namelen, valuelen);\r
+                       valuep = &thisacl;\r
+               } else\r
+                       valuep = value;\r
+@@ -107,8 +107,8 @@\r
+               }\r
+       } else if (strncmp(namevalue, SGI_MAC_FILE, SGI_MAC_FILE_SIZE) == 0) {\r
+               if (value == NULL) {\r
+-                      bzero(&macl, sizeof(xfs_mac_label_t));\r
+-                      bcopy(namevalue+namelen, &macl, valuelen);\r
++                      memset(&macl, 0, sizeof(xfs_mac_label_t));\r
++                      memmove(&macl, namevalue+namelen, valuelen);\r
+                       valuep = &macl;\r
+               } else\r
+                       valuep = value;\r
+@@ -357,7 +357,7 @@\r
+               }\r
+               ASSERT(mp->m_sb.sb_blocksize == XFS_BUF_COUNT(bp));\r
+               length = MIN(XFS_BUF_COUNT(bp), valuelen - amountdone);\r
+-              bcopy(XFS_BUF_PTR(bp), value, length);\r
++              memmove(value, XFS_BUF_PTR(bp), length);\r
+               amountdone += length;\r
+               value += length;\r
+               i++;\r
+@@ -803,7 +803,7 @@\r
+        * the way.  Then walk the leaf blocks left-to-right, calling\r
+        * a parent-verification routine each time we traverse a block.\r
+        */\r
+-      bzero(&da_cursor, sizeof(da_bt_cursor_t));\r
++      memset(&da_cursor, 0, sizeof(da_bt_cursor_t));\r
+       da_cursor.active = 0;\r
+       da_cursor.type = 0;\r
+       da_cursor.ino = ino;\r
+diff -ru xfsprogs-2.7.11_vanilla/repair/dinode.c xfsprogs-2.7.11_sysv3-legacy/repair/dinode.c\r
+--- xfsprogs-2.7.11_vanilla/repair/dinode.c    2006-01-17 03:46:52.000000000 +0000\r
++++ xfsprogs-2.7.11_sysv3-legacy/repair/dinode.c       2008-03-21 16:06:21.000000000 +0000\r
+@@ -296,7 +296,7 @@\r
+       /* and clear the forks */\r
\r
+       if (dirty && !no_modify)\r
+-              bzero(&dino->di_u, XFS_LITINO(mp));\r
++              memset(&dino->di_u, 0, XFS_LITINO(mp));\r
\r
+       return(dirty);\r
+ }\r
+@@ -1516,8 +1516,8 @@\r
+                * local symlink, just copy the symlink out of the\r
+                * inode into the data area\r
+                */\r
+-              bcopy((char *)XFS_DFORK_DPTR(dino),\r
+-                      symlink, INT_GET(dinoc->di_size, ARCH_CONVERT));\r
++              memmove(symlink, (char *)XFS_DFORK_DPTR(dino),\r
++                      INT_GET(dinoc->di_size, ARCH_CONVERT));\r
+       } else {\r
+               /*\r
+                * stored in a meta-data file, have to bmap one block\r
+@@ -1542,7 +1542,7 @@\r
+                       buf_data = (char *)XFS_BUF_PTR(bp);\r
+                       size = MIN(INT_GET(dinoc->di_size, ARCH_CONVERT)\r
+                               - amountdone, (int)XFS_FSB_TO_BB(mp, 1)*BBSIZE);\r
+-                      bcopy(buf_data, cptr, size);\r
++                      memmove(cptr, buf_data, size);\r
+                       cptr += size;\r
+                       amountdone += size;\r
+                       i++;\r
+diff -ru xfsprogs-2.7.11_vanilla/repair/dir.c xfsprogs-2.7.11_sysv3-legacy/repair/dir.c\r
+--- xfsprogs-2.7.11_vanilla/repair/dir.c       2006-01-17 03:46:52.000000000 +0000\r
++++ xfsprogs-2.7.11_sysv3-legacy/repair/dir.c  2008-03-21 16:15:02.000000000 +0000\r
+@@ -334,7 +334,7 @@\r
+                * happened.\r
+                */\r
+               if (junkit)  {\r
+-                      bcopy(sf_entry->name, name, namelen);\r
++                      memmove(name, sf_entry->name, namelen);\r
+                       name[namelen] = '\0';\r
\r
+                       if (!no_modify)  {\r
+@@ -352,7 +352,7 @@\r
\r
+                               INT_MOD(sf->hdr.count, ARCH_CONVERT, -1);\r
+                               num_entries--;\r
+-                              bzero((void *) ((__psint_t) sf_entry + tmp_len),\r
++                              memset((void *) ((__psint_t) sf_entry + tmp_len), 0,\r
+                                       tmp_elen);\r
\r
+                               /*\r
+@@ -511,7 +511,7 @@\r
+       if ((freemap = malloc(mp->m_sb.sb_blocksize)) == NULL)\r
+               return(NULL);\r
\r
+-      bzero(freemap, mp->m_sb.sb_blocksize/NBBY);\r
++      memset(freemap, 0, mp->m_sb.sb_blocksize/NBBY);\r
\r
+       return(freemap);\r
+ }\r
+@@ -520,7 +520,7 @@\r
+ void\r
+ init_da_freemap(da_freemap_t *dir_freemap)\r
+ {\r
+-      bzero(dir_freemap, sizeof(da_freemap_t) * DA_BMAP_SIZE);\r
++      memset(dir_freemap, 0, sizeof(da_freemap_t) * DA_BMAP_SIZE);\r
+ }\r
\r
+ /*\r
+@@ -753,7 +753,7 @@\r
+       da_hole_map_t   holemap;\r
\r
+       init_da_freemap(dir_freemap);\r
+-      bzero(&holemap, sizeof(da_hole_map_t));\r
++      memset(&holemap, 0, sizeof(da_hole_map_t));\r
\r
+       set_da_freemap(mp, dir_freemap, 0, 50);\r
+       set_da_freemap(mp, dir_freemap, 100, 126);\r
+@@ -1525,9 +1525,9 @@\r
+                               memmove(entry, entry + 1, (INT_GET(hdr->count, ARCH_CONVERT) - i) *\r
+                                       sizeof(xfs_dir_leaf_entry_t));\r
+                       }\r
+-                      bzero((void *) ((__psint_t) entry +\r
++                      memset((void *) ((__psint_t) entry +\r
+                               (INT_GET(leaf->hdr.count, ARCH_CONVERT) - i - 1) *\r
+-                              sizeof(xfs_dir_leaf_entry_t)),\r
++                              sizeof(xfs_dir_leaf_entry_t)), 0,\r
+                               sizeof(xfs_dir_leaf_entry_t));\r
\r
+                       start = (__psint_t) &leaf->entries[INT_GET(hdr->count, ARCH_CONVERT)] -\r
+@@ -1624,9 +1624,9 @@\r
+                                               (INT_GET(leaf->hdr.count, ARCH_CONVERT) - i - 1) *\r
+                                               sizeof(xfs_dir_leaf_entry_t));\r
+                               }\r
+-                              bzero((void *) ((__psint_t) entry +\r
++                              memset((void *) ((__psint_t) entry +\r
+                                       (INT_GET(leaf->hdr.count, ARCH_CONVERT) - i - 1) *\r
+-                                      sizeof(xfs_dir_leaf_entry_t)),\r
++                                      sizeof(xfs_dir_leaf_entry_t)), 0,\r
+                                       sizeof(xfs_dir_leaf_entry_t));\r
\r
+                               /*\r
+@@ -1825,11 +1825,11 @@\r
+                                           sizeof(xfs_dir_leaf_entry_t))  {\r
+                                               memmove(entry, entry + 1,\r
+                                                       bytes);\r
+-                                              bzero((void *)\r
+-                                              ((__psint_t) entry + bytes),\r
++                                              memset((void *)\r
++                                              ((__psint_t) entry + bytes), 0,\r
+                                               sizeof(xfs_dir_leaf_entry_t));\r
+                                       } else  {\r
+-                                              bzero(entry,\r
++                                              memset(entry, 0,\r
+                                               sizeof(xfs_dir_leaf_entry_t));\r
+                                       }\r
\r
+@@ -2067,11 +2067,11 @@\r
+                                */\r
+                               if (bytes > sizeof(xfs_dir_leaf_entry_t))  {\r
+                                       memmove(entry, entry + 1, bytes);\r
+-                                      bzero((void *)\r
+-                                              ((__psint_t) entry + bytes),\r
++                                      memset((void *)\r
++                                              ((__psint_t) entry + bytes), 0,\r
+                                               sizeof(xfs_dir_leaf_entry_t));\r
+                               } else  {\r
+-                                      bzero(entry,\r
++                                      memset(entry, 0,\r
+                                               sizeof(xfs_dir_leaf_entry_t));\r
+                               }\r
\r
+@@ -2136,7 +2136,7 @@\r
+                * making it impossible for the stored length\r
+                * value to be out of range.\r
+                */\r
+-              bcopy(namest->name, fname, entry->namelen);\r
++              memmove(fname, namest->name, entry->namelen);\r
+               fname[entry->namelen] = '\0';\r
+               hashval = libxfs_da_hashname(fname, entry->namelen);\r
\r
+@@ -2465,7 +2465,7 @@\r
+        * (XFS_DIR_LEAF_MAPSIZE (3) * biggest regions)\r
+        * and see if they match what's in the block\r
+        */\r
+-      bzero(&holemap, sizeof(da_hole_map_t));\r
++      memset(&holemap, 0, sizeof(da_hole_map_t));\r
+       process_da_freemap(mp, dir_freemap, &holemap);\r
\r
+       if (zero_len_entries)  {\r
+@@ -2522,7 +2522,7 @@\r
+                       /*\r
+                        * copy leaf block header\r
+                        */\r
+-                      bcopy(&leaf->hdr, &new_leaf->hdr,\r
++                      memmove(&new_leaf->hdr, &leaf->hdr,\r
+                               sizeof(xfs_dir_leaf_hdr_t));\r
\r
+                       /*\r
+@@ -2568,8 +2568,8 @@\r
+                               d_entry->namelen = s_entry->namelen;\r
+                               d_entry->pad2 = 0;\r
\r
+-                              bcopy((char *) leaf + INT_GET(s_entry->nameidx, ARCH_CONVERT),\r
+-                                      first_byte, bytes);\r
++                              memmove(first_byte, (char *) leaf + INT_GET(s_entry->nameidx, ARCH_CONVERT),\r
++                                      bytes);\r
\r
+                               num_entries++;\r
+                               d_entry++;\r
+@@ -2581,7 +2581,7 @@\r
+                       /*\r
+                        * zero space between end of table and top of heap\r
+                        */\r
+-                      bzero(d_entry, (__psint_t) first_byte\r
++                      memset(d_entry, 0, (__psint_t) first_byte\r
+                                       - (__psint_t) d_entry);\r
\r
+                       /*\r
+@@ -2617,7 +2617,7 @@\r
+                       /*\r
+                        * final step, copy block back\r
+                        */\r
+-                      bcopy(new_leaf, leaf, mp->m_sb.sb_blocksize);\r
++                      memmove(leaf, new_leaf, mp->m_sb.sb_blocksize);\r
\r
+                       *buf_dirty = 1;\r
+               } else  {\r
+@@ -2853,7 +2853,7 @@\r
+        * the way.  Then walk the leaf blocks left-to-right, calling\r
+        * a parent-verification routine each time we traverse a block.\r
+        */\r
+-      bzero(&da_cursor, sizeof(da_bt_cursor_t));\r
++      memset(&da_cursor, 0, sizeof(da_bt_cursor_t));\r
\r
+       da_cursor.active = 0;\r
+       da_cursor.type = 0;\r
+diff -ru xfsprogs-2.7.11_vanilla/repair/dir2.c xfsprogs-2.7.11_sysv3-legacy/repair/dir2.c\r
+--- xfsprogs-2.7.11_vanilla/repair/dir2.c      2006-01-17 03:46:52.000000000 +0000\r
++++ xfsprogs-2.7.11_sysv3-legacy/repair/dir2.c 2008-03-21 16:06:21.000000000 +0000\r
+@@ -124,7 +124,7 @@\r
+               }\r
+               for (i = off = 0; i < nex; i++, off += XFS_BUF_COUNT(bp)) {\r
+                       bp = bplist[i];\r
+-                      bcopy(XFS_BUF_PTR(bp), (char *)dabuf->data + off,\r
++                      memmove((char *)dabuf->data + off, XFS_BUF_PTR(bp),\r
+                               XFS_BUF_COUNT(bp));\r
+               }\r
+       }\r
+@@ -149,7 +149,7 @@\r
+               dabuf->dirty = 0;\r
+               for (i=off=0; i < dabuf->nbuf; i++, off += XFS_BUF_COUNT(bp)) {\r
+                       bp = dabuf->bps[i];\r
+-                      bcopy((char *)dabuf->data + off, XFS_BUF_PTR(bp),\r
++                      memmove(XFS_BUF_PTR(bp), (char *)dabuf->data + off,\r
+                               XFS_BUF_COUNT(bp));\r
+               }\r
+       }\r
+@@ -187,10 +187,10 @@\r
+                       do_error(_("couldn't malloc dir2 buffer list\n"));\r
+                       exit(1);\r
+               }\r
+-              bcopy(dabuf->bps, bplist, nbuf * sizeof(*bplist));\r
++              memmove(bplist, dabuf->bps, nbuf * sizeof(*bplist));\r
+               for (i = off = 0; i < nbuf; i++, off += XFS_BUF_COUNT(bp)) {\r
+                       bp = bplist[i];\r
+-                      bcopy((char *)dabuf->data + off, XFS_BUF_PTR(bp),\r
++                      memmove(XFS_BUF_PTR(bp), (char *)dabuf->data + off,\r
+                               XFS_BUF_COUNT(bp));\r
+               }\r
+       }\r
+@@ -223,7 +223,7 @@\r
+                       do_error(_("couldn't malloc dir2 buffer list\n"));\r
+                       exit(1);\r
+               }\r
+-              bcopy(dabuf->bps, bplist, nbuf * sizeof(*bplist));\r
++              memmove(bplist, dabuf->bps, nbuf * sizeof(*bplist));\r
+       }\r
+       da_buf_done(dabuf);\r
+       for (i = 0; i < nbuf; i++)\r
+@@ -1076,7 +1076,7 @@\r
+                * happened.\r
+                */\r
+               if (junkit)  {\r
+-                      bcopy(sfep->name, name, namelen);\r
++                      memmove(name, sfep->name, namelen);\r
+                       name[namelen] = '\0';\r
\r
+                       if (!no_modify)  {\r
+@@ -1095,7 +1095,7 @@\r
\r
+                               INT_MOD(sfp->hdr.count, ARCH_CONVERT, -1);\r
+                               num_entries--;\r
+-                              bzero((void *) ((__psint_t) sfep + tmp_len),\r
++                              memset((void *) ((__psint_t) sfep + tmp_len), 0,\r
+                                       tmp_elen);\r
\r
+                               /*\r
+@@ -1921,7 +1921,7 @@\r
+        * Then walk the leaf blocks left-to-right, calling a parent\r
+        * verification routine each time we traverse a block.\r
+        */\r
+-      bzero(&da_cursor, sizeof(da_cursor));\r
++      memset(&da_cursor, 0, sizeof(da_cursor));\r
+       da_cursor.ino = ino;\r
+       da_cursor.dip = dip;\r
+       da_cursor.blkmap = blkmap;\r
+diff -ru xfsprogs-2.7.11_vanilla/repair/globals.h xfsprogs-2.7.11_sysv3-legacy/repair/globals.h\r
+--- xfsprogs-2.7.11_vanilla/repair/globals.h   2006-01-17 03:46:52.000000000 +0000\r
++++ xfsprogs-2.7.11_sysv3-legacy/repair/globals.h      2008-03-21 16:10:19.000000000 +0000\r
+@@ -66,7 +66,7 @@\r
+  * the partial sb mask bit set, then you depend on the fields\r
+  * in it up to and including sb_inoalignmt but the unused part of the\r
+  * sector may have trash in it.  If the sb has any bits set that are in\r
+- * the good mask, then the entire sb and sector are good (was bzero'ed\r
++ * the good mask, then the entire sb and sector are good (was zero'ed\r
+  * by mkfs).  The third mask is for filesystems made by pre-6.5 campus\r
+  * alpha mkfs's.  Those are rare so we'll check for those under\r
+  * a special option.\r
+diff -ru xfsprogs-2.7.11_vanilla/repair/incore.c xfsprogs-2.7.11_sysv3-legacy/repair/incore.c\r
+--- xfsprogs-2.7.11_vanilla/repair/incore.c    2006-01-17 03:46:52.000000000 +0000\r
++++ xfsprogs-2.7.11_sysv3-legacy/repair/incore.c       2008-03-21 16:06:21.000000000 +0000\r
+@@ -74,7 +74,7 @@\r
+                               numblocks);\r
+                       return;\r
+               }\r
+-              bzero(ba_bmap[i], size);\r
++              memset(ba_bmap[i], 0, size);\r
+       }\r
\r
+       if (rtblocks == 0)  {\r
+diff -ru xfsprogs-2.7.11_vanilla/repair/incore_bmc.c xfsprogs-2.7.11_sysv3-legacy/repair/incore_bmc.c\r
+--- xfsprogs-2.7.11_vanilla/repair/incore_bmc.c        2006-01-17 03:46:52.000000000 +0000\r
++++ xfsprogs-2.7.11_sysv3-legacy/repair/incore_bmc.c   2008-03-21 16:06:21.000000000 +0000\r
+@@ -29,7 +29,7 @@\r
+ {\r
+       int i;\r
\r
+-      bzero(cursor, sizeof(bmap_cursor_t));\r
++      memset(cursor, 0, sizeof(bmap_cursor_t));\r
+       cursor->ino = NULLFSINO;\r
+       cursor->num_levels = num_levels;\r
\r
+diff -ru xfsprogs-2.7.11_vanilla/repair/incore_ino.c xfsprogs-2.7.11_sysv3-legacy/repair/incore_ino.c\r
+--- xfsprogs-2.7.11_vanilla/repair/incore_ino.c        2006-01-17 03:46:52.000000000 +0000\r
++++ xfsprogs-2.7.11_sysv3-legacy/repair/incore_ino.c   2008-03-21 16:06:21.000000000 +0000\r
+@@ -515,12 +515,11 @@\r
+       if (!tmp)\r
+               do_error(_("couldn't memalign pentries table\n"));\r
\r
+-      (void) bcopy(irec->ino_un.plist->pentries, tmp,\r
++      memmove(tmp, irec->ino_un.plist->pentries,\r
+                       target * sizeof(parent_entry_t));\r
\r
+       if (cnt > target)\r
+-              (void) bcopy(irec->ino_un.plist->pentries + target,\r
+-                              tmp + target + 1,\r
++              memmove(tmp + target + 1, irec->ino_un.plist->pentries + target,\r
+                               (cnt - target) * sizeof(parent_entry_t));\r
\r
+       free(irec->ino_un.plist->pentries);\r
+@@ -674,7 +673,7 @@\r
+       if (bptrs_index == BPTR_ALLOC_NUM)\r
+               bptrs = NULL;\r
\r
+-      bzero(bptr, sizeof(backptrs_t));\r
++      memset(bptr, 0, sizeof(backptrs_t));\r
\r
+       return(bptr);\r
+ }\r
+@@ -688,7 +687,7 @@\r
+       if ((ptr = malloc(sizeof(backptrs_t))) == NULL)\r
+               do_error(_("could not malloc back pointer table\n"));\r
\r
+-      bzero(ptr, sizeof(backptrs_t));\r
++      memset(ptr, 0, sizeof(backptrs_t));\r
\r
+       return(ptr);\r
+ }\r
+@@ -802,7 +801,7 @@\r
+       if ((last_rec = malloc(sizeof(ino_tree_node_t *) * agcount)) == NULL)\r
+               do_error(_("couldn't malloc uncertain inode cache area\n"));\r
\r
+-      bzero(last_rec, sizeof(ino_tree_node_t *) * agcount);\r
++      memset(last_rec, 0, sizeof(ino_tree_node_t *) * agcount);\r
\r
+       full_backptrs = 0;\r
\r
+diff -ru xfsprogs-2.7.11_vanilla/repair/phase4.c xfsprogs-2.7.11_sysv3-legacy/repair/phase4.c\r
+--- xfsprogs-2.7.11_vanilla/repair/phase4.c    2006-01-17 03:46:52.000000000 +0000\r
++++ xfsprogs-2.7.11_sysv3-legacy/repair/phase4.c       2008-03-21 16:06:21.000000000 +0000\r
+@@ -68,7 +68,7 @@\r
+               namest = XFS_DIR_LEAF_NAMESTRUCT(leaf,\r
+                       INT_GET(entry->nameidx, ARCH_CONVERT));\r
+               XFS_DIR_SF_GET_DIRINO(&namest->inumber, &lino);\r
+-              bcopy(namest->name, fname, entry->namelen);\r
++              memmove(fname, namest->name, entry->namelen);\r
+               fname[entry->namelen] = '\0';\r
\r
+               if (fname[0] != '/' && !strcmp(fname, ORPHANAGE))  {\r
+@@ -316,7 +316,7 @@\r
+               tmp_sfe = NULL;\r
+               sf_entry = next_sfe;\r
+               XFS_DIR_SF_GET_DIRINO(&sf_entry->inumber, &lino);\r
+-              bcopy(sf_entry->name, fname, sf_entry->namelen);\r
++              memmove(fname, sf_entry->name, sf_entry->namelen);\r
+               fname[sf_entry->namelen] = '\0';\r
\r
+               if (!strcmp(ORPHANAGE, fname))  {\r
+@@ -447,7 +447,7 @@\r
\r
+                       INT_MOD(sf->hdr.count, ARCH_CONVERT, -1);\r
\r
+-                      bzero((void *) ((__psint_t) sf_entry + tmp_len),\r
++                      memset((void *) ((__psint_t) sf_entry + tmp_len), 0,\r
+                               tmp_elen);\r
\r
+                       /*\r
+@@ -534,7 +534,7 @@\r
+               }\r
+               dep = (xfs_dir2_data_entry_t *)ptr;\r
+               lino = INT_GET(dep->inumber, ARCH_CONVERT);\r
+-              bcopy(dep->name, fname, dep->namelen);\r
++              memmove(fname, dep->name, dep->namelen);\r
+               fname[dep->namelen] = '\0';\r
\r
+               if (fname[0] != '/' && !strcmp(fname, ORPHANAGE))  {\r
+@@ -797,7 +797,7 @@\r
+               sf_entry = next_sfe;\r
+               lino = XFS_DIR2_SF_GET_INUMBER(sf,\r
+                       XFS_DIR2_SF_INUMBERP(sf_entry));\r
+-              bcopy(sf_entry->name, fname, sf_entry->namelen);\r
++              memmove(fname, sf_entry->name, sf_entry->namelen);\r
+               fname[sf_entry->namelen] = '\0';\r
\r
+               if (!strcmp(ORPHANAGE, fname))  {\r
+@@ -931,7 +931,7 @@\r
+                       if (lino > XFS_DIR2_MAX_SHORT_INUM)\r
+                               sf->hdr.i8count--;\r
\r
+-                      bzero((void *) ((__psint_t) sf_entry + tmp_len),\r
++                      memset((void *) ((__psint_t) sf_entry + tmp_len), 0,\r
+                               tmp_elen);\r
\r
+                       /*\r
+@@ -1292,7 +1292,7 @@\r
+               /*\r
+                * now reset the bitmap for all ags\r
+                */\r
+-              bzero(ba_bmap[i], roundup(mp->m_sb.sb_agblocks/(NBBY/XR_BB),\r
++              memset(ba_bmap[i], 0, roundup(mp->m_sb.sb_agblocks/(NBBY/XR_BB),\r
+                                               sizeof(__uint64_t)));\r
+               for (j = 0; j < ag_hdr_block; j++)\r
+                       set_agbno_state(mp, i, j, XR_E_INUSE_FS);\r
+diff -ru xfsprogs-2.7.11_vanilla/repair/phase5.c xfsprogs-2.7.11_sysv3-legacy/repair/phase5.c\r
+--- xfsprogs-2.7.11_vanilla/repair/phase5.c    2006-01-17 03:46:52.000000000 +0000\r
++++ xfsprogs-2.7.11_sysv3-legacy/repair/phase5.c       2008-03-21 16:12:06.000000000 +0000\r
+@@ -93,7 +93,7 @@\r
+        * extents of free blocks.  At this point, we know\r
+        * that blocks in the bitmap are either set to an\r
+        * "in use" state or set to unknown (0) since the\r
+-       * bmaps were bzero'ed in phase 4 and only blocks\r
++       * bmaps were zero'ed in phase 4 and only blocks\r
+        * being used by inodes, inode bmaps, ag headers,\r
+        * and the files themselves were put into the bitmap.\r
+        *\r
+@@ -664,7 +664,7 @@\r
+                * initialize block header\r
+                */\r
+               bt_hdr = XFS_BUF_TO_ALLOC_BLOCK(lptr->buf_p);\r
+-              bzero(bt_hdr, mp->m_sb.sb_blocksize);\r
++              memset(bt_hdr, 0, mp->m_sb.sb_blocksize);\r
\r
+               INT_SET(bt_hdr->bb_magic, ARCH_CONVERT, magic);\r
+               INT_SET(bt_hdr->bb_level, ARCH_CONVERT, level);\r
+@@ -741,7 +741,7 @@\r
+                * initialize block header\r
+                */\r
+               bt_hdr = XFS_BUF_TO_ALLOC_BLOCK(lptr->buf_p);\r
+-              bzero(bt_hdr, mp->m_sb.sb_blocksize);\r
++              memset(bt_hdr, 0, mp->m_sb.sb_blocksize);\r
\r
+               INT_SET(bt_hdr->bb_magic, ARCH_CONVERT, magic);\r
+               INT_SET(bt_hdr->bb_level, ARCH_CONVERT, i);\r
+@@ -772,7 +772,7 @@\r
+                * block initialization, lay in block header\r
+                */\r
+               bt_hdr = XFS_BUF_TO_ALLOC_BLOCK(lptr->buf_p);\r
+-              bzero(bt_hdr, mp->m_sb.sb_blocksize);\r
++              memset(bt_hdr, 0, mp->m_sb.sb_blocksize);\r
\r
+               INT_SET(bt_hdr->bb_magic, ARCH_CONVERT, magic);\r
+               bt_hdr->bb_level = 0;\r
+@@ -1021,7 +1021,7 @@\r
+                * initialize block header\r
+                */\r
+               bt_hdr = XFS_BUF_TO_INOBT_BLOCK(lptr->buf_p);\r
+-              bzero(bt_hdr, mp->m_sb.sb_blocksize);\r
++              memset(bt_hdr, 0, mp->m_sb.sb_blocksize);\r
\r
+               INT_SET(bt_hdr->bb_magic, ARCH_CONVERT, XFS_IBT_MAGIC);\r
+               INT_SET(bt_hdr->bb_level, ARCH_CONVERT, level);\r
+@@ -1060,7 +1060,7 @@\r
+                       XFS_AG_DADDR(mp, agno, XFS_AGI_DADDR(mp)),\r
+                       mp->m_sb.sb_sectsize/BBSIZE);\r
+       agi = XFS_BUF_TO_AGI(agi_buf);\r
+-      bzero(agi, mp->m_sb.sb_sectsize);\r
++      memset(agi, 0, mp->m_sb.sb_sectsize);\r
\r
+       INT_SET(agi->agi_magicnum, ARCH_CONVERT, XFS_AGI_MAGIC);\r
+       INT_SET(agi->agi_versionnum, ARCH_CONVERT, XFS_AGI_VERSION);\r
+@@ -1124,7 +1124,7 @@\r
+                * initialize block header\r
+                */\r
+               bt_hdr = XFS_BUF_TO_INOBT_BLOCK(lptr->buf_p);\r
+-              bzero(bt_hdr, mp->m_sb.sb_blocksize);\r
++              memset(bt_hdr, 0, mp->m_sb.sb_blocksize);\r
\r
+               INT_SET(bt_hdr->bb_magic, ARCH_CONVERT, XFS_IBT_MAGIC);\r
+               INT_SET(bt_hdr->bb_level, ARCH_CONVERT, i);\r
+@@ -1152,7 +1152,7 @@\r
+                * block initialization, lay in block header\r
+                */\r
+               bt_hdr = XFS_BUF_TO_INOBT_BLOCK(lptr->buf_p);\r
+-              bzero(bt_hdr, mp->m_sb.sb_blocksize);\r
++              memset(bt_hdr, 0, mp->m_sb.sb_blocksize);\r
\r
+               INT_SET(bt_hdr->bb_magic, ARCH_CONVERT, XFS_IBT_MAGIC);\r
+               bt_hdr->bb_level = 0;\r
+@@ -1239,7 +1239,7 @@\r
+                       XFS_AG_DADDR(mp, agno, XFS_AGF_DADDR(mp)),\r
+                       mp->m_sb.sb_sectsize/BBSIZE);\r
+       agf = XFS_BUF_TO_AGF(agf_buf);\r
+-      bzero(agf, mp->m_sb.sb_sectsize);\r
++      memset(agf, 0, mp->m_sb.sb_sectsize);\r
\r
+ #ifdef XR_BLD_FREE_TRACE\r
+       fprintf(stderr, "agf = 0x%x, agf_buf->b_un.b_addr = 0x%x\n",\r
+@@ -1287,7 +1287,7 @@\r
+                               XFS_AG_DADDR(mp, agno, XFS_AGFL_DADDR(mp)),\r
+                               mp->m_sb.sb_sectsize/BBSIZE);\r
+               agfl = XFS_BUF_TO_AGFL(agfl_buf);\r
+-              bzero(agfl, mp->m_sb.sb_sectsize);\r
++              memset(agfl, 0, mp->m_sb.sb_sectsize);\r
+               /*\r
+                * ok, now grab as many blocks as we can\r
+                */\r
+diff -ru xfsprogs-2.7.11_vanilla/repair/phase6.c xfsprogs-2.7.11_sysv3-legacy/repair/phase6.c\r
+--- xfsprogs-2.7.11_vanilla/repair/phase6.c    2006-01-17 03:46:52.000000000 +0000\r
++++ xfsprogs-2.7.11_sysv3-legacy/repair/phase6.c       2008-03-21 16:06:21.000000000 +0000\r
+@@ -341,7 +341,7 @@\r
+                       error);\r
+       }\r
\r
+-      bzero(&ip->i_d, sizeof(xfs_dinode_core_t));\r
++      memset(&ip->i_d, 0, sizeof(xfs_dinode_core_t));\r
\r
+       ip->i_d.di_magic = XFS_DINODE_MAGIC;\r
+       ip->i_d.di_mode = S_IFREG;\r
+@@ -461,7 +461,7 @@\r
+                       return(1);\r
+               }\r
\r
+-              bcopy(bmp, XFS_BUF_PTR(bp), mp->m_sb.sb_blocksize);\r
++              memmove(XFS_BUF_PTR(bp), bmp, mp->m_sb.sb_blocksize);\r
\r
+               libxfs_trans_log_buf(tp, bp, 0, mp->m_sb.sb_blocksize - 1);\r
\r
+@@ -531,7 +531,7 @@\r
+                       return(1);\r
+               }\r
\r
+-              bcopy(smp, XFS_BUF_PTR(bp), mp->m_sb.sb_blocksize);\r
++              memmove(XFS_BUF_PTR(bp), smp, mp->m_sb.sb_blocksize);\r
\r
+               libxfs_trans_log_buf(tp, bp, 0, mp->m_sb.sb_blocksize - 1);\r
\r
+@@ -576,7 +576,7 @@\r
+                       error);\r
+       }\r
\r
+-      bzero(&ip->i_d, sizeof(xfs_dinode_core_t));\r
++      memset(&ip->i_d, 0, sizeof(xfs_dinode_core_t));\r
\r
+       ip->i_d.di_magic = XFS_DINODE_MAGIC;\r
+       ip->i_d.di_mode = S_IFREG;\r
+@@ -674,7 +674,7 @@\r
+       /*\r
+        * take care of the core -- initialization from xfs_ialloc()\r
+        */\r
+-      bzero(&ip->i_d, sizeof(xfs_dinode_core_t));\r
++      memset(&ip->i_d, 0, sizeof(xfs_dinode_core_t));\r
\r
+       ip->i_d.di_magic = XFS_DINODE_MAGIC;\r
+       ip->i_d.di_mode = (__uint16_t) mode|S_IFDIR;\r
+@@ -1231,7 +1231,7 @@\r
+       /*\r
+        * snag the info we need out of the directory then release all buffers\r
+        */\r
+-      bcopy(namest->name, fname, entry->namelen);\r
++      memmove(fname, namest->name, entry->namelen);\r
+       fname[entry->namelen] = '\0';\r
+       *hashval = INT_GET(entry->hashval, ARCH_CONVERT);\r
+       namelen = entry->namelen;\r
+@@ -1341,7 +1341,7 @@\r
+               junkit = 0;\r
\r
+               XFS_DIR_SF_GET_DIRINO(&namest->inumber, &lino);\r
+-              bcopy(namest->name, fname, entry->namelen);\r
++              memmove(fname, namest->name, entry->namelen);\r
+               fname[entry->namelen] = '\0';\r
\r
+               ASSERT(lino != NULLFSINO);\r
+@@ -1656,7 +1656,7 @@\r
+       libxfs_trans_ijoin(tp, ip, 0);\r
+       libxfs_trans_ihold(tp, ip);\r
+       libxfs_da_bjoin(tp, bp);\r
+-      bzero(&args, sizeof(args));\r
++      memset(&args, 0, sizeof(args));\r
+       XFS_BMAP_INIT(&flist, &firstblock);\r
+       args.dp = ip;\r
+       args.trans = tp;\r
+@@ -1907,7 +1907,7 @@\r
+                       continue;\r
+               }\r
+               junkit = 0;\r
+-              bcopy(dep->name, fname, dep->namelen);\r
++              memmove(fname, dep->name, dep->namelen);\r
+               fname[dep->namelen] = '\0';\r
+               ASSERT(INT_GET(dep->inumber, ARCH_CONVERT) != NULLFSINO);\r
+               /*\r
+@@ -2350,7 +2350,7 @@\r
+       }\r
\r
+       /* allocate blocks for btree */\r
+-      bzero(&args, sizeof(args));\r
++      memset(&args, 0, sizeof(args));\r
+       args.trans = tp;\r
+       args.dp = ip;\r
+       args.whichfork = XFS_DATA_FORK;\r
+@@ -2364,7 +2364,7 @@\r
+               /* NOTREACHED */\r
+       }\r
+       leaf = lbp->data;\r
+-      bzero(leaf, mp->m_dirblksize);\r
++      memset(leaf, 0, mp->m_dirblksize);\r
+       INT_SET(leaf->hdr.info.magic, ARCH_CONVERT, XFS_DIR2_LEAFN_MAGIC);\r
+       libxfs_da_log_buf(tp, lbp, 0, mp->m_dirblksize - 1);\r
+       libxfs_bmap_finish(&tp, &flist, firstblock, &committed);\r
+@@ -2381,7 +2381,7 @@\r
+               libxfs_trans_ijoin(tp, ip, 0);\r
+               libxfs_trans_ihold(tp, ip);\r
+               XFS_BMAP_INIT(&flist, &firstblock);\r
+-              bzero(&args, sizeof(args));\r
++              memset(&args, 0, sizeof(args));\r
+               args.trans = tp;\r
+               args.dp = ip;\r
+               args.whichfork = XFS_DATA_FORK;\r
+@@ -2398,7 +2398,7 @@\r
+                       /* NOTREACHED */\r
+               }\r
+               free = fbp->data;\r
+-              bzero(free, mp->m_dirblksize);\r
++              memset(free, 0, mp->m_dirblksize);\r
+               INT_SET(free->hdr.magic, ARCH_CONVERT, XFS_DIR2_FREE_MAGIC);\r
+               INT_SET(free->hdr.firstdb, ARCH_CONVERT, i);\r
+               INT_SET(free->hdr.nvalid, ARCH_CONVERT, XFS_DIR2_MAX_FREE_BESTS(mp));\r
+@@ -2473,7 +2473,7 @@\r
+                       mp->m_dirblksize);\r
+               exit(1);\r
+       }\r
+-      bcopy(bp->data, data, mp->m_dirblksize);\r
++      memmove(data, bp->data, mp->m_dirblksize);\r
+       ptr = (char *)data->u;\r
+       if (INT_GET(data->hdr.magic, ARCH_CONVERT) == XFS_DIR2_BLOCK_MAGIC) {\r
+               btp = XFS_DIR2_BLOCK_TAIL_P(mp, (xfs_dir2_block_t *)data);\r
+@@ -2495,7 +2495,7 @@\r
+       libxfs_da_bhold(tp, fbp);\r
+       XFS_BMAP_INIT(&flist, &firstblock);\r
+       needlog = needscan = 0;\r
+-      bzero(((xfs_dir2_data_t *)(bp->data))->hdr.bestfree,\r
++      memset(((xfs_dir2_data_t *)(bp->data))->hdr.bestfree, 0,\r
+               sizeof(data->hdr.bestfree));\r
+       libxfs_dir2_data_make_free(tp, bp, (xfs_dir2_data_aoff_t)sizeof(data->hdr),\r
+               mp->m_dirblksize - sizeof(data->hdr), &needlog, &needscan);\r
+@@ -2856,7 +2856,7 @@\r
+                       }\r
+               }\r
\r
+-              bcopy(sf_entry->name, fname, sf_entry->namelen);\r
++              memmove(fname, sf_entry->name, sf_entry->namelen);\r
+               fname[sf_entry->namelen] = '\0';\r
\r
+               ASSERT(no_modify || lino != NULLFSINO);\r
+@@ -2967,7 +2967,7 @@\r
+                               memmove(sf_entry, tmp_sfe, tmp_len);\r
\r
+                               INT_MOD(sf->hdr.count, ARCH_CONVERT, -1);\r
+-                              bzero((void *) ((__psint_t) sf_entry + tmp_len),\r
++                              memset((void *) ((__psint_t) sf_entry + tmp_len), 0,\r
+                                               tmp_elen);\r
\r
+                               /*\r
+@@ -3071,7 +3071,7 @@\r
\r
+               XFS_DIR_SF_GET_DIRINO(&sf_entry->inumber, &lino);\r
\r
+-              bcopy(sf_entry->name, fname, sf_entry->namelen);\r
++              memmove(fname, sf_entry->name, sf_entry->namelen);\r
+               fname[sf_entry->namelen] = '\0';\r
\r
+               if (sf_entry->name[0] == '/')  {\r
+@@ -3087,7 +3087,7 @@\r
+                               memmove(sf_entry, tmp_sfe, tmp_len);\r
\r
+                               INT_MOD(sf->hdr.count, ARCH_CONVERT, -1);\r
+-                              bzero((void *) ((__psint_t) sf_entry + tmp_len),\r
++                              memset((void *) ((__psint_t) sf_entry + tmp_len), 0,\r
+                                               tmp_elen);\r
\r
+                               /*\r
+@@ -3242,7 +3242,7 @@\r
+                       }\r
+               }\r
\r
+-              bcopy(sfep->name, fname, sfep->namelen);\r
++              memmove(fname, sfep->name, sfep->namelen);\r
+               fname[sfep->namelen] = '\0';\r
\r
+               ASSERT(no_modify || (lino != NULLFSINO && lino != 0));\r
+@@ -3363,7 +3363,7 @@\r
+                               memmove(sfep, tmp_sfep, tmp_len);\r
\r
+                               INT_MOD(sfp->hdr.count, ARCH_CONVERT, -1);\r
+-                              bzero((void *) ((__psint_t) sfep + tmp_len),\r
++                              memset((void *) ((__psint_t) sfep + tmp_len), 0,\r
+                                               tmp_elen);\r
\r
+                               /*\r
+@@ -3879,8 +3879,8 @@\r
+       int                     i;\r
+       int                     j;\r
\r
+-      bzero(&zerocr, sizeof(struct cred));\r
+-      bzero(&zerofsx, sizeof(struct fsxattr));\r
++      memset(&zerocr, 0, sizeof(struct cred));\r
++      memset(&zerofsx, 0, sizeof(struct fsxattr));\r
\r
+       do_log(_("Phase 6 - check inode connectivity...\n"));\r
\r
+diff -ru xfsprogs-2.7.11_vanilla/repair/rt.c xfsprogs-2.7.11_sysv3-legacy/repair/rt.c\r
+--- xfsprogs-2.7.11_vanilla/repair/rt.c        2006-01-17 03:46:52.000000000 +0000\r
++++ xfsprogs-2.7.11_sysv3-legacy/repair/rt.c   2008-03-21 15:14:13.000000000 +0000\r
+@@ -275,7 +275,7 @@\r
+                       continue;\r
+               }\r
+               bytes = bp->b_un.b_addr;\r
+-              bcopy(bytes, (char *)sumfile + sumbno * mp->m_sb.sb_blocksize,\r
++              memmove((char *)sumfile + sumbno * mp->m_sb.sb_blocksize, bytes,\r
+                       mp->m_sb.sb_blocksize);\r
+               libxfs_putbuf(bp);\r
+       }\r
+diff -ru xfsprogs-2.7.11_vanilla/repair/sb.c xfsprogs-2.7.11_sysv3-legacy/repair/sb.c\r
+--- xfsprogs-2.7.11_vanilla/repair/sb.c        2006-01-17 03:46:52.000000000 +0000\r
++++ xfsprogs-2.7.11_sysv3-legacy/repair/sb.c   2008-03-21 16:10:10.000000000 +0000\r
+@@ -77,7 +77,7 @@\r
+       dest->sb_fdblocks = 0;\r
+       dest->sb_frextents = 0;\r
\r
+-      bzero(source->sb_fname, 12);\r
++      memset(source->sb_fname, 0, 12);\r
+ }\r
\r
+ /*\r
+@@ -105,7 +105,7 @@\r
+               exit(1);\r
+       }\r
\r
+-      bzero(&bufsb, sizeof(xfs_sb_t));\r
++      memset(&bufsb, 0, sizeof(xfs_sb_t));\r
+       retval = 0;\r
+       dirty = 0;\r
+       bsize = 0;\r
+@@ -144,7 +144,7 @@\r
+                        * found one.  now verify it by looking\r
+                        * for other secondaries.\r
+                        */\r
+-                      bcopy(&bufsb, rsb, sizeof(xfs_sb_t));\r
++                      memmove(rsb, &bufsb, sizeof(xfs_sb_t));\r
+                       rsb->sb_inprogress = 0;\r
+                       clear_sunit = 1;\r
\r
+@@ -576,7 +576,7 @@\r
+ void\r
+ get_sb_geometry(fs_geometry_t *geo, xfs_sb_t *sbp)\r
+ {\r
+-      bzero(geo, sizeof(fs_geometry_t));\r
++      memset(geo, 0, sizeof(fs_geometry_t));\r
\r
+       /*\r
+        * blindly set fields that we know are always good\r
+@@ -643,7 +643,7 @@\r
+        * superblock fields located after sb_widthfields get set\r
+        * into the geometry structure only if we can determine\r
+        * from the features enabled in this superblock whether\r
+-       * or not the sector was bzero'd at mkfs time.\r
++       * or not the sector was zero'd at mkfs time.\r
+        */\r
+       if ((!pre_65_beta && (sbp->sb_versionnum & XR_GOOD_SECSB_VNMASK)) ||\r
+           (pre_65_beta && (sbp->sb_versionnum & XR_ALPHA_SECSB_VNMASK))) {\r
+diff -ru xfsprogs-2.7.11_vanilla/rtcp/xfs_rtcp.c xfsprogs-2.7.11_sysv3-legacy/rtcp/xfs_rtcp.c\r
+--- xfsprogs-2.7.11_vanilla/rtcp/xfs_rtcp.c    2006-01-17 03:46:52.000000000 +0000\r
++++ xfsprogs-2.7.11_sysv3-legacy/rtcp/xfs_rtcp.c       2008-03-21 16:06:21.000000000 +0000\r
+@@ -365,7 +365,7 @@\r
+                       return( -1 );\r
+               }\r
\r
+-              bzero( fbuf, iosz);\r
++              memset( fbuf, 0, iosz);\r
+       }\r
\r
+       close(fromfd);\r