patch-platform-intel_c 1.0 KB

12345678910111213141516171819202122232425262728293031323334
  1. --- mdadm-3.1.1.orig/platform-intel.c 2009-11-16 23:55:41.000000000 +0100
  2. +++ mdadm-3.1.1/platform-intel.c 2010-02-06 01:07:51.781825419 +0100
  3. @@ -47,6 +47,7 @@ struct sys_dev *find_driver_devices(cons
  4. char path[256];
  5. char link[256];
  6. char *c;
  7. + char *rpath;
  8. DIR *driver_dir;
  9. struct dirent *de;
  10. struct sys_dev *head = NULL;
  11. @@ -87,7 +88,9 @@ struct sys_dev *find_driver_devices(cons
  12. /* generate canonical path name for the device */
  13. sprintf(path, "/sys/bus/%s/drivers/%s/%s",
  14. bus, driver, de->d_name);
  15. - list->path = canonicalize_file_name(path);
  16. +
  17. + rpath = malloc(PATH_MAX);
  18. + list->path = realpath(path, rpath);
  19. list->next = NULL;
  20. }
  21. closedir(driver_dir);
  22. @@ -203,9 +206,11 @@ const struct imsm_orom *find_imsm_orom(v
  23. char *devt_to_devpath(dev_t dev)
  24. {
  25. char device[40];
  26. + char *rpath;
  27. sprintf(device, "/sys/dev/block/%d:%d/device", major(dev), minor(dev));
  28. - return canonicalize_file_name(device);
  29. + rpath = malloc(PATH_MAX);
  30. + return realpath(device, rpath);
  31. }
  32. static char *diskfd_to_devpath(int fd)