mirror of
https://github.com/systemd/systemd.git
synced 2024-10-28 20:25:38 +03:00
dissect: is_loop_device() returns negative on error, don't mistake that is true
This commit is contained in:
parent
74cb2db9f4
commit
3afda7c797
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user