summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian C. Lane <bcl@redhat.com>2015-08-07 13:59:58 -0700
committerBrian C. Lane <bcl@redhat.com>2015-08-07 14:35:18 -0700
commit579bd6878b07d8387451d36106ccf86d26818b77 (patch)
treefee9b37c8d01c6048d1525a68fb6309df941473d
parent4886bad13dd011ff56e1c46ff29e8067778c16fd (diff)
downloadparted-579bd6878b07d8387451d36106ccf86d26818b77.tar.gz
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
-rw-r--r--libparted/arch/linux.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libparted/arch/linux.c b/libparted/arch/linux.c
index 349442b..906298f 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);