Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 28 Sep 2001 10:51:14 +0300
From:      Ruslan Ermilov <ru@FreeBSD.ORG>
To:        "Sergey A. Osokin" <osa@freebsd.org.ru>
Cc:        audit@FreeBSD.ORG
Subject:   Re: iostat(8) WARNS=2 cleanup
Message-ID:  <20010928105114.E30062@sunbay.com>
In-Reply-To: <20010927225814.A46080@freebsd.org.ru>; from osa@freebsd.org.ru on Thu, Sep 27, 2001 at 10:58:14PM %2B0400
References:  <20010927225814.A46080@freebsd.org.ru>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Sep 27, 2001 at 10:58:14PM +0400, Sergey A. Osokin wrote:
> Hello.
> Please review patch.
> Thanks.
> 
Revision 1.23 has been committed.  Please resubmit.

> --- iostat.orig/iostat.c	Mon Sep 24 13:20:34 2001
> +++ iostat/iostat.c	Mon Sep 24 13:19:01 2001
>  
> +	(const char *)namelist[X_TK_NIN].n_name = "_tk_nin";
> +	(const char *)namelist[X_TK_NOUT].n_name = "_tk_nout";
> +	(const char *)namelist[X_CP_TIME].n_name = "_cp_time";
> +	(const char *)namelist[X_BOOTTIME].n_name = "_boottime";
> +	namelist[4].n_name = NULL;
>
I don't like this.  We need to fix the "struct nlist" definition
in <nlist.h> instead.

> @@ -580,12 +580,12 @@
>  static void
>  phdr(int signo)
>  {
> -
> -	phdr_flag = 1;	
> +	if (signo == SIGCONT)
> +		phdr_flag = 1;	
>  }
>  
This is not something that qualifies like WARNS cleanup.

>  static int
>  readvar(kvm_t *kd, const char *name, int nlid, void *ptr, size_t len)
>  {
>  	if (kd != NULL) {
> -		ssize_t nbytes;
> +		size_t nbytes;
>  
>  		nbytes = kvm_read(kd, nlid, ptr, len);
>  
Why?  kvm_read(3) returns ``ssize_t''.


-- 
Ruslan Ermilov		Oracle Developer/DBA,
ru@sunbay.com		Sunbay Software AG,
ru@FreeBSD.org		FreeBSD committer,
+380.652.512.251	Simferopol, Ukraine

http://www.FreeBSD.org	The Power To Serve
http://www.oracle.com	Enabling The Information Age

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-audit" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010928105114.E30062>