diff options
author | Lennart Poettering <lennart@poettering.net> | 2020-09-17 17:24:33 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2020-09-17 18:02:41 +0200 |
commit | 3afda7c7976c25db786948a961873fa5c2c8e0e9 (patch) | |
tree | 95e510c46a85b7b53bd04b53461dbe1e447a115d /src/shared | |
parent | dissect: always invalidate secondary arch partitions if we found primary arch (diff) | |
download | systemd-3afda7c7976c25db786948a961873fa5c2c8e0e9.tar.xz systemd-3afda7c7976c25db786948a961873fa5c2c8e0e9.zip |
dissect: is_loop_device() returns negative on error, don't mistake that is true
Diffstat (limited to 'src/shared')
-rw-r--r-- | src/shared/dissect-image.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/shared/dissect-image.c b/src/shared/dissect-image.c index e7e05a5de6..2c339e38b8 100644 --- a/src/shared/dissect-image.c +++ b/src/shared/dissect-image.c @@ -1033,7 +1033,7 @@ static int mount_partition( /* If requested, turn on discard support. */ if (fstype_can_discard(fstype) && ((flags & DISSECT_IMAGE_DISCARD) || - ((flags & DISSECT_IMAGE_DISCARD_ON_LOOP) && is_loop_device(m->node)))) { + ((flags & DISSECT_IMAGE_DISCARD_ON_LOOP) && is_loop_device(m->node) > 0))) { options = strdup("discard"); if (!options) return -ENOMEM; |