503 |
|
|
504 |
|
if(diskio_stats_ptr->disk_name!=NULL) free(diskio_stats_ptr->disk_name); |
505 |
|
|
506 |
< |
diskio_stats_ptr->disk_name=strdup(ksp->ks_name); |
506 |
> |
diskio_stats_ptr->disk_name=strdup((char *) get_svr_from_bsd(ksp->ks_name)); |
507 |
|
diskio_stats_ptr->systime=time(NULL); |
508 |
|
num_diskio++; |
509 |
|
} |
575 |
|
|
576 |
|
n++; |
577 |
|
} |
578 |
+ |
|
579 |
+ |
if(f != NULL) fclose(f); |
580 |
+ |
|
581 |
+ |
/* This code relies on /proc/partions existing, and it all being malloc'ed above. |
582 |
|
|
583 |
|
if (!has_pp_stats) { |
584 |
|
/* This is an older kernel without stats in /proc/partitions. |