From 07f7ba3eb5baef8a7f50f5fec3c66ffd97e8a7fe Mon Sep 17 00:00:00 2001 From: Natalia Portillo Date: Sun, 29 Mar 2020 05:26:38 +0100 Subject: [PATCH] Fix formatting MO disk in Windows host. --- src/devices/disk/mo.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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; } +