1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
|
From c324259a062e1082c1daa02d3e910e02d6df9044 Mon Sep 17 00:00:00 2001
From: Justus Winter <4winter@informatik.uni-hamburg.de>
Date: Tue, 2 Dec 2014 00:20:51 +0100
Subject: [PATCH hurd 5/5] xxx replace bcopy with memcpy or memmove as
appropriate
* ext2fs/inode.c
* ext2fs/pager.c
* libpager/pagemap.c
* mach-defpager/default_pager.c
* pfinet/ethernet.c
* pfinet/tunnel.c
---
ext2fs/inode.c | 2 +-
ext2fs/pager.c | 4 ++--
libpager/pagemap.c | 2 +-
mach-defpager/default_pager.c | 4 ++--
pfinet/ethernet.c | 10 +++++-----
pfinet/tunnel.c | 2 +-
6 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/ext2fs/inode.c b/ext2fs/inode.c
index 27530fb..c001a4e 100644
--- a/ext2fs/inode.c
+++ b/ext2fs/inode.c
@@ -733,7 +733,7 @@ diskfs_set_translator (struct node *np, const char *name, unsigned namelen,
buf[0] = namelen & 0xFF;
buf[1] = (namelen >> 8) & 0xFF;
- bcopy (name, buf + 2, namelen);
+ memcpy (buf + 2, name, namelen);
blkptr = disk_cache_block_ref (blkno);
memcpy (blkptr, buf, block_size);
diff --git a/ext2fs/pager.c b/ext2fs/pager.c
index ae51530..a6c4fbb 100644
--- a/ext2fs/pager.c
+++ b/ext2fs/pager.c
@@ -209,7 +209,7 @@ file_pager_read_page (struct node *node, vm_offset_t page,
else
/* We've already got some buffer, so copy into it. */
{
- bcopy (new_buf, *buf + offs, new_len);
+ memcpy (*buf + offs, new_buf, new_len);
free_page_buf (new_buf); /* Return NEW_BUF to our pool. */
STAT_INC (file_pagein_freed_bufs);
}
@@ -316,7 +316,7 @@ pending_blocks_write (struct pending_blocks *pb)
/* Put what we're going to write into a page-aligned buffer. */
{
void *page_buf = get_page_buf ();
- bcopy (pb->buf + pb->offs, (void *)page_buf, length);
+ memcpy ((void *)page_buf, pb->buf + pb->offs, length);
err = store_write (store, dev_block, page_buf, length, &amount);
free_page_buf (page_buf);
}
diff --git a/libpager/pagemap.c b/libpager/pagemap.c
index b8b3362..963f656 100644
--- a/libpager/pagemap.c
+++ b/libpager/pagemap.c
@@ -36,7 +36,7 @@ _pager_pagemap_resize (struct pager *p, vm_address_t off)
err = (newaddr == (void *) -1) ? errno : 0;
if (! err)
{
- bcopy (p->pagemap, newaddr, p->pagemapsize * sizeof (*p->pagemap));
+ memcpy (newaddr, p->pagemap, p->pagemapsize * sizeof (*p->pagemap));
munmap (p->pagemap, p->pagemapsize * sizeof (*p->pagemap));
p->pagemap = newaddr;
p->pagemapsize = newsize;
diff --git a/mach-defpager/default_pager.c b/mach-defpager/default_pager.c
index 9e4b0e7..83382c0 100644
--- a/mach-defpager/default_pager.c
+++ b/mach-defpager/default_pager.c
@@ -431,7 +431,7 @@ create_paging_partition(const char *name,
memset (new_list, 0, n * sizeof(partition_t));
if (i) {
old_list = all_partitions.partition_list;
- bcopy(old_list, new_list, i*sizeof(partition_t));
+ memcpy (new_list, old_list, i*sizeof(partition_t));
}
all_partitions.partition_list = new_list;
all_partitions.n_partitions = n;
@@ -1678,7 +1678,7 @@ ddprintf ("default_read(%x,%x,%x,%d)\n",addr,size,offset,block.block.p_index);
* the next piece.
*/
first_time = FALSE;
- bcopy((char *)raddr, (char *)addr, rsize);
+ memcpy ((char *)addr, (char *)raddr, rsize);
addr += rsize;
offset += rsize;
size -= rsize;
diff --git a/pfinet/ethernet.c b/pfinet/ethernet.c
index 1678243..e6ae53c 100644
--- a/pfinet/ethernet.c
+++ b/pfinet/ethernet.c
@@ -158,10 +158,10 @@ ethernet_demuxer (mach_msg_header_t *inp,
skb->dev = dev;
/* Copy the two parts of the frame into the buffer. */
- bcopy (msg->header, skb->data, ETH_HLEN);
- bcopy (msg->packet + sizeof (struct packet_header),
- skb->data + ETH_HLEN,
- datalen - ETH_HLEN);
+ memcpy (skb->data, msg->header, ETH_HLEN);
+ memcpy (skb->data + ETH_HLEN,
+ msg->packet + sizeof (struct packet_header),
+ datalen - ETH_HLEN);
/* Drop it on the queue. */
skb->protocol = eth_type_trans (skb, dev);
@@ -389,7 +389,7 @@ setup_ethernet_device (char *name, struct device **device)
error (2, err, "%s: Cannot get hardware Ethernet address", name);
net_address[0] = ntohl (net_address[0]);
net_address[1] = ntohl (net_address[1]);
- bcopy (net_address, dev->dev_addr, ETH_ALEN);
+ memcpy (dev->dev_addr, net_address, ETH_ALEN);
/* That should be enough. */
diff --git a/pfinet/tunnel.c b/pfinet/tunnel.c
index 6a7f355..02e9ee8 100644
--- a/pfinet/tunnel.c
+++ b/pfinet/tunnel.c
@@ -395,7 +395,7 @@ trivfs_S_io_write (struct trivfs_protid *cred,
skb->len = datalen;
skb->dev = &tdev->dev;
- bcopy (data, skb->data, datalen);
+ memcpy (skb->data, data, datalen);
/* Drop it on the queue. */
skb->mac.raw = skb->data;
--
2.1.3
|