123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- $Id: update-patches 24 2008-08-31 14:56:13Z wbx $
- --- util-linux-2.12r.orig/fdisk/fdiskbsdlabel.c 2003-07-13 23:12:47.000000000 +0200
- +++ util-linux-2.12r/fdisk/fdiskbsdlabel.c 2008-10-16 12:28:32.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
|