Ensure that we start on a new line when writing new lines

This commit is contained in:
Leandro Pereira 2021-07-02 15:38:55 -07:00
Родитель e23d0642e4
Коммит 2adc05904d
1 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -1055,7 +1055,7 @@ static bool update_kernel_cmdline_params_for_grub(
free(old_contents);
}
fprintf(resume_cfg, "# az-hibernate-agent:start\n");
fprintf(resume_cfg, "\n# az-hibernate-agent:start\n");
fprintf(resume_cfg, "GRUB_CMDLINE_LINUX_DEFAULT=\"$GRUB_CMDLINE_LINUX_DEFAULT %s\"\n", args);
fprintf(resume_cfg, "# az-hibernate-agent:end\n");
@ -1179,7 +1179,7 @@ static void ensure_swap_is_enabled(const struct swap_file *swap, bool created)
fwrite(old_contents, old_contents_len, 1, fstab);
free(old_contents);
}
fprintf(fstab, "%s\tnone\tswap\tswap\t0\t0\n", swap->path);
fprintf(fstab, "\n%s\tnone\tswap\tswap\t0\t0\n", swap->path);
fclose(fstab);
}