diff options
Diffstat (limited to 'debian/patches/0004-xxx-replace-bcopy-with-memcpy-or-memmove-as-appropri.patch')
-rw-r--r-- | debian/patches/0004-xxx-replace-bcopy-with-memcpy-or-memmove-as-appropri.patch | 135 |
1 files changed, 135 insertions, 0 deletions
diff --git a/debian/patches/0004-xxx-replace-bcopy-with-memcpy-or-memmove-as-appropri.patch b/debian/patches/0004-xxx-replace-bcopy-with-memcpy-or-memmove-as-appropri.patch new file mode 100644 index 00000000..b219f074 --- /dev/null +++ b/debian/patches/0004-xxx-replace-bcopy-with-memcpy-or-memmove-as-appropri.patch @@ -0,0 +1,135 @@ +From 9c4b160d6806e58b282ed3824572c8c38a275639 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 4/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 ed78265..c11b5c1 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 + |