7f6b65822f
- UI: Avoid memory leaks - libparted: Fix memory leaks.patch - libparted: Fix possible memory leaks.patch - libparted: Stop converting . in-sys-path-to / - libparted: Use read-only when probing devices on linux - tests: Use wait_for_dev_to_ functions
38 lines
1.2 KiB
Diff
38 lines
1.2 KiB
Diff
From 6dc72201ff5b41c171863e6b8eb069b8f8c479cf Mon Sep 17 00:00:00 2001
|
|
From: "Brian C. Lane" <bcl@redhat.com>
|
|
Date: Fri, 7 Aug 2015 13:59:58 -0700
|
|
Subject: [PATCH 18/18] libparted: Stop converting . in sys path to /
|
|
|
|
In _probe_sys_block it claimed that ! and . are replaced by / in sys
|
|
paths, but according to the kernel code only ! is replaced (for cciss
|
|
devices).
|
|
|
|
This is now causing problems with libnvdimm devices, the details are
|
|
here:
|
|
|
|
https://git.kernel.org/cgit/linux/kernel/git/djbw/nvdimm.git/tree/Documentation/nvdimm/nvdimm.txt?h=libnvdimm-for-next
|
|
(cherry picked from commit 579bd6878b07d8387451d36106ccf86d26818b77)
|
|
---
|
|
libparted/arch/linux.c | 4 ++--
|
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/libparted/arch/linux.c b/libparted/arch/linux.c
|
|
index d33c02d..20a7235 100644
|
|
--- a/libparted/arch/linux.c
|
|
+++ b/libparted/arch/linux.c
|
|
@@ -2235,9 +2235,9 @@ _probe_sys_block ()
|
|
|
|
strcpy (dev_name, "/dev/");
|
|
strcat (dev_name, dirent->d_name);
|
|
- /* in /sys/block, '/'s are replaced with '!' or '.' */
|
|
+ /* in /sys/block, '/'s are replaced with '!' */
|
|
for (ptr = dev_name; *ptr != '\0'; ptr++) {
|
|
- if (*ptr == '!' || *ptr == '.')
|
|
+ if (*ptr == '!')
|
|
*ptr = '/';
|
|
}
|
|
_ped_device_probe (dev_name);
|
|
--
|
|
2.4.3
|
|
|