sd-device: rename devpath_from_devnum() -> devname_from_devnum()
In sd-device, `devpath` is a kind of syspath without '/sys' prefix, e.g. /devices/pci0000:00/0000:00:1c.4/0000:3c:00.0/nvme/nvme0/nvme0n1, and `devname` is a path to the device node, e.g. /dev/nvme0n1. Let's use the consistent name for the helper function.
This commit is contained in:
@@ -45,7 +45,7 @@ static int verify_esp_blkid(
|
||||
const char *v;
|
||||
int r;
|
||||
|
||||
r = devpath_from_devnum(S_IFBLK, devid, &node);
|
||||
r = devname_from_devnum(S_IFBLK, devid, &node);
|
||||
if (r < 0)
|
||||
return log_error_errno(r, "Failed to get device path for " DEVNUM_FORMAT_STR ": %m", DEVNUM_FORMAT_VAL(devid));
|
||||
|
||||
@@ -508,7 +508,7 @@ static int verify_xbootldr_blkid(
|
||||
const char *type, *v;
|
||||
int r;
|
||||
|
||||
r = devpath_from_devnum(S_IFBLK, devid, &node);
|
||||
r = devname_from_devnum(S_IFBLK, devid, &node);
|
||||
if (r < 0)
|
||||
return log_error_errno(r, "Failed to get block device path for " DEVNUM_FORMAT_STR ": %m",
|
||||
DEVNUM_FORMAT_VAL(devid));
|
||||
|
||||
@@ -15,7 +15,7 @@ int quotactl_devnum(int cmd, dev_t devnum, int id, void *addr) {
|
||||
/* Like quotactl() but takes a dev_t instead of a path to a device node, and fixes caddr_t → void*,
|
||||
* like we should, today */
|
||||
|
||||
r = devpath_from_devnum(S_IFBLK, devnum, &devnode);
|
||||
r = devname_from_devnum(S_IFBLK, devnum, &devnode);
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user