Re: APM Patches

2004-07-07 Thread Liam J. Foy
On Wed, 07 Jul 2004 19:42:35 +0300
Niki Denev <[EMAIL PROTECTED]> wrote:

> Niki Denev writes:
> 
> > M. Warner Losh writes:
> > 
> >> In message: <[EMAIL PROTECTED]>
> >> "Liam J. Foy" <[EMAIL PROTECTED]> writes:
> >> : Hey guys,
> >> : 
> >> :  Since it was decided 
> >> (http://lists.freebsd.org/pipermail/freebsd-acpi/2004-June/000352.html)
> >> : we are going to stick with apm -l producing -1 and not 255 which is stated in 
> >> the handbook would one 
> >> : of you guys please commit:
> >> : 
> >> : --- /usr/src/usr.sbin/apm/apm.8  Thu Jun 24 17:32:55 2004
> >> : +++ /liamfoy/apm.8   Thu Jun 24 17:32:27 2004
> >> : @@ -106,7 +106,7 @@
> >> :  state respectively.
> >> :  .It Fl t
> >> :  Display the estimated remaining battery lifetime in seconds.  If
> >> : -it is unknown, 255 is displayed.
> >> : +it is unknown, -1 is displayed.
> >> :  .It Fl Z
> >> :  Transition the system into standby mode.  This mode uses less power than
> >> :  full power mode, but more than suspend mode.  Some laptops support
> >> : 
> >> : 
> >> : 
> >> : Another patch I would like you guys to review is this. Currently apm -t will 
> >> output
> >> : 0 when it cannot find a valid rate or the full battery time(as the comment 
> >> mentions).
> >> : I think it should return -1 (unknown) to reflect an error, which is stated in 
> >> the man page.
> >> : It should not return 0 since we do not have 0 seconds left, we have an unknown 
> >> value
> >> : remaining. Either that or the man page it edited. I believe the following patch 
> >> should 
> >> : be commited really.
> >> : 
> >> : The patch is:
> >> : 
> >> : --- /usr/src/sys/dev/acpica/acpi_cmbat.c Sun Jul  4 20:41:43 2004
> >> : +++ /home/liamfoy/acpi_cmbat.c   Sun Jul  4 20:39:14 2004
> >> : @@ -536,7 +536,7 @@
> >> :  bat[i]->min = (bat[i]->full_charge_time * bat[i]->cap) / 100;
> >> :  } else {
> >> :  /* Couldn't find valid rate and full battery time */
> >> : -bat[i]->min = 0;
> >> : +bat[i]->min = -1;
> >> :  }
> >> :  total_min += bat[i]->min;
> >> :  total_cap += bat[i]->cap;
> >> 
> >> I don't like this patch, since we use ->min later for math...
> >> 
> >> Warner
> > 
> > What about this ?
> > 
> > --- sys/dev/acpica/acpi_cmbat.c.origMon Jul  5 15:15:28 2004
> > +++ sys/dev/acpica/acpi_cmbat.c Mon Jul  5 16:37:02 2004
> > @@ -655,7 +655,7 @@
> > battinfo->state = ACPI_BATT_STAT_NOT_PRESENT;
> >  } else {
> > battinfo->cap = sc->cap;
> > -   battinfo->min = sc->min;
> > +   battinfo->min = sc->min ? sc->min : -1;
> > battinfo->state = sc->bst.state;
> >  }
> >  
> > 
> > 
> > --
> > Regards,
> > Niki
> 
> 
> So, is this Ok or not? :)
> I'm running with this for a few days... no probs...
> But also the only time that this is used probably is in apm(8) ?
> It seems to not affect the math with ->min, by maybe it is not the cleanest
> solution to this cosmetic problem?

I personally like this patch. It does not effect the math and is much
better than returning 0 which would indicate to the user he/she has not
battery life left. I believe this should be changed.

Depends on what the other guys think.
> :)
> 
> --
> Cheers,
> Niki
> 
> 


-- 
-Liam J. Foy
http://liamfoy.kerneled.org
"Love is like maths -- the idea is simple but can be quite complicated."
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: APM Patches

2004-07-05 Thread Liam J. Foy
On Mon, 05 Jul 2004 16:45:11 +0300
Niki Denev <[EMAIL PROTECTED]> wrote:

