[sheepdog] [PATCH] sheep: save updated config after version migration
Liu Yuan
namei.unix at gmail.com
Tue Jun 10 06:18:31 CEST 2014
On Mon, Jun 09, 2014 at 06:51:45PM +0900, Hitoshi Mitake wrote:
> 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 <liangry at ucweb.com>
> Cc: Giovanni Bellac <giovannib1979 at ymail.com>
> Signed-off-by: Hitoshi Mitake <mitake.hitoshi at lab.ntt.co.jp>
> ---
> sheep/config.c | 8 ++++----
> 1 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/sheep/config.c b/sheep/config.c
> index 3342560..846a802 100644
> --- a/sheep/config.c
> +++ b/sheep/config.c
> @@ -129,16 +129,16 @@ reload:
> "exists data format mismatch");
> return -1;
> }
> -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.7.1
>
> --
> sheepdog mailing list
> sheepdog at lists.wpkg.org
> http://lists.wpkg.org/mailman/listinfo/sheepdog
Applied thanks
Yuan
More information about the sheepdog
mailing list