]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
core/cgroup: block_get_originating() doesn't return > 0
authorMike Yuan <me@yhndnzj.com>
Sat, 3 May 2025 19:00:15 +0000 (21:00 +0200)
committerMike Yuan <me@yhndnzj.com>
Mon, 5 May 2025 16:39:05 +0000 (18:39 +0200)
Follow-up for 612fc70fc0f5445817f3f5c033dd3d5b5fd058ea

src/core/cgroup.c

index 74c9d786a1f230b02aa29d4b7f482607162499b3..e37bf46e876f1dfd25a05f00bc5e3d851b61d308 100644 (file)
@@ -1019,7 +1019,8 @@ static int lookup_block_device(const char *p, dev_t *ret) {
         }
 
         /* If this is a LUKS/DM device, recursively try to get the originating block device */
-        while (block_get_originating(*ret, ret) > 0);
+        while (block_get_originating(*ret, ret) >= 0)
+                ;
 
         /* If this is a partition, try to get the originating block device */
         (void) block_get_whole_disk(*ret, ret);