mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-19 10:53:58 +00:00
- Use pjdlog_exitx() to log errors and exit instead of errx().
- Use 'unable to' (instead of 'cannot') consistently. MFC after: 1 month
This commit is contained in:
parent
1a28a37578
commit
005f438bf5
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=210879
@ -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);
|
||||
|
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user