--- 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)