Fix modify --readwrite

test-assert
Vitaliy Filippov 2021-11-29 01:52:21 +03:00
parent 95496d0845
commit 24f0f8278a
1 changed files with 4 additions and 4 deletions

View File

@ -70,7 +70,7 @@ struct image_changer_t
// Check confirmation when trimming an image with children // Check confirmation when trimming an image with children
if (has_children && !force) if (has_children && !force)
{ {
fprintf(stderr, "Image %s has children. Refusing to shrink it without --force", image_name.c_str()); fprintf(stderr, "Image %s has children. Refusing to shrink it without --force\n", image_name.c_str());
exit(1); exit(1);
} }
// Shrink the image first // Shrink the image first
@ -98,9 +98,9 @@ resume_1:
{ {
cfg.readonly = false; cfg.readonly = false;
// Check confirmation when making an image with children read-write // Check confirmation when making an image with children read-write
if (!force) if (has_children && !force)
{ {
fprintf(stderr, "Image %s has children. Refusing to make it read-write without --force", image_name.c_str()); fprintf(stderr, "Image %s has children. Refusing to make it read-write without --force\n", image_name.c_str());
exit(1); exit(1);
} }
} }
@ -184,7 +184,7 @@ resume_1:
resume_2: resume_2:
if (parent->waiting > 0) if (parent->waiting > 0)
return; return;
printf("Image %s changed\n", image_name.c_str()); printf("Image %s modified\n", image_name.c_str());
state = 100; state = 100;
} }
}; };