summaryrefslogtreecommitdiffstats
path: root/mbbsd
diff options
context:
space:
mode:
authorin2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2002-04-20 15:31:46 +0800
committerin2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2002-04-20 15:31:46 +0800
commit1b62f09c249ae8b59968e3927515da1ce52c705a (patch)
treecebf3c090d3f4e4e8c2e95359c726662d0d5ce00 /mbbsd
parent67afb777945003a7ca2bedd2c301a8a1f62fc589 (diff)
downloadpttbbs-1b62f09c249ae8b59968e3927515da1ce52c705a.tar
pttbbs-1b62f09c249ae8b59968e3927515da1ce52c705a.tar.gz
pttbbs-1b62f09c249ae8b59968e3927515da1ce52c705a.tar.bz2
pttbbs-1b62f09c249ae8b59968e3927515da1ce52c705a.tar.lz
pttbbs-1b62f09c249ae8b59968e3927515da1ce52c705a.tar.xz
pttbbs-1b62f09c249ae8b59968e3927515da1ce52c705a.tar.zst
pttbbs-1b62f09c249ae8b59968e3927515da1ce52c705a.zip
MDCACHEHITRATE
git-svn-id: http://opensvn.csie.org/pttbbs/pttbbs/trunk/pttbbs@125 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd')
-rw-r--r--mbbsd/cache.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/mbbsd/cache.c b/mbbsd/cache.c
index 94e8edfc..03092a2f 100644
--- a/mbbsd/cache.c
+++ b/mbbsd/cache.c
@@ -1,4 +1,4 @@
-/* $Id: cache.c,v 1.19 2002/04/19 12:10:09 in2 Exp $ */
+/* $Id: cache.c,v 1.20 2002/04/20 07:31:46 in2 Exp $ */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -1070,9 +1070,16 @@ int mdcacheopen(char *fpath)
char *cpath;
if( strncmp(fpath, "boards/", 7) && strncmp(fpath, "etc/", 4) )
return open(fpath, O_RDONLY);
-
+
+#ifdef MDCACHEHITRATE
+ ++GLOBE[0];
+#endif
if( (fd = open((cpath = cachepath(fpath)), O_RDONLY)) < 0 )
return updatemdcache(cpath, fpath);
+#ifdef MDCACHEHITRATE
+ else
+ ++GLOBE[1];
+#endif
return fd;
}