Skip to content
This repository has been archived by the owner on Mar 28, 2018. It is now read-only.

Commit

Permalink
state: Update the rootfs and workload dir config from state
Browse files Browse the repository at this point in the history
Signed-off-by: Archana Shinde <[email protected]>
  • Loading branch information
amshinde committed Jun 18, 2017
1 parent 9097610 commit f97694e
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/oci.c
Original file line number Diff line number Diff line change
Expand Up @@ -1638,6 +1638,11 @@ cc_oci_config_update (struct cc_oci_config *config,
state->mounts = NULL;
}

if (state->rootfs_mount) {
config->rootfs_mount = state->rootfs_mount;
state->rootfs_mount = NULL;
}

if (state->namespaces) {
config->oci.oci_linux.namespaces = state->namespaces;
state->namespaces = NULL;
Expand Down Expand Up @@ -1677,6 +1682,14 @@ cc_oci_config_update (struct cc_oci_config *config,
sizeof (config->state.procsock_path));
}

if (state->workload_dir) {
g_strlcpy (config->workload_dir,
state->workload_dir,
sizeof (config->workload_dir));
g_free(state->workload_dir);
state->workload_dir = NULL;
}

return true;
}

Expand Down

0 comments on commit f97694e

Please sign in to comment.