From: Li Xi Date: Thu, 27 Feb 2014 07:58:18 +0000 (+0800) Subject: LU-4676 hsm: Fix return value error of ct_run() X-Git-Tag: 2.5.2-RC1~16 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=refs%2Fchanges%2F34%2F10234%2F2;p=fs%2Flustre-release.git LU-4676 hsm: Fix return value error of ct_run() ct_run() returns 0 after find out that fs_name is invalid. lhsmtool_posix will exists with 0 after that error happens. That might mislead scripts calling lhsmtool_posix. Lustre-change: http://review.whamcloud.com/9412 Lustre-commit: d5ad6ff819e635c6ba337586cf70698b7728ff7f Change-Id: Id182e989011e02104b5960c6692995825d939ad6 Signed-off-by: Li Xi Tested-by: Jenkins Tested-by: Maloo Reviewed-by: James Nunez Reviewed-by: jacques-Charles Lafoucriere Reviewed-by: Faccini Bruno Reviewed-by: Oleg Drokin Reviewed-on: http://review.whamcloud.com/10234 --- diff --git a/lustre/utils/lhsmtool_posix.c b/lustre/utils/lhsmtool_posix.c index 9ca73df..22ba504 100644 --- a/lustre/utils/lhsmtool_posix.c +++ b/lustre/utils/lhsmtool_posix.c @@ -1768,7 +1768,8 @@ static int ct_run(void) hal->hal_fsname, hal->hal_archive_id, hal->hal_count); if (strcmp(hal->hal_fsname, fs_name) != 0) { - CT_ERROR(EINVAL, "'%s' invalid fs name, expecting: %s", + rc = -EINVAL; + CT_ERROR(rc, "'%s' invalid fs name, expecting: %s", hal->hal_fsname, fs_name); err_major++; if (opt.o_abort_on_error)