kdebase patch

Matthew Dillon dillon at apollo.backplane.com
Wed Dec 17 14:24:56 PST 2003


:This patch builds kdebase out of CVS.
:
:Thanks to Dave Rhodus for his help on it and the other fine folks hanging
:out in #dragonflybsd on Efnet.
:----------------------------------------------------------------------
:
:        ps->vmRss    = p.kp_eproc.e_vm.vm_rssize * getpagesize();
:-       strlcpy(ps->name,p.kp_proc.p_comm ? p.kp_proc.p_comm : "????", sizeof(p
:s->name));
:+       /*strlcpy(ps->name,p.kp_proc.p_comm ? p.kp_proc.p_comm : "????", sizeof
:(ps->name));*/
:+       strncpy(ps->name,p.kp_thread.td_comm ? p.kp_thread.td_comm : "????", si
:zeof(ps->name));
:        strcpy(ps->status,(p.kp_proc.p_stat>=1)&&(p.kp_proc.p_stat<=5)? statuse
:s[p.kp_proc.p_stat-1]:"????");
: #endif
:----------------------------------------------------------------------
:
:Thanks again... Its working well here. :)
:
:Dave

    I am fairly sure that strncpy is not compatible with strlcpy.  strncpy
    will happily NOT terminate the target buffer with a \0 if the source
    buffer is too large.

    But we should have strlcpy().  Do we not have strlcpy() ?

					-Matt
					Matthew Dillon 
					<dillon at xxxxxxxxxxxxx>





More information about the Kernel mailing list