From: Hitoshi Mitake <[email protected]> Current config migration mechanism doesn't save updated version number even after successful migration. This patch fixes the problem.
Related issue: https://bugs.launchpad.net/sheepdog-project/+bug/1327040 Cc: Ruoyu <[email protected]> Cc: Giovanni Bellac <[email protected]> Signed-off-by: Hitoshi Mitake <[email protected]> Signed-off-by: Liu Yuan <[email protected]> Conflicts: sheep/config.c Conflicts were resolved by Hitoshi Mitake. Signed-off-by: Hitoshi Mitake <[email protected]> --- sheep/config.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sheep/config.c b/sheep/config.c index 9a0217b..c6eeddc 100644 --- a/sheep/config.c +++ b/sheep/config.c @@ -123,16 +123,16 @@ int init_config_file(void) reload: ret = 0; get_cluster_config(&sys->cinfo); -out: - close(fd); - return ret; create: config.version = SD_FORMAT_VERSION; if (write_config() != SD_RES_SUCCESS) return -1; - return 0; +out: + close(fd); + + return ret; } void init_config_path(const char *base_path) -- 1.9.1 -- sheepdog mailing list [email protected] http://lists.wpkg.org/mailman/listinfo/sheepdog
