From: Yu Watanabe Date: Sun, 18 Sep 2022 13:48:53 +0000 (+0900) Subject: blockdev-util: change return value when a partition device is passed to partition_enu... X-Git-Tag: v252-rc1~148^2~2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5a27af52c755c7c76f8b47046903a2cdd64aaf7b;p=thirdparty%2Fsystemd.git 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(). --- diff --git a/src/shared/blockdev-util.c b/src/shared/blockdev-util.c index ff77a8e4ea8..ab3b5ce2633 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)