From owner-svn-src-head@FreeBSD.ORG Thu Aug 5 18:56:25 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 30531106566B; Thu, 5 Aug 2010 18:56:25 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1EC478FC15; Thu, 5 Aug 2010 18:56:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o75IuPrk076057; Thu, 5 Aug 2010 18:56:25 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o75IuPh8076054; Thu, 5 Aug 2010 18:56:25 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201008051856.o75IuPh8076054@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Thu, 5 Aug 2010 18:56:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210879 - head/sbin/hastd X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Aug 2010 18:56:25 -0000 Author: pjd Date: Thu Aug 5 18:56:24 2010 New Revision: 210879 URL: http://svn.freebsd.org/changeset/base/210879 Log: - Use pjdlog_exitx() to log errors and exit instead of errx(). - Use 'unable to' (instead of 'cannot') consistently. MFC after: 1 month Modified: head/sbin/hastd/hastd.c head/sbin/hastd/secondary.c Modified: head/sbin/hastd/hastd.c ============================================================================== --- head/sbin/hastd/hastd.c Thu Aug 5 18:49:06 2010 (r210878) +++ head/sbin/hastd/hastd.c Thu Aug 5 18:56:24 2010 (r210879) @@ -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); Modified: head/sbin/hastd/secondary.c ============================================================================== --- head/sbin/hastd/secondary.c Thu Aug 5 18:49:06 2010 (r210878) +++ head/sbin/hastd/secondary.c Thu Aug 5 18:56:24 2010 (r210879) @@ -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); }