src/main.c | 5 +++-- src/token_manager.c | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-)
New commits: commit c1f8306a1f5bfa219bb014251f4d8f50f27c65ab Author: David Teigland teigland@redhat.com Date: Thu May 19 13:07:37 2011 -0500
sanlock: quiet error case
silence add_resource -17 error condition with -Q 1 since we don't care during testing
diff --git a/src/main.c b/src/main.c index bfa6a1c..c4ed5f8 100644 --- a/src/main.c +++ b/src/main.c @@ -898,8 +898,9 @@ static void cmd_acquire(struct task *task, struct cmd_args *ca) token = new_tokens[i]; rv = add_resource(token, cl_pid); if (rv < 0) { - log_errot(token, "cmd_acquire %d,%d,%d add_resource %d", - cl_ci, cl_fd, cl_pid, rv); + if (!com.quiet_fail) + log_errot(token, "cmd_acquire %d,%d,%d add_resource %d", + cl_ci, cl_fd, cl_pid, rv); result = rv; goto done; } diff --git a/src/token_manager.c b/src/token_manager.c index 12d14c5..4803c08 100644 --- a/src/token_manager.c +++ b/src/token_manager.c @@ -74,8 +74,9 @@ int add_resource(struct token *token, int pid)
r = find_resource(token, &dispose_resources); if (r) { - log_errot(token, "add_resource disposed"); - rv = -EEXIST; + if (!com.quiet_fail) + log_errot(token, "add_resource disposed"); + rv = -EAGAIN; goto out; }
sanlock-devel@lists.fedorahosted.org