$NetBSD: patch-cg,v 1.3 2013/04/11 19:57:52 joerg Exp $ --- xenstat/xentop/xentop.c.orig 2008-04-25 13:03:12.000000000 +0000 +++ xenstat/xentop/xentop.c @@ -18,7 +18,8 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include +#include +#define vw_printw vwprintw #include #include #include @@ -28,7 +29,11 @@ #include #include #include +#ifndef __NetBSD__ #include +#else +#include +#endif #include @@ -251,7 +256,7 @@ static void fail(const char *str) { if(cwin != NULL && !isendwin()) endwin(); - fprintf(stderr, str); + fprintf(stderr, "%s", str); exit(1); } @@ -752,10 +757,11 @@ void do_summary(void) unsigned i, num_domains = 0; unsigned long long used = 0; xenstat_domain *domain; + time_t curt; /* Print program name, current time, and number of domains */ - strftime(time_str, TIME_STR_LEN, TIME_STR_FORMAT, - localtime(&curtime.tv_sec)); + curt = curtime.tv_sec; + strftime(time_str, TIME_STR_LEN, TIME_STR_FORMAT, localtime(&curt)); num_domains = xenstat_node_num_domains(cur_node); ver_str = xenstat_node_xen_version(cur_node); print("xentop - %s Xen %s\n", time_str, ver_str); @@ -921,6 +927,7 @@ void do_network(xenstat_domain *domain) /* Output all VBD information */ void do_vbd(xenstat_domain *domain) { +#ifdef notyet int i = 0; xenstat_vbd *vbd; unsigned num_vbds = 0; @@ -952,6 +959,7 @@ void do_vbd(xenstat_domain *domain) xenstat_vbd_rd_reqs(vbd), xenstat_vbd_wr_reqs(vbd)); } +#endif } static void top(void)