42 |
|
#define VALID_FS_TYPES {"ext2", "ext3", "xfs", "reiserfs", "vfat", "tmpfs"} |
43 |
|
#endif |
44 |
|
|
45 |
< |
#ifdef FREEBSD |
45 |
> |
#ifdef ALLBSD |
46 |
|
#include <sys/param.h> |
47 |
|
#include <sys/ucred.h> |
48 |
|
#include <sys/mount.h> |
49 |
+ |
#define VALID_FS_TYPES {"ufs", "mfs", "ffs"} |
50 |
+ |
#endif |
51 |
+ |
#ifdef FREEBSD |
52 |
|
#include <sys/dkstat.h> |
53 |
|
#include <devstat.h> |
51 |
– |
#define VALID_FS_TYPES {"ufs", "mfs"} |
54 |
|
#endif |
55 |
+ |
|
56 |
|
#define START_VAL 1 |
57 |
|
|
58 |
|
char *copy_string(char *orig_ptr, const char *newtext){ |
101 |
|
struct mntent *mp; |
102 |
|
struct statfs fs; |
103 |
|
#endif |
104 |
< |
#ifdef FREEBSD |
104 |
> |
#ifdef ALLBSD |
105 |
|
int nummnt; |
106 |
|
struct statfs *mp; |
107 |
|
#endif |
114 |
|
watermark=START_VAL; |
115 |
|
init_disk_stat(0, watermark-1, disk_stats); |
116 |
|
} |
117 |
< |
#ifdef FREEBSD |
117 |
> |
#ifdef ALLBSD |
118 |
|
nummnt=getmntinfo(&mp , MNT_LOCAL); |
119 |
|
if (nummnt<=0){ |
120 |
|
return NULL; |
178 |
|
} |
179 |
|
|
180 |
|
disk_ptr=disk_stats+num_disks; |
181 |
< |
#ifdef FREEBSD |
181 |
> |
#ifdef ALLBSD |
182 |
|
if((disk_ptr->device_name=copy_string(disk_ptr->device_name, mp->f_mntfromname))==NULL){ |
183 |
|
return NULL; |
184 |
|
} |
336 |
|
int n_selected, n_selections; |
337 |
|
long sel_gen; |
338 |
|
struct devstat *dev_ptr; |
339 |
+ |
#endif |
340 |
+ |
#ifdef NETBSD |
341 |
+ |
/* FIXME get_diskio_stats NYI on NetBSD. |
342 |
+ |
* See vmstat/dkstats.c in NetBSD source for examples. |
343 |
+ |
*/ |
344 |
|
#endif |
345 |
|
num_diskio=0; |
346 |
|
|