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

« back to all changes in this revision

Viewing changes to debian/patches/dasd-sync.patch

  • Committer: Package Import Robot
  • Author(s): Colin Watson
  • Date: 2014-07-21 10:23:16 UTC
  • mfrom: (7.2.32 sid)
  • Revision ID: package-import@ubuntu.com-20140721102316-jsyv3yzmbo8vlde5
Tags: 3.1-3
Upload to unstable.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
From a8e217730f8fb7152845c3748b1236d0e7c2c360 Mon Sep 17 00:00:00 2001
2
 
From: "Brian C. Lane" <bcl@redhat.com>
3
 
Date: Fri, 28 Mar 2014 17:10:08 +0000
4
 
Subject: Remove DASD restriction on _disk_sync_part_table
5
 
 
6
 
Origin: upstream, http://git.debian.org/?p=parted/parted.git;a=commitdiff;h=9fa0e1800db5b9f094ae481fd95a51da03f19e95
7
 
Bug-Fedora: https://bugzilla.redhat.com/show_bug.cgi?id=651478
8
 
Bug-Debian: http://bugs.debian.org/605759
9
 
Forwarded: not-needed
10
 
Last-Update: 2010-12-19
11
 
 
12
 
Patch-Name: dasd-sync.patch
13
 
---
14
 
 libparted/arch/linux.c | 22 +++++++++-------------
15
 
 1 file changed, 9 insertions(+), 13 deletions(-)
16
 
 
17
 
diff --git a/libparted/arch/linux.c b/libparted/arch/linux.c
18
 
index bccc2c2..69088f9 100644
19
 
--- a/libparted/arch/linux.c
20
 
+++ b/libparted/arch/linux.c
21
 
@@ -40,6 +40,7 @@
22
 
 #include <sys/types.h>
23
 
 #include <sys/utsname.h>        /* for uname() */
24
 
 #include <scsi/scsi.h>
25
 
+#include <assert.h>
26
 
 #ifdef ENABLE_DEVICE_MAPPER
27
 
 #include <libdevmapper.h>
28
 
 #endif
29
 
@@ -2944,20 +2945,15 @@ linux_disk_commit (PedDisk* disk)
30
 
                 return 1;
31
 
 
32
 
         if (disk->dev->type != PED_DEVICE_FILE) {
33
 
-                /* The ioctl() command BLKPG_ADD_PARTITION does not notify
34
 
-                 * the devfs system; consequently, /proc/partitions will not
35
 
-                 * be up to date, and the proper links in /dev are not
36
 
-                 * created.  Therefore, if using DevFS, we must get the kernel
37
 
-                 * to re-read and grok the partition table.
38
 
-                 */
39
 
-                /* Work around kernel dasd problem so we really do BLKRRPART */
40
 
-               int ok = 1;
41
 
-               if (disk->dev->type != PED_DEVICE_DASD && _have_blkpg ()) {
42
 
-                       if (!_disk_sync_part_table (disk))
43
 
-                         ok = 0;
44
 
-               }
45
 
 
46
 
-                return ok;
47
 
+               /* We now require BLKPG support.  If this assertion fails,
48
 
+                  please write to the mailing list describing your system.
49
 
+                  Assuming it's never triggered, ...
50
 
+                  FIXME: remove this assertion in 2012.  */
51
 
+               assert (_have_blkpg ());
52
 
+
53
 
+               if (!_disk_sync_part_table (disk))
54
 
+                       return 0;
55
 
         }
56
 
 
57
 
         return 1;