Date: Fri, 18 Dec 1998 16:34:22 -0800 From: Bill Trost <trost@cloud.rain.com> To: Eric Kozowski <eric@haydenisland.verio.net> Cc: mobile@FreeBSD.ORG Subject: Re: xbatt and apm -b hang my system Message-ID: <6043.914027662@cloud.rain.com> In-Reply-To: Your message of Fri, 18 Dec 1998 16:07:12 PST. <19981218160712.A6917@haydenisland.verio.net> References: <19981218160712.A6917@haydenisland.verio.net>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6043.914027662>
