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
|
--- util-linux-ng-2.15.orig/fdisk/fdiskbsdlabel.c 2009-02-24 16:39:30.000000000 +0100
+++ util-linux-ng-2.15/fdisk/fdiskbsdlabel.c 2009-06-22 22:42:04.000000000 +0200
@@ -538,10 +538,10 @@ 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));
+ memcpy (&dl, d, sizeof (struct xbsd_disklabel));
/* The disklabel will be overwritten by 0's from bootxx anyway */
- bzero (d, sizeof (struct xbsd_disklabel));
+ memset (d, 0, sizeof (struct xbsd_disklabel));
snprintf (path, sizeof(path), "%s/boot%s", bootdir, dkbasename);
if (!xbsd_get_bootstrap (path, &disklabelbuffer[xbsd_dlabel.d_secsize],
@@ -555,7 +555,7 @@ xbsd_write_bootstrap (void)
exit ( EXIT_FAILURE );
}
- bcopy (&dl, d, sizeof (struct xbsd_disklabel));
+ memcpy (d, &dl, sizeof (struct xbsd_disklabel));
#if defined (__powerpc__) || defined (__hppa__)
sector = 0;
@@ -657,7 +657,7 @@ xbsd_initlabel (struct partition *p, str
struct geom g;
get_geometry (fd, &g);
- bzero (d, sizeof (struct xbsd_disklabel));
+ memset (d, 0, sizeof (struct xbsd_disklabel));
d -> d_magic = BSD_DISKMAGIC;
@@ -740,8 +740,8 @@ xbsd_readlabel (struct partition *p, str
if (BSD_BBSIZE != read (fd, disklabelbuffer, BSD_BBSIZE))
fatal (unable_to_read);
- bcopy (&disklabelbuffer[BSD_LABELSECTOR * SECTOR_SIZE + BSD_LABELOFFSET],
- d, sizeof (struct xbsd_disklabel));
+ memcpy (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;
@@ -776,7 +776,7 @@ xbsd_writelabel (struct partition *p, st
/* 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],
+ memcpy (&disklabelbuffer[BSD_LABELSECTOR * SECTOR_SIZE + BSD_LABELOFFSET], d,
sizeof (struct xbsd_disklabel));
#if defined (__alpha__) && BSD_LABELSECTOR == 0
|