patch-platform-intel_c 1022 B

12345678910111213141516171819202122232425262728293031323334
  1. --- mdadm-3.0.orig/platform-intel.c 2009-06-02 07:48:29.000000000 +0200
  2. +++ mdadm-3.0/platform-intel.c 2009-09-02 19:30:09.000000000 +0200
  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. @@ -198,9 +201,11 @@ const struct imsm_orom *find_imsm_orom(v
  22. char *devt_to_devpath(dev_t dev)
  23. {
  24. char device[40];
  25. + char *rpath;
  26. sprintf(device, "/sys/dev/block/%d:%d/device", major(dev), minor(dev));
  27. - return canonicalize_file_name(device);
  28. + rpath = malloc(PATH_MAX);
  29. + return realpath(device, rpath);
  30. }
  31. static char *diskfd_to_devpath(int fd)