> M. Warner Losh writes:
> 
> > In message: <[EMAIL PROTECTED]>
> > "Liam J. Foy" <[EMAIL PROTECTED]> writes:
> > : Hey guys,
> > : 
> > :   Since it was decided 
> > (http://lists.freebsd.org/pipermail/freebsd-acpi/2004-June/000352.html)
> > : we are going to stick with apm -l producing -1 and not 255 which is stated in 
> > the handbook would one 
> > : of you guys please commit:
> > : 
> > : --- /usr/src/usr.sbin/apm/apm.8   Thu Jun 24 17:32:55 2004
> > : +++ /liamfoy/apm.8Thu Jun 24 17:32:27 2004
> > : @@ -106,7 +106,7 @@
> > :  state respectively.
> > :  .It Fl t
> > :  Display the estimated remaining battery lifetime in seconds.  If
> > : -it is unknown, 255 is displayed.
> > : +it is unknown, -1 is displayed.
> > :  .It Fl Z
> > :  Transition the system into standby mode.  This mode uses less power than
> > :  full power mode, but more than suspend mode.  Some laptops support
> > : 
> > : 
> > : 
> > : Another patch I would like you guys to review is this. Currently apm -t will 
> > output
> > : 0 when it cannot find a valid rate or the full battery time(as the comment 
> > mentions).
> > : I think it should return -1 (unknown) to reflect an error, which is stated in 
> > the man page.
> > : It should not return 0 since we do not have 0 seconds left, we have an unknown 
> > value
> > : remaining. Either that or the man page it edited. I believe the following patch 
> > should 
> > : be commited really.
> > : 
> > : The patch is:
> > : 
> > : --- /usr/src/sys/dev/acpica/acpi_cmbat.c  Sun Jul  4 20:41:43 2004
> > : +++ /home/liamfoy/acpi_cmbat.cSun Jul  4 20:39:14 2004
> > : @@ -536,7 +536,7 @@
> > :   bat[i]->min = (bat[i]->full_charge_time * bat[i]->cap) / 100;
> > :   } else {
> > :   /* Couldn't find valid rate and full battery time */
> > : - bat[i]->min = 0;
> > : + bat[i]->min = -1;
> > :   }
> > :   total_min += bat[i]->min;
> > :   total_cap += bat[i]->cap;
> > 
> > I don't like this patch, since we use ->min later for math...
> > 
> > Warner
> 
> What about this ?
> 
> --- sys/dev/acpica/acpi_cmbat.c.orig  Mon Jul  5 15:15:28 2004
> +++ sys/dev/acpica/acpi_cmbat.c   Mon Jul  5 16:37:02 2004
> @@ -655,7 +655,7 @@
>   battinfo->state = ACPI_BATT_STAT_NOT_PRESENT;
>  } else {
>   battinfo->cap = sc->cap;
> - battinfo->min = sc->min;
> + battinfo->min = sc->min ? sc->min : -1;
>   battinfo->state = sc->bst.state;
>  }
>  
Hmm, yes. Actually looking now, this patch seem alot better. It should
not affect the math.

I like it. Up to the others.
> 
> 
> --
> Regards,
> Niki
> 


-- 
-Liam J. Foy
http://liamfoy.kerneled.org
"Love is like maths -- the idea is simple but can be quite complicated."
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


APM Patches

2004-07-04 Thread Liam J. Foy
Hey guys,

Since it was decided 
(http://lists.freebsd.org/pipermail/freebsd-acpi/2004-June/000352.html)
we are going to stick with apm -l producing -1 and not 255 which is stated in the 
handbook would one 
of you guys please commit:

--- /usr/src/usr.sbin/apm/apm.8 Thu Jun 24 17:32:55 2004
+++ /liamfoy/apm.8  Thu Jun 24 17:32:27 2004
@@ -106,7 +106,7 @@
 state respectively.
 .It Fl t
 Display the estimated remaining battery lifetime in seconds.  If
-it is unknown, 255 is displayed.
+it is unknown, -1 is displayed.
 .It Fl Z
 Transition the system into standby mode.  This mode uses less power than
 full power mode, but more than suspend mode.  Some laptops support



Another patch I would like you guys to review is this. Currently apm -t will output
0 when it cannot find a valid rate or the full battery time(as the comment mentions).
I think it should return -1 (unknown) to reflect an error, which is stated in the man 
page.
It should not return 0 since we do not have 0 seconds left, we have an unknown value
remaining. Either that or the man page it edited. I believe the following patch should 
be commited really.

The patch is:

--- /usr/src/sys/dev/acpica/acpi_cmbat.cSun Jul  4 20:41:43 2004
+++ /home/liamfoy/acpi_cmbat.c  Sun Jul  4 20:39:14 2004
@@ -536,7 +536,7 @@
bat[i]->min = (bat[i]->full_charge_time * bat[i]->cap) / 100;
} else {
/* Couldn't find valid rate and full battery time */
-   bat[i]->min = 0;
+   bat[i]->min = -1;
}
total_min += bat[i]->min;
total_cap += bat[i]->cap;



