svn commit: r219083 - head/sys/boot/common

Pawel Jakub Dawidek pjd at FreeBSD.org
Sun Feb 27 12:25:47 UTC 2011


Author: pjd
Date: Sun Feb 27 12:25:47 2011
New Revision: 219083
URL: http://svn.freebsd.org/changeset/base/219083

Log:
  Rename bcpy() macro to bcopy().

Modified:
  head/sys/boot/common/gpt.c
  head/sys/boot/common/util.h

Modified: head/sys/boot/common/gpt.c
==============================================================================
--- head/sys/boot/common/gpt.c	Sun Feb 27 11:40:20 2011	(r219082)
+++ head/sys/boot/common/gpt.c	Sun Feb 27 12:25:47 2011	(r219083)
@@ -71,7 +71,7 @@ gptupdate(const char *which, struct dsk 
 	entries_per_sec = DEV_BSIZE / hdr->hdr_entsz;
 	slba = curent / entries_per_sec;
 	firstent = slba * entries_per_sec;
-	bcpy(&table[firstent], secbuf, DEV_BSIZE);
+	bcopy(&table[firstent], secbuf, DEV_BSIZE);
 	slba += hdr->hdr_lba_table;
 	if (drvwrite(dskp, secbuf, slba, 1)) {
 		printf("%s: unable to update %s GPT partition table\n",
@@ -82,7 +82,7 @@ gptupdate(const char *which, struct dsk 
 	hdr->hdr_crc_self = 0;
 	hdr->hdr_crc_self = crc32(hdr, hdr->hdr_size);
 	bzero(secbuf, DEV_BSIZE);
-	bcpy(hdr, secbuf, hdr->hdr_size);
+	bcopy(hdr, secbuf, hdr->hdr_size);
 	if (drvwrite(dskp, secbuf, hdr->hdr_lba_self, 1)) {
 		printf("%s: unable to update %s GPT header\n", BOOTPROG, which);
 		return;
@@ -191,7 +191,7 @@ gptread_hdr(const char *which, struct ds
 		printf("%s: unable to read %s GPT header\n", BOOTPROG, which);
 		return (-1);
 	}
-	bcpy(secbuf, hdr, sizeof(*hdr));
+	bcopy(secbuf, hdr, sizeof(*hdr));
 	if (bcmp(hdr->hdr_sig, GPT_HDR_SIG, sizeof(hdr->hdr_sig)) != 0 ||
 	    hdr->hdr_lba_self != hdrlba || hdr->hdr_revision < 0x00010000 ||
 	    hdr->hdr_entsz < sizeof(struct gpt_ent) ||
@@ -259,7 +259,7 @@ gptbootconv(const char *which, struct ds
 		}
 		if (!sector_updated)
 			continue;
-		bcpy(&table[nent], secbuf, DEV_BSIZE);
+		bcopy(&table[nent], secbuf, DEV_BSIZE);
 		if (drvwrite(dskp, secbuf, slba, 1)) {
 			printf("%s: unable to update %s GPT partition table\n",
 			    BOOTPROG, which);
@@ -271,7 +271,7 @@ gptbootconv(const char *which, struct ds
 	hdr->hdr_crc_self = 0;
 	hdr->hdr_crc_self = crc32(hdr, hdr->hdr_size);
 	bzero(secbuf, DEV_BSIZE);
-	bcpy(hdr, secbuf, hdr->hdr_size);
+	bcopy(hdr, secbuf, hdr->hdr_size);
 	if (drvwrite(dskp, secbuf, hdr->hdr_lba_self, 1))
 		printf("%s: unable to update %s GPT header\n", BOOTPROG, which);
 }
@@ -299,7 +299,7 @@ gptread_table(const char *which, const u
 		}
 		ent = (struct gpt_ent *)secbuf;
 		for (part = 0; part < entries_per_sec; part++, ent++) {
-			bcpy(ent, &table[nent], sizeof(table[nent]));
+			bcopy(ent, &table[nent], sizeof(table[nent]));
 			if (++nent >= hdr->hdr_entries)
 				break;
 		}

Modified: head/sys/boot/common/util.h
==============================================================================
--- head/sys/boot/common/util.h	Sun Feb 27 11:40:20 2011	(r219082)
+++ head/sys/boot/common/util.h	Sun Feb 27 12:25:47 2011	(r219083)
@@ -37,7 +37,7 @@ void memcpy(void *dst, const void *src, 
 void memset(void *b, int c, size_t len);
 int memcmp(const void *b1, const void *b2, size_t len);
 
-#define	bcpy(src, dst, len)	memcpy((dst), (src), (len))
+#define	bcopy(src, dst, len)	memcpy((dst), (src), (len))
 #define	bzero(buf, size)	memset((buf), 0, (size))
 #define	bcmp(b1, b2, len)	(memcmp((b1), (b2), (len)) != 0)
 


More information about the svn-src-head mailing list