diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2009-11-09 16:27:48 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2009-11-09 16:27:48 +0000 |
commit | 081b6d412b61b5c8a916f77bbe7b75130c1215c6 (patch) | |
tree | 9a73f96f819548a6111740502adb9ef47cce6592 /main/mdadm/mdadm-uclibc.patch | |
parent | 823bbd3fe0cf19e91bbc38e97c4f826ce6bf4a3e (diff) | |
download | aports-081b6d412b61b5c8a916f77bbe7b75130c1215c6.tar.bz2 aports-081b6d412b61b5c8a916f77bbe7b75130c1215c6.tar.xz |
main/mdadm: upgrade to 3.0.3
Diffstat (limited to 'main/mdadm/mdadm-uclibc.patch')
-rw-r--r-- | main/mdadm/mdadm-uclibc.patch | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/main/mdadm/mdadm-uclibc.patch b/main/mdadm/mdadm-uclibc.patch new file mode 100644 index 0000000000..abc9969ca8 --- /dev/null +++ b/main/mdadm/mdadm-uclibc.patch @@ -0,0 +1,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) |