Thanks in advance - comments welcome,

-- 
-Liam J. Foy
http://liamfoy.kerneled.org
"Love is like maths -- the idea is simple but can be quite complicated."
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: quiet ATX mid-Towers

2004-06-19 Thread Liam J. Foy
On Sat, 19 Jun 2004 22:08:32 +0200
Jeremie Le Hen <[EMAIL PROTECTED]> wrote:

> > Under a kind suggestion, I am re-submitting this
> > e-mail with a different subject.  The old message was:
> > 
> > Hello, I am looking for a very quiet ATX mid-tower and
> > I was wondering if anybody has a suggestion or
> > recommendation.  My hard disks produce the most
> > decibels at the most annoying frequency -- it?s not a
> > bad fan.  I am an EE student using FreeBSD, so a quiet
> > computer is very important to me.
> 
> This is completly off-topic.  This is not even FreeBSD-related, except
> you are a FreeBSD user.

This is a chat@ question =)

> 
> -- 
> Jeremie LE HEN aka TtZ/TataZ  [EMAIL PROTECTED]
>  [EMAIL PROTECTED]
> Hi! I'm a .signature virus! Copy me into your ~/.signature to help me spread!
> ___
> [EMAIL PROTECTED] mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
> To unsubscribe, send any mail to "[EMAIL PROTECTED]"


-- 
-Liam Foy
http://liamfoy.kerneled.org
"Do only what only you can do."
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: [current tinderbox] failure on amd64/amd64

2004-06-17 Thread Liam J. Foy
On Thu, 17 Jun 2004 05:47:25 -0400 (EDT)
FreeBSD Tinderbox <[EMAIL PROTECTED]> wrote:

