This commit is contained in:
Alex Kotov 2022-01-16 21:09:12 +05:00
parent 74f04659e8
commit db7a207d64
Signed by: kotovalexarian
GPG Key ID: 553C0EBBEB5D5F08
1 changed files with 14 additions and 14 deletions

View File

@ -135,22 +135,22 @@ bool create_mbr_file(
}
printf("\n");
}
}
{
FILE *fd = fopen(output_filename, "wb");
if (fd == NULL) {
fprintf(stderr, "Can't open image file\n");
return false;
}
const size_t size = fwrite(mbr_ptr, 1, sizeof(mbr), fd);
if (size != sizeof(mbr)) {
fprintf(stderr, "Can't write image file\n");
return false;
}
fclose(fd);
{
FILE *fd = fopen(output_filename, "wb");
if (fd == NULL) {
fprintf(stderr, "Can't open image file\n");
return false;
}
const size_t size = fwrite(mbr_ptr, 1, sizeof(mbr), fd);
if (size != sizeof(mbr)) {
fprintf(stderr, "Can't write image file\n");
return false;
}
fclose(fd);
}
return true;