]> git.pld-linux.org Git - packages/parted.git/blob - 0018-libparted-Stop-converting-.-in-sys-path-to.patch
- rel 4; tons of patches from FC
[packages/parted.git] / 0018-libparted-Stop-converting-.-in-sys-path-to.patch
1 From 6dc72201ff5b41c171863e6b8eb069b8f8c479cf Mon Sep 17 00:00:00 2001
2 From: "Brian C. Lane" <bcl@redhat.com>
3 Date: Fri, 7 Aug 2015 13:59:58 -0700
4 Subject: [PATCH 18/18] libparted: Stop converting . in sys path to /
5
6 In _probe_sys_block it claimed that ! and . are replaced by / in sys
7 paths, but according to the kernel code only ! is replaced (for cciss
8 devices).
9
10 This is now causing problems with libnvdimm devices, the details are
11 here:
12
13 https://git.kernel.org/cgit/linux/kernel/git/djbw/nvdimm.git/tree/Documentation/nvdimm/nvdimm.txt?h=libnvdimm-for-next
14 (cherry picked from commit 579bd6878b07d8387451d36106ccf86d26818b77)
15 ---
16  libparted/arch/linux.c | 4 ++--
17  1 file changed, 2 insertions(+), 2 deletions(-)
18
19 diff --git a/libparted/arch/linux.c b/libparted/arch/linux.c
20 index d33c02d..20a7235 100644
21 --- a/libparted/arch/linux.c
22 +++ b/libparted/arch/linux.c
23 @@ -2235,9 +2235,9 @@ _probe_sys_block ()
24  
25                 strcpy (dev_name, "/dev/");
26                 strcat (dev_name, dirent->d_name);
27 -               /* in /sys/block, '/'s are replaced with '!' or '.' */
28 +               /* in /sys/block, '/'s are replaced with '!' */
29                 for (ptr = dev_name; *ptr != '\0'; ptr++) {
30 -                       if (*ptr == '!' || *ptr == '.')
31 +                       if (*ptr == '!')
32                                 *ptr = '/';
33                 }
34                 _ped_device_probe (dev_name);
35 -- 
36 2.4.3
37
This page took 0.087689 seconds and 3 git commands to generate.