aboutsummaryrefslogtreecommitdiff
path: root/util-linux
diff options
context:
space:
mode:
authorvapier <vapier@69ca8d6d-28ef-0310-b511-8ec308f3f277>2006-04-16 05:58:21 +0000
committervapier <vapier@69ca8d6d-28ef-0310-b511-8ec308f3f277>2006-04-16 05:58:21 +0000
commitf139eafe73838805465a0a4e22149421427f7e1d (patch)
tree146414467e7f28fe49270853815ea4d19efddb7d /util-linux
parentab1ba183deb012132c28b3f8467eaa9b6adfa665 (diff)
downloadbusybox-w32-f139eafe73838805465a0a4e22149421427f7e1d.tar.gz
busybox-w32-f139eafe73838805465a0a4e22149421427f7e1d.tar.bz2
busybox-w32-f139eafe73838805465a0a4e22149421427f7e1d.zip
use memmove() instead of bcopy()
git-svn-id: svn://busybox.net/trunk/busybox@14887 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'util-linux')
-rw-r--r--util-linux/fdisk.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/util-linux/fdisk.c b/util-linux/fdisk.c
index f119788b1..9701c467b 100644
--- a/util-linux/fdisk.c
+++ b/util-linux/fdisk.c
@@ -1322,7 +1322,7 @@ xbsd_write_bootstrap(void)
1322 1322
1323/* We need a backup of the disklabel (xbsd_dlabel might have changed). */ 1323/* We need a backup of the disklabel (xbsd_dlabel might have changed). */
1324 d = &disklabelbuffer[BSD_LABELSECTOR * SECTOR_SIZE]; 1324 d = &disklabelbuffer[BSD_LABELSECTOR * SECTOR_SIZE];
1325 bcopy(d, &dl, sizeof(struct xbsd_disklabel)); 1325 memmove(&dl, d, sizeof(struct xbsd_disklabel));
1326 1326
1327/* The disklabel will be overwritten by 0's from bootxx anyway */ 1327/* The disklabel will be overwritten by 0's from bootxx anyway */
1328 memset(d, 0, sizeof(struct xbsd_disklabel)); 1328 memset(d, 0, sizeof(struct xbsd_disklabel));
@@ -1339,7 +1339,7 @@ xbsd_write_bootstrap(void)
1339 exit(EXIT_FAILURE); 1339 exit(EXIT_FAILURE);
1340 } 1340 }
1341 1341
1342 bcopy(&dl, d, sizeof(struct xbsd_disklabel)); 1342 memmove(d, &dl, sizeof(struct xbsd_disklabel));
1343 1343
1344#if defined (__powerpc__) || defined (__hppa__) 1344#if defined (__powerpc__) || defined (__hppa__)
1345 sector = 0; 1345 sector = 0;
@@ -1526,8 +1526,8 @@ xbsd_readlabel (struct partition *p, struct xbsd_disklabel *d)
1526 if (BSD_BBSIZE != read(fd, disklabelbuffer, BSD_BBSIZE)) 1526 if (BSD_BBSIZE != read(fd, disklabelbuffer, BSD_BBSIZE))
1527 fdisk_fatal(unable_to_read); 1527 fdisk_fatal(unable_to_read);
1528 1528
1529 bcopy(&disklabelbuffer[BSD_LABELSECTOR * SECTOR_SIZE + BSD_LABELOFFSET], 1529 memmove(d, &disklabelbuffer[BSD_LABELSECTOR * SECTOR_SIZE + BSD_LABELOFFSET],
1530 d, sizeof(struct xbsd_disklabel)); 1530 sizeof(struct xbsd_disklabel));
1531 1531
1532 if (d->d_magic != BSD_DISKMAGIC || d->d_magic2 != BSD_DISKMAGIC) 1532 if (d->d_magic != BSD_DISKMAGIC || d->d_magic2 != BSD_DISKMAGIC)
1533 return 0; 1533 return 0;
@@ -1562,8 +1562,8 @@ xbsd_writelabel (struct partition *p, struct xbsd_disklabel *d)
1562 /* This is necessary if we want to write the bootstrap later, 1562 /* This is necessary if we want to write the bootstrap later,
1563 otherwise we'd write the old disklabel with the bootstrap. 1563 otherwise we'd write the old disklabel with the bootstrap.
1564 */ 1564 */
1565 bcopy(d, &disklabelbuffer[BSD_LABELSECTOR * SECTOR_SIZE + BSD_LABELOFFSET], 1565 memmove(&disklabelbuffer[BSD_LABELSECTOR * SECTOR_SIZE + BSD_LABELOFFSET],
1566 sizeof(struct xbsd_disklabel)); 1566 d, sizeof(struct xbsd_disklabel));
1567 1567
1568#if defined (__alpha__) && BSD_LABELSECTOR == 0 1568#if defined (__alpha__) && BSD_LABELSECTOR == 0
1569 alpha_bootblock_checksum (disklabelbuffer); 1569 alpha_bootblock_checksum (disklabelbuffer);