From owner-freebsd-bugs Tue Sep 8 20:40:05 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id UAA10944 for freebsd-bugs-outgoing; Tue, 8 Sep 1998 20:40:05 -0700 (PDT) (envelope-from owner-freebsd-bugs@FreeBSD.ORG) Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id UAA10899 for ; Tue, 8 Sep 1998 20:40:02 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.8.8/8.8.5) id UAA04748; Tue, 8 Sep 1998 20:40:00 -0700 (PDT) Received: from fatman.i-pi.com (fatman.i-pi.com [198.49.217.3]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id UAA10095 for ; Tue, 8 Sep 1998 20:30:04 -0700 (PDT) (envelope-from ingham@fatman.i-pi.com) Received: (from ingham@localhost) by fatman.i-pi.com (8.8.8/8.8.8) id VAA08519; Tue, 8 Sep 1998 21:29:55 -0600 (MDT) (envelope-from ingham) Message-Id: <199809090329.VAA08519@fatman.i-pi.com> Date: Tue, 8 Sep 1998 21:29:55 -0600 (MDT) From: Kenneth Ingham Reply-To: ingham@fatman.i-pi.com To: FreeBSD-gnats-submit@FreeBSD.ORG X-Send-Pr-Version: 3.2 Subject: bin/7869: Improved error messages from apm Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Number: 7869 >Category: bin >Synopsis: Improved error messages from apm >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue Sep 8 20:40:00 PDT 1998 >Last-Modified: >Originator: Kenneth Ingham >Organization: Kenneth Ingham Consulting >Release: FreeBSD 2.2.7-RELEASE i386 >Environment: When apm cannot open /dev/apm >Description: When apm cannot open /dev/apm, the error message does not give clues as to why it cannot open the device. >How-To-Repeat: I didn't have apm enabled in the kernel. However, this was not obvious from the error message. >Fix: Apply this patch to /usr/src/usr.sbin/apm/apm.c *** apm.c Tue Sep 8 21:23:05 1998 --- apm.c.orig Tue Sep 8 21:22:04 1998 *************** *** 25,31 **** #include #include #include - #include #include #define APMDEV "/dev/apm" --- 25,30 ---- *************** *** 161,167 **** finish_option: fd = open(APMDEV, O_RDWR); if (fd == -1) { ! warnx("can't open %s: %s", APMDEV, strerror(errno)); return 1; } if (sleep) --- 160,166 ---- finish_option: fd = open(APMDEV, O_RDWR); if (fd == -1) { ! warnx("can't open %s", APMDEV); return 1; } if (sleep) >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message