Prompt user before doing anything

This commit is contained in:
Imbus 2026-02-07 14:55:24 +01:00
parent 21f2420d42
commit 5277b78fd3

View file

@ -242,6 +242,12 @@ int main(int argc, char *argv[]) {
printf("Writing %s to %s\n", wjob.filename, wjob.dev_name);
printf("Is this okay? (y/n): ");
fflush(stdout);
if ('y' != getchar()) {
exit(0);
}
wjob.buffer = malloc(BLOCKSIZE);
wjob.buffer2 = malloc(BLOCKSIZE);
assert(wjob.buffer);