Date: Tue, 8 Sep 1998 21:29:55 -0600 (MDT) From: Kenneth Ingham <ingham@fatman.i-pi.com> To: FreeBSD-gnats-submit@FreeBSD.ORG Subject: bin/7869: Improved error messages from apm Message-ID: <199809090329.VAA08519@fatman.i-pi.com>
next in thread | raw e-mail | index | archive | help
>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 <sys/file.h> #include <sys/ioctl.h> #include <unistd.h> - #include <errno.h> #include <machine/apm_bios.h> #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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199809090329.VAA08519>