From 5a27af52c755c7c76f8b47046903a2cdd64aaf7b Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Sun, 18 Sep 2022 22:48:53 +0900 Subject: [PATCH] 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(). --- src/shared/blockdev-util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shared/blockdev-util.c b/src/shared/blockdev-util.c index ff77a8e4ea..ab3b5ce263 100644 --- a/src/shared/blockdev-util.c +++ b/src/shared/blockdev-util.c @@ -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)