Here is diff. I cam across the error: In function (for each function in iostat.c) multiple declaration (of the the functions)
I think everything is good enough. Still if someone can figure it out and tell me. - Pratyush. On Fri, Feb 25, 2011 at 11:21 AM, Pratyush Kshirsagar < [email protected]> wrote: > Hello, > I am porting the iostat from FreeBSD. > I have problem with the function devstat_compute_statistics() > Here is how its used in FreeBSD ans I tried the compute_stats() in > dragonfly but still need this equivalent to be correct > So, please give me the correct usage of compute_stats similar to > devstat_compute_statistics in the FreeBSD, here it is: > > if (devstat_compute_statistics > <http://fxr.googlebit.com/ident?i=devstat_compute_statistics>(&cur > <http://fxr.googlebit.com/ident?i=cur>.dinfo > <http://fxr.googlebit.com/ident?i=dinfo>->devices > <http://fxr.googlebit.com/ident?i=devices>[di > <http://fxr.googlebit.com/ident?i=di>], > &last <http://fxr.googlebit.com/ident?i=last>.dinfo > <http://fxr.googlebit.com/ident?i=dinfo>->devices > <http://fxr.googlebit.com/ident?i=devices>[di > <http://fxr.googlebit.com/ident?i=di>], busy_seconds, > DSM_KB_PER_TRANSFER, &kb_per_transfer, > DSM_TRANSFERS_PER_SECOND, &transfers_per_second, > DSM_MB_PER_SECOND, &mb_per_second, DSM_NONE) != 0) > errx <http://fxr.googlebit.com/ident?i=errx>(1, *"%s"*, > devstat_errbuf <http://fxr.googlebit.com/ident?i=devstat_errbuf>); > > > Also, is it OK if we call getnumdevs() without any arguments (its similar to > freebsd devstat_getdevs()). > > The FreeBSD uses: > > switch (devstat_getdevs > <http://fxr.googlebit.com/ident?i=devstat_getdevs>(NULL > <http://fxr.googlebit.com/ident?i=NULL>, &cur > <http://fxr.googlebit.com/ident?i=cur>)) { > case -1: > errx <http://fxr.googlebit.com/ident?i=errx>(1, *"%s"*, > devstat_errbuf <http://fxr.googlebit.com/ident?i=devstat_errbuf>); > break; > case 1: > cmdiostat > <http://fxr.googlebit.com/ident?i=cmdiostat>(*"refresh"*, NULL > <http://fxr.googlebit.com/ident?i=NULL>); > break; > default: > break; > } > > > I am still trying to remove some warnings and error. Will mail you if need > more help. > > > pratyush.kshirsagar (@ gmail.com) > > >
iostat_diff
Description: Binary data
