From 6cba41ab0dbe5eb817f37bd43caff4754d801d3b Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Mon, 18 May 2020 18:29:57 +0200 Subject: [PATCH] blockdev: propagate one more unexpected error --- src/basic/blockdev-util.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/basic/blockdev-util.c b/src/basic/blockdev-util.c index 7d94c55a6d..54431f5d0f 100644 --- a/src/basic/blockdev-util.c +++ b/src/basic/blockdev-util.c @@ -29,6 +29,8 @@ int block_get_whole_disk(dev_t d, dev_t *ret) { *ret = d; return 0; } + if (errno != ENOENT) + return -errno; /* If it is a partition find the originating device */ xsprintf_sys_block_path(p, "/partition", d); -- 2.25.1