> TB --- 2004-06-17 08:56:11 - tinderbox 2.3 running on freebsd-current.sentex.ca
> TB --- 2004-06-17 08:56:11 - starting CURRENT tinderbox run for amd64/amd64
> TB --- 2004-06-17 08:56:11 - checking out the source tree
> TB --- 2004-06-17 08:56:11 - cd /home/tinderbox/sandbox/CURRENT/amd64/amd64
> TB --- 2004-06-17 08:56:11 - /usr/bin/cvs -f -R -q -d/home/ncvs update -Pd -A src
> TB --- 2004-06-17 09:01:06 - building world (CFLAGS=-O2 -pipe)
> TB --- 2004-06-17 09:01:06 - cd /home/tinderbox/sandbox/CURRENT/amd64/amd64/src
> TB --- 2004-06-17 09:01:06 - /usr/bin/make -B buildworld
> >>> Rebuilding the temporary build tree
> >>> stage 1.1: legacy release compatibility shims
> >>> stage 1.2: bootstrap tools
> >>> stage 2.1: cleaning up the object tree
> >>> stage 2.2: rebuilding the object tree
> >>> stage 2.3: build tools
> >>> stage 3: cross tools
> >>> stage 4.1: building includes
> >>> stage 4.2: building libraries
> >>> stage 4.3: make dependencies
> >>> stage 4.4: building everything
> [...]
> cc -O2 -pipe-o nos-tun nos-tun.o 
> gzip -cn /tinderbox/CURRENT/amd64/amd64/src/sbin/nos-tun/nos-tun.8 > nos-tun.8.gz
> ===> sbin/pfctl
> cc -O2 -pipe  -Wall -Wmissing-prototypes -Wno-uninitialized -Wstrict-prototypes 
> -I/tinderbox/CURRENT/amd64/amd64/src/sbin/pfctl/../../contrib/pf/pfctl 
> -I/tinderbox/CURRENT/amd64/amd64/src/sbin/pfctl/../../sys/contrib/pf -DENABLE_ALTQ 
> -Wsystem-headers -Werror -Wall -Wno-format-y2k -Wno-uninitialized -c 
> /tinderbox/CURRENT/amd64/amd64/src/contrib/pf/pfctl/pfctl.c
> cc -O2 -pipe  -Wall -Wmissing-prototypes -Wno-uninitialized -Wstrict-prototypes 
> -I/tinderbox/CURRENT/amd64/amd64/src/sbin/pfctl/../../contrib/pf/pfctl 
> -I/tinderbox/CURRENT/amd64/amd64/src/sbin/pfctl/../../sys/contrib/pf -DENABLE_ALTQ 
> -Wsystem-headers -Werror -Wall -Wno-format-y2k -Wno-uninitialized -c parse.c
> cc -O2 -pipe  -Wall -Wmissing-prototypes -Wno-uninitialized -Wstrict-prototypes 
> -I/tinderbox/CURRENT/amd64/amd64/src/sbin/pfctl/../../contrib/pf/pfctl 
> -I/tinderbox/CURRENT/amd64/amd64/src/sbin/pfctl/../../sys/contrib/pf -DENABLE_ALTQ 
> -Wsystem-headers -Werror -Wall -Wno-format-y2k -Wno-uninitialized -c 
> /tinderbox/CURRENT/amd64/amd64/src/contrib/pf/pfctl/pfctl_parser.c
> /tinderbox/CURRENT/amd64/amd64/src/contrib/pf/pfctl/pfctl_parser.c: In function 
> `print_status':
> /tinderbox/CURRENT/amd64/amd64/src/contrib/pf/pfctl/pfctl_parser.c:559: warning: 
> long long int format, long unsigned int arg (arg 3)
> *** Error code 1
> 
> Stop in /tinderbox/CURRENT/amd64/amd64/src/sbin/pfctl.
> *** Error code 1
> 
> Stop in /tinderbox/CURRENT/amd64/amd64/src/sbin.
> *** Error code 1
> 
> Stop in /tinderbox/CURRENT/amd64/amd64/src.
> *** Error code 1
> 
> Stop in /tinderbox/CURRENT/amd64/amd64/src.
> *** Error code 1
> 
> Stop in /tinderbox/CURRENT/amd64/amd64/src.
> TB --- 2004-06-17 09:47:25 - WARNING: /usr/bin/make returned exit code  1 
> TB --- 2004-06-17 09:47:25 - ERROR: failed to build world
> TB --- 2004-06-17 09:47:25 - tinderbox aborted
> 
> ___
> [EMAIL PROTECTED] mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-current
> To unsubscribe, send any mail to "[EMAIL PROTECTED]"


The following patch should solve this problem I believe:

--- /usr/src/contrib/pf/pfctl/pfctl_parser.cThu Jun 17 13:20:07 2004
+++ /home/liamfoy/pfctl_parser.cThu Jun 17 13:26:16 2004
@@ -555,7 +555,7 @@
printf("  %-25s %14u %14s\n", "current entries",
s->src_nodes, "");
for (i = 0; i < SCNT_MAX; i++) {
-   printf("  %-25s %14lld ", pf_scounters[i],
+   printf("  %-25s %14lu ", pf_scounters[i],
s->scounters[i]);
if (runtime > 0)
printf("%14.1f/s\n",



Correct me if I am wrong :), would someone care to commit it if its fine?

Thanks in advance,

Liam J. Foy <[EMAIL PROTECTED]>
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


GDB/Kernel Question

2004-06-15 Thread Liam J. Foy
Hey guys,

Am trying to follow line by line of some code in userland. Now in
the userland program it calls a kernel function. Is there a way
I can carry on following it line by line in the kernel function
and once it has finished return back to the userland program?

Of course, my kernel is compiled with the -g options.

Love to hear if it can be done and if so now, thanks in advance !

-- 
-Liam Foy
http://liamfoy.kerneled.org
"Do only what only you can do."
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Orinoco Gold and Linksys AP

2004-06-05 Thread Liam J. Foy
On Sat, 05 Jun 2004 12:37:28 -0600 (MDT)
"M. Warner Losh" <[EMAIL PROTECTED]> wrote:

> In message: <[EMAIL PROTECTED]>
> Søren Schmidt <[EMAIL PROTECTED]> writes:
> : Liam J. Foy wrote:
> : > Hey guys,
> : > 
> : >   I have also emailed this to freebsd-mobile@, so just writing to see if any of 
> you guys have had any problems with an Orinoco Gold and a Linksys AP in -CURRENT. 
> They seem to both work fine in windows, just unable to ping each other in freebsd. 
> Here is the output of ifconfig wi0:
> : > 
> : > wi0: flags=8843 mtu 1500
> : >   inet6 fe80::202:2dff:fec0:2a58%wi0 prefixlen 64 scopeid 0x5 
> : >   inet 192.168.0.20 netmask 0xff00 broadcast 255.255.255.0
> : >   ether 00:02:2d:c0:2a:58
> : >   media: IEEE 802.11 Wireless Ethernet autoselect (DS/11Mbps)
> : >   status: associated
> : >   ssid Anduril 1:Anduril
> : >   stationname "FreeBSD WaveLAN/IEEE node"
> : >   channel 3 authmode OPEN powersavemode OFF powersavesleep 100
> : >   rtsthreshold 2312 protmode CTS
> : >   wepmode OFF weptxkey 1
> : > 
> : > The AP has WEP disabled, and whos SSID is Anduril. SSID Broadcast is disabled 
> also on the AP.
> : > 
> : > Any hints or ideas are greatly thanked,
> : 
> : My orinoco's hasn't worked since the if_wi driver was redone over a year 
> : ago (yeah time flies. You might have better luck with if_owi though, but 
> : it didn't help mine either.
Is your card an Orinoco Classic Gold?
> 
> What firmware level do you have?  Both wi and owi works for all my
> lucent/wavelan/orinoco cards. :-(
> 
Hi Warner,

I have managed to get mine working. netstat -rn showed my problem, I was routing to 
the same point on two up interfaces. Disabling the one I dont used fixed it. Thanks 
for replying !
> Warner
-- 
-Liam Foy
http://liamfoy.kerneled.org
"Do only what only you can do."
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Orinoco Gold and Linksys AP

2004-06-04 Thread Liam J. Foy
On Fri, 04 Jun 2004 22:31:40 +0200
Søren Schmidt <[EMAIL PROTECTED]> wrote:

> Liam J. Foy wrote:
> > Hey guys,
> > 
> > I have also emailed this to freebsd-mobile@, so just writing to see if any of 
> > you guys have had any problems with an Orinoco Gold and a Linksys AP in -CURRENT. 
> > They seem to both work fine in windows, just unable to ping each other in freebsd. 
> > Here is the output of ifconfig wi0:
> > 
> > wi0: flags=8843 mtu 1500
> > inet6 fe80::202:2dff:fec0:2a58%wi0 prefixlen 64 scopeid 0x5 
> > inet 192.168.0.20 netmask 0xff00 broadcast 255.255.255.0
> > ether 00:02:2d:c0:2a:58
> > media: IEEE 802.11 Wireless Ethernet autoselect (DS/11Mbps)
> > status: associated
> > ssid Anduril 1:Anduril
> > stationname "FreeBSD WaveLAN/IEEE node"
> > channel 3 authmode OPEN powersavemode OFF powersavesleep 100
> > rtsthreshold 2312 protmode CTS
> > wepmode OFF weptxkey 1
> > 
> > The AP has WEP disabled, and whos SSID is Anduril. SSID Broadcast is disabled also 
> > on the AP.
> > 
> > Any hints or ideas are greatly thanked,
> 
> My orinoco's hasn't worked since the if_wi driver was redone over a year 
> ago (yeah time flies. You might have better luck with if_owi though, but 
> it didn't help mine either.
> 

Hi, I have seem to have fixed it. Was because I had two interfaces for the same
route.

Thanks for responding anyway,

> -- 
> -Søren
> 
> ___
> [EMAIL PROTECTED] mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
> To unsubscribe, send any mail to "[EMAIL PROTECTED]"


-- 
-Liam Foy
http://liamfoy.kerneled.org
"Do only what only you can do."
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Orinoco Gold and Linksys AP

2004-06-04 Thread Liam J. Foy
Hey guys,

I have also emailed this to freebsd-mobile@, so just writing to see if any of 
you guys have had any problems with an Orinoco Gold and a Linksys AP in -CURRENT. They 
seem to both work fine in windows, just unable to ping each other in freebsd. Here is 
the output of ifconfig wi0:

wi0: flags=8843 mtu 1500
inet6 fe80::202:2dff:fec0:2a58%wi0 prefixlen 64 scopeid 0x5 
inet 192.168.0.20 netmask 0xff00 broadcast 255.255.255.0
ether 00:02:2d:c0:2a:58
media: IEEE 802.11 Wireless Ethernet autoselect (DS/11Mbps)
status: associated
ssid Anduril 1:Anduril
stationname "FreeBSD WaveLAN/IEEE node"
channel 3 authmode OPEN powersavemode OFF powersavesleep 100
rtsthreshold 2312 protmode CTS
wepmode OFF weptxkey 1

The AP has WEP disabled, and whos SSID is Anduril. SSID Broadcast is disabled also on 
the AP.

Any hints or ideas are greatly thanked,

Regards,

-- 
-Liam Foy
http://liamfoy.kerneled.org
"Do only what only you can do."
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"