summaryrefslogtreecommitdiffstats
path: root/main/mdadm/mdadm-uclibc.patch
blob: abc9969ca80792e326b76fb73beb9ba37bd49cc6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
--- a/platform-intel.c	Mon Nov  9 15:58:52 2009
+++ b/platform-intel.c	Mon Nov  9 16:01:47 2009
@@ -87,7 +87,9 @@
 		/* generate canonical path name for the device */
 		sprintf(path, "/sys/bus/%s/drivers/%s/%s",
 			bus, driver, de->d_name);
-		list->path = canonicalize_file_name(path);
+		list->path = malloc(PATH_MAX);
+		if (list->path)
+			realpath(path, list->path);
 		list->next = NULL;
 	}
 	closedir(driver_dir);
@@ -203,9 +205,10 @@
 char *devt_to_devpath(dev_t dev)
 {
 	char device[40];
-
+	char *tmp = malloc(PATH_MAX);
+	
 	sprintf(device, "/sys/dev/block/%d:%d/device", major(dev), minor(dev));
-	return canonicalize_file_name(device);
+	return tmp ? realpath(device, tmp) : NULL;
 }
 
 static char *diskfd_to_devpath(int fd)