diff --git a/src/devices/disk/mo.c b/src/devices/disk/mo.c index 9119d12..4d41690 100644 --- a/src/devices/disk/mo.c +++ b/src/devices/disk/mo.c @@ -2575,7 +2575,7 @@ mo_format(mo_t *dev) ret = (int)SetEndOfFile(fh); - if(ret) + if(!ret) { DEBUG("MO %i: Failed to truncate image file to 0\n", dev->id); return; @@ -2592,7 +2592,7 @@ mo_format(mo_t *dev) ret = (int)SetEndOfFile(fh); - if(ret) + if(!ret) { DEBUG("MO %i: Failed to truncate image file to %llu\n", dev->id, size); return; @@ -2655,3 +2655,4 @@ mo_erase(mo_t *dev) return 1; } +