50 |
|
"ext3", "vxfs", "hfs", "hfsplus", "hpfs", "jffs", \ |
51 |
|
"jffs2", "minix", "msdos", "ntfs", "qnx4", "ramfs", \ |
52 |
|
"rootfs", "reiserfs", "sysv", "v7", "udf", "ufs", \ |
53 |
< |
"umsdos", "vfat", "xfs", "jfs"} |
53 |
> |
"umsdos", "vfat", "xfs", "jfs", "nfs"} |
54 |
|
#endif |
55 |
|
|
56 |
|
#ifdef CYGWIN |
66 |
|
#include <sys/dkstat.h> |
67 |
|
#include <devstat.h> |
68 |
|
#define VALID_FS_TYPES {"hpfs", "msdosfs", "ntfs", "udf", "ext2fs", \ |
69 |
< |
"ufs", "mfs"} |
69 |
> |
"ufs", "mfs", "nfs"} |
70 |
|
#endif |
71 |
|
#if defined(NETBSD) || defined(OPENBSD) |
72 |
|
#include <sys/param.h> |
73 |
|
#include <sys/sysctl.h> |
74 |
|
#include <sys/disk.h> |
75 |
|
#define VALID_FS_TYPES {"ffs", "mfs", "msdos", "lfs", "adosfs", "ext2fs", \ |
76 |
< |
"ntfs"} |
76 |
> |
"ntfs", "nfs"} |
77 |
|
#endif |
78 |
|
|
79 |
|
#ifdef HPUX |
106 |
|
const char *types[] = VALID_FS_TYPES; |
107 |
|
int i; |
108 |
|
|
109 |
< |
for (i = 0; i < (sizeof types / sizeof *types); i++) { |
109 |
> |
for (i = 0; i < (int) (sizeof types / sizeof *types); i++) { |
110 |
|
if (strcmp(types[i], type) == 0) { |
111 |
|
return 1; |
112 |
|
} |
144 |
|
#endif |
145 |
|
|
146 |
|
#ifdef ALLBSD |
147 |
< |
nummnt=getmntinfo(&mp , MNT_LOCAL); |
147 |
> |
nummnt=getmntinfo(&mp, MNT_WAIT); |
148 |
|
if (nummnt<=0){ |
149 |
|
sg_set_error_with_errno(SG_ERROR_GETMNTINFO, NULL); |
150 |
|
return NULL; |
392 |
|
} |
393 |
|
|
394 |
|
/* We can't seperate the reads from the writes, we'll |
395 |
< |
just give the same to each. */ |
396 |
< |
rbytes = wbytes = di->psd_dkwds / 2; |
395 |
> |
* just give the same to each. (This value is in |
396 |
> |
* 64-byte chunks according to the pstat header file, |
397 |
> |
* and can wrap to be negative.) |
398 |
> |
*/ |
399 |
> |
rbytes = wbytes = ((unsigned long) di->psd_dkwds) * 64LL; |
400 |
|
|
401 |
|
/* Skip unused disks. */ |
402 |
|
if (rbytes == 0 && wbytes == 0) { |
416 |
|
|
417 |
|
num_diskio++; |
418 |
|
|
419 |
+ |
/* FIXME This should use a static cache, like the Linux |
420 |
+ |
* code below. */ |
421 |
|
if (diskio_stats_ptr->disk_name == NULL) { |
422 |
|
dh = opendir("/dev/dsk"); |
423 |
|
if (dh == NULL) { |