]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
blockdev: propagate one more unexpected error
authorLennart Poettering <lennart@poettering.net>
Mon, 18 May 2020 16:29:57 +0000 (18:29 +0200)
committerLennart Poettering <lennart@poettering.net>
Mon, 18 May 2020 16:41:56 +0000 (18:41 +0200)
src/basic/blockdev-util.c

index 7d94c55a6dcafb69dd3b4e0b864a131958d90e7f..54431f5d0fb0ed7d54819e38307e97f4dc0451d9 100644 (file)
@@ -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);