Diskstat fix for FreeBSD
This commit is contained in:
parent
8fa71f10a1
commit
dd62eda1b4
@ -101,7 +101,9 @@ char *get_diskstat()
|
|||||||
mntsize = getmntinfo(&mntbuf, MNT_NOWAIT);
|
mntsize = getmntinfo(&mntbuf, MNT_NOWAIT);
|
||||||
|
|
||||||
for (i = 0; i < mntsize; i++) {
|
for (i = 0; i < mntsize; i++) {
|
||||||
if ((strncmp(mntbuf[i].f_fstypename, (char *)"kernfs", 6)) && (statfs(mntbuf[i].f_mntonname, &sfs) == 0)) {
|
if ((strncmp(mntbuf[i].f_fstypename, (char *)"kernfs", 6)) &&
|
||||||
|
(strncmp(mntbuf[i].f_fstypename, (char *)"procfs", 6)) &&
|
||||||
|
(statfs(mntbuf[i].f_mntonname, &sfs) == 0)) {
|
||||||
if (tmp == NULL)
|
if (tmp == NULL)
|
||||||
tmp = xstrcpy((char *)",");
|
tmp = xstrcpy((char *)",");
|
||||||
else
|
else
|
||||||
|
Reference in New Issue
Block a user