ye olde magicke

2013-03-25 Thread Ted Unangst
An analysis of the kernel using sophisticated machine learning pattern
matching algorithms reveals the presence of several function that are
never called and can be deleted.

Index: sys/exec_aout.h
===
RCS file: /cvs/src/sys/sys/exec_aout.h,v
retrieving revision 1.22
diff -u -p -r1.22 exec_aout.h
--- sys/exec_aout.h 6 Oct 2006 20:58:17 -   1.22
+++ sys/exec_aout.h 26 Mar 2013 06:32:06 -
@@ -192,11 +192,6 @@ intexec_aout_prep_zmagic(struct proc *,
 intexec_aout_prep_nmagic(struct proc *, struct exec_package *);
 intexec_aout_prep_omagic(struct proc *, struct exec_package *);
 
-/* For compatibility modules */
-intexec_aout_prep_oldzmagic(struct proc *, struct exec_package *);
-intexec_aout_prep_oldnmagic(struct proc *, struct exec_package *);
-intexec_aout_prep_oldomagic(struct proc *, struct exec_package *);
-
 /*
  * MD portion
  */
Index: compat/common/compat_exec.c
===
RCS file: compat/common/compat_exec.c
diff -N compat/common/compat_exec.c
--- compat/common/compat_exec.c 15 Nov 2001 06:22:29 -  1.7
+++ /dev/null   1 Jan 1970 00:00:00 -
@@ -1,190 +0,0 @@
-/* $OpenBSD: compat_exec.c,v 1.7 2001/11/15 06:22:29 art Exp $ */
-/* $NetBSD: compat_exec.c,v 1.1 1996/05/18 15:52:21 christos Exp $ */
-
-/*
- * Copyright (c) 1993, 1994 Christopher G. Demetriou
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *notice, this list of conditions and the following disclaimer in the
- *documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- *must display the following acknowledgement:
- *  This product includes software developed by Christopher G. Demetriou.
- * 4. The name of the author may not be used to endorse or promote products
- *derived from this software without specific prior written permission
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-
-/*
- * exec_aout_prep_oldzmagic():
- * Prepare the vmcmds to build a vmspace for an old ZMAGIC
- * binary. [386BSD/BSDI/4.4BSD/NetBSD0.8]
- *
- * Cloned from exec_aout_prep_zmagic() in kern/exec_aout.c; a more verbose
- * description of operation is there.
- * There were copies of this in the mac68k, hp300, and i386 ports.
- */
-int
-exec_aout_prep_oldzmagic(p, epp)
-   struct proc *p;
-   struct exec_package *epp;
-{
-   struct exec *execp = epp->ep_hdr;
-
-   epp->ep_taddr = 0;
-   epp->ep_tsize = execp->a_text;
-   epp->ep_daddr = epp->ep_taddr + execp->a_text;
-   epp->ep_dsize = execp->a_data + execp->a_bss;
-   epp->ep_entry = execp->a_entry;
-
-   /*
-* check if vnode is in open for writing, because we want to
-* demand-page out of it.  if it is, don't do it, for various
-* reasons
-*/
-   if ((execp->a_text != 0 || execp->a_data != 0) &&
-   epp->ep_vp->v_writecount != 0) {
-#ifdef DIAGNOSTIC
-   if (epp->ep_vp->v_flag & VTEXT)
-   panic("exec: a VTEXT vnode has writecount != 0");
-#endif
-   return ETXTBSY;
-   }
-   vn_marktext(epp->ep_vp);
-
-   /* set up command for text segment */
-   NEW_VMCMD(&epp->ep_vmcmds, vmcmd_map_pagedvn, execp->a_text,
-   epp->ep_taddr, epp->ep_vp, PAGE_SIZE,
-   VM_PROT_READ|VM_PROT_EXECUTE);
-
-   /* set up command for data segment */
-   NEW_VMCMD(&epp->ep_vmcmds, vmcmd_map_pagedvn, execp->a_data,
-   epp->ep_daddr, epp->ep_vp,
-   execp->a_text + PAGE_SIZE,
-   VM_PROT_READ|VM_PROT_WRITE|VM_PROT_EXECUTE);
-
-   /* set up command for bss segment */
-   NEW_VMCMD(&epp->ep_vmcmds, vmcmd_map_zero, execp-

cleanup ossaudio compat

2013-03-25 Thread Ted Unangst
As much as it pains me to submit a diff that contains + in the compat
directory, this is still mostly -. Calling our mixer devices NetBSD
devices doesn't make a whole lot of sense. Also kill some other dead
code.

The comment still doesn't make a lot of sense to me. The comment says
only 32 devices are available, but OSS_SOUND_MIXER_NRDEVICES is
defined to be 17. I leave the thinking to somebody else.

Index: ossaudio.c
===
RCS file: /cvs/src/sys/compat/ossaudio/ossaudio.c,v
retrieving revision 1.14
diff -u -p -r1.14 ossaudio.c
--- ossaudio.c  22 Apr 2012 05:43:14 -  1.14
+++ ossaudio.c  26 Mar 2013 06:21:55 -
@@ -494,14 +494,14 @@ oss_ioctl_audio(p, uap, retval)
return (error);
 }
 
-/* If the NetBSD mixer device should have more than 32 devices
+/* If the mixer device should have more than 32 devices
  * some will not be available to Linux */
-#define NETBSD_MAXDEVS 64
+#define MAX_MIXER_DEVS 64
 struct audiodevinfo {
int done;
dev_t dev;
int16_t devmap[OSS_SOUND_MIXER_NRDEVICES], 
-   rdevmap[NETBSD_MAXDEVS];
+   rdevmap[MAX_MIXER_DEVS];
 u_long devmask, recmask, stereomask;
u_long caps, source;
 };
@@ -532,16 +532,10 @@ getdevinfo(fp, p)
{ AudioNtreble, OSS_SOUND_MIXER_TREBLE },
{ AudioNbass,   OSS_SOUND_MIXER_BASS },
{ AudioNspeaker,OSS_SOUND_MIXER_SPEAKER },
-/* { AudioNheadphone,  ?? },*/
{ AudioNoutput, OSS_SOUND_MIXER_OGAIN },
{ AudioNinput,  OSS_SOUND_MIXER_IGAIN },
-/* { AudioNmaster, OSS_SOUND_MIXER_SPEAKER },*/
-/* { AudioNstereo, ?? },*/
-/* { AudioNmono,   ?? },*/
{ AudioNfmsynth,OSS_SOUND_MIXER_SYNTH },
-/* { AudioNwave,   OSS_SOUND_MIXER_PCM },*/
{ AudioNmidi,   OSS_SOUND_MIXER_SYNTH },
-/* { AudioNmixerout,   ?? },*/
{ 0, -1 }
};
register const struct oss_devs *dp;
@@ -572,9 +566,9 @@ getdevinfo(fp, p)
di->caps = 0;
for(i = 0; i < OSS_SOUND_MIXER_NRDEVICES; i++)
di->devmap[i] = -1;
-   for(i = 0; i < NETBSD_MAXDEVS; i++)
+   for(i = 0; i < MAX_MIXER_DEVS; i++)
di->rdevmap[i] = -1;
-   for(i = 0; i < NETBSD_MAXDEVS; i++) {
+   for(i = 0; i < MAX_MIXER_DEVS; i++) {
mi.index = i;
if (ioctlf(fp, AUDIO_MIXER_DEVINFO, (caddr_t)&mi, p) < 0)
break;
@@ -822,11 +816,6 @@ oss_ioctl_sequencer(p, uap, retval)
 { 
struct file *fp;
struct filedesc *fdp;
-#if 0
-   u_long com;
-   int idat;
-   int error;
-#endif
 
fdp = p->p_fd;
if ((fp = fd_getfile(fdp, SCARG(uap, fd))) == NULL)
@@ -835,9 +824,6 @@ oss_ioctl_sequencer(p, uap, retval)
if ((fp->f_flag & (FREAD | FWRITE)) == 0)
return (EBADF);
 
-#if 0
-   com = SCARG(uap, com);
-#endif
retval[0] = 0;
 
return EINVAL;



sysctl rndstats

2013-03-25 Thread Ted Unangst
sysctl kern.random prints out a series of unintelligble numbers.
add some labels for more pretty.

also stop printing unused values. i don't need to verify that the pad
bytes are still zero. for that matter, we don't even need pad bytes.

Index: sys/dev/rndvar.h
===
RCS file: /cvs/src/sys/dev/rndvar.h,v
retrieving revision 1.29
diff -u -p -r1.29 rndvar.h
--- sys/dev/rndvar.h8 Jan 2011 19:45:08 -   1.29
+++ sys/dev/rndvar.h26 Mar 2013 05:56:40 -
@@ -44,14 +44,9 @@
 struct rndstats {
quad_t rnd_total;   /* total bits of entropy generated */
quad_t rnd_used;/* strong data bits read so far */
-   quad_t rnd_reads;   /* strong read calls -- unused */
quad_t arc4_reads;  /* aRC4 data bytes read so far */
quad_t arc4_nstirs; /* arc4 pool stirs */
-   quad_t arc4_stirs;  /* arc4 pool stirs (bits used) -- unused */
 
-   quad_t rnd_pad[5];
-
-   quad_t rnd_waits;   /* sleeps for data -- unused */
quad_t rnd_enqs;/* enqueue calls */
quad_t rnd_deqs;/* dequeue calls */
quad_t rnd_drops;   /* queue-full drops */
Index: sbin/sysctl/sysctl.c
===
RCS file: /cvs/src/sbin/sysctl/sysctl.c,v
retrieving revision 1.184
diff -u -p -r1.184 sysctl.c
--- sbin/sysctl/sysctl.c20 Sep 2012 20:11:58 -  1.184
+++ sbin/sysctl/sysctl.c26 Mar 2013 06:05:45 -
@@ -869,33 +869,27 @@ parse(char *string, int flags)
 
if (!nflag)
(void)printf("%s%s", string, equ);
-   (void)printf(
-   "%llu %llu %llu %llu %llu %llu %llu %llu %llu %llu %llu %llu 
%llu %llu %llu %llu",
-   (unsigned long long)rndstats->rnd_total,
-   (unsigned long long)rndstats->rnd_used,
-   (unsigned long long)rndstats->rnd_reads,
-   (unsigned long long)rndstats->arc4_reads,
-   (unsigned long long)rndstats->arc4_nstirs,
-   (unsigned long long)rndstats->arc4_stirs,
-   (unsigned long long)rndstats->rnd_pad[0],
-   (unsigned long long)rndstats->rnd_pad[1],
-   (unsigned long long)rndstats->rnd_pad[2],
-   (unsigned long long)rndstats->rnd_pad[3],
-   (unsigned long long)rndstats->rnd_pad[4],
-   (unsigned long long)rndstats->rnd_waits,
-   (unsigned long long)rndstats->rnd_enqs,
-   (unsigned long long)rndstats->rnd_deqs,
-   (unsigned long long)rndstats->rnd_drops,
-   (unsigned long long)rndstats->rnd_drople);
-   for (i = 0; i < 
sizeof(rndstats->rnd_ed)/sizeof(rndstats->rnd_ed[0]);
+   printf("tot: %llu used: %llu read: %llu stirs: %llu"
+   " enqs: %llu deqs: %llu drops: %llu ledrops: %llu",
+   rndstats->rnd_total, rndstats->rnd_used,
+   rndstats->arc4_reads, rndstats->arc4_nstirs,
+   rndstats->rnd_enqs, rndstats->rnd_deqs,
+   rndstats->rnd_drops, rndstats->rnd_drople);
+   printf(" ed:");
+   for (i = 0;
+   i < sizeof(rndstats->rnd_ed)/sizeof(rndstats->rnd_ed[0]);
i++)
-   (void)printf(" %llu", (unsigned long 
long)rndstats->rnd_ed[i]);
-   for (i = 0; i < 
sizeof(rndstats->rnd_sc)/sizeof(rndstats->rnd_sc[0]);
+   printf(" %llu", (unsigned long 
long)rndstats->rnd_ed[i]);
+   printf(" sc:");
+   for (i = 0;
+   i < sizeof(rndstats->rnd_sc)/sizeof(rndstats->rnd_sc[0]);
i++)
-   (void)printf(" %llu", (unsigned long 
long)rndstats->rnd_sc[i]);
-   for (i = 0; i < 
sizeof(rndstats->rnd_sb)/sizeof(rndstats->rnd_sb[0]);
+   printf(" %llu", (unsigned long 
long)rndstats->rnd_sc[i]);
+   printf(" sb:");
+   for (i = 0;
+   i < sizeof(rndstats->rnd_sb)/sizeof(rndstats->rnd_sb[0]);
i++)
-   (void)printf(" %llu", (unsigned long 
long)rndstats->rnd_sb[i]);
+   printf(" %llu", (unsigned long 
long)rndstats->rnd_sb[i]);
printf("\n");
return;
}



[PATCH] FIX: pf(4) DIOCKILLSTATES ioctl with port_op may not work correctly.

2013-03-25 Thread UMEZAWA Takeshi
Hello,

I have found a trivial bug in pf(4) DIOCKILLSTATES ioctl.

No functional change by this patch.


UMEZAWA Takeshi (FAMILY Given) 
Internet Initiative Japan Inc.



diff --git a/sys/net/pf_ioctl.c b/sys/net/pf_ioctl.c
index 426d8ea..ad861d5 100644
--- a/sys/net/pf_ioctl.c
+++ b/sys/net/pf_ioctl.c
@@ -1351,14 +1351,14 @@ pfioctl(dev_t dev, u_long cmd, caddr_t addr, int flags, 
struct proc *p)
sk = s->key[PF_SK_STACK];
srcaddr = &sk->addr[1];
dstaddr = &sk->addr[0];
-   srcport = sk->port[0];
+   srcport = sk->port[1];
dstport = sk->port[0];
} else {
sk = s->key[PF_SK_WIRE];
srcaddr = &sk->addr[0];
dstaddr = &sk->addr[1];
srcport = sk->port[0];
-   dstport = sk->port[0];
+   dstport = sk->port[1];
}
if ((!psk->psk_af || sk->af == psk->psk_af)
&& (!psk->psk_proto || psk->psk_proto ==



Re: uthum(4): Microdia's USB TEMPer variant

2013-03-25 Thread Luis Coronado
Sasano,

recently I bought a pair of pcsensor devices from amazon. Wasn't sure if
uthum supported it yet.

Your diff works for me:

dmesg:
uhidev3 at uhub3 port 1 configuration 1 interface 0 "RDing TEMPerV1.2" rev
2.00/0.01 addr 2
uhidev3: iclass 3/1, 1 report id
uthum0 at uhidev3 reportid 1
uhidev4 at uhub3 port 1 configuration 1 interface 1 "RDing TEMPerV1.2" rev
2.00/0.01 addr 2
uhidev4: iclass 3/1
uthum1 at uhidev4
uthum1: type ds75/12bit (temperature)

sysctl hw:
hw.sensors.uthum1.temp0=29.12 degC (inner)

usbdevs -vd:
Controller /dev/usb3:
addr 1: full speed, self powered, config 1, UHCI root hub(0x),
Intel(0x8086), rev 1.00
  uhub3
 port 1 addr 2: low speed, power 100 mA, config 1, TEMPerV1.2(0x7401),
RDing(0x0c45), rev 0.01
   uhidev3
   uhidev4
 port 2 powered

Im running -current + uthum-wip.diff
OpenBSD 5.3-current (GENERIC.MP) #1: Mon Mar 25 16:26:44 CST 2013
r...@host.mynetwork.dev:/usr/src/sys/arch/amd64/compile/GENERIC.MP

-luis



On Sat, Mar 16, 2013 at 9:24 AM, SASANO Takayoshi  wrote:

> Hi,
>
> I bought a PC Sensor's gold TEMPer
> (http://www.pcsensor.com/index.php?_a=product&product_id=41), but this is
> completely different from TEMPer series which handled by uthum(4) driver.
>
> This is also USB HID device (one keyboard and one mouse) but temperature
> data comes from interrupt pipe, not control pipe.
>
> Details are described in TEMPered's wiki page [1]. And I hope my lsusb
> log [2] and USB analyzer log (attached to Windows) [3] helps.
>
> I wrote a patch (work-in-progress, and for OpenBSD 5.2) for uthum(4) to
> test my device [4]. But I have a question, which is better to expand
> uthum(4) driver or write a new one?
>
> [1] https://github.com/edorfaus/TEMPered/wiki/0C45%3A7401
> [2] http://www2192ue.sakura.ne.jp/~uaa/gomitext/2013/20130224/temp.txt
> [3] http://www2192ue.sakura.ne.jp/~uaa/gomitext/2013/20130307/temper.txt
> [4]
> http://www2192ue.sakura.ne.jp/~uaa/gomitext/2013/20130315/uthum-wip.diff
>
> Thanks,
> 
> SASANO Takayoshi 
>
>


ddb while running X

2013-03-25 Thread Mark Kettenis
Now that we have KMS, it becomes possible to switch to the console
before entering ddb.  Of course this will only work on devices
supported by inteldrm for now.

ok?


Index: arch/i386/i386/db_interface.c
===
RCS file: /cvs/src/sys/arch/i386/i386/db_interface.c,v
retrieving revision 1.27
diff -u -p -r1.27 db_interface.c
--- arch/i386/i386/db_interface.c   4 Apr 2011 22:37:30 -   1.27
+++ arch/i386/i386/db_interface.c   26 Mar 2013 00:28:23 -
@@ -57,6 +57,11 @@
 #include 
 #endif /* NACPI > 0 */
 
+#include "wsdisplay.h"
+#if NWSDISPLAY > 0
+#include 
+#endif
+
 extern label_t *db_recover;
 extern char *trap_type[];
 extern int trap_types;
@@ -100,6 +105,10 @@ int
 kdb_trap(int type, int code, db_regs_t *regs)
 {
int s;
+
+#if NWSDISPLAY > 0
+   wsdisplay_switchtoconsole();
+#endif
 
switch (type) {
case T_BPTFLT:  /* breakpoint */
Index: arch/amd64/amd64/db_interface.c
===
RCS file: /cvs/src/sys/arch/amd64/amd64/db_interface.c,v
retrieving revision 1.16
diff -u -p -r1.16 db_interface.c
--- arch/amd64/amd64/db_interface.c 1 Apr 2010 19:47:59 -   1.16
+++ arch/amd64/amd64/db_interface.c 26 Mar 2013 00:28:23 -
@@ -62,6 +62,11 @@
 #include 
 #endif /* NACPI > 0 */
 
+#include "wsdisplay.h"
+#if NWSDISPLAY > 0
+#include 
+#endif
+
 extern label_t *db_recover;
 extern char *trap_type[];
 extern int trap_types;
@@ -106,6 +111,10 @@ int
 kdb_trap(int type, int code, db_regs_t *regs)
 {
int s;
+
+#if NWSDISPLAY > 0
+   wsdisplay_switchtoconsole();
+#endif
 
switch (type) {
case T_BPTFLT:  /* breakpoint */
Index: dev/pci/drm/i915/i915_drv.c
===
RCS file: /cvs/src/sys/dev/pci/drm/i915/i915_drv.c,v
retrieving revision 1.7
diff -u -p -r1.7 i915_drv.c
--- dev/pci/drm/i915/i915_drv.c 25 Mar 2013 19:50:56 -  1.7
+++ dev/pci/drm/i915/i915_drv.c 26 Mar 2013 00:28:24 -
@@ -699,6 +699,10 @@ inteldrm_show_screen(void *v, void *cook
 void (*cb)(void *, int, int), void *cbarg)
 {
struct inteldrm_softc *dev_priv = v;
+   struct rasops_info *ri = &dev_priv->ro;
+
+   if (cookie == ri->ri_active)
+   return (0);
 
dev_priv->switchcb = cb;
dev_priv->switchcbarg = cbarg;



Re: More direct use of IFQ_MAXLEN

2013-03-25 Thread Mike Belopuhov
On Tue, Mar 19, 2013 at 11:50 +0100, Martin Pieuchot wrote:
> Diff below removes 4 global read-only variables "ifqmaxlen", "ipqmaxlen",
> "ip6qmaxlen" and "mplsqmaxlen" that are all set to IFQ_MAXLEN and never
> modified afterward.
> 
> ok?
> 

OK to reduce bogosity.



Fix iteration of softdep hash tables

2013-03-25 Thread Pedro Martelletto

Hi,

The code in clear_remove() and clear_inodedeps() does not iterate over
the pagedep and inodedep hash tables correctly. The last entry in the
table is skipped -- this is due to the fact that 'pagedep_hash' and
'inodedep_hash' hold the size of the hash tables - 1.

-p.

Index: ufs/ffs/ffs_softdep.c
===
RCS file: /cvs/src/sys/ufs/ffs/ffs_softdep.c,v
retrieving revision 1.116
diff -u -p -r1.116 ffs_softdep.c
--- ufs/ffs/ffs_softdep.c   17 Feb 2013 17:39:29 -  1.116
+++ ufs/ffs/ffs_softdep.c   25 Mar 2013 10:36:26 -
@@ -5320,9 +5320,9 @@ clear_remove(struct proc *p)
ino_t ino;
 
 	ACQUIRE_LOCK(&lk);

-   for (cnt = 0; cnt < pagedep_hash; cnt++) {
+   for (cnt = 0; cnt <= pagedep_hash; cnt++) {
pagedephd = &pagedep_hashtbl[next++];
-   if (next >= pagedep_hash)
+   if (next > pagedep_hash)
next = 0;
LIST_FOREACH(pagedep, pagedephd, pd_hash) {
if (LIST_FIRST(&pagedep->pd_dirremhd) == NULL)
@@ -5376,9 +5376,9 @@ clear_inodedeps(struct proc *p)
 	 * We will then gather up all the inodes in its block 
 	 * that have dependencies and flush them out.

 */
-   for (cnt = 0; cnt < inodedep_hash; cnt++) {
+   for (cnt = 0; cnt <= inodedep_hash; cnt++) {
inodedephd = &inodedep_hashtbl[next++];
-   if (next >= inodedep_hash)
+   if (next > inodedep_hash)
next = 0;
if ((inodedep = LIST_FIRST(inodedephd)) != NULL)
break;



Re: Adds product ATI RADEON_HD5570

2013-03-25 Thread acamari


On Sun, 24 Mar 2013, Ted Unangst wrote:

> On Sun, Mar 24, 2013 at 16:59, Abel Abraham Camarillo Ojeda wrote:
> > When I used nail it _always_ segfaults when trying to open
> > my gmail inbox via IMAP, maybe it has something to do
> > with my 30,000 mails in inbox...
> 
> smtp and imap are separate and unrelated protocols. your mail client
> doesn't need to read your imap inbox to send mails using smtp.
> 

I hope alpine doesn't mangle this.

Index: dev/pci/pcidevs
===
RCS file: /cvs/src/sys/dev/pci/pcidevs,v
retrieving revision 1.1670
diff -u -p -r1.1670 pcidevs
--- dev/pci/pcidevs 14 Mar 2013 14:47:00 -  1.1670
+++ dev/pci/pcidevs 18 Mar 2013 22:09:57 -
@@ -1273,6 +1273,7 @@ product ATI RADEON_HD6670 0x6758  Radeon 
 product ATI RADEON_HD5800  0x6899  Radeon HD 5800
 product ATI RADEON_HD5700  0x68b8  Radeon HD 5700
 product ATI RADEON_HD5670  0x68d8  Radeon HD 5670
+product ATI RADEON_HD5570  0x68d9  Radeon HD 5570
 product ATI MOBILITY_HD54700x68e0  Radeon Mobility HD 5470
 product ATI MOBILITY_HD54300x68e1  Radeon Mobility HD 5430
 product ATI RADEON_HD5450  0x68f9  Radeon HD 5450
Index: dev/pci/pcidevs.h
===
RCS file: /cvs/src/sys/dev/pci/pcidevs.h,v
retrieving revision 1.1666
diff -u -p -r1.1666 pcidevs.h
--- dev/pci/pcidevs.h   14 Mar 2013 14:47:28 -  1.1666
+++ dev/pci/pcidevs.h   18 Mar 2013 22:10:30 -
@@ -1278,6 +1278,7 @@
 #definePCI_PRODUCT_ATI_RADEON_HD5800   0x6899  /* Radeon HD 
5800 */
 #definePCI_PRODUCT_ATI_RADEON_HD5700   0x68b8  /* Radeon HD 
5700 */
 #definePCI_PRODUCT_ATI_RADEON_HD5670   0x68d8  /* Radeon HD 
5670 */
+#definePCI_PRODUCT_ATI_RADEON_HD5570   0x68d9  /* Radeon HD 
5570 */
 #definePCI_PRODUCT_ATI_MOBILITY_HD5470 0x68e0  /* Radeon 
Mobility HD 5470 */
 #definePCI_PRODUCT_ATI_MOBILITY_HD5430 0x68e1  /* Radeon 
Mobility HD 5430 */
 #definePCI_PRODUCT_ATI_RADEON_HD5450   0x68f9  /* Radeon HD 
5450 */
Index: dev/pci/pcidevs_data.h
===
RCS file: /cvs/src/sys/dev/pci/pcidevs_data.h,v
retrieving revision 1.1661
diff -u -p -r1.1661 pcidevs_data.h
--- dev/pci/pcidevs_data.h  14 Mar 2013 14:47:28 -  1.1661
+++ dev/pci/pcidevs_data.h  18 Mar 2013 22:10:30 -
@@ -3408,6 +3408,10 @@ static const struct pci_known_product pc
"Radeon HD 5670",
},
{
+   PCI_VENDOR_ATI, PCI_PRODUCT_ATI_RADEON_HD5570,
+   "Radeon HD 5570",
+   },
+   {
PCI_VENDOR_ATI, PCI_PRODUCT_ATI_MOBILITY_HD5470,
"Radeon Mobility HD 5470",
},



Re: /usr.bin/colldef and collation tables

2013-03-25 Thread Vladimir Támara Patiño

On Sat, Mar 23, 2013 at 04:09:12PM +0100, Stefan Sperling wrote:

On Sat, Mar 23, 2013 at 09:27:50AM -0500, Vladimir Támara Patiño wrote:
> >Please change this to look like
> >in other parse.y files in the OpenBSD src tree (e.g. look at bgpd).
> 
> Could you change?


No, sorry. I don't have time for doing that.


My time is also limited.


Please cross-check the parse.y files yourself and make sure the new
parse.y file follows conventions used in the existing parse.y files.
We want our source tree to be consistent.


I think it is somehow similar to lex.l and yacc.y of usr.bin/mklocale

But, however I would like to know what conventions of other parse.y files 
are desirable (even for mklocale)?


* Using log.c ?
* Not using lex, but implementing the lexer in parse.y?


I see you're still tempted to copy code from FreeBSD without making
it perfect for OpenBSD. I'm not going to allow you to be that lazy ;-)


I made small changes, like improving documentation, using strlcpy
and strlcat, adding debugging of lexer when the option -d is used.

Comparing mklocale current implementations with NetBSD's,  I see 
improving documentation and renamings. What other conventions are

important?

Possible to show example with mklocale's lexer and parser?


Why do you compile colldef with COLLAGE_DEBUG by default?


To have the option -d that gives debuggin information (mklocale also has
it).


Don't expect me to hunt for additional opinions
and OKs before I've gotten around to review the libc changes you
sent as well, and before I'm perfectly happy with both diffs.


Ok.  Better then sending both parts as one patch?


I'm certainly not going to commit any of this without asking others
for review as well, so please don't be worried if it takes some time
to get this in.


Ok.


collate.h has this:
This should be named something like COLLATE_MAX_STR_LEN.


Ok.


Also, the collate.h file has:

> +__BEGIN_DECLS
> +#ifdef COLLATE_DEBUG
> +void  __collate_print_tables(void);

This is bogus. colldef.c declares and defines a collate_print_tables()
function. The __collate_print_tables() function is used in the libc
diff you sent, so it doesn't belong in the colldef diff.


Ok.

Should I sent now, only one diff (with changes for colldef, collation
tables and changes to libc ?)

--
Dios, gracias por tu amor infinito.
--  
 Vladimir Támara Patiño.  http://vtamara.pasosdeJesus.org/

 http://www.pasosdejesus.org/dominio_publico_colombia.html



5.3 lyrics

2013-03-25 Thread Alexey Suslikov
hi tech@.

despite of 5.3 lyrics being released recently,
53.html says opposite. is it normal?

cheers,
alexey