summaryrefslogtreecommitdiff
path: root/package/mdadm/patches/patch-platform-intel_c
blob: 3102306e7795ab5a92b13cce44507c17ac58bcab (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
27
28
29
30
31
32
33
34
--- mdadm-3.1.1.orig/platform-intel.c	2009-11-16 23:55:41.000000000 +0100
+++ mdadm-3.1.1/platform-intel.c	2010-02-06 01:07:51.781825419 +0100
@@ -47,6 +47,7 @@ struct sys_dev *find_driver_devices(cons
 	char path[256];
 	char link[256];
 	char *c;
+	char *rpath;
 	DIR *driver_dir;
 	struct dirent *de;
 	struct sys_dev *head = NULL;
@@ -87,7 +88,9 @@ struct sys_dev *find_driver_devices(cons
 		/* 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);
+		
+		rpath = malloc(PATH_MAX);
+		list->path = realpath(path, rpath);
 		list->next = NULL;
 	}
 	closedir(driver_dir);
@@ -203,9 +206,11 @@ const struct imsm_orom *find_imsm_orom(v
 char *devt_to_devpath(dev_t dev)
 {
 	char device[40];
+	char *rpath;
 
 	sprintf(device, "/sys/dev/block/%d:%d/device", major(dev), minor(dev));
-	return canonicalize_file_name(device);
+	rpath = malloc(PATH_MAX);
+	return realpath(device, rpath);
 }
 
 static char *diskfd_to_devpath(int fd)