From 1a54030445c802b79491c286988ee4d25fdb9665 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Sun, 16 Apr 2006 05:58:21 +0000 Subject: use memmove() instead of bcopy() --- util-linux/fdisk.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'util-linux/fdisk.c') diff --git a/util-linux/fdisk.c b/util-linux/fdisk.c index f119788..9701c46 100644 --- a/util-linux/fdisk.c +++ b/util-linux/fdisk.c @@ -1322,7 +1322,7 @@ xbsd_write_bootstrap(void) /* We need a backup of the disklabel (xbsd_dlabel might have changed). */ d = &disklabelbuffer[BSD_LABELSECTOR * SECTOR_SIZE]; - bcopy(d, &dl, sizeof(struct xbsd_disklabel)); + memmove(&dl, d, sizeof(struct xbsd_disklabel)); /* The disklabel will be overwritten by 0's from bootxx anyway */ memset(d, 0, sizeof(struct xbsd_disklabel)); @@ -1339,7 +1339,7 @@ xbsd_write_bootstrap(void) exit(EXIT_FAILURE); } - bcopy(&dl, d, sizeof(struct xbsd_disklabel)); + memmove(d, &dl, sizeof(struct xbsd_disklabel)); #if defined (__powerpc__) || defined (__hppa__) sector = 0; @@ -1526,8 +1526,8 @@ xbsd_readlabel (struct partition *p, struct xbsd_disklabel *d) if (BSD_BBSIZE != read(fd, disklabelbuffer, BSD_BBSIZE)) fdisk_fatal(unable_to_read); - bcopy(&disklabelbuffer[BSD_LABELSECTOR * SECTOR_SIZE + BSD_LABELOFFSET], - d, sizeof(struct xbsd_disklabel)); + memmove(d, &disklabelbuffer[BSD_LABELSECTOR * SECTOR_SIZE + BSD_LABELOFFSET], + sizeof(struct xbsd_disklabel)); if (d->d_magic != BSD_DISKMAGIC || d->d_magic2 != BSD_DISKMAGIC) return 0; @@ -1562,8 +1562,8 @@ xbsd_writelabel (struct partition *p, struct xbsd_disklabel *d) /* This is necessary if we want to write the bootstrap later, otherwise we'd write the old disklabel with the bootstrap. */ - bcopy(d, &disklabelbuffer[BSD_LABELSECTOR * SECTOR_SIZE + BSD_LABELOFFSET], - sizeof(struct xbsd_disklabel)); + memmove(&disklabelbuffer[BSD_LABELSECTOR * SECTOR_SIZE + BSD_LABELOFFSET], + d, sizeof(struct xbsd_disklabel)); #if defined (__alpha__) && BSD_LABELSECTOR == 0 alpha_bootblock_checksum (disklabelbuffer); -- cgit v1.1