library: remove getpartitions_num from library

getpartitions_num was only used in vmstat and basically counted
partitions in disks, this is now moved to vmstat.
This commit is contained in:
Craig Small
2015-07-01 22:14:30 +10:00
parent 161e06465b
commit 855a6a7055
4 changed files with 14 additions and 88 deletions

View File

@@ -12,9 +12,7 @@ global:
get_ns_name;
get_pid_digits;
get_slabinfo;
getbtime;
getdiskstat;
getpartitions_num;
getslabinfo;
look_up_our_self;
lookup_wchan;

View File

@@ -171,21 +171,6 @@ static void crash(const char *filename) {
}
///////////////////////////////////////////////////////////////////////
// based on Fabian Frederick's /proc/diskstats parser
unsigned int getpartitions_num(struct disk_stat *disks, int ndisks){
int i=0;
int partitions=0;
for (i=0;i<ndisks;i++){
partitions+=disks[i].partitions;
}
return partitions;
}
/////////////////////////////////////////////////////////////////////////////
static int is_disk(char *dev)
{

View File

@@ -41,7 +41,6 @@ typedef struct partition_stat{
unsigned long long requested_writes;
}partition_stat;
extern unsigned int getpartitions_num(struct disk_stat *disks, int ndisks);
extern unsigned int getdiskstat (struct disk_stat**,struct partition_stat**);
typedef struct slab_cache{