parted/0063-libparted-don-t-canonicalize-dev-md-paths-872361.patch
Brian C. Lane a248769183 - Rebasing Fedora patches with upstream master since v3.1 release
- Summary of important changes from upstream:
  - add support for a new Linux-specific GPT partition type code
  - partprobe: remove partitions when there is no partition table
  - libparted: refactor device-mapper partition sync code
  - libparted: remove extraneous blkpg add partition ped exception
  - libparted: don't probe every dm device in probe_all
- New Fedora changes:
  - libparted: Add Intel Rapid Start Technology partition flag.
  - libparted: Add UEFI System Partition flag.
  - libparted: Add hfs_esp partition flag to GPT.
  - libparted: Recognize btrfs filesystem
  - tests: Add btrfs and xfs to the fs probe test
2013-08-28 13:55:15 -07:00

38 lines
1.3 KiB
Diff

From 73ed3e0ba21afec398f3b1cfb6ee013cf4ce3fc2 Mon Sep 17 00:00:00 2001
From: "Brian C. Lane" <bcl@redhat.com>
Date: Thu, 1 Nov 2012 16:22:42 -0700
Subject: [PATCH 63/69] libparted: don't canonicalize /dev/md/ paths (#872361)
This is the same issue we have with /dev/mapper/ paths that was fixed in
commit c1eb485b9fd8919e18f192d678bc52b0488e6ee0. When libparted
is used to setup the device the symlink should be used to reference it,
not the backing device name which could change.
* libparted/device.c (ped_device_get): Don't canonicalize names
that start with "/dev/md/".
---
libparted/device.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/libparted/device.c b/libparted/device.c
index 738b320..cdcc117 100644
--- a/libparted/device.c
+++ b/libparted/device.c
@@ -152,8 +152,11 @@ ped_device_get (const char* path)
char* normal_path = NULL;
PED_ASSERT (path != NULL);
- /* Don't canonicalize /dev/mapper paths, see tests/symlink.c */
- if (strncmp (path, "/dev/mapper/", 12))
+ /* Don't canonicalize /dev/mapper or /dev/md/ paths, see
+ tests/symlink.c
+ */
+ if (strncmp (path, "/dev/mapper/", 12) &&
+ strncmp (path, "/dev/md/", 8))
normal_path = canonicalize_file_name (path);
if (!normal_path)
/* Well, maybe it is just that the file does not exist.
--
1.8.3.1