From 066fa2aff33ba32208e6f3341ba76676a0419da2 Mon Sep 17 00:00:00 2001 From: Shaun Ruffell Date: Wed, 12 Feb 2014 11:49:39 -0600 Subject: [PATCH] dahdi_cfg: error()->perror() when sem_open fails. This fixes a confusing error message. When sem_open failed, the system.conf line number was being printed and the system error code was not. Signed-off-by: Shaun Ruffell --- dahdi_cfg.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dahdi_cfg.c b/dahdi_cfg.c index 4e9cc9e..620383b 100644 --- a/dahdi_cfg.c +++ b/dahdi_cfg.c @@ -1672,13 +1672,13 @@ finish: lock = sem_open(SEM_NAME, O_CREAT, O_RDWR, 1); if (SEM_FAILED == lock) { - error("Unable to create 'dahdi_cfg' mutex.\n"); + perror("Unable to create 'dahdi_cfg' mutex"); exit_code = 1; goto release_sem; } if (-1 == sem_wait(lock)) { - error("Failed to wait for dahdi_cfg mutex.\n"); + perror("Failed to wait for 'dahdi_cfg' mutex"); exit_code = 1; goto unlink_sem; } @@ -1730,7 +1730,7 @@ finish: } if (-1 == sem_wait(lock)) { - error("Failed to wait for dahdi_cfg mutex after creating dynamic spans.\n"); + perror("Failed to wait for 'dahdi_cfg' mutex after creating dynamic spans"); exit_code = 1; goto unlink_sem; }