$NetBSD: patch-af,v 1.5 2004/04/26 11:54:15 markd Exp $

--- kcontrol/info/info_netbsd.cpp.orig	2003-01-21 02:17:16.000000000 +1300
+++ kcontrol/info/info_netbsd.cpp
@@ -272,7 +272,11 @@ bool GetInfo_Partitions (QListView *lbox
 	FILE *pipe = popen("/sbin/mount", "r");
 	QTextStream *t;
 	u_int64_t tsz, fsz;
+#ifdef ST_RDONLY
+	struct statvfs sfs;
+#else
 	struct statfs sfs;
+#endif
 	int ok;
 
 	if (!pipe) {
@@ -312,11 +316,19 @@ bool GetInfo_Partitions (QListView *lbox
 			flags = "";
 		}
 
+#ifdef ST_RDONLY
+		if (statvfs(mountpoint, &sfs) == 0) {
+			tsz = ((1LL * sfs.f_blocks * sfs.f_frsize / 1024) + 513)
+					/ 1024;
+			fsz = ((1LL * sfs.f_bfree * sfs.f_frsize / 1024) + 513)
+					/ 1024;
+#else
 		if (statfs(mountpoint, &sfs) == 0) {
 			tsz = ((1LL * sfs.f_blocks * sfs.f_bsize / 1024) + 513)
 					/ 1024;
 			fsz = ((1LL * sfs.f_bfree * sfs.f_bsize / 1024) + 513)
 					/ 1024;
+#endif
 			ok = 1;
 		} else {
 			tsz = fsz = 0;
