~ubuntu-branches/ubuntu/utopic/parted/utopic-proposed

« back to all changes in this revision

Viewing changes to debian/patches/gptsync.patch

  • Committer: Package Import Robot
  • Author(s): Phillip Susi
  • Date: 2013-08-12 10:11:10 UTC
  • mfrom: (7.2.25 sid)
  • Revision ID: package-import@ubuntu.com-20130812101110-b6xi9i5tcoq7deo0
Tags: 2.3-14
* Merge fix-head-size-assertion.patch from Ubuntu: change an
  assert so it correctly recovers instead of aborting the program
  (closes: #620273).
* Merge dm_p_separator.patch from Ubuntu: parted would add a
  'p' between the base device name and the partition number for
  all device-mapper devices instead of only if the base name
  ended in a digit.
* Merge remove-dev_t-dep.patch from Ubuntu: parted was making
  bad assumptions about the meaning of the values of dev_t,
  causing it to fail to detect in-use partitions on all dmraid
  disks, and regular disk partitions > #16.
* Merge skip-floppy.patch from Ubuntu: add floppies to the list
  of ignored devices since they can not be partitioned anyhow,
  and often people have no floppy though their bios thinks they do,
  and touching it causes hangs.
* Merge gptsync.patch from Ubuntu: On Intel Mac systems, write a
  synced MBR rather than a protective MBR.
* Merge loop-partitions.patch from Ubuntu: backport some changes
  to allow the use of partitions on loop devices.  This also
  allows more than 16 partitions.
* Merge dmraid.patch from Ubuntu: Don't probe dmraid partition
  devices.  Also set UUID of newly created dmraid partition devices.
* Merge dm-part-sync.patch from Ubuntu: refactor device-mapper
  partition sync code so it does not fail when unmodified partitions
  are mounted.
* Merge udevadm-settle.patch from Ubuntu: Run udevadm settle around
  partition table rereads, to avoid races.
* Merge 16-dos-partitions.patch from Ubuntu: the kernel was not
  being informed of partitions above #16 on dos partition tables
  (closes: #667638).
* Merge hfs-probe-corrupt.patch from Ubuntu: don't let a corrupt
  FS evoke failed assertion.
* Backport online resize patches: 0001-parted-resizepart-command.patch,
  0003-libparted-Add-support-for-BLKPG-ioctl-partition-resi.patch,
  and 0004-parted-make-_partition_warn_busy-actually-a-warning.patch
* Merge fewer-gpt-entries.patch: Backport upstream patches to handle
  GPT labels with fewer than 128 partition entries (LP: #1187560).
* debian/patches/avoid-disturbing-partitions.patch: Don't remove and
  re-add unmodified partitions (LP: #1060484).
* debian/patches/linux-specific-gpt-type.patch: Backport upstream
  changes to use a linux specific partition type code instead of
  Microsoft's, which causes Windows to offer to format the partition.

Show diffs side-by-side

added added

removed removed

Lines of Context:
5
5
Description: GPT syncing for Intel Macs
6
6
 On Intel Mac systems, write a synced MBR rather than a protective MBR.
7
7
 
8
 
Index: b/libparted/labels/gpt.c
9
 
===================================================================
10
8
--- a/libparted/labels/gpt.c
11
9
+++ b/libparted/labels/gpt.c
12
10
@@ -10,6 +10,11 @@
30
28
 #include <fcntl.h>
31
29
 #include <unistd.h>
32
30
 #include <uuid/uuid.h>
33
 
@@ -287,6 +294,258 @@
 
31
@@ -282,6 +289,258 @@
34
32
 
35
33
 static PedDiskType gpt_disk_type;
36
34
 
289
287
 static inline uint32_t
290
288
 pth_get_size (const PedDevice *dev)
291
289
 {
292
 
@@ -481,6 +740,9 @@
 
290
@@ -476,6 +735,9 @@
293
291
   if (!gpt_sig_found)
294
292
     return 0;
295
293
 
299
297
   void *label;
300
298
   if (!ptt_read_sector (dev, 0, &label))
301
299
     return 0;
302
 
@@ -897,6 +1159,10 @@
 
300
@@ -889,6 +1151,10 @@
303
301
  *  warn if it's not there, and treat the disk as MSDOS, with a note
304
302
  *  for users to use Parted to "fix up" their disk if they
305
303
  *  really want it to be considered GPT.
310
308
  ************************************************************/
311
309
 static int
312
310
 gpt_read (PedDisk *disk)
313
 
@@ -1103,6 +1369,129 @@
 
311
@@ -1095,6 +1361,129 @@
314
312
   return write_ok;
315
313
 }
316
314
 
440
438
 static int
441
439
 _generate_header (const PedDisk *disk, int alternate, uint32_t ptes_crc,
442
440
                   GuidPartitionTableHeader_t **gpt_p)
443
 
@@ -1211,9 +1600,15 @@
 
441
@@ -1201,9 +1590,15 @@
444
442
 
445
443
   ptes_crc = efi_crc32 (ptes, ptes_size);
446
444
 
459
457
 
460
458
   /* Write PTH and PTEs */
461
459
   /* FIXME: Caution: this code is nearly identical to what's just below. */
462
 
@@ -1805,6 +2200,21 @@
 
460
@@ -1790,6 +2185,21 @@
463
461
   PED_ASSERT (sizeof (GuidPartitionEntry_t) == 128, return);
464
462
 
465
463
   ped_disk_type_register (&gpt_disk_type);
481
479
 }
482
480
 
483
481
 void
484
 
Index: b/tests/t0290-gptsync.sh
485
 
===================================================================
486
482
--- /dev/null
487
483
+++ b/tests/t0290-gptsync.sh
488
484
@@ -0,0 +1,175 @@
661
657
+compare exp out || fail=1
662
658
+
663
659
+Exit $fail
664
 
Index: b/tests/Makefile.am
665
 
===================================================================
666
660
--- a/tests/Makefile.am
667
661
+++ b/tests/Makefile.am
668
662
@@ -15,6 +15,7 @@