21 lines
562 B
Text
21 lines
562 B
Text
|
$NetBSD: patch-ah,v 1.3 2004/05/24 09:10:06 adam Exp $
|
||
|
|
||
|
--- vfu/vfucopy.cpp.orig 2004-05-24 10:52:29.000000000 +0000
|
||
|
+++ vfu/vfucopy.cpp
|
||
|
@@ -30,9 +30,15 @@ int ignore_copy_errors = 0; /* actually
|
||
|
fsize_t device_free_space( const char *target ) /* user free space, NOT real! */
|
||
|
{
|
||
|
char t[MAX_PATH];
|
||
|
+#ifdef _SYS_STATVFS_H_
|
||
|
+ struct statvfs stafs;
|
||
|
+ str_file_path( target, t );
|
||
|
+ statvfs( t, &stafs );
|
||
|
+#else
|
||
|
struct statfs stafs;
|
||
|
str_file_path( target, t );
|
||
|
statfs( t, &stafs );
|
||
|
+#endif
|
||
|
return ((fsize_t)(stafs.f_bsize)) * stafs.f_bfree;
|
||
|
};
|
||
|
|