summaryrefslogtreecommitdiff
path: root/package/mdadm/patches/patch-platform-intel_c
blob: 1e6e113a1d932f06895ce490e1031cf06503213a (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.0.orig/platform-intel.c	2009-06-02 07:48:29.000000000 +0200
+++ mdadm-3.0/platform-intel.c	2009-09-02 19:30:09.000000000 +0200
@@ -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;
 	}
 
@@ -198,9 +201,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)