aboutsummaryrefslogtreecommitdiff
path: root/sbin/hastd/secondary.c
diff options
context:
space:
mode:
authorPawel Jakub Dawidek <pjd@FreeBSD.org>2010-08-05 18:56:24 +0000
committerPawel Jakub Dawidek <pjd@FreeBSD.org>2010-08-05 18:56:24 +0000
commit005f438bf5108d8ffe0f418669e4ab1999c7c5fe (patch)
tree9e1c402b582272d21e23b7e3414ea400bfe64c98 /sbin/hastd/secondary.c
parent1a28a37578c5e5d22b5a765d033548dbe0d3d134 (diff)
downloadsrc-005f438bf5108d8ffe0f418669e4ab1999c7c5fe.tar.gz
src-005f438bf5108d8ffe0f418669e4ab1999c7c5fe.zip
- Use pjdlog_exitx() to log errors and exit instead of errx().
- Use 'unable to' (instead of 'cannot') consistently. MFC after: 1 month
Notes
Notes: svn path=/head/; revision=210879
Diffstat (limited to 'sbin/hastd/secondary.c')
-rw-r--r--sbin/hastd/secondary.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/sbin/hastd/secondary.c b/sbin/hastd/secondary.c
index b487e9dc2bee..b4549b0010b4 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);
}