core: Ensure kernel and initramfs are put into place with fdatasync()
Via a new libgsystem API.
This commit is contained in:
1 parent
47bd290065
commit
c9a840c659
2 files changed
+3
-5
No files matched your search
+1
-1
Submodule src/libgsystem updated: 6c736d9309...ce441a7a7b.
@@ -157,9 +157,7 @@ setup_kernel (OtAdminUpdateKernel *self,
|
||||
prefix = g_strndup (kernel_name, release - kernel_name);
|
||||
self->kernel_path = ot_gfile_get_child_strconcat (self->boot_ostree_dir, prefix, "-", self->release, NULL);
|
||||
|
||||
if (!g_file_copy (src_kernel_path, self->kernel_path,
|
||||
G_FILE_COPY_OVERWRITE | G_FILE_COPY_ALL_METADATA | G_FILE_COPY_NOFOLLOW_SYMLINKS,
|
||||
cancellable, NULL, NULL, error))
|
||||
if (!gs_file_linkcopy_sync_data (src_kernel_path, self->kernel_path, cancellable, error))
|
||||
goto out;
|
||||
|
||||
g_print ("ostadmin: Deploying kernel %s\n", gs_file_get_path_cached (self->kernel_path));
|
||||
@@ -258,7 +256,7 @@ update_initramfs (OtAdminUpdateKernel *self,
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (!g_file_copy (initramfs_tmp_file, initramfs_file, 0, cancellable, NULL, NULL, error))
|
||||
if (!gs_file_linkcopy_sync_data (initramfs_tmp_file, initramfs_file, cancellable, error))
|
||||
goto out;
|
||||
|
||||
g_print ("Created: %s\n", gs_file_get_path_cached (initramfs_file));
|
||||
|
||||
Reference in new issue
Block a user