blockdev-util: change return value when a partition device is passed to partition_enumerator_new()

To make it consistent what returned by block_device_get_whole_disk().
This commit is contained in:
Yu Watanabe
2022-09-18 22:54:20 +09:00
parent 55a437f8b2
commit 5a27af52c7
+1 -1
View File
@@ -572,7 +572,7 @@ int partition_enumerator_new(sd_device *dev, sd_device_enumerator **ret) {
if (r < 0)
return r;
if (r == 0)
return -EINVAL;
return -ENXIO; /* return a recognizable error */
r = sd_device_enumerator_new(&e);
if (r < 0)