diff options
author | pjd <pjd@FreeBSD.org> | 2011-02-27 12:25:47 +0000 |
---|---|---|
committer | pjd <pjd@FreeBSD.org> | 2011-02-27 12:25:47 +0000 |
commit | 1903daf0a4e7d5991b5a9396b74e51ce39add811 (patch) | |
tree | 335d50413bd5c973c861689873526d30bbed19dc /sys/boot/common | |
parent | ffc2c5868b543205c58402664225de09d37283fd (diff) | |
download | FreeBSD-src-1903daf0a4e7d5991b5a9396b74e51ce39add811.zip FreeBSD-src-1903daf0a4e7d5991b5a9396b74e51ce39add811.tar.gz |
Rename bcpy() macro to bcopy().
Diffstat (limited to 'sys/boot/common')
-rw-r--r-- | sys/boot/common/gpt.c | 12 | ||||
-rw-r--r-- | sys/boot/common/util.h | 2 |
2 files changed, 7 insertions, 7 deletions
diff --git a/sys/boot/common/gpt.c b/sys/boot/common/gpt.c index 9c00980..0078abc 100644 --- a/sys/boot/common/gpt.c +++ b/sys/boot/common/gpt.c @@ -71,7 +71,7 @@ gptupdate(const char *which, struct dsk *dskp, struct gpt_hdr *hdr, 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 *dskp, struct gpt_hdr *hdr, 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 dsk *dskp, struct gpt_hdr *hdr, 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 dsk *dskp, struct gpt_hdr *hdr, } 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 dsk *dskp, struct gpt_hdr *hdr, 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 uuid_t *uuid, struct dsk *dskp, } 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; } diff --git a/sys/boot/common/util.h b/sys/boot/common/util.h index 600c4e0..1ccb78d 100644 --- a/sys/boot/common/util.h +++ b/sys/boot/common/util.h @@ -37,7 +37,7 @@ void memcpy(void *dst, const void *src, int len); 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) |