diff options
author | pjd <pjd@FreeBSD.org> | 2010-08-05 18:56:24 +0000 |
---|---|---|
committer | pjd <pjd@FreeBSD.org> | 2010-08-05 18:56:24 +0000 |
commit | ed23731ef16b7c809bc104a6ac534061a4f2f2f4 (patch) | |
tree | 9e1c402b582272d21e23b7e3414ea400bfe64c98 /sbin | |
parent | df8e8f685988a04e7518b7ce2a04827fdae8dbfd (diff) | |
download | FreeBSD-src-ed23731ef16b7c809bc104a6ac534061a4f2f2f4.zip FreeBSD-src-ed23731ef16b7c809bc104a6ac534061a4f2f2f4.tar.gz |
- Use pjdlog_exitx() to log errors and exit instead of errx().
- Use 'unable to' (instead of 'cannot') consistently.
MFC after: 1 month
Diffstat (limited to 'sbin')
-rw-r--r-- | sbin/hastd/hastd.c | 2 | ||||
-rw-r--r-- | sbin/hastd/secondary.c | 10 |
2 files changed, 7 insertions, 5 deletions
diff --git a/sbin/hastd/hastd.c b/sbin/hastd/hastd.c index 1d9d1b4..533cda6 100644 --- a/sbin/hastd/hastd.c +++ b/sbin/hastd/hastd.c @@ -490,7 +490,7 @@ main(int argc, char *argv[]) (intmax_t)otherpid); } /* If we cannot create pidfile from other reasons, only warn. */ - pjdlog_errno(LOG_WARNING, "Cannot open or create pidfile"); + pjdlog_errno(LOG_WARNING, "Unable to open or create pidfile"); } cfg = yy_config_parse(cfgpath); diff --git a/sbin/hastd/secondary.c b/sbin/hastd/secondary.c index b487e9d..b4549b0 100644 --- a/sbin/hastd/secondary.c +++ b/sbin/hastd/secondary.c @@ -127,14 +127,16 @@ init_environment(void) for (ii = 0; ii < HAST_HIO_MAX; ii++) { hio = malloc(sizeof(*hio)); if (hio == NULL) { - errx(EX_TEMPFAIL, "cannot allocate %zu bytes of memory " - "for hio request", sizeof(*hio)); + pjdlog_exitx(EX_TEMPFAIL, + "Unable to allocate memory (%zu bytes) for hio request.", + sizeof(*hio)); } hio->hio_error = 0; hio->hio_data = malloc(MAXPHYS); if (hio->hio_data == NULL) { - errx(EX_TEMPFAIL, "cannot allocate %zu bytes of memory " - "for gctl_data", (size_t)MAXPHYS); + pjdlog_exitx(EX_TEMPFAIL, + "Unable to allocate memory (%zu bytes) for gctl_data.", + (size_t)MAXPHYS); } TAILQ_INSERT_HEAD(&hio_free_list, hio, hio_next); } |