summaryrefslogtreecommitdiff
path: root/misc/vfu/patches/patch-ac
blob: 602a454c978a988c01772cdfc9ed953cbcf2d415 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
$NetBSD: patch-ac,v 1.10 2004/05/24 09:10:06 adam Exp $

--- vfu/vfu.cpp.orig	2002-05-24 16:55:36.000000000 +0000
+++ vfu/vfu.cpp
@@ -9,6 +9,7 @@
  *
  */
 
+#include <stdarg.h>
 #include "vfu.h"
 #include "vfuopt.h"
 #include "vfufiles.h"
@@ -485,8 +486,6 @@ void vfu_help()
   mb.push( "        1. $HOME/$RC_PREFIX/vfu/vfu.conf");
   mb.push( "        2. $HOME/.vfu/vfu.conf");
   mb.push( "        3. " FILENAME_CONF_GLOBAL0 );
-  mb.push( "        4. " FILENAME_CONF_GLOBAL1 );
-  mb.push( "        5. " FILENAME_CONF_GLOBAL2 );
   mb.push( "" );
   vfu_menu_box( 1, 4, "VFU Help ( PageUp/PageDown to scroll )" );
   mb.zap();
@@ -604,10 +603,6 @@ void vfu_init()
     { /* cannot find local/user conf file, try globals */
     if ( access( FILENAME_CONF_GLOBAL0, R_OK ) == 0 ) 
       filename_conf = FILENAME_CONF_GLOBAL0;
-    if ( access( FILENAME_CONF_GLOBAL1, R_OK ) == 0 ) 
-      filename_conf = FILENAME_CONF_GLOBAL1;
-    if ( access( FILENAME_CONF_GLOBAL2, R_OK ) == 0 ) 
-      filename_conf = FILENAME_CONF_GLOBAL2;
     /* if we get here then no readable conf file found */   
     }
   
@@ -1157,8 +1152,13 @@ void update_status()
     files_size += s;  
     }  
   /* current fs statistics */  
+#ifdef _SYS_STATVFS_H_
+  struct statvfs stafs;
+  statvfs( ".", &stafs );
+#else
   struct statfs stafs;
   statfs( ".", &stafs );
+#endif
   fs_free  = (fsize_t)(stafs.f_bsize) * (opt.show_user_free?stafs.f_bavail:stafs.f_bfree);
   fs_total = (fsize_t)(stafs.f_bsize) * stafs.f_blocks;
   fs_block_size = (fsize_t)(stafs.f_bsize);
@@ -2391,8 +2391,13 @@ void vfu_jump_to_mountpoint( int all )
     str_word( str, " \t", t ); /* get mount point */
     va.set( z, t ); /* replace line with mount point only */
 
+#ifdef _SYS_STATVFS_H_
+    struct statvfs stafs;
+    statvfs( t, &stafs );
+#else
     struct statfs stafs;
     statfs( t, &stafs );
+#endif
     int hk = ('A'+ z); /* hot key */
     #ifdef _TARGET_GO32_
     if (toupper(t[0]) >= 'A' && toupper(t[0]) <= 'Z' && toupper(t[1]) == ':')