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:
@@ -55,7 +55,7 @@ static int resize_crypt_luks_device(dev_t devno, const char *fstype, dev_t main_
|
||||
|
||||
log_debug("%s is %"PRIu64" bytes", main_devpath, size);
|
||||
|
||||
r = devpath_from_devnum(S_IFBLK, devno, &devpath);
|
||||
r = devname_from_devnum(S_IFBLK, devno, &devpath);
|
||||
if (r < 0)
|
||||
return log_error_errno(r, "Failed to get devpath of " DEVNUM_FORMAT_STR ": %m",
|
||||
DEVNUM_FORMAT_VAL(devno));
|
||||
@@ -117,7 +117,7 @@ static int maybe_resize_underlying_device(
|
||||
if (devno == main_devno)
|
||||
return 0;
|
||||
|
||||
r = devpath_from_devnum(S_IFBLK, devno, &devpath);
|
||||
r = devname_from_devnum(S_IFBLK, devno, &devpath);
|
||||
if (r < 0)
|
||||
return log_error_errno(r, "Failed to get devpath for block device " DEVNUM_FORMAT_STR ": %m",
|
||||
DEVNUM_FORMAT_VAL(devno));
|
||||
|
||||
@@ -4508,7 +4508,7 @@ static int acquire_root_devno(
|
||||
if (r < 0)
|
||||
log_debug_errno(r, "Failed to find whole disk block device for '%s', ignoring: %m", p);
|
||||
|
||||
r = devpath_from_devnum(S_IFBLK, devno, ret);
|
||||
r = devname_from_devnum(S_IFBLK, devno, ret);
|
||||
if (r < 0)
|
||||
return log_debug_errno(r, "Failed to determine canonical path for '%s': %m", p);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user