summaryrefslogtreecommitdiffstats
path: root/support/htcacheclean.c
diff options
context:
space:
mode:
authorColm MacCarthaigh <colm@apache.org>2005-08-26 19:54:18 +0200
committerColm MacCarthaigh <colm@apache.org>2005-08-26 19:54:18 +0200
commit42377545e23d899866ecc7fd9738fff22bc021e5 (patch)
tree43f0aa136545770a3e3fde8ddda6cf5d5381218b /support/htcacheclean.c
parentMove the "GracefulShutdownTimeout" directive into mpm_common, for re-use (diff)
downloadapache2-42377545e23d899866ecc7fd9738fff22bc021e5.tar.xz
apache2-42377545e23d899866ecc7fd9738fff22bc021e5.zip
Allow htcacheclean to deal in gigabytes.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@240297 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'support/htcacheclean.c')
-rw-r--r--support/htcacheclean.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/support/htcacheclean.c b/support/htcacheclean.c
index bfdba1c997..20c184ffa3 100644
--- a/support/htcacheclean.c
+++ b/support/htcacheclean.c
@@ -63,6 +63,7 @@
#define SECS_PER_MIN 60
#define KBYTE 1024
#define MBYTE 1048576
+#define GBYTE 1073741824
#define DIRINFO (APR_FINFO_MTIME|APR_FINFO_SIZE|APR_FINFO_TYPE|APR_FINFO_LINK)
@@ -874,6 +875,9 @@ int main(int argc, const char * const argv[])
else if ((*end == 'M' || *end == 'm') && !end[1]) {
max *= MBYTE;
}
+ else if ((*end == 'G' || *end == 'g') && !end[1]) {
+ max *= GBYTE;
+ }
else if (*end && /* neither empty nor [Bb] */
((*end != 'B' && *end != 'b') || end[1])) {
rv = APR_EGENERAL;