this is a GLIBC specific feature and should not be used.
according to its manpage:
"The call canonicalize_file_name(path) is equivalent
to the call realpath(path, NULL)."
thus, we use realpath so it works everywhere.
Signed-off-by: John Spencer <maillist-mdadm@barfooze.de>
Signed-off-by: NeilBrown <neilb@suse.de>
list->dev_id = (__u16) dev_id;
list->type = type;
- list->path = canonicalize_file_name(path);
+ list->path = realpath(path, NULL);
list->next = NULL;
if ((list->pci_id = strrchr(list->path, '/')) != NULL)
list->pci_id++;
char device[46];
sprintf(device, "/sys/dev/block/%d:%d/device", major(dev), minor(dev));
- return canonicalize_file_name(device);
+ return realpath(device, NULL);
}
char *diskfd_to_devpath(int fd)