From owner-freebsd-mobile Fri Dec 18 16:35:11 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id QAA28613 for freebsd-mobile-outgoing; Fri, 18 Dec 1998 16:35:11 -0800 (PST) (envelope-from owner-freebsd-mobile@FreeBSD.ORG) Received: from jli.com (jli.com [199.2.111.1]) by hub.freebsd.org (8.8.8/8.8.8) with SMTP id QAA28608 for ; Fri, 18 Dec 1998 16:35:09 -0800 (PST) (envelope-from trost@cloud.rain.com) Received: (qmail 8715 invoked by uid 4); 19 Dec 1998 00:34:59 -0000 Received: (qmail 6046 invoked from network); 19 Dec 1998 00:34:22 -0000 Received: from localhost.cloud.rain.com (HELO cloud.rain.com) (127.0.0.1) by localhost.cloud.rain.com with SMTP; 19 Dec 1998 00:34:22 -0000 To: Eric Kozowski cc: mobile@FreeBSD.ORG Subject: Re: xbatt and apm -b hang my system References: <19981218160712.A6917@haydenisland.verio.net> In-reply-to: Your message of Fri, 18 Dec 1998 16:07:12 PST. <19981218160712.A6917@haydenisland.verio.net> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <6042.914027662.1@cloud.rain.com> Date: Fri, 18 Dec 1998 16:34:22 -0800 Message-ID: <6043.914027662@cloud.rain.com> From: Bill Trost Sender: owner-freebsd-mobile@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Eric Kozowski writes: zzz generates "Inappropriate ioctl for device" as do all other apm commands. apmconf -e generates "can't ioctl APMIO_ENABLE" me thinks something is wrong in the kernel support for apm, but i double checked that apm support was compile in. i even rebuilt the kernel to make sure. system: quantex h1331 p2 233 freebsd 2.2.7 + pao what's the best way to troubleshoot this problem? Well, for starters, I'd fix apmconf to tell you something better than "I can't ioctl." Patches (for 3.0 or therebouts) are attached. Could someone commit this if appropriate? Offhand, my own scientific wild-ass guess is that you have a binary incompatibility between your apm software and your kernel. Did you PAOify apm and apmconf when you PAOified your kernel? --- /tmp/apmconf.c Fri Dec 18 16:30:06 1998 +++ apmconf.c Fri Dec 18 16:30:09 1998 @@ -92,28 +92,28 @@ enable_apm(int dh) { if (ioctl(dh, APMIO_ENABLE, NULL) == -1) - errx(1, "can't ioctl APMIO_ENABLE"); + err(1, "can't ioctl APMIO_ENABLE"); } static void disable_apm(int dh) { if (ioctl(dh, APMIO_DISABLE, NULL) == -1) - errx(1, "can't ioctl APMIO_DISABLE"); + err(1, "can't ioctl APMIO_DISABLE"); } static void haltcpu_apm(int dh) { if (ioctl(dh, APMIO_HALTCPU, NULL) == -1) - errx(1, "can't ioctl APMIO_HALTCPU"); + err(1, "can't ioctl APMIO_HALTCPU"); } static void nothaltcpu_apm(int dh) { if (ioctl(dh, APMIO_NOTHALTCPU, NULL) == -1) - errx(1, "can't ioctl APMIO_NOTHALTCPU"); + err(1, "can't ioctl APMIO_NOTHALTCPU"); } int @@ -124,7 +124,7 @@ main_argc = argc; main_argv = argv; if ((dh = open(APMDEV, O_RDWR)) == -1) - errx(1, "can't open '%s'", APMDEV); + err(1, "can't open '%s'", APMDEV); parse_option(); /* disable operation is executed first */ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-mobile" in the body